Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 1,936 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->data; | Scene *scene = (Scene *)ptr->data; | ||||
| return (scene->audio.flag & AUDIO_MUTE) != 0; | return (scene->audio.flag & AUDIO_MUTE) != 0; | ||||
| } | } | ||||
| static void rna_Scene_use_audio_set(PointerRNA *ptr, bool value) | static void rna_Scene_use_audio_set(PointerRNA *ptr, bool value) | ||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->data; | Scene *scene = (Scene *)ptr->data; | ||||
| short old_flag = scene->audio.flag; | |||||
| if (value) { | if (value) { | ||||
| scene->audio.flag |= AUDIO_MUTE; | scene->audio.flag |= AUDIO_MUTE; | ||||
| } | } | ||||
| else { | else { | ||||
| scene->audio.flag &= ~AUDIO_MUTE; | scene->audio.flag &= ~AUDIO_MUTE; | ||||
| } | } | ||||
| if (scene->audio.flag != old_flag) { | |||||
| DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_MUTE); | |||||
| } | |||||
sergey: `set` functions must not do any sort of tagging. | |||||
| } | } | ||||
| static void rna_Scene_use_audio_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) | static void rna_Scene_use_audio_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_MUTE); | DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_MUTE); | ||||
| } | } | ||||
| static int rna_Scene_sync_mode_get(PointerRNA *ptr) | static int rna_Scene_sync_mode_get(PointerRNA *ptr) | ||||
| ▲ Show 20 Lines • Show All 5,719 Lines • Show Last 20 Lines | |||||
set functions must not do any sort of tagging.