From 418f1b74dd4d8660cab2b8559b657494b5b4126f Mon Sep 17 00:00:00 2001 From: KirilStrezikozin Date: Sat, 18 Feb 2023 21:19:15 +0200 Subject: [PATCH] fix: https://github.com/KirilStrezikozin/BakeMaster-Blender-Addon/issues/25#issuecomment-1434774958 --- operators.py | 2 +- utils.py | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/operators.py b/operators.py index 4abcb18..865065d 100644 --- a/operators.py +++ b/operators.py @@ -444,7 +444,7 @@ def execute(self, context): ### constructing new Table_of_Objects items for index, shell in enumerate(groups): - new_container = BM_Table_of_Objects_Add(scene, context) + universal_container = BM_Table_of_Objects_Add(scene, context) # name is set to the root_name of the first object in the shell universal_container.nm_container_name_old = BM_ITEM_PROPS_nm_container_name_GlobalUpdate_OnCreate(context, CombineToRaw(roots[shell[0]][0])) diff --git a/utils.py b/utils.py index 623e853..1e92d8e 100644 --- a/utils.py +++ b/utils.py @@ -659,12 +659,7 @@ def BM_ITEM_PROPS_nm_uni_container_is_global_Update(self, context): for map_index, map in enumerate(object.global_maps): to_remove.append(map_index) for map_index in sorted(to_remove, reverse=True): - # unset highpolies - BM_ITEM_PROPS_hl_highpoly_SyncedRemoval(context, map_index, 'MAP', False) - # update use_cage - BM_ITEM_PROPS_hl_cage_UpdateOnRemove(context, map_index, 'MAP') - object.global_maps.remove(map_index) - BM_ITEM_PROPS_hl_highpoly_EnsureHighpolyMarked(context) + BM_Table_of_Maps_Remove(object.global_maps, context, map_index) object.global_maps_active_index = 0 # add @@ -2255,7 +2250,7 @@ def BM_ITEM_PROPS_hl_highpoly_unset_none(context, container): for index in sorted(to_remove, reverse=True): container.hl_highpoly_table.remove(index) - container.hl_highpoly_table_active_index = highpoly_index + container.hl_highpoly_table_active_index = highpoly_index - 1 def BM_ITEM_PROPS_hl_highpoly_UpdateOnAddOT(context): for object in context.scene.bm_table_of_objects: