diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-10-03 08:21:38 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-10-03 08:21:38 +0400 |
commit | f4c697cf7fc1b3bd3e040b90921fafbee8bafa4a (patch) | |
tree | a8d0ae5eb0fd5ee75bc094c0fc176b471c73d7e6 /release | |
parent | 97d8839ad565bff1a02da59a1a2f97264ba79e68 (diff) |
Keying Sets UI:
Added a way to view and edit Keying Sets via the Scene Buttons. These are still some tweaks needed to make this really workable, but should still work well enough for simply viewing and tweaking existing Keying Sets created using other means.
Additional bugfixes:
* Adjusted the size of labels on properties that had a 'label' for their name. Now it uses 1/3 of the total width instead, which looks much better for most cases.
* Added missing entries for adding Force Fields from the Info-header 'Add' menu. At some point we should unify this menu with the popup operator's one, since this is exactly the kind of situation we had hoped in avoid with new UI architectures.
* Moved all the operator defines for keyframing stuff to the 'intern' anim header instead
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/buttons_scene.py | 88 | ||||
-rw-r--r-- | release/scripts/ui/space_info.py | 4 |
2 files changed, 92 insertions, 0 deletions
diff --git a/release/scripts/ui/buttons_scene.py b/release/scripts/ui/buttons_scene.py index 2fbd176e36a..6467836961c 100644 --- a/release/scripts/ui/buttons_scene.py +++ b/release/scripts/ui/buttons_scene.py @@ -1,6 +1,14 @@ import bpy +class SceneButtonsPanel(bpy.types.Panel): + __space_type__ = 'PROPERTIES' + __region_type__ = 'WINDOW' + __context__ = "scene" + + def poll(self, context): + return (context.scene != None) + class RenderButtonsPanel(bpy.types.Panel): __space_type__ = 'PROPERTIES' __region_type__ = 'WINDOW' @@ -450,6 +458,84 @@ class SCENE_PT_unit(RenderButtonsPanel): row.active = (unit.system != 'NONE') row.itemR(unit, "scale_length", text="Scale") row.itemR(unit, "use_separate") + +class SCENE_PT_keying_sets(SceneButtonsPanel): + __label__ = "Keying Sets" + __default_closed__ = True + + def draw(self, context): + layout = self.layout + + scene = context.scene + + row = layout.row() + + col = row.column() + col.template_list(scene, "keying_sets", scene, "active_keying_set_index", rows=2) + + col = row.column(align=True) + col.itemO("anim.keying_set_add", icon='ICON_ZOOMIN', text="") + col.itemO("anim.keying_set_remove", icon='ICON_ZOOMOUT', text="") + + ks = scene.active_keying_set + if ks: + row = layout.row() + + col = row.column() + col.itemR(ks, "name") + col.itemR(ks, "absolute") + + col = row.column() + col.itemL(text="Keyframing Settings:") + col.itemR(ks, "insertkey_needed", text="Needed") + col.itemR(ks, "insertkey_visual", text="Visual") + +class SCENE_PT_keying_set_paths(SceneButtonsPanel): + __label__ = "Active Keying Set" + __default_closed__ = True + + def poll(self, context): + return (context.scene != None) and (context.scene.active_keying_set != None) + + def draw(self, context): + layout = self.layout + + scene = context.scene + ks = scene.active_keying_set + + row = layout.row() + + col = row.column() + col.template_list(ks, "paths", ks, "active_path_index", rows=2) + + col = row.column(align=True) + col.itemO("anim.keying_set_path_add", icon='ICON_ZOOMIN', text="") + col.itemO("anim.keying_set_path_remove", icon='ICON_ZOOMOUT', text="") + + ksp = ks.active_path + if ksp: + col = layout.column() + col.itemL(text="Target:") + col.itemR(ksp, "id") + col.itemR(ksp, "rna_path") + + + row = layout.row() + + col = row.column() + col.itemL(text="Array Target:") + col.itemR(ksp, "entire_array") + if ksp.entire_array == False: + col.itemR(ksp, "array_index") + + col = row.column() + col.itemL(text="F-Curve Grouping:") + col.itemR(ksp, "grouping") + if ksp.grouping == 'NAMED': + col.itemR(ksp, "group") + + + class SCENE_PT_physics(RenderButtonsPanel): __label__ = "Gravity" @@ -479,4 +565,6 @@ bpy.types.register(SCENE_PT_performance) bpy.types.register(SCENE_PT_post_processing) bpy.types.register(SCENE_PT_stamp) bpy.types.register(SCENE_PT_unit) +bpy.types.register(SCENE_PT_keying_sets) +bpy.types.register(SCENE_PT_keying_set_paths) bpy.types.register(SCENE_PT_physics) diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py index c1a2b1f4275..49261981ac2 100644 --- a/release/scripts/ui/space_info.py +++ b/release/scripts/ui/space_info.py @@ -144,6 +144,10 @@ class INFO_MT_add(bpy.types.Menu): layout.item_enumO("object.add", "type", 'CAMERA', icon='ICON_OUTLINER_OB_CAMERA') layout.item_menu_enumO("object.lamp_add", "type", 'LAMP', text="Lamp", icon='ICON_OUTLINER_OB_LAMP') + + layout.itemS() + + layout.item_menu_enumO("object.effector_add", "type", 'EMPTY', text="Force Field", icon='ICON_OUTLINER_OB_EMPTY') class INFO_MT_game(bpy.types.Menu): __space_type__ = 'INFO' |