[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23349] trunk/blender: Armature UI
William Reynish
william at reynish.com
Sat Sep 19 15:50:24 CEST 2009
Revision: 23349
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23349
Author: billrey
Date: 2009-09-19 15:50:24 +0200 (Sat, 19 Sep 2009)
Log Message:
-----------
Armature UI
Added the new pose tools in the toolbar.
Changed a few armature values to enums.
Brecht: The Heads/Tails enum seems to also enable armature.draw_axis, and the paths_type enum affects armature.draw_names
Modified Paths:
--------------
trunk/blender/release/ui/buttons_data_armature.py
trunk/blender/release/ui/space_view3d_toolbar.py
trunk/blender/source/blender/makesrna/intern/rna_armature.c
Modified: trunk/blender/release/ui/buttons_data_armature.py
===================================================================
--- trunk/blender/release/ui/buttons_data_armature.py 2009-09-19 12:38:49 UTC (rev 23348)
+++ trunk/blender/release/ui/buttons_data_armature.py 2009-09-19 13:50:24 UTC (rev 23349)
@@ -121,28 +121,31 @@
layout = self.layout
arm = context.armature
-
+
+ layout.itemR(arm, "paths_type", expand=True)
+
split = layout.split()
col = split.column()
- col.itemR(arm, "paths_show_around_current_frame", text="Around Frame")
sub = col.column(align=True)
- if (arm.paths_show_around_current_frame):
+ if (arm.paths_type == 'CURRENT_FRAME'):
sub.itemR(arm, "path_before_current", text="Before")
sub.itemR(arm, "path_after_current", text="After")
- else:
+ elif (arm.paths_type == 'RANGE'):
sub.itemR(arm, "path_start_frame", text="Start")
sub.itemR(arm, "path_end_frame", text="End")
- sub.itemR(arm, "path_size", text="Step")
- col.itemR(arm, "paths_calculate_head_positions", text="Head")
+ sub.itemR(arm, "path_size", text="Step")
+ col.row().itemR(arm, "paths_location", expand=True)
col = split.column()
col.itemL(text="Show:")
col.itemR(arm, "paths_show_frame_numbers", text="Frame Numbers")
col.itemR(arm, "paths_highlight_keyframes", text="Keyframes")
col.itemR(arm, "paths_show_keyframe_numbers", text="Keyframe Numbers")
+
+ layout.itemO("pose.paths_calculate")
class DATA_PT_ghost(DataButtonsPanel):
__label__ = "Ghost"
@@ -151,11 +154,12 @@
layout = self.layout
arm = context.armature
-
+
+ layout.itemR(arm, "ghost_type", expand=True)
+
split = layout.split()
col = split.column()
- col.itemR(arm, "ghost_type", text="")
sub = col.column(align=True)
if arm.ghost_type == 'RANGE':
Modified: trunk/blender/release/ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/ui/space_view3d_toolbar.py 2009-09-19 12:38:49 UTC (rev 23348)
+++ trunk/blender/release/ui/space_view3d_toolbar.py 2009-09-19 13:50:24 UTC (rev 23349)
@@ -299,11 +299,13 @@
col.itemL(text="Pose:")
col.itemO("pose.copy", text="Copy")
col.itemO("pose.paste", text="Paste")
+ col.itemO("poselib.pose_add", text="Add To library")
col = layout.column(align=True)
- col.itemL(text="Library:")
- col.itemO("poselib.pose_add", text="Add")
- col.itemO("poselib.pose_remove", text="Remove")
+ col.itemL(text="In-Between:")
+ col.itemO("pose.relax", text="Relax")
+ col.itemO("pose.push", text="Push")
+ col.itemO("pose.breakdown", text="Breakdowner")
col = layout.column(align=True)
col.itemL(text="Repeat:")
Modified: trunk/blender/source/blender/makesrna/intern/rna_armature.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_armature.c 2009-09-19 12:38:49 UTC (rev 23348)
+++ trunk/blender/source/blender/makesrna/intern/rna_armature.c 2009-09-19 13:50:24 UTC (rev 23349)
@@ -526,16 +526,25 @@
PropertyRNA *prop;
static EnumPropertyItem prop_drawtype_items[] = {
- {ARM_OCTA, "OCTAHEDRAL", 0, "Octahedral", "Draw bones as octahedral shape (default)."},
- {ARM_LINE, "STICK", 0, "Stick", "Draw bones as simple 2D lines with dots."},
- {ARM_B_BONE, "BBONE", 0, "B-Bone", "Draw bones as boxes, showing subdivision and B-Splines"},
- {ARM_ENVELOPE, "ENVELOPE", 0, "Envelope", "Draw bones as extruded spheres, showing defomation influence volume."},
+ {ARM_OCTA, "OCTAHEDRAL", 0, "Octahedral", "Display bones as octahedral shape (default)."},
+ {ARM_LINE, "STICK", 0, "Stick", "Display bones as simple 2D lines with dots."},
+ {ARM_B_BONE, "BBONE", 0, "B-Bone", "Display bones as boxes, showing subdivision and B-Splines"},
+ {ARM_ENVELOPE, "ENVELOPE", 0, "Envelope", "Display bones as extruded spheres, showing defomation influence volume."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ghost_type_items[] = {
- {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Current Frame", "Draw Ghosts of poses within a fixed number of frames around the current frame."},
- {ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Draw Ghosts of poses within specified range."},
- {ARM_GHOST_KEYS, "KEYS", 0, "On Keyframes", "Draw Ghosts of poses on Keyframes."},
+ {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame", "Display Ghosts of poses within a fixed number of frames around the current frame."},
+ {ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Display Ghosts of poses within specified range."},
+ {ARM_GHOST_KEYS, "KEYS", 0, "On Keyframes", "Display Ghosts of poses on Keyframes."},
{0, NULL, 0, NULL, NULL}};
+ static const EnumPropertyItem prop_paths_type_items[]= {
+ {ARM_PATH_ACFRA, "CURRENT_FRAME", 0, "Around Frame", "Display Paths of poses within a fixed number of frames around the current frame."},
+ {0, "RANGE", 0, "In Range", "Display Paths of poses within specified range."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static const EnumPropertyItem prop_paths_location_items[]= {
+ {ARM_PATH_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
+ {0, "TIPS", 0, "Tips", "Calculate bone paths from tips"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Armature", "ID");
RNA_def_struct_ui_text(srna, "Armature", "Armature datablock containing a hierarchy of bones, usually used for rigging characters.");
@@ -564,9 +573,21 @@
prop= RNA_def_property(srna, "ghost_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ghosttype");
RNA_def_property_enum_items(prop, prop_ghost_type_items);
- RNA_def_property_ui_text(prop, "Ghost Drawing", "Method of Onion-skinning for active Action");
+ RNA_def_property_ui_text(prop, "Ghost Type", "Method of Onion-skinning for active Action");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+ prop= RNA_def_property(srna, "paths_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, prop_paths_type_items);
+ RNA_def_property_ui_text(prop, "Paths Type", "Mapping type to use for this image in the game engine.");
+ RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+
+ prop= RNA_def_property(srna, "paths_location", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, prop_paths_location_items);
+ RNA_def_property_ui_text(prop, "Paths Location", "When calculating Bone Paths, use Head or Tips");
+ RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
+
/* Boolean values */
/* layer */
prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER_MEMBER);
@@ -672,15 +693,7 @@
RNA_def_property_ui_text(prop, "Paths Show Keyframe Numbers", "When drawing Armature in Pose Mode, show frame numbers of Keyframes on Bone Paths");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "paths_show_around_current_frame", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pathflag", ARM_PATH_ACFRA);
- RNA_def_property_ui_text(prop, "Paths Around Current Frame", "When drawing Armature in Pose Mode, only show section of Bone Paths that falls around current frame");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "paths_calculate_head_positions", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pathflag", ARM_PATH_HEADS);
- RNA_def_property_ui_text(prop, "Paths Use Heads", "When calculating Bone Paths, use Head locations instead of Tips");
- RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* Number fields */
/* ghost/onionskining settings */
More information about the Bf-blender-cvs
mailing list