From 1b14c85e57e3ff5a21690b8881ee9f8f661dbdf3 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 17 May 2012 02:49:09 +0000 Subject: 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. --- release/scripts/startup/bl_ui/properties_scene.py | 35 ++++++++++++++++------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 1c78549c086..329dc6d6a01 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -93,6 +93,14 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel): 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): bl_label = "Keying Sets" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} @@ -122,9 +130,9 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, Panel): subcol.operator_context = 'INVOKE_DEFAULT' 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.prop(ks, "bl_options") + draw_keyingset_options(ks, col) 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_path_builder(ksp, "data_path", ksp.id) - row = layout.row() + 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") - 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") + layout.separator() + row = layout.row() col = row.column() col.label(text="F-Curve Grouping:") - col.prop(ksp, "group_method") + col.prop(ksp, "group_method", text="") if ksp.group_method == 'NAMED': 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): -- cgit v1.2.3