diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-03-12 18:33:13 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-03-12 19:49:56 +0300 |
commit | 476be3746e85b4891189c8d480501905b9400c66 (patch) | |
tree | 9ca83a3acaf227f0e350725c3d60655341bf6d18 /intern/cycles/blender/addon/properties.py | |
parent | b01e9ad4f0e34f83c582d1a3c1e3c90f2586dcf5 (diff) |
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.
Diffstat (limited to 'intern/cycles/blender/addon/properties.py')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 5 |
1 files changed, 4 insertions, 1 deletions
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", |