Files
blender/release/ui/buttons_data_bone.py
Joshua Leung d7e06a6d91 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.
2009-06-13 11:52:33 +00:00

55 lines
1.3 KiB
Python

import bpy
class BoneButtonsPanel(bpy.types.Panel):
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
__context__ = "bone"
def poll(self, context):
return (context.bone != None)
class BONE_PT_bone(BoneButtonsPanel):
__idname__ = "BONE_PT_bone"
__label__ = "Bone"
def draw(self, context):
bone = context.bone
layout = self.layout
split = layout.split()
sub = split.column()
sub.itemR(bone, "name")
sub.itemR(bone, "parent")
sub.itemR(bone, "connected")
sub.itemR(bone, "deform")
sub.itemL(text="Inherit:")
sub.itemR(bone, "hinge")
sub.itemR(bone, "inherit_scale")
sub.itemL(text="Envelope:")
sub.itemR(bone, "envelope_distance", text="Distance")
sub.itemR(bone, "envelope_weight", text="Weight")
sub.itemR(bone, "multiply_vertexgroup_with_envelope", text="Multiply")
sub = split.column()
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)")
sub.itemR(bone, "pose_channel_hidden", text="Hide (PoseMode)")
sub.itemL(text="Curved Bones:")
sub.itemR(bone, "bbone_segments", text="Segments")
sub.itemR(bone, "bbone_in", text="Ease In")
sub.itemR(bone, "bbone_out", text="Ease Out")
sub.itemR(bone, "cyclic_offset")
bpy.types.register(BONE_PT_bone)