[Bf-blender-cvs] [8d50a3e19e0] master: Fix T85930: Custom Property Error: Wrong Subtype

Campbell Barton noreply at git.blender.org
Wed Feb 24 06:22:26 CET 2021


Commit: 8d50a3e19e025ef470132e7edadd7b180db833f5
Author: Campbell Barton
Date:   Wed Feb 24 16:16:53 2021 +1100
Branches: master
https://developer.blender.org/rB8d50a3e19e025ef470132e7edadd7b180db833f5

Fix T85930: Custom Property Error: Wrong Subtype

Regression in 08dbc4f996e4e95f3ab64f7bb3e1193700c585f5

Unfortunately lambda functions don't work with postponed annotations.

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

M	release/scripts/startup/bl_operators/wm.py

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

diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 3b94a964148..b14f9c05210 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1220,11 +1220,14 @@ class WM_OT_properties_edit(Operator):
     )
     subtype: EnumProperty(
         name="Subtype",
-        items=lambda self, _context: WM_OT_properties_edit.subtype_items,
+        items=WM_OT_properties_edit._subtype_items_fn,
     )
 
     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



More information about the Bf-blender-cvs mailing list