[Bf-extensions-cvs] [115c9dbc] master: Rigify: don't complain about poll functions in property definitions.

Alexander Gavrilov noreply at git.blender.org
Wed Jul 1 22:02:26 CEST 2020


Commit: 115c9dbc8c28bc7029de6cd50e714ce49a953ac0
Author: Alexander Gavrilov
Date:   Wed Jul 1 23:02:02 2020 +0300
Branches: master
https://developer.blender.org/rBA115c9dbc8c28bc7029de6cd50e714ce49a953ac0

Rigify: don't complain about poll functions in property definitions.

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

M	rigify/__init__.py

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

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)



More information about the Bf-extensions-cvs mailing list