[Bf-blender-cvs] [827818d37dd] blender2.8: Rename bPoseChannel's temp/cache pointer for DrawManager to draw_data.

Bastien Montagne noreply at git.blender.org
Wed May 3 16:21:22 CEST 2017


Commit: 827818d37dd2c9caf16ddc2c2b8d9415d6afc3b9
Author: Bastien Montagne
Date:   Wed May 3 16:10:25 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB827818d37dd2c9caf16ddc2c2b8d9415d6afc3b9

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'! ;)

===================================================================

M	source/blender/blenkernel/intern/action.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/draw/intern/draw_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 44ee9aa7bf1..9889ebc56ef 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -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)
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4cb0595dde9..7567fce3778 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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) {
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c
index 5eca979341c..36aabdf7735 100644
--- a/source/blender/draw/intern/draw_armature.c
+++ b/source/blender/draw/intern/draw_armature.c
@@ -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++) {
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 51d6b000739..d4fd54ce7ad 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -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;




More information about the Bf-blender-cvs mailing list