Asset Pipeline v2 #145

Closed
Nick Alberelli wants to merge 431 commits from (deleted):feature/asset-pipeline-v2 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 8 additions and 8 deletions
Showing only changes of commit 6798e2beca - Show all commits

View File

@ -47,7 +47,7 @@ class AssetTransferMapping:
self.object_map = self._gen_object_map() self.object_map = self._gen_object_map()
self.collection_map = self._gen_collection_map() self.collection_map = self._gen_collection_map()
self.transfer_data_map = self._gen_transfer_data_map() self.transfer_data_map = self._gen_transfer_data_map()
self.other_id_map = self._gen_other_id_map() self.shared_id_map = self._gen_shared_id_map()
def _get_external_object(self, local_obj): def _get_external_object(self, local_obj):
external_obj_name = get_target_name( external_obj_name = get_target_name(
@ -204,8 +204,8 @@ class AssetTransferMapping:
transfer_data_map[name] = map_item transfer_data_map[name] = map_item
return transfer_data_map return transfer_data_map
def _gen_other_id_map(self): def _gen_shared_id_map(self):
other_id_map: Dict[bpy.types.ID, bpy.types.ID] = {} shared_id_map: Dict[bpy.types.ID, bpy.types.ID] = {}
for local_id in get_shared_ids(self._local_col): for local_id in get_shared_ids(self._local_col):
external_id_name = get_target_name(local_id.name) external_id_name = get_target_name(local_id.name)
id_storage = get_storage_of_id(local_id) id_storage = get_storage_of_id(local_id)
@ -216,9 +216,9 @@ class AssetTransferMapping:
and local_id.asset_id_owner != "NONE" and local_id.asset_id_owner != "NONE"
): ):
if external_id: if external_id:
other_id_map[external_id] = local_id shared_id_map[external_id] = local_id
else: else:
if external_id: if external_id:
other_id_map[local_id] = external_id shared_id_map[local_id] = external_id
return other_id_map return shared_id_map

View File

@ -200,8 +200,8 @@ def merge_task_layer(
for col in map.collection_map: for col in map.collection_map:
remap_user(col, map.collection_map[col]) remap_user(col, map.collection_map[col])
for id in map.other_id_map: for id in map.shared_id_map:
remap_user(id, map.other_id_map[id]) remap_user(id, map.shared_id_map[id])
bpy.ops.outliner.orphans_purge( bpy.ops.outliner.orphans_purge(
do_local_ids=True, do_linked_ids=False, do_recursive=True do_local_ids=True, do_linked_ids=False, do_recursive=True