[Bf-extensions-cvs] [084eec36] master: Fix T76900: Tri-lighting addon broken when there was no camera

Jacques Lucke noreply at git.blender.org
Wed Jun 3 10:55:18 CEST 2020


Commit: 084eec36977c9a084aa020031f4a1aa0f0352170
Author: Jacques Lucke
Date:   Wed Jun 3 10:54:49 2020 +0200
Branches: master
https://developer.blender.org/rBA084eec36977c9a084aa020031f4a1aa0f0352170

Fix T76900: Tri-lighting addon broken when there was no camera

Reviewers: lichtwerk

Differential Revision: https://developer.blender.org/D7861

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

M	lighting_tri_lights.py

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

diff --git a/lighting_tri_lights.py b/lighting_tri_lights.py
index a5478974..f86972ed 100644
--- a/lighting_tri_lights.py
+++ b/lighting_tri_lights.py
@@ -142,7 +142,8 @@ class OBJECT_OT_TriLighting(Operator):
                 scene.camera = cam_obj
                 bpy.ops.view3d.camera_to_view()
                 camera = cam_obj
-                bpy.ops.view3d.view_axis(type='TOP')
+                # Leave camera view again, otherwise redo does not work correctly.
+                bpy.ops.view3d.view_camera()
 
             obj = bpy.context.view_layer.objects.active



More information about the Bf-extensions-cvs mailing list