Revert removal of lambda usage for Python RNA callbacks
This reverts commits -476be3746e
-8d50a3e19e
-08dbc4f996
(partially).
This commit is contained in:
parent
e125305af4
commit
81178eca7c
|
@ -226,9 +226,6 @@ 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):
|
||||
|
||||
|
@ -541,7 +538,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=poll_object_is_camera,
|
||||
poll=lambda self, obj: obj.type == 'CAMERA',
|
||||
)
|
||||
offscreen_dicing_scale: FloatProperty(
|
||||
name="Offscreen Dicing Scale",
|
||||
|
|
|
@ -860,7 +860,9 @@ class WM_OT_url_open_preset(Operator):
|
|||
|
||||
type: EnumProperty(
|
||||
name="Site",
|
||||
items=WM_OT_url_open_preset._preset_items,
|
||||
items=lambda self, _context: (
|
||||
item for (item, _) in WM_OT_url_open_preset.preset_items
|
||||
),
|
||||
)
|
||||
|
||||
id: StringProperty(
|
||||
|
@ -915,10 +917,6 @@ class WM_OT_url_open_preset(Operator):
|
|||
"https://www.blender.org/about/credits/"),
|
||||
]
|
||||
|
||||
@staticmethod
|
||||
def _preset_items(_self, _context):
|
||||
return (item for (item, _) in WM_OT_url_open_preset.preset_items)
|
||||
|
||||
def execute(self, context):
|
||||
url = None
|
||||
type = self.type
|
||||
|
@ -1220,14 +1218,11 @@ class WM_OT_properties_edit(Operator):
|
|||
)
|
||||
subtype: EnumProperty(
|
||||
name="Subtype",
|
||||
items=WM_OT_properties_edit._subtype_items_fn,
|
||||
items=lambda self, _context: WM_OT_properties_edit.subtype_items,
|
||||
)
|
||||
|
||||
subtype_items = rna_vector_subtype_items
|
||||
|
||||
def _subtype_items_fn(_self, _context):
|
||||
return WM_OT_properties_edit.subtype_items
|
||||
|
||||
def _init_subtype(self, prop_type, is_array, subtype):
|
||||
subtype = subtype or 'NONE'
|
||||
subtype_items = rna_vector_subtype_items
|
||||
|
|
Loading…
Reference in New Issue