[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34271] trunk/blender/source/blender: Patch [#24808] B-Bone display size

Joshua Leung aligorith at gmail.com
Wed Jan 12 02:36:13 CET 2011


Revision: 34271
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34271
Author:   aligorith
Date:     2011-01-12 01:36:12 +0000 (Wed, 12 Jan 2011)
Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/nla.c
    trunk/blender/source/blender/makesrna/intern/rna_armature.c

Modified: trunk/blender/source/blender/blenkernel/intern/nla.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/nla.c	2011-01-12 01:17:13 UTC (rev 34270)
+++ trunk/blender/source/blender/blenkernel/intern/nla.c	2011-01-12 01:36:12 UTC (rev 34271)
@@ -1210,13 +1210,13 @@
 	}
 }
 
+/* Sanity Validation ------------------------------------ */
+
 static int nla_editbone_name_check(void *arg, const char *name)
 {
 	return BLI_ghash_haskey((GHash *)arg, (void *)name);
 }
 
-/* Sanity Validation ------------------------------------ */
-
 /* Find (and set) a unique name for a strip from the whole AnimData block 
  * Uses a similar method to the BLI method, but is implemented differently
  * as we need to ensure that the name is unique over several lists of tracks,

Modified: trunk/blender/source/blender/makesrna/intern/rna_armature.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_armature.c	2011-01-12 01:17:13 UTC (rev 34270)
+++ trunk/blender/source/blender/makesrna/intern/rna_armature.c	2011-01-12 01:36:12 UTC (rev 34271)
@@ -517,6 +517,18 @@
 	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...)




More information about the Bf-blender-cvs mailing list