[Bf-extensions-cvs] [0860dca0] soc-2019-openxr: Cleanup: Little Python style tweaks from review

Julian Eisel noreply at git.blender.org
Tue Mar 17 13:38:46 CET 2020


Commit: 0860dca0ceb6e0924c100d4d1a4e84caf839a2bb
Author: Julian Eisel
Date:   Tue Mar 17 13:38:20 2020 +0100
Branches: soc-2019-openxr
https://developer.blender.org/rBA0860dca0ceb6e0924c100d4d1a4e84caf839a2bb

Cleanup: Little Python style tweaks from review

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

M	viewport_vr_preview.py

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

diff --git a/viewport_vr_preview.py b/viewport_vr_preview.py
index b7778b41..dfceba05 100644
--- a/viewport_vr_preview.py
+++ b/viewport_vr_preview.py
@@ -56,7 +56,7 @@ bl_info = {
 def ensure_default_vr_landmark(context: bpy.context):
     # Ensure there's a default landmark (scene camera by default).
     landmarks = bpy.context.scene.vr_landmarks
-    if len(landmarks) == 0:
+    if not landmarks:
         landmarks.add()
         landmarks[0].type = 'SCENE_CAMERA'
 
@@ -547,7 +547,8 @@ class VIEW3D_GGT_vr_viewer_pose(GizmoGroup):
             not view3d.mirror_xr_session
         )
 
-    def _get_viewer_pose_matrix(self, context):
+    @staticmethod
+    def _get_viewer_pose_matrix(context):
         from mathutils import Matrix, Quaternion
 
         wm = context.window_manager



More information about the Bf-extensions-cvs mailing list