From bbdf47aa0bd964be143ae03fb488ce13fa2228bd Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 12 Jan 2011 01:36:12 +0000 Subject: Patch [#24808] B-Bone display size Submitted by Dan Eicher (dna) Adds the ability to resize b-bones (ctrl+alt+S) using the python api Bone.bbone_x Bone.bbone_z --- source/blender/makesrna/intern/rna_armature.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/blender/makesrna/intern/rna_armature.c') diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 40755e0dfd1..61f6176fb25 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -517,6 +517,18 @@ static void rna_def_bone_common(StructRNA *srna, int editbone) RNA_def_property_range(prop, 0.0f, 2.0f); RNA_def_property_ui_text(prop, "B-Bone Ease Out", "Length of second Bezier Handle (for B-Bones only)"); RNA_def_property_update(prop, 0, "rna_Armature_update_data"); + + prop= RNA_def_property(srna, "bbone_x", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "xwidth"); + RNA_def_property_range(prop, 0.0f, 1000.0f); + RNA_def_property_ui_text(prop, "B-Bone Display X Width", "B-Bone X size"); + RNA_def_property_update(prop, 0, "rna_Armature_update_data"); + + prop= RNA_def_property(srna, "bbone_z", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "zwidth"); + RNA_def_property_range(prop, 0.0f, 1000.0f); + RNA_def_property_ui_text(prop, "B-Bone Display Z Width", "B-Bone Z size"); + RNA_def_property_update(prop, 0, "rna_Armature_update_data"); } // err... bones should not be directly edited (only editbones should be...) -- cgit v1.2.3