Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions blender/dasu_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
6. Dasu picks it up automatically and places it on the active sheet
"""

bl_info = {
"name": "Dasu Bridge",
"author": "4nigel",
"version": (0, 1, 0),
"blender": (4, 0, 0),
"location": "View3D > N-Panel > Dasu",
"description": "Send Bonsai BIM drawings to the Dasu sheet layout tool",
"category": "Import-Export",
}

import bpy
import json
import os
Expand Down Expand Up @@ -776,14 +786,18 @@ def draw(self, context):
DASU_PT_panel,
]

# Self-unregister (safe to re-run in Text Editor)
for cls in CLASSES:
try: bpy.utils.unregister_class(cls)
except Exception: pass
_unregister_props()
def register():
for cls in CLASSES:
bpy.utils.register_class(cls)
_register_props()
print('\n Dasu panel registered. Press N in the 3D viewport → Dasu tab.\n')


def unregister():
for cls in reversed(CLASSES):
bpy.utils.unregister_class(cls)
_unregister_props()

for cls in CLASSES:
bpy.utils.register_class(cls)
_register_props()

print('\n Dasu panel registered. Press N in the 3D viewport → Dasu tab.\n')
if __name__ == '__main__':
register()