[Bf-blender-cvs] [1e816bf837f] lineart-bvh: LineArt: Move type rejection before visibility check

YimingWu noreply at git.blender.org
Sat Jul 3 11:26:26 CEST 2021


Commit: 1e816bf837fbe66f920650982454c03eda1b685f
Author: YimingWu
Date:   Tue Jun 22 23:03:53 2021 +0800
Branches: lineart-bvh
https://developer.blender.org/rB1e816bf837fbe66f920650982454c03eda1b685f

LineArt: Move type rejection before visibility check

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

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 dc9d994beb4..fe3a202e8ed 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -2190,6 +2190,10 @@ static void lineart_main_load_geometries(
     mul_m4db_m4db_m4fl_uniq(obi->model_view_proj, rb->view_projection, ob->obmat);
     mul_m4db_m4db_m4fl_uniq(obi->model_view, rb->view, ob->obmat);
 
+    if (!ELEM(use_ob->type, OB_MESH, OB_MBALL, OB_CURVE, OB_SURF, OB_FONT)) {
+      continue;
+    }
+
     if (!lineart_geometry_check_visible(obi->model_view_proj, use_ob)) {
       if (G.debug_value == 4000) {
         bound_box_discard_count++;
@@ -2197,10 +2201,6 @@ static void lineart_main_load_geometries(
       continue;
     }
 
-    if (!(use_ob->type == OB_MESH || use_ob->type == OB_MBALL || use_ob->type == OB_CURVE ||
-          use_ob->type == OB_SURF || use_ob->type == OB_FONT)) {
-      continue;
-    }
     if (use_ob->type == OB_MESH) {
       use_mesh = use_ob->data;
     }



More information about the Bf-blender-cvs mailing list