Fix #104982: Ensure view layer when baking line art.

This is more like a hack, which ensures view layer depsgraph evaluation
when baking line art. It should fix the problem where the camera marker
switch would cause `view_layer->object_bases_array == null`.

Pull Request: https://projects.blender.org/blender/blender/pulls/117227
This commit is contained in:
YimingWu
2024-01-25 04:33:37 +01:00
committed by YimingWu
parent 6aede44fb7
commit f2d08d2cbe

View File

@@ -237,6 +237,7 @@ static void lineart_gpencil_bake_startjob(void *customdata, wmJobWorkerStatus *w
BKE_scene_frame_set(bj->scene, frame);
BKE_scene_graph_update_for_newframe(bj->dg);
DEG_graph_build_from_view_layer(bj->dg);
for (LinkNode *l = bj->objects; l; l = l->next) {
Object *ob = static_cast<Object *>(l->link);