A few smaller adjustments to armature and bone properties.
This commit is contained in:
@@ -37,7 +37,9 @@ class DATA_PT_skeleton(DataButtonsPanel):
|
||||
ob = context.object
|
||||
arm = context.armature
|
||||
space = context.space_data
|
||||
|
||||
|
||||
layout.itemR(arm, "pose_position", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
@@ -50,7 +52,6 @@ class DATA_PT_skeleton(DataButtonsPanel):
|
||||
col.itemR(arm, "auto_ik")
|
||||
|
||||
col = split.column()
|
||||
col.itemR(arm, "rest_position")
|
||||
col.itemL(text="Deform:")
|
||||
col.itemR(arm, "deform_vertexgroups", text="Vertex Groups")
|
||||
col.itemR(arm, "deform_envelope", text="Envelopes")
|
||||
@@ -140,12 +141,16 @@ class DATA_PT_paths(DataButtonsPanel):
|
||||
col.row().itemR(arm, "paths_location", expand=True)
|
||||
|
||||
col = split.column()
|
||||
col.itemL(text="Show:")
|
||||
col.itemL(text="Display:")
|
||||
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")
|
||||
layout.itemS()
|
||||
|
||||
row = layout.row()
|
||||
row.itemO("pose.paths_calculate", text="Calculate Paths")
|
||||
row.itemO("pose.paths_clear", text="Clear Paths")
|
||||
|
||||
class DATA_PT_ghost(DataButtonsPanel):
|
||||
__label__ = "Ghost"
|
||||
@@ -171,6 +176,7 @@ class DATA_PT_ghost(DataButtonsPanel):
|
||||
sub.itemR(arm, "ghost_size", text="Step")
|
||||
|
||||
col = split.column()
|
||||
col.itemL(text="Display:")
|
||||
col.itemR(arm, "ghost_only_selected", text="Selected Only")
|
||||
|
||||
bpy.types.register(DATA_PT_context_arm)
|
||||
|
@@ -177,7 +177,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel):
|
||||
split = layout.split(percentage=0.25)
|
||||
split.itemR(pchan, "ik_dof_x", text="X")
|
||||
row = split.row()
|
||||
row.itemR(pchan, "ik_stiffness_x", text="Stiffness")
|
||||
row.itemR(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
|
||||
row.active = pchan.ik_dof_x
|
||||
|
||||
split = layout.split(percentage=0.25)
|
||||
@@ -192,7 +192,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel):
|
||||
split = layout.split(percentage=0.25)
|
||||
split.itemR(pchan, "ik_dof_y", text="Y")
|
||||
row = split.row()
|
||||
row.itemR(pchan, "ik_stiffness_y", text="Stiffness")
|
||||
row.itemR(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
|
||||
row.active = pchan.ik_dof_y
|
||||
|
||||
split = layout.split(percentage=0.25)
|
||||
@@ -207,7 +207,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel):
|
||||
split = layout.split(percentage=0.25)
|
||||
split.itemR(pchan, "ik_dof_z", text="Z")
|
||||
row = split.row()
|
||||
row.itemR(pchan, "ik_stiffness_z", text="Stiffness")
|
||||
row.itemR(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
|
||||
row.active = pchan.ik_dof_z
|
||||
|
||||
split = layout.split(percentage=0.25)
|
||||
@@ -220,7 +220,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel):
|
||||
row.active = pchan.ik_dof_z and pchan.ik_limit_z
|
||||
|
||||
split = layout.split()
|
||||
split.itemR(pchan, "ik_stretch", text="Stretch")
|
||||
split.itemR(pchan, "ik_stretch", text="Stretch", slider=True)
|
||||
split.itemL()
|
||||
|
||||
class BONE_PT_deform(BoneButtonsPanel):
|
||||
|
@@ -540,10 +540,13 @@ static void rna_def_armature(BlenderRNA *brna)
|
||||
{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, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
static const EnumPropertyItem prop_pose_position_items[]= {
|
||||
{0, "POSE_POSITION", 0, "Pose Position", "Show armature in posed state."},
|
||||
{ARM_RESTPOS, "REST_POSITION", 0, "Rest Position", "Show Armature in binding pose state. No posing possible."},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
srna= RNA_def_struct(brna, "Armature", "ID");
|
||||
@@ -565,6 +568,17 @@ static void rna_def_armature(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Edit Bones", "");
|
||||
|
||||
/* Enum values */
|
||||
// prop= RNA_def_property(srna, "rest_position", PROP_BOOLEAN, PROP_NONE);
|
||||
// RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_RESTPOS);
|
||||
// RNA_def_property_ui_text(prop, "Rest Position", "Show Armature in Rest Position. No posing possible.");
|
||||
// RNA_def_property_update(prop, 0, "rna_Armature_update_data");
|
||||
|
||||
prop= RNA_def_property(srna, "pose_position", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
|
||||
RNA_def_property_enum_items(prop, prop_pose_position_items);
|
||||
RNA_def_property_ui_text(prop, "Pose Position", "Show armature in binding pose or final posed state.");
|
||||
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
|
||||
|
||||
prop= RNA_def_property(srna, "drawtype", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, prop_drawtype_items);
|
||||
RNA_def_property_ui_text(prop, "Draw Type", "");
|
||||
@@ -606,10 +620,7 @@ static void rna_def_armature(BlenderRNA *brna)
|
||||
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
|
||||
|
||||
/* flag */
|
||||
prop= RNA_def_property(srna, "rest_position", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_RESTPOS);
|
||||
RNA_def_property_ui_text(prop, "Rest Position", "Show Armature in Rest Position. No posing possible.");
|
||||
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
|
||||
|
||||
|
||||
prop= RNA_def_property(srna, "draw_axes", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DRAWAXES);
|
||||
|
Reference in New Issue
Block a user