Page MenuHome

You can't register a `GizmoGroup` after unregistering it
Open, Confirmed, MediumPublic

Description

System Information
Operating system: windows 64bits

Blender Version
Broken:
blender2.8, 2019-02-10

Short description of error
When trying to unregister and then register an addon that supports GizmoGroups. An error message is displayed and the process stops.

Exact steps for others to reproduce the error
In the gizmo_simple.py template, add these lines:

issubclass(MyLightWidgetGroup, bpy.types.GizmoGroup)

bpy.utils.unregister_class(MyLightWidgetGroup)
bpy.utils.register_class(MyLightWidgetGroup)

When trying to execute the code through Blender, you should see the error message :

Traceback (most recent call last):
  File "\gizmo_simple.py", line 52, in <module>

TypeError: expected GizmoGroup subclass of class "MyLightWidgetGroup"
Error: Python script fail, look in the console for now...

Details

Type
Bug

Event Timeline

Jacques Lucke (JacquesLucke) triaged this task as Confirmed, Medium priority.Mon, Feb 11, 11:52 AM

It's interesting that this error is related to issubclass(MyLightWidgetGroup, bpy.types.GizmoGroup). When I remove this line, it works just fine.