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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r--source/blender/makesrna/intern/rna_pose.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index f7964ba52ef..5aad710c712 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -41,12 +41,25 @@
#include "BKE_context.h"
#include "BKE_depsgraph.h"
+#include "BKE_idprop.h"
static void rna_Pose_update(bContext *C, PointerRNA *ptr)
{
DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
+IDProperty *rna_PoseChannel_idproperties(PointerRNA *ptr, int create)
+{
+ bPoseChannel *pchan= ptr->data;
+
+ if(create && !pchan->prop) {
+ IDPropertyTemplate val = {0};
+ pchan->prop= IDP_New(IDP_GROUP, val, "RNA_PoseChannel group");
+ }
+
+ return pchan->prop;
+}
+
#else
/* users shouldn't be editing pose channel data directly -- better to set ipos and let blender calc pose_channel stuff */
@@ -66,6 +79,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
srna= RNA_def_struct(brna, "PoseChannel", NULL);
RNA_def_struct_sdna(srna, "bPoseChannel");
RNA_def_struct_ui_text(srna, "Pose Channel", "Channel defining pose data for a bone in a Pose.");
+ RNA_def_struct_idproperties_func(srna, "rna_PoseChannel_idproperties");
prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "constraints", NULL);