[Bf-extensions-cvs] [55a605df] blender2.8: Rigify: clear RigifyParameters properties when toggling legacy mode.
Alexander Gavrilov
noreply at git.blender.org
Mon Nov 19 15:01:18 CET 2018
Commit: 55a605dfbe3b2350406cd13e86762a575266e66f
Author: Alexander Gavrilov
Date: Mon Nov 19 15:35:31 2018 +0300
Branches: blender2.8
https://developer.blender.org/rBA55a605dfbe3b2350406cd13e86762a575266e66f
Rigify: clear RigifyParameters properties when toggling legacy mode.
Registering and unregistering the class causes 2.8 to complain
about non-annotation properties, and this avoids the problem.
Plus, legacy and non-legacy shouldn't interact.
===================================================================
M rigify/__init__.py
===================================================================
diff --git a/rigify/__init__.py b/rigify/__init__.py
index 3c0efdfd..7e0c8ada 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -72,6 +72,8 @@ class RigifyPreferences(AddonPreferences):
unregister()
+ clear_rigify_parameters()
+
globals().pop('utils')
globals().pop('rig_lists')
globals().pop('generate')
@@ -104,6 +106,8 @@ class RigifyPreferences(AddonPreferences):
unregister()
+ clear_rigify_parameters()
+
globals().pop('utils')
globals().pop('rig_lists')
globals().pop('generate')
@@ -217,6 +221,15 @@ class RigifyParameters(bpy.types.PropertyGroup):
name: StringProperty()
+# Remember the initial property set
+RIGIFY_PARAMETERS_BASE_DIR = set(dir(RigifyParameters))
+
+def clear_rigify_parameters():
+ for name in list(dir(RigifyParameters)):
+ if name not in RIGIFY_PARAMETERS_BASE_DIR:
+ delattr(RigifyParameters, name)
+
+
class RigifyArmatureLayer(bpy.types.PropertyGroup):
def get_group(self):
More information about the Bf-extensions-cvs
mailing list