kopia lustrzana https://github.com/hc-psy/blender-gpt
[fix] register prevent re-registering
rodzic
3e82d05f37
commit
f0210aee44
|
@ -23,13 +23,15 @@ Classes = (BLENDERGPT_PT_PANEL, BLENDERGPT_OT_DEL_ALL_MSG, BLENDERGPT_OT_DEL_MSG
|
|||
|
||||
def register():
|
||||
for cls in Classes:
|
||||
bpy.utils.register_class(cls)
|
||||
if cls.__name__ not in bpy.types.__dict__:
|
||||
bpy.utils.register_class(cls)
|
||||
|
||||
props_initialization()
|
||||
|
||||
|
||||
def unregister():
|
||||
for cls in Classes:
|
||||
bpy.utils.unregister_class(cls)
|
||||
if cls.__name__ in bpy.types.__dict__:
|
||||
bpy.utils.unregister_class(cls)
|
||||
|
||||
props_clear()
|
||||
|
|
Ładowanie…
Reference in New Issue