[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46707] trunk/blender/release/scripts/ startup/bl_ui/properties_scene.py: KeyingSets UI - Improving button layout for legibility of buttons

Joshua Leung aligorith at gmail.com
Thu May 17 04:49:12 CEST 2012


Revision: 46707
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46707
Author:   aligorith
Date:     2012-05-17 02:49:09 +0000 (Thu, 17 May 2012)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_scene.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_scene.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_scene.py	2012-05-17 02:31:52 UTC (rev 46706)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_scene.py	2012-05-17 02:49:09 UTC (rev 46707)
@@ -93,6 +93,14 @@
         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 @@
             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,23 +169,28 @@
             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 = row.column(align=True)
+            col.label(text="Keyframing Settings:")
+            draw_keyingset_options(ks, col)
 
-            col.prop(ksp, "bl_options")
 
-
 class SCENE_PT_physics(SceneButtonsPanel, Panel):
     bl_label = "Gravity"
     COMPAT_ENGINES = {'BLENDER_RENDER'}




More information about the Bf-blender-cvs mailing list