Rename bPoseChannel's temp/cache pointer for DrawManager to draw_data.
More generic name, this remains a temp solution anyway, until we have proper handling of temp data from 'magic DEG'! ;)
This commit is contained in:
parent
6824ee0595
commit
827818d37d
|
@ -580,7 +580,7 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, const bool copy_constraints)
|
|||
pchan->prop = IDP_CopyProperty(pchan->prop);
|
||||
}
|
||||
|
||||
pchan->bbone_matrices = NULL; /* Drawing cache of bbone matrices, no need to copy. */
|
||||
pchan->draw_data = NULL; /* Drawing cache of bbone matrices, no need to copy. */
|
||||
}
|
||||
|
||||
/* for now, duplicate Bone Groups too when doing this */
|
||||
|
@ -771,7 +771,7 @@ void BKE_pose_channel_free_ex(bPoseChannel *pchan, bool do_id_user)
|
|||
}
|
||||
|
||||
/* Cached bbone matrices, for new draw manager rendering code. */
|
||||
MEM_SAFE_FREE(pchan->bbone_matrices);
|
||||
MEM_SAFE_FREE(pchan->draw_data);
|
||||
}
|
||||
|
||||
void BKE_pose_channel_free(bPoseChannel *pchan)
|
||||
|
|
|
@ -5065,7 +5065,7 @@ static void direct_link_pose(FileData *fd, bPose *pose)
|
|||
/* in case this value changes in future, clamp else we get undefined behavior */
|
||||
CLAMP(pchan->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
|
||||
|
||||
pchan->bbone_matrices = NULL;
|
||||
pchan->draw_data = NULL;
|
||||
}
|
||||
pose->ikdata = NULL;
|
||||
if (pose->ikparam != NULL) {
|
||||
|
|
|
@ -771,10 +771,10 @@ static void draw_bone_update_disp_matrix_bbone(EditBone *eBone, bPoseChannel *pc
|
|||
/* Note that we need this even for one-segment bones, because box drawing need specific weirdo matrix for the box,
|
||||
* that we cannot use to draw end points & co. */
|
||||
if (pchan) {
|
||||
Mat4 *bbones_mat = pchan->bbone_matrices;
|
||||
Mat4 *bbones_mat = pchan->draw_data;
|
||||
if (bbones_mat == NULL) {
|
||||
/* We just allocate max allowed segcount, we can always refine this later if really needed. */
|
||||
bbones_mat = pchan->bbone_matrices = MEM_mallocN(sizeof(*bbones_mat) * MAX_BBONE_SUBDIV, __func__);
|
||||
bbones_mat = pchan->draw_data = MEM_mallocN(sizeof(*bbones_mat) * MAX_BBONE_SUBDIV, __func__);
|
||||
}
|
||||
|
||||
if (bbone_segments > 1) {
|
||||
|
@ -957,7 +957,7 @@ static void draw_bone_wire(
|
|||
}
|
||||
|
||||
if (pchan) {
|
||||
Mat4 *bbones_mat = pchan->bbone_matrices;
|
||||
Mat4 *bbones_mat = pchan->draw_data;
|
||||
BLI_assert(bbones_mat != NULL);
|
||||
|
||||
for (int i = pchan->bone->segments; i--; bbones_mat++) {
|
||||
|
@ -992,7 +992,7 @@ static void draw_bone_box(
|
|||
}
|
||||
|
||||
if (pchan) {
|
||||
Mat4 *bbones_mat = pchan->bbone_matrices;
|
||||
Mat4 *bbones_mat = pchan->draw_data;
|
||||
BLI_assert(bbones_mat != NULL);
|
||||
|
||||
for (int i = pchan->bone->segments; i--; bbones_mat++) {
|
||||
|
|
|
@ -265,7 +265,7 @@ typedef struct bPoseChannel {
|
|||
float disp_wire_color[4];
|
||||
|
||||
void *temp; /* use for outliner */
|
||||
void *bbone_matrices; /* Used to cache each bbone's segment matrix. */
|
||||
void *draw_data; /* Used to cache each bbone's segment matrix. */
|
||||
} bPoseChannel;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue