[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20852] branches/blender2.5/blender: 2. 5 - Armature/Bone Tweaks

Joshua Leung aligorith at gmail.com
Sat Jun 13 13:52:33 CEST 2009


Revision: 20852
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20852
Author:   aligorith
Date:     2009-06-13 13:52:33 +0200 (Sat, 13 Jun 2009)

Log Message:
-----------
2.5 - Armature/Bone Tweaks

- Changing visible layers for armatures now sends notifiers
- Made the bone buttons show the layers data 

TODO:
I also tried making the bone buttons show for 'PoseChannels' instead of the raw bones since this is more correct for most editing that can be done (i.e. when posing). For editmode though, we'd need to wrap EditBones in some way? However, I couldn't seem to get this to work due to the way paths are resolved.

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data_bone.py
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_armature.c

Modified: branches/blender2.5/blender/release/ui/buttons_data_bone.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_bone.py	2009-06-13 11:28:29 UTC (rev 20851)
+++ branches/blender2.5/blender/release/ui/buttons_data_bone.py	2009-06-13 11:52:33 UTC (rev 20852)
@@ -35,7 +35,9 @@
 		sub.itemR(bone, "multiply_vertexgroup_with_envelope", text="Multiply")
 
 		sub = split.column()
-		#sub.itemR(bone, "layer")
+		sub.itemL(text="Layers:")
+		sub.template_layers(bone, "layer")
+		
 		sub.itemL(text="Display:")
 		sub.itemR(bone, "draw_wire", text="Wireframe")
 		sub.itemR(bone, "editmode_hidden", text="Hide (EditMode)")

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_armature.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_armature.c	2009-06-13 11:28:29 UTC (rev 20851)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_armature.c	2009-06-13 11:52:33 UTC (rev 20852)
@@ -32,6 +32,8 @@
 #include "DNA_armature_types.h"
 #include "DNA_scene_types.h"
 
+#include "WM_types.h"
+
 #ifdef RNA_RUNTIME
 
 static void rna_Bone_layer_set(PointerRNA *ptr, const int *values)
@@ -294,6 +296,7 @@
 	RNA_def_property_array(prop, 16);
 	RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility.");
 	RNA_def_property_boolean_funcs(prop, NULL, "rna_Armature_layer_set");
+	RNA_def_property_update(prop, NC_OBJECT|ND_POSE, NULL);
 	
 		/* layer protection */
 	prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_NONE);





More information about the Bf-blender-cvs mailing list