[Bf-blender-cvs] [dad0f37c1e8] blender-v3.4-release: Fix T101824: Line art flickers when light object has scaling.

Yiming Wu noreply at git.blender.org
Fri Nov 25 15:22:11 CET 2022


Commit: dad0f37c1e82cee038c3967598028a00814c1c33
Author: Yiming Wu
Date:   Fri Nov 25 21:55:44 2022 +0800
Branches: blender-v3.4-release
https://developer.blender.org/rBdad0f37c1e82cee038c3967598028a00814c1c33

Fix T101824: Line art flickers when light object has scaling.

Line art doesn't expect light or camera objects to have scaling.

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

M	release/scripts/addons
M	release/scripts/addons_contrib
M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M	source/tools

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

diff --git a/release/scripts/addons b/release/scripts/addons
index 946b62da3f9..bde68da02fd 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 946b62da3f9c93b4add8596aef836bf3a29ea27c
+Subproject commit bde68da02fde93968dc11b52d42060ac3b81ed37
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 69b1305f4b7..e6179b3b112 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 69b1305f4b74fbd7e847acc6a5566755b9803d78
+Subproject commit e6179b3b112298e131bbd0faf648bf0d392b6cdd
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 4b5c40c0e38..d5d5a8214f5 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -3594,6 +3594,10 @@ static LineartData *lineart_create_render_buffer(Scene *scene,
     copy_v3db_v3fl(ld->conf.active_camera_pos, active_camera->object_to_world[3]);
   }
   copy_m4_m4(ld->conf.cam_obmat, camera->object_to_world);
+  /* Make sure none of the scaling factor makes in, line art expects no scaling on cameras and lights. */
+  normalize_v3(ld->conf.cam_obmat[0]);
+  normalize_v3(ld->conf.cam_obmat[1]);
+  normalize_v3(ld->conf.cam_obmat[2]);
 
   ld->conf.cam_is_persp = (c->type == CAM_PERSP);
   ld->conf.near_clip = c->clip_start + clipping_offset;
@@ -3622,6 +3626,10 @@ static LineartData *lineart_create_render_buffer(Scene *scene,
     Object *light_obj = lmd->light_contour_object;
     copy_v3db_v3fl(ld->conf.camera_pos_secondary, light_obj->object_to_world[3]);
     copy_m4_m4(ld->conf.cam_obmat_secondary, light_obj->object_to_world);
+    /* Make sure none of the scaling factor makes in, line art expects no scaling on cameras and lights. */
+    normalize_v3(ld->conf.cam_obmat_secondary[0]);
+    normalize_v3(ld->conf.cam_obmat_secondary[1]);
+    normalize_v3(ld->conf.cam_obmat_secondary[2]);
     ld->conf.light_reference_available = true;
     if (light_obj->type == OB_LAMP) {
       ld->conf.cam_is_persp_secondary = ((Light *)light_obj->data)->type != LA_SUN;
diff --git a/source/tools b/source/tools
index dfa16042bf7..9e33a8678a3 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit dfa16042bf7149475ad318d29a8202d969982abb
+Subproject commit 9e33a8678a3b97d2fdb833349657c3cc1c04811f



More information about the Bf-blender-cvs mailing list