diff options
author | Thomas Dinges <blender@dingto.org> | 2009-05-19 19:38:36 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-05-19 19:38:36 +0400 |
commit | 2a055ca728820146355a79c49f18c3a4d681faac (patch) | |
tree | ffb15c3782e87c1ca883a1db3490e6bf497c17ae /release/ui/buttons_data_armature.py | |
parent | 1b6bfa6b8a6d7af8819adefa646364b91a81961b (diff) |
2.5:
* Added new modifier tab.
* Fixed problems when no object was selected after delete.
* Added initial Armature, Bone, Curve and Font panels, by William Reynish (Billrey). Thanks!
* Small RNA changes
* Commit revision 20240 and 20268 from trunk. ("Mouse wheel zoom lost after rendering.")
Diffstat (limited to 'release/ui/buttons_data_armature.py')
-rw-r--r-- | release/ui/buttons_data_armature.py | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/release/ui/buttons_data_armature.py b/release/ui/buttons_data_armature.py new file mode 100644 index 00000000000..f8cf595ea37 --- /dev/null +++ b/release/ui/buttons_data_armature.py @@ -0,0 +1,122 @@ + +import bpy + +class DataButtonsPanel(bpy.types.Panel): + __space_type__ = "BUTTONS_WINDOW" + __region_type__ = "WINDOW" + __context__ = "data" + + def poll(self, context): + ob = context.active_object + return (ob and ob.type == 'ARMATURE') + +class DATA_PT_skeleton(DataButtonsPanel): + __idname__ = "DATA_PT_skeleton" + __label__ = "Skeleton" + + def draw(self, context): + arm = context.main.armatures[0] + layout = self.layout + + row = layout.row() + row.itemR(arm, "rest_position") + + split = layout.split() + + sub = split.column() + + sub.itemL(text="Deform:") + sub.itemR(arm, "deform_vertexgroups", text="Vertes Groups") + sub.itemR(arm, "deform_envelope", text="Envelopes") + sub.itemR(arm, "deform_quaternion", text="Quaternion") + sub.itemR(arm, "deform_bbone_rest", text="B-Bones Rest") + #sub.itemR(arm, "x_axis_mirror") + #sub.itemR(arm, "auto_ik") + + sub = split.column() + sub.itemL(text="Layers:") + sub.itemL(text="LAYERS") + #sub.itemR(arm, "layer") + #sub.itemR(arm, "layer_protection") + + +class DATA_PT_display(DataButtonsPanel): + __idname__ = "DATA_PT_display" + __label__ = "Display" + + def draw(self, context): + arm = context.main.armatures[0] + layout = self.layout + + split = layout.split() + + sub = split.column() + sub.itemR(arm, "drawtype", text="Style") + sub.itemR(arm, "delay_deform", text="Delay Refresh") + + sub = split.column() + sub.itemR(arm, "draw_names", text="Names") + sub.itemR(arm, "draw_axes", text="Axes") + sub.itemR(arm, "draw_custom_bone_shapes", text="Shapes") + sub.itemR(arm, "draw_group_colors", text="Colors") + + +class DATA_PT_paths(DataButtonsPanel): + __idname__ = "DATA_PT_paths" + __label__ = "Paths" + + def draw(self, context): + arm = context.main.armatures[0] + layout = self.layout + + split = layout.split() + + sub = split.column() + + sub.itemR(arm, "paths_show_around_current_frame", text="Around Frame") + if (arm.paths_show_around_current_frame): + sub.itemR(arm, "path_before_current", text="Before") + sub.itemR(arm, "path_after_current", text="After") + else: + sub.itemR(arm, "path_start_frame", text="Start") + sub.itemR(arm, "path_end_frame", text="End") + + sub.itemR(arm, "path_size", text="Step") + sub.itemR(arm, "paths_calculate_head_positions", text="Head") + + sub = split.column() + sub.itemL(text="Show:") + sub.itemR(arm, "paths_show_frame_numbers", text="Frame Numbers") + sub.itemR(arm, "paths_highlight_keyframes", text="Keyframes") + sub.itemR(arm, "paths_show_keyframe_numbers", text="Keyframe Numbers") + + +class DATA_PT_ghost(DataButtonsPanel): + __idname__ = "DATA_PT_ghost" + __label__ = "Ghost" + + def draw(self, context): + arm = context.main.armatures[0] + layout = self.layout + + split = layout.split() + + sub = split.column() + + sub.itemR(arm, "ghost_type", text="Scope") + if arm.ghost_type == 'RANGE': + sub.itemR(arm, "ghost_start_frame", text="Start") + sub.itemR(arm, "ghost_end_frame", text="End") + sub.itemR(arm, "ghost_size", text="Step") + elif arm.ghost_type == 'CURRENT_FRAME': + sub.itemR(arm, "ghost_step", text="Range") + sub.itemR(arm, "ghost_size", text="Step") + + sub = split.column() + + sub.itemR(arm, "ghost_only_selected", text="Selected Only") + +bpy.types.register(DATA_PT_skeleton) +bpy.types.register(DATA_PT_display) +bpy.types.register(DATA_PT_paths) +bpy.types.register(DATA_PT_ghost)
\ No newline at end of file |