Cleanup: use "_Runtime" suffix for DNA
authorCampbell Barton <ideasman42@gmail.com>
Mon, 11 Feb 2019 05:48:42 +0000 (16:48 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 11 Feb 2019 05:50:23 +0000 (16:50 +1100)
Was done everywhere except bPoseChannel.

source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/armature.c
source/blender/makesdna/DNA_action_types.h

index 5eb469d..be77377 100644 (file)
@@ -794,7 +794,7 @@ void BKE_pose_channel_free_ex(bPoseChannel *pchan, bool do_id_user)
 /** Deallocates runtime cache of a pose channel's B-Bone shape. */
 void BKE_pose_channel_free_bbone_cache(bPoseChannel *pchan)
 {
-       bPoseChannelRuntime *runtime = &pchan->runtime;
+       bPoseChannel_Runtime *runtime = &pchan->runtime;
 
        runtime->bbone_segments = 0;
        MEM_SAFE_FREE(runtime->bbone_rest_mats);
index aca29c0..99474ce 100644 (file)
@@ -836,7 +836,7 @@ typedef struct ObjectBBoneDeform {
 
 static void allocate_bbone_cache(bPoseChannel *pchan, int segments)
 {
-       bPoseChannelRuntime *runtime = &pchan->runtime;
+       bPoseChannel_Runtime *runtime = &pchan->runtime;
 
        if (runtime->bbone_segments != segments) {
                if (runtime->bbone_segments != 0) {
@@ -844,17 +844,17 @@ static void allocate_bbone_cache(bPoseChannel *pchan, int segments)
                }
 
                runtime->bbone_segments = segments;
-               runtime->bbone_rest_mats = MEM_malloc_arrayN(sizeof(Mat4), (uint)segments, "bPoseChannelRuntime::bbone_rest_mats");
-               runtime->bbone_pose_mats = MEM_malloc_arrayN(sizeof(Mat4), (uint)segments, "bPoseChannelRuntime::bbone_pose_mats");
-               runtime->bbone_deform_mats = MEM_malloc_arrayN(sizeof(Mat4), 1 + (uint)segments, "bPoseChannelRuntime::bbone_deform_mats");
-               runtime->bbone_dual_quats = MEM_malloc_arrayN(sizeof(DualQuat), (uint)segments, "bPoseChannelRuntime::bbone_dual_quats");
+               runtime->bbone_rest_mats = MEM_malloc_arrayN(sizeof(Mat4), (uint)segments, "bPoseChannel_Runtime::bbone_rest_mats");
+               runtime->bbone_pose_mats = MEM_malloc_arrayN(sizeof(Mat4), (uint)segments, "bPoseChannel_Runtime::bbone_pose_mats");
+               runtime->bbone_deform_mats = MEM_malloc_arrayN(sizeof(Mat4), 1 + (uint)segments, "bPoseChannel_Runtime::bbone_deform_mats");
+               runtime->bbone_dual_quats = MEM_malloc_arrayN(sizeof(DualQuat), (uint)segments, "bPoseChannel_Runtime::bbone_dual_quats");
        }
 }
 
 /** Compute and cache the B-Bone shape in the channel runtime struct. */
 void BKE_pchan_bbone_segments_cache_compute(bPoseChannel *pchan)
 {
-       bPoseChannelRuntime *runtime = &pchan->runtime;
+       bPoseChannel_Runtime *runtime = &pchan->runtime;
        Bone *bone = pchan->bone;
        int segments = bone->segments;
 
@@ -897,8 +897,8 @@ void BKE_pchan_bbone_segments_cache_compute(bPoseChannel *pchan)
 /** Copy cached B-Bone segments from one channel to another */
 void BKE_pchan_bbone_segments_cache_copy(bPoseChannel *pchan, bPoseChannel *pchan_from)
 {
-       bPoseChannelRuntime *runtime = &pchan->runtime;
-       bPoseChannelRuntime *runtime_from = &pchan_from->runtime;
+       bPoseChannel_Runtime *runtime = &pchan->runtime;
+       bPoseChannel_Runtime *runtime_from = &pchan_from->runtime;
        int segments = runtime_from->bbone_segments;
 
        if (segments <= 1) {
index a9447ef..63010bc 100644 (file)
@@ -182,7 +182,7 @@ typedef struct bPoseChannelDrawData {
 struct DualQuat;
 struct Mat4;
 
-typedef struct bPoseChannelRuntime {
+typedef struct bPoseChannel_Runtime {
        int bbone_segments;
        char pad[4];
 
@@ -193,7 +193,7 @@ typedef struct bPoseChannelRuntime {
        /* Delta from rest to pose in matrix and DualQuat form. */
        struct Mat4 *bbone_deform_mats;
        struct DualQuat *bbone_dual_quats;
-} bPoseChannelRuntime;
+} bPoseChannel_Runtime;
 
 /* ************************************************ */
 /* Poses */
@@ -330,8 +330,8 @@ typedef struct bPoseChannel {
        /** Points to an original pose channel. */
        struct bPoseChannel *orig_pchan;
 
-       /** Runtime data. */
-       struct bPoseChannelRuntime runtime;
+       /** Runtime data (keep last). */
+       struct bPoseChannel_Runtime runtime;
 } bPoseChannel;