Skip to content

Commit

Permalink
Addition error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vanous committed Dec 28, 2023
1 parent 76cfce2 commit 406f1a0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1370,11 +1370,12 @@ def onDepsgraph(scene):

@bpy.app.handlers.persistent
def onLoadFile(scene):
if ('DMX' in bpy.data.scenes['Scene'].collection.children):
print("DMX", "File contains DMX show, linking...")
bpy.context.scene.dmx.linkFile()
else:
bpy.context.scene.dmx.unlinkFile()
if "Scene" in bpy.data.scenes:
if ('DMX' in bpy.data.scenes['Scene'].collection.children):
print("DMX", "File contains DMX show, linking...")
bpy.context.scene.dmx.linkFile()
else:
bpy.context.scene.dmx.unlinkFile()

# Selection callback
handle = object()
Expand Down

0 comments on commit 406f1a0

Please sign in to comment.