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:
authorSebastian Parborg <darkdefende@gmail.com>2019-05-09 12:19:38 +0300
committerSebastian Parborg <darkdefende@gmail.com>2019-05-09 12:21:34 +0300
commit5ab57f7ba41dff3d4554d1cb47db2b2868efe710 (patch)
tree84fefd90ab7b498fc1542eebc2f009ca8986f42d /source/blender/makesrna/intern/rna_pose.c
parentffb3226d276fd0af584431bc86ab25fa79c44a37 (diff)
Move out pose edit options into the pose data
Move pose edit mode booleans out of the armature data into the pose data Reviewed By: Brecht Differential Revision: http://developer.blender.org/D4832
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r--source/blender/makesrna/intern/rna_pose.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 1b4a7efbdd8..7babbbdc8c7 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -122,6 +122,11 @@ static void rna_Pose_IK_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
BIK_clear_data(ob->pose);
}
+static char *rna_Pose_path(PointerRNA *UNUSED(ptr))
+{
+ return BLI_strdup("pose");
+}
+
static char *rna_PoseBone_path(PointerRNA *ptr)
{
bPoseChannel *pchan = ptr->data;
@@ -1551,6 +1556,31 @@ static void rna_def_pose(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "IK Param", "Parameters for IK solver");
+ /* pose edit options */
+ prop = RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", POSE_MIRROR_EDIT);
+ RNA_def_property_ui_text(
+ prop, "X-Axis Mirror", "Apply changes to matching bone on opposite side of X-Axis");
+ RNA_def_struct_path_func(srna, "rna_Pose_path");
+ RNA_def_property_update(prop, 0, "rna_Pose_update");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
+
+ prop = RNA_def_property(srna, "use_mirror_relative", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", POSE_MIRROR_RELATIVE);
+ RNA_def_property_ui_text(
+ prop, "Relative Mirror", "Apply relative transformations in X-mirror mode");
+ RNA_def_struct_path_func(srna, "rna_Pose_path");
+ RNA_def_property_update(prop, 0, "rna_Pose_update");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
+
+ prop = RNA_def_property(srna, "use_auto_ik", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", POSE_AUTO_IK);
+ RNA_def_property_ui_text(
+ prop, "Auto IK", "Add temporary IK constraints while grabbing bones in Pose Mode");
+ RNA_def_struct_path_func(srna, "rna_Pose_path");
+ RNA_def_property_update(prop, 0, "rna_Pose_update");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
+
/* animviz */
rna_def_animviz_common(srna);