Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-04-01 00:39:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-01 00:39:08 +0400
commitc19725b2667cfcec64135901ccb40b3c9ec37e00 (patch)
treead97abf53127e70559bc21f0696a91b65f7c0fe7 /source/blender/makesrna/intern/rna_pose.c
parent3c6a0274b94709e4b9767de5054c8a5402a97db3 (diff)
svn merge https://svn.blender.org/svnroot/bf-blender/branches/render25 -r27895:27901; svn merge https://svn.blender.org/svnroot/bf-blender/branches/render25 -r27902:27907, skipping 27902
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r--source/blender/makesrna/intern/rna_pose.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index ff67597a78b..39694b5b64a 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -531,6 +531,18 @@ PointerRNA rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key)
return rptr;
}
+static void rna_PoseChannel_matrix_local_get(PointerRNA *ptr, float *values)
+{
+ bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ pchan_to_mat4(pchan, (float (*)[4])values);
+}
+
+static void rna_PoseChannel_matrix_local_set(PointerRNA *ptr, const float *values)
+{
+ bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ pchan_apply_mat4(pchan, (float (*)[4])values);
+}
+
#else
static void rna_def_bone_group(BlenderRNA *brna)
@@ -764,12 +776,17 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* transform matrices - should be read-only since these are set directly by AnimSys evaluation */
- prop= RNA_def_property(srna, "channel_matrix", PROP_FLOAT, PROP_MATRIX);
+ prop= RNA_def_property(srna, "matrix_channel", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "chan_mat");
RNA_def_property_array(prop, 16);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints");
-
+
+ prop= RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX);
+ RNA_def_property_array(prop, 16);
+ RNA_def_property_ui_text(prop, "Local Matrix", "Matrix representing the parent relative location, scale and rotation. Provides an alternative access to these properties.");
+ RNA_def_property_float_funcs(prop, "rna_PoseChannel_matrix_local_get", "rna_PoseChannel_matrix_local_set", NULL);
+
prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "pose_mat");
RNA_def_property_array(prop, 16);