[Bf-blender-cvs] [476be3746e8] master: Fix T86332: setting Cycles dicing camera fails after recent changes

Brecht Van Lommel noreply at git.blender.org
Fri Mar 12 17:50:17 CET 2021


Commit: 476be3746e85b4891189c8d480501905b9400c66
Author: Brecht Van Lommel
Date:   Fri Mar 12 16:33:13 2021 +0100
Branches: master
https://developer.blender.org/rB476be3746e85b4891189c8d480501905b9400c66

Fix T86332: setting Cycles dicing camera fails after recent changes

Somehow "from __future__ import annotations" and "lambda" are not working
together well here, work around it by not using a lambda function.

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

M	intern/cycles/blender/addon/properties.py

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

diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index dc4437bdc52..91bc1cb84a4 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -226,6 +226,9 @@ def update_render_passes(self, context):
     view_layer = context.view_layer
     view_layer.update_render_passes()
 
+def poll_object_is_camera(self, obj):
+    return obj.type == 'CAMERA'
+
 
 class CyclesRenderSettings(bpy.types.PropertyGroup):
 
@@ -538,7 +541,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
         description="Camera to use as reference point when subdividing geometry, useful to avoid crawling "
         "artifacts in animations when the scene camera is moving",
         type=bpy.types.Object,
-        poll=lambda self, obj: obj.type == 'CAMERA',
+        poll=poll_object_is_camera,
     )
     offscreen_dicing_scale: FloatProperty(
         name="Offscreen Dicing Scale",



More information about the Bf-blender-cvs mailing list