Changeset View
Changeset View
Standalone View
Standalone View
source/creator/creator_args.c
| Show First 20 Lines • Show All 434 Lines • ▼ Show 20 Lines | static void render_set_depgraph(bContext *C, Render *re) | ||||
| */ | */ | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| /* NOTE: This is STUPID to use first layer, but is ok for now | /* NOTE: This is STUPID to use first layer, but is ok for now | ||||
| * (at least for until depsgraph becomes per-layer). | * (at least for until depsgraph becomes per-layer). | ||||
| * Apparently, CTX_data_layer is crashing here (context's layer | * Apparently, CTX_data_layer is crashing here (context's layer | ||||
| * is NULL for old files, and there is no workspace). | * is NULL for old files, and there is no workspace). | ||||
| */ | */ | ||||
| SceneLayer *scene_layer = scene->render_layers.first; | ViewLayer *view_layer = scene->view_layers.first; | ||||
| Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, scene_layer, true); | Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); | ||||
| DEG_graph_relations_update(depsgraph, bmain, scene, scene_layer); | DEG_graph_relations_update(depsgraph, bmain, scene, view_layer); | ||||
| DEG_graph_on_visible_update(bmain, depsgraph); | DEG_graph_on_visible_update(bmain, depsgraph); | ||||
| RE_SetDepsgraph(re, depsgraph); | RE_SetDepsgraph(re, depsgraph); | ||||
| } | } | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Handle Argument Callbacks | /** \name Handle Argument Callbacks | ||||
| ▲ Show 20 Lines • Show All 1,474 Lines • Show Last 20 Lines | |||||