[Bf-blender-cvs] [e2152169580] master: Cleanup: use "_Runtime" suffix for DNA
Campbell Barton
noreply at git.blender.org
Mon Feb 11 07:00:06 CET 2019
Commit: e215216958093790b0377d42567fd42c94942bef
Author: Campbell Barton
Date: Mon Feb 11 16:48:42 2019 +1100
Branches: master
https://developer.blender.org/rBe215216958093790b0377d42567fd42c94942bef
Cleanup: use "_Runtime" suffix for DNA
Was done everywhere except bPoseChannel.
===================================================================
M source/blender/blenkernel/intern/action.c
M source/blender/blenkernel/intern/armature.c
M source/blender/makesdna/DNA_action_types.h
===================================================================
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 5eb469d4b98..be77377e88e 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -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);
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index aca29c0349a..99474ce9bae 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -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) {
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index a9447efb19d..63010bcc27f 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -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;
More information about the Bf-blender-cvs
mailing list