diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2020-07-01 23:02:02 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2020-07-01 23:02:18 +0300 |
commit | 115c9dbc8c28bc7029de6cd50e714ce49a953ac0 (patch) | |
tree | 9be62bea6a683cbd1f8802ea8b04bb1b21bba66d /rigify/__init__.py | |
parent | c6453b9803f2f945ff85a9549b80cad8c1f9600f (diff) |
Rigify: don't complain about poll functions in property definitions.
Diffstat (limited to 'rigify/__init__.py')
-rw-r--r-- | rigify/__init__.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/rigify/__init__.py b/rigify/__init__.py index adfa6350..83aafb8c 100644 --- a/rigify/__init__.py +++ b/rigify/__init__.py @@ -416,15 +416,18 @@ class RigifyParameterValidator(object): print("!!! RIGIFY RIG %s: INVALID DEFINITION FOR RIG PARAMETER %s: %r\n" % (self.__rig_name, name, val)) return + # actually defining the property modifies the dictionary with new parameters, so copy it now + new_def = (val[0], val[1].copy()) + + if 'poll' in new_def[1]: + del new_def[1]['poll'] + if name in self.__prop_table: cur_rig, cur_info = self.__prop_table[name] - if val != cur_info: + if new_def != cur_info: print("!!! RIGIFY RIG %s: REDEFINING PARAMETER %s AS:\n\n %s\n" % (self.__rig_name, name, format_property_spec(val))) print("!!! PREVIOUS DEFINITION BY %s:\n\n %s\n" % (cur_rig, format_property_spec(cur_info))) - # actually defining the property modifies the dictionary with new parameters, so copy it now - new_def = (val[0], val[1].copy()) - # inject a generic update callback that calls the appropriate rig classmethod val[1]['update'] = update_callback(name) |