Skip to content

Commit

Permalink
fix compatibility with the old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tingjoybits committed May 2, 2022
1 parent 57bf27b commit 0471a94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def delete_workspace_screens(name, temp=False):
if workspace:
screens = []
for s in workspace.screens:
s.user_clear()
s.name += '_@#TEMP#@'
screens.append(s)
bpy.data.batch_remove(ids=screens)
Expand All @@ -89,7 +90,8 @@ def append_data_from_a_file(filepath, name, duplicates='SKIP'):
if duplicates == 'SKIP' and w not in bpy.data.workspaces:
data_to.workspaces.append(w)
if duplicates == 'OVERWRITE':
delete_workspace_screens(name, temp=True)
# if bpy.app.version >= (3, 2, 0):
# delete_workspace_screens(name, temp=True)
data_to.workspaces.append(w)
if duplicates == 'RENAME':
workspace = w
Expand Down

0 comments on commit 0471a94

Please sign in to comment.