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.
This commit is contained in:
Joshua Leung
2009-06-13 11:52:33 +00:00
parent cd3c52db03
commit d7e06a6d91
2 changed files with 6 additions and 1 deletions

View File

@@ -35,7 +35,9 @@ class BONE_PT_bone(BoneButtonsPanel):
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)")

View File

@@ -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 @@ void rna_def_armature(BlenderRNA *brna)
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);