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
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user