KeyingSets UI - Improving button layout for legibility of buttons

* Use custom names for the keying options enum. The old automated layout dumped
out lengthy names which
didn't work well with the limited UI widths we were using, leading to all the
interesting stuff getting cropped out

* Moved the "array target" options to be in line with the rest of the target
specification stuff. I've ended up flattening that set of options into a single
row, which seems to work quite well.

* Removed label from grouping method enum. There was a perfectly good section
header above, and with narrow UI's, the name of this and the one below ended up
looking the same/confusing.
This commit is contained in:
Joshua Leung 2012-05-17 02:49:09 +00:00
parent 9dd981a440
commit 1b14c85e57

@ -93,6 +93,14 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel):
row.prop(unit, "use_separate") row.prop(unit, "use_separate")
def draw_keyingset_options(data, layout):
# NOTE: keep in sync with rna_def_common_keying_flags() in rna_animation.c
# These are defined out like this because the standard names are too long
layout.prop_enum(data, "bl_options", text="Only Needed", value='INSERTKEY_NEEDED')
layout.prop_enum(data, "bl_options", text="Visual Keying", value='INSERTKEY_VISUAL')
layout.prop_enum(data, "bl_options", text="XYZ=RGB Coloring", value='INSERTKEY_XYZ_TO_RGB')
class SCENE_PT_keying_sets(SceneButtonsPanel, Panel): class SCENE_PT_keying_sets(SceneButtonsPanel, Panel):
bl_label = "Keying Sets" bl_label = "Keying Sets"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@ -122,9 +130,9 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, Panel):
subcol.operator_context = 'INVOKE_DEFAULT' subcol.operator_context = 'INVOKE_DEFAULT'
subcol.operator("anim.keying_set_export", text="Export to File").filepath = "keyingset.py" subcol.operator("anim.keying_set_export", text="Export to File").filepath = "keyingset.py"
col = row.column() col = row.column(align=True)
col.label(text="Keyframing Settings:") col.label(text="Keyframing Settings:")
col.prop(ks, "bl_options") draw_keyingset_options(ks, col)
class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel): class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel):
@ -161,21 +169,26 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel):
col.template_any_ID(ksp, "id", "id_type") col.template_any_ID(ksp, "id", "id_type")
col.template_path_builder(ksp, "data_path", ksp.id) col.template_path_builder(ksp, "data_path", ksp.id)
row = col.row(align=True)
row.label(text="Array Target:")
row.prop(ksp, "use_entire_array", text="All Items")
if ksp.use_entire_array:
row.label(text=" ") # padding
else:
row.prop(ksp, "array_index", text="Index")
layout.separator()
row = layout.row() row = layout.row()
col = row.column()
col.label(text="Array Target:")
col.prop(ksp, "use_entire_array")
if ksp.use_entire_array is False:
col.prop(ksp, "array_index")
col = row.column() col = row.column()
col.label(text="F-Curve Grouping:") col.label(text="F-Curve Grouping:")
col.prop(ksp, "group_method") col.prop(ksp, "group_method", text="")
if ksp.group_method == 'NAMED': if ksp.group_method == 'NAMED':
col.prop(ksp, "group") col.prop(ksp, "group")
col.prop(ksp, "bl_options") col = row.column(align=True)
col.label(text="Keyframing Settings:")
draw_keyingset_options(ks, col)
class SCENE_PT_physics(SceneButtonsPanel, Panel): class SCENE_PT_physics(SceneButtonsPanel, Panel):