forked from bartvdbraak/blender
2.5 Timeline:
* Finally the header and menus are done via python. * Added RNA for sync audio. Note: This is just a basic working version in python. It needs more work and some layout changes. Joshua: Feel free to adjust this further :)
This commit is contained in:
parent
64fb0667b2
commit
2cf5b52856
@ -9,6 +9,7 @@ class TIME_HT_header(bpy.types.Header):
|
|||||||
|
|
||||||
st = context.space_data
|
st = context.space_data
|
||||||
scene = context.scene
|
scene = context.scene
|
||||||
|
rd = context.scene.render_data
|
||||||
tools = context.tool_settings
|
tools = context.tool_settings
|
||||||
screen = context.screen
|
screen = context.screen
|
||||||
|
|
||||||
@ -47,10 +48,11 @@ class TIME_HT_header(bpy.types.Header):
|
|||||||
sub = row.row()
|
sub = row.row()
|
||||||
sub.scale_x = 2.0
|
sub.scale_x = 2.0
|
||||||
sub.itemO("screen.animation_play", text="", icon='ICON_PAUSE')
|
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.keyframe_jump", "next", True, text="", icon='ICON_NEXT_KEYFRAME')
|
||||||
row.item_booleanO("screen.frame_jump", "end", True, text="", icon='ICON_FF')
|
row.item_booleanO("screen.frame_jump", "end", True, text="", icon='ICON_FF')
|
||||||
|
|
||||||
|
layout.itemS()
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.itemR(tools, "enable_auto_key", text="", toggle=True, icon='ICON_REC')
|
row.itemR(tools, "enable_auto_key", text="", toggle=True, icon='ICON_REC')
|
||||||
sub = row.row()
|
sub = row.row()
|
||||||
@ -59,6 +61,10 @@ class TIME_HT_header(bpy.types.Header):
|
|||||||
|
|
||||||
layout.itemS()
|
layout.itemS()
|
||||||
|
|
||||||
|
layout.itemR(rd, "sync_audio", text="", toggle=True, icon='ICON_SPEAKER')
|
||||||
|
|
||||||
|
layout.itemS()
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.itemR(scene, "active_keyingset")
|
row.itemR(scene, "active_keyingset")
|
||||||
row.itemO("anim.insert_keyframe", text="", icon="ICON_KEY_HLT")
|
row.itemO("anim.insert_keyframe", text="", icon="ICON_KEY_HLT")
|
||||||
|
@ -270,7 +270,7 @@ static void time_main_area_listener(ARegion *ar, wmNotifier *wmn)
|
|||||||
|
|
||||||
/* ************************ header time area region *********************** */
|
/* ************************ header time area region *********************** */
|
||||||
|
|
||||||
//#define PY_HEADER
|
#define PY_HEADER
|
||||||
/* add handlers, stuff you only do once or on area/region changes */
|
/* add handlers, stuff you only do once or on area/region changes */
|
||||||
static void time_header_area_init(wmWindowManager *wm, ARegion *ar)
|
static void time_header_area_init(wmWindowManager *wm, ARegion *ar)
|
||||||
{
|
{
|
||||||
|
@ -1421,6 +1421,11 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
|||||||
RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
|
RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
|
||||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||||
|
|
||||||
|
prop= RNA_def_property(srna, "sync_audio", PROP_BOOLEAN, PROP_NONE);
|
||||||
|
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
|
||||||
|
RNA_def_property_ui_text(prop, "Sync Audio", "Play back and sync with audio from Sequence Editor");
|
||||||
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
|
prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
|
||||||
RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
|
RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
|
||||||
|
Loading…
Reference in New Issue
Block a user