diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-05-03 19:50:53 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-05-03 19:50:53 +0300 |
commit | 20185a8681f15f3e4e129e064fbe9a150dc4c963 (patch) | |
tree | a2c2d91126634d4a460b9e92205abb18e2836475 /source/blender | |
parent | 8c49e6f99e412c5752f70f506b5554c283ad9dbc (diff) |
Cleanup "Sync Mode" (i.e. Av Sync/Framedropping) stuff
* Remove the "sync_mode" dropdown from timeline header, and move it into
the Playback menu instead.
* Remove the confusing "Frame Dropping" and "AV Sync" entries from the
Playback menu. These were supposed to be mutually exclusive (or else,
the "sync_mode" menu would break).
* Turn AV Sync on by default
* Commented out the Frame Dropping and Av Sync RNA Properties too.
THere doesn't seem to be any valid reason for these to exist?
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index f3f08aec3cd..a11c7320da5 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -717,6 +717,7 @@ void BKE_scene_init(Scene *sce) sce->audio.doppler_factor = 1.0f; sce->audio.speed_of_sound = 343.3f; sce->audio.volume = 1.0f; + sce->audio.flag = AUDIO_SYNC; BLI_strncpy(sce->r.pic, U.renderdir, sizeof(sce->r.pic)); diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index 1e27ab64f48..3211ed4fc11 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -210,6 +210,11 @@ void BLO_update_defaults_startup_blend(Main *bmain) } scene->r.ffcodecdata.audio_mixrate = 48000; + + /* set av sync by default */ + printf("setting new default audio\n"); + scene->audio.flag |= AUDIO_SYNC; + scene->flag &= ~SCE_FRAME_DROP; } for (FreestyleLineStyle *linestyle = bmain->linestyle.first; linestyle; linestyle = linestyle->id.next) { diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 1fb4e2d8b57..b93c3cf1dc6 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5864,14 +5864,17 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); /* Frame dropping flag for playback and sync enum */ +#if 0 /* XXX: Is this actually needed? */ prop = RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_FRAME_DROP); RNA_def_property_ui_text(prop, "Frame Dropping", "Play back dropping frames if frame display is too slow"); RNA_def_property_update(prop, NC_SCENE, NULL); +#endif prop = RNA_def_property(srna, "sync_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_funcs(prop, "rna_Scene_sync_mode_get", "rna_Scene_sync_mode_set", NULL); RNA_def_property_enum_items(prop, sync_mode_items); + RNA_def_property_enum_default(prop, AUDIO_SYNC); RNA_def_property_ui_text(prop, "Sync Mode", "How to sync playback"); RNA_def_property_update(prop, NC_SCENE, NULL); @@ -6007,11 +6010,13 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted"); RNA_def_property_update(prop, NC_SCENE, NULL); +#if 0 /* XXX: Is this actually needed? */ prop = RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC); RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio clock, dropping frames if frame display is too slow"); RNA_def_property_update(prop, NC_SCENE, NULL); +#endif prop = RNA_def_property(srna, "use_audio_scrub", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB); |