From fa27d81937ebed6283f329024951ab6aa82dd2d4 Mon Sep 17 00:00:00 2001 From: mano-wii Date: Mon, 8 Jul 2019 13:48:01 -0300 Subject: 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. --- release/scripts/modules/bpy_types.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '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): -- cgit v1.2.3