[Bf-extensions-cvs] [37af7e13] master: Rigidy: update for internal changes to deferred property registration
Campbell Barton
noreply at git.blender.org
Mon Feb 22 13:02:25 CET 2021
Commit: 37af7e130b99865575f1fa2315ef806f815b0f42
Author: Campbell Barton
Date: Mon Feb 22 23:01:50 2021 +1100
Branches: master
https://developer.blender.org/rBA37af7e130b99865575f1fa2315ef806f815b0f42
Rigidy: update for internal changes to deferred property registration
===================================================================
M rigify/__init__.py
===================================================================
diff --git a/rigify/__init__.py b/rigify/__init__.py
index 1be1a310..65947ee8 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -455,16 +455,17 @@ class RigifyParameterValidator(object):
def __getattr__(self, name):
return getattr(self.__params, name)
- def __setattr__(self, name, val):
+ def __setattr__(self, name, val_original):
# allow __init__ to work correctly
if hasattr(RigifyParameterValidator, name):
- return object.__setattr__(self, name, val)
+ return object.__setattr__(self, name, val_original)
- if not (isinstance(val, tuple) and callable(val[0]) and isinstance(val[1], dict)):
- print("!!! RIGIFY RIG %s: INVALID DEFINITION FOR RIG PARAMETER %s: %r\n" % (self.__rig_name, name, val))
+ if not isinstance(val_original, bpy.props._PropertyDeferred):
+ print("!!! RIGIFY RIG %s: INVALID DEFINITION FOR RIG PARAMETER %s: %r\n" % (self.__rig_name, name, val_original))
return
# actually defining the property modifies the dictionary with new parameters, so copy it now
+ val = (val_original.function, val_original.keywords)
new_def = (val[0], val[1].copy())
if 'poll' in new_def[1]:
More information about the Bf-extensions-cvs
mailing list