diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-09-21 16:49:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-09-21 16:57:08 +0300 |
commit | 84b074baedd9d472ff2f52759b15f119de4f69c2 (patch) | |
tree | 21b4b9c5f1dbb56c47a5cab796207526e2eaaee8 /source/blender/makesrna/intern/rna_pose.c | |
parent | 0dbde559cfff511e75ab44e2c3d7efe8321dc309 (diff) |
Armature drawing: custom shape scale options
- Custom scale:
Avoids having multiple custom-shapes at different sizes.
- Option not to use bones length:
So changes in edit-mode don't resize the custom-shape.
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index e65023132c9..27ff0a63e75 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -1062,6 +1062,17 @@ static void rna_def_pose_channel(BlenderRNA *brna) RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); + prop = RNA_def_property(srna, "custom_shape_scale", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "custom_scale"); + RNA_def_property_range(prop, 0.0f, 1000.0f); + RNA_def_property_ui_text(prop, "Custom Shape Scale", "Adjust the size of the custom shape"); + RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); + + prop = RNA_def_property(srna, "use_custom_shape_bone_size", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", PCHAN_DRAW_NO_CUSTOM_BONE_SIZE); + RNA_def_property_ui_text(prop, "Use Bone Size", "Scale the custom object by the bone length"); + RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); + prop = RNA_def_property(srna, "custom_shape_transform", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "custom_tx"); RNA_def_property_struct_type(prop, "PoseBone"); |