Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-02-22 15:01:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-22 15:01:50 +0300
commit37af7e130b99865575f1fa2315ef806f815b0f42 (patch)
tree0f3b3e7a7d8b39c4d194a68c624301d94c219b28 /rigify/__init__.py
parent29622ebd4d98e86a39c66d2247e2f42ba13d98ff (diff)
Rigidy: update for internal changes to deferred property registration
Diffstat (limited to 'rigify/__init__.py')
-rw-r--r--rigify/__init__.py9
1 files changed, 5 insertions, 4 deletions
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]: