Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
| Show First 20 Lines • Show All 1,050 Lines • ▼ Show 20 Lines | static void rna_RenderSettings_active_layer_set(PointerRNA *ptr, PointerRNA value) | ||||
| if (index != -1) rd->actlay = index; | if (index != -1) rd->actlay = index; | ||||
| } | } | ||||
| static SceneRenderLayer *rna_RenderLayer_new(ID *id, RenderData *UNUSED(rd), const char *name) | static SceneRenderLayer *rna_RenderLayer_new(ID *id, RenderData *UNUSED(rd), const char *name) | ||||
| { | { | ||||
| Scene *scene = (Scene *)id; | Scene *scene = (Scene *)id; | ||||
| SceneRenderLayer *srl = BKE_scene_add_render_layer(scene, name); | SceneRenderLayer *srl = BKE_scene_add_render_layer(scene, name); | ||||
| DAG_id_tag_update(&scene->id, 0); | |||||
| WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| return srl; | return srl; | ||||
| } | } | ||||
| static void rna_RenderLayer_remove(ID *id, RenderData *UNUSED(rd), Main *bmain, ReportList *reports, | static void rna_RenderLayer_remove(ID *id, RenderData *UNUSED(rd), Main *bmain, ReportList *reports, | ||||
| PointerRNA *srl_ptr) | PointerRNA *srl_ptr) | ||||
| { | { | ||||
| SceneRenderLayer *srl = srl_ptr->data; | SceneRenderLayer *srl = srl_ptr->data; | ||||
| Scene *scene = (Scene *)id; | Scene *scene = (Scene *)id; | ||||
| if (!BKE_scene_remove_render_layer(bmain, scene, srl)) { | if (!BKE_scene_remove_render_layer(bmain, scene, srl)) { | ||||
| BKE_reportf(reports, RPT_ERROR, "Render layer '%s' could not be removed from scene '%s'", | BKE_reportf(reports, RPT_ERROR, "Render layer '%s' could not be removed from scene '%s'", | ||||
| srl->name, scene->id.name + 2); | srl->name, scene->id.name + 2); | ||||
| return; | return; | ||||
| } | } | ||||
| RNA_POINTER_INVALIDATE(srl_ptr); | RNA_POINTER_INVALIDATE(srl_ptr); | ||||
| DAG_id_tag_update(&scene->id, 0); | |||||
| WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| } | } | ||||
| static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value) | static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value) | ||||
| { | { | ||||
| RenderData *rd = (RenderData *)ptr->data; | RenderData *rd = (RenderData *)ptr->data; | ||||
| RenderEngineType *type = BLI_findlink(&R_engines, value); | RenderEngineType *type = BLI_findlink(&R_engines, value); | ||||
| ▲ Show 20 Lines • Show All 4,388 Lines • Show Last 20 Lines | |||||