From 476be3746e85b4891189c8d480501905b9400c66 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 12 Mar 2021 16:33:13 +0100 Subject: 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. --- intern/cycles/blender/addon/properties.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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", -- cgit v1.2.3