[Bf-blender-cvs] [eca95d35bac] blender-v3.3-release: Fix T102612: Line art crash on loading due to references to other scenes.

YimingWu noreply at git.blender.org
Thu Jan 12 22:26:57 CET 2023


Commit: eca95d35bacc5858c01c2f3294b429577461c29a
Author: YimingWu
Date:   Thu Jan 5 12:43:05 2023 +0800
Branches: blender-v3.3-release
https://developer.blender.org/rBeca95d35bacc5858c01c2f3294b429577461c29a

Fix T102612: Line art crash on loading due to references to other scenes.

===================================================================

M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c

===================================================================

diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 8d75082d63f..b0818b157bb 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -2484,9 +2484,10 @@ static void lineart_object_load_single_instance(LineartData *ld,
   }
   if (ob->type == OB_MESH) {
     use_mesh = BKE_object_get_evaluated_mesh(ob);
-    if (use_mesh->edit_mesh) {
+    if ((!use_mesh) || use_mesh->edit_mesh) {
       /* If the object is being edited, then the mesh is not evaluated fully into the final
-       * result, do not load them. */
+       * result, do not load them. This could be caused by incorrect evaluation order due to
+       * the way line art uses depsgraph.See T102612 for explaination of this workaround. */
       return;
     }
   }
@@ -2494,7 +2495,7 @@ static void lineart_object_load_single_instance(LineartData *ld,
     use_mesh = BKE_mesh_new_from_object(depsgraph, ob, true, true);
   }
 
-  /* In case we still can not get any mesh geometry data from the object */
+  /* In case we still can not get any mesh geometry data from the object, same as above. */
   if (!use_mesh) {
     return;
   }



More information about the Bf-blender-cvs mailing list