From 0471a9407db6e6a6170f7f82bbdf29de9850cdc2 Mon Sep 17 00:00:00 2001 From: tingjoybits Date: Mon, 2 May 2022 16:34:12 +0300 Subject: [PATCH] fix compatibility with the old versions --- functions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions.py b/functions.py index f75d8e2..3df3152 100644 --- a/functions.py +++ b/functions.py @@ -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) @@ -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