rna UI api rename...
note: this aims to follow pep8 however I chose to use 'prop/props' rather then 'property/properties' because it would make function names too long. itemR() --> prop() items_enumR() --> props_enum() item_menu_enumR() --> prop_menu_enum() item_pointerR() --> prop_pointer() itemO() --> operator() item_enumO() --> operator_enum() items_enumO() --> operator_enums() item_menu_enumO() --> operator_menu_enum() item_booleanO() --> operator_boolean() item_intO() --> operator_int() item_floatO() --> operator_float() item_stringO() --> operator_string() itemL() --> label() itemM() --> menu() itemS() --> separator() batch script used http://www.pasteall.org/9345
This commit is contained in:
@@ -35,51 +35,51 @@ class TIME_HT_header(bpy.types.Header):
|
||||
|
||||
if context.area.show_menus:
|
||||
sub = row.row(align=True)
|
||||
sub.itemM("TIME_MT_view")
|
||||
sub.itemM("TIME_MT_frame")
|
||||
sub.itemM("TIME_MT_playback")
|
||||
sub.menu("TIME_MT_view")
|
||||
sub.menu("TIME_MT_frame")
|
||||
sub.menu("TIME_MT_playback")
|
||||
|
||||
layout.itemR(scene, "use_preview_range", text="PR")
|
||||
layout.prop(scene, "use_preview_range", text="PR")
|
||||
|
||||
row = layout.row(align=True)
|
||||
if not scene.use_preview_range:
|
||||
row.itemR(scene, "start_frame", text="Start")
|
||||
row.itemR(scene, "end_frame", text="End")
|
||||
row.prop(scene, "start_frame", text="Start")
|
||||
row.prop(scene, "end_frame", text="End")
|
||||
else:
|
||||
row.itemR(scene, "preview_range_start_frame", text="Start")
|
||||
row.itemR(scene, "preview_range_end_frame", text="End")
|
||||
row.prop(scene, "preview_range_start_frame", text="Start")
|
||||
row.prop(scene, "preview_range_end_frame", text="End")
|
||||
|
||||
layout.itemR(scene, "current_frame", text="")
|
||||
layout.prop(scene, "current_frame", text="")
|
||||
|
||||
layout.itemS()
|
||||
layout.separator()
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.item_booleanO("screen.frame_jump", "end", False, text="", icon='ICON_REW')
|
||||
row.item_booleanO("screen.keyframe_jump", "next", False, text="", icon='ICON_PREV_KEYFRAME')
|
||||
row.operator_boolean("screen.frame_jump", "end", False, text="", icon='ICON_REW')
|
||||
row.operator_boolean("screen.keyframe_jump", "next", False, text="", icon='ICON_PREV_KEYFRAME')
|
||||
if not screen.animation_playing:
|
||||
row.item_booleanO("screen.animation_play", "reverse", True, text="", icon='ICON_PLAY_REVERSE')
|
||||
row.itemO("screen.animation_play", text="", icon='ICON_PLAY')
|
||||
row.operator_boolean("screen.animation_play", "reverse", True, text="", icon='ICON_PLAY_REVERSE')
|
||||
row.operator("screen.animation_play", text="", icon='ICON_PLAY')
|
||||
else:
|
||||
sub = row.row()
|
||||
sub.scale_x = 2.0
|
||||
sub.itemO("screen.animation_play", text="", icon='ICON_PAUSE')
|
||||
row.item_booleanO("screen.keyframe_jump", "next", True, text="", icon='ICON_NEXT_KEYFRAME')
|
||||
row.item_booleanO("screen.frame_jump", "end", True, text="", icon='ICON_FF')
|
||||
sub.operator("screen.animation_play", text="", icon='ICON_PAUSE')
|
||||
row.operator_boolean("screen.keyframe_jump", "next", True, text="", icon='ICON_NEXT_KEYFRAME')
|
||||
row.operator_boolean("screen.frame_jump", "end", True, text="", icon='ICON_FF')
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.itemR(tools, "enable_auto_key", text="", toggle=True, icon='ICON_REC')
|
||||
row.prop(tools, "enable_auto_key", text="", toggle=True, icon='ICON_REC')
|
||||
if screen.animation_playing and tools.enable_auto_key:
|
||||
subsub = row.row()
|
||||
subsub.itemR(tools, "record_with_nla", toggle=True)
|
||||
subsub.prop(tools, "record_with_nla", toggle=True)
|
||||
|
||||
layout.itemR(scene, "sync_audio", text="", toggle=True, icon='ICON_SPEAKER')
|
||||
layout.prop(scene, "sync_audio", text="", toggle=True, icon='ICON_SPEAKER')
|
||||
|
||||
layout.itemS()
|
||||
layout.separator()
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.item_pointerR(scene, "active_keying_set", scene, "keying_sets", text="")
|
||||
row.itemO("anim.insert_keyframe", text="", icon='ICON_KEY_HLT')
|
||||
row.itemO("anim.delete_keyframe", text="", icon='ICON_KEY_DEHLT')
|
||||
row.prop_pointer(scene, "active_keying_set", scene, "keying_sets", text="")
|
||||
row.operator("anim.insert_keyframe", text="", icon='ICON_KEY_HLT')
|
||||
row.operator("anim.delete_keyframe", text="", icon='ICON_KEY_DEHLT')
|
||||
|
||||
|
||||
class TIME_MT_view(bpy.types.Menu):
|
||||
@@ -90,11 +90,11 @@ class TIME_MT_view(bpy.types.Menu):
|
||||
|
||||
st = context.space_data
|
||||
|
||||
layout.itemO("anim.time_toggle")
|
||||
layout.operator("anim.time_toggle")
|
||||
|
||||
layout.itemS()
|
||||
layout.separator()
|
||||
|
||||
layout.itemR(st, "only_selected")
|
||||
layout.prop(st, "only_selected")
|
||||
|
||||
|
||||
class TIME_MT_frame(bpy.types.Menu):
|
||||
@@ -104,22 +104,22 @@ class TIME_MT_frame(bpy.types.Menu):
|
||||
layout = self.layout
|
||||
# tools = context.tool_settings
|
||||
|
||||
layout.itemO("marker.add", text="Add Marker")
|
||||
layout.itemO("marker.duplicate", text="Duplicate Marker")
|
||||
layout.itemO("marker.move", text="Grab/Move Marker")
|
||||
layout.itemO("marker.delete", text="Delete Marker")
|
||||
layout.itemL(text="ToDo: Name Marker")
|
||||
layout.operator("marker.add", text="Add Marker")
|
||||
layout.operator("marker.duplicate", text="Duplicate Marker")
|
||||
layout.operator("marker.move", text="Grab/Move Marker")
|
||||
layout.operator("marker.delete", text="Delete Marker")
|
||||
layout.label(text="ToDo: Name Marker")
|
||||
|
||||
layout.itemS()
|
||||
layout.separator()
|
||||
|
||||
layout.itemO("time.start_frame_set")
|
||||
layout.itemO("time.end_frame_set")
|
||||
layout.operator("time.start_frame_set")
|
||||
layout.operator("time.end_frame_set")
|
||||
|
||||
layout.itemS()
|
||||
layout.separator()
|
||||
|
||||
sub = layout.row()
|
||||
#sub.active = tools.enable_auto_key
|
||||
sub.itemM("TIME_MT_autokey")
|
||||
sub.menu("TIME_MT_autokey")
|
||||
|
||||
|
||||
class TIME_MT_playback(bpy.types.Menu):
|
||||
@@ -131,23 +131,23 @@ class TIME_MT_playback(bpy.types.Menu):
|
||||
st = context.space_data
|
||||
scene = context.scene
|
||||
|
||||
layout.itemR(st, "play_top_left")
|
||||
layout.itemR(st, "play_all_3d")
|
||||
layout.itemR(st, "play_anim")
|
||||
layout.itemR(st, "play_buttons")
|
||||
layout.itemR(st, "play_image")
|
||||
layout.itemR(st, "play_sequencer")
|
||||
layout.itemR(st, "play_nodes")
|
||||
layout.prop(st, "play_top_left")
|
||||
layout.prop(st, "play_all_3d")
|
||||
layout.prop(st, "play_anim")
|
||||
layout.prop(st, "play_buttons")
|
||||
layout.prop(st, "play_image")
|
||||
layout.prop(st, "play_sequencer")
|
||||
layout.prop(st, "play_nodes")
|
||||
|
||||
layout.itemS()
|
||||
layout.separator()
|
||||
|
||||
layout.itemR(st, "continue_physics")
|
||||
layout.prop(st, "continue_physics")
|
||||
|
||||
layout.itemS()
|
||||
layout.separator()
|
||||
|
||||
layout.itemR(scene, "sync_audio", icon='ICON_SPEAKER')
|
||||
layout.itemR(scene, "mute_audio")
|
||||
layout.itemR(scene, "scrub_audio")
|
||||
layout.prop(scene, "sync_audio", icon='ICON_SPEAKER')
|
||||
layout.prop(scene, "mute_audio")
|
||||
layout.prop(scene, "scrub_audio")
|
||||
|
||||
|
||||
class TIME_MT_autokey(bpy.types.Menu):
|
||||
|
||||
Reference in New Issue
Block a user