[Bf-blender-cvs] [fa27d81937e] master: Fix T61401: Failure to register a `GizmoGroup` after unregistering it

mano-wii noreply at git.blender.org
Mon Jul 8 18:48:20 CEST 2019


Commit: fa27d81937ebed6283f329024951ab6aa82dd2d4
Author: mano-wii
Date:   Mon Jul 8 13:48:01 2019 -0300
Branches: master
https://developer.blender.org/rBfa27d81937ebed6283f329024951ab6aa82dd2d4

Fix T61401: Failure to register a `GizmoGroup` after unregistering it

It does not seem right to rely on the python code to fix problems in the C code.
But this already works like this with the other Python Classes.

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

M	release/scripts/modules/bpy_types.py

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

diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 3970517a211..ec016d364c6 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -655,6 +655,12 @@ class Gizmo(StructRNA):
         return (batch, shader)
 
 
+    # Dummy class to keep the reference in `bpy_types_dict` and avoid
+# erros like: "TypeError: expected GizmoGroup subclass of class ..."
+class GizmoGroup(StructRNA):
+    __slots__ = ()
+
+
 # Only defined so operators members can be used by accessing self.order
 # with doc generation 'self.properties.bl_rna.properties' can fail
 class Operator(StructRNA, metaclass=RNAMeta):



More information about the Bf-blender-cvs mailing list