Asset Pipeline v2 #145
@ -179,15 +179,14 @@ def merge_task_layer(
|
||||
external_col = bpy.data.collections[f"{col_base_name}.{external_suffix}"]
|
||||
|
||||
map = AssetTransferMapping(local_col, external_col, local_tls)
|
||||
|
||||
if len(map.conflict_transfer_data) != 0:
|
||||
error_msg = ''
|
||||
if len(map.conflict_transfer_data) != 0:
|
||||
for conflict in map.conflict_transfer_data:
|
||||
error_msg += f"Transfer Data conflict found for '{conflict.name}' on obj '{conflict.id_data.name}'\n"
|
||||
return error_msg
|
||||
|
||||
if len(map.conflict_ids) != 0:
|
||||
error_msg = ''
|
||||
|
||||
for conflict_obj in map.conflict_ids:
|
||||
type_name = get_id_type_name(type(conflict_obj))
|
||||
error_msg += (
|
||||
@ -197,12 +196,22 @@ def merge_task_layer(
|
||||
|
||||
# Remove all transfer data from target objects
|
||||
for source_obj in map.object_map:
|
||||
if source_obj.data.users > 1:
|
||||
error_msg += (
|
||||
f"Object {source_obj.name} contains multi-user datablock'\n"
|
||||
)
|
||||
return error_msg
|
||||
target_obj = map.object_map[source_obj]
|
||||
target_obj.transfer_data_ownership.clear()
|
||||
|
||||
apply_transfer_data(context, map.transfer_data_map)
|
||||
|
||||
for source_obj in map.object_map:
|
||||
if target_obj.data.users > 1:
|
||||
error_msg += (
|
||||
f"Object {source_obj.name} contains multi-user datablock'\n"
|
||||
)
|
||||
return error_msg
|
||||
target_obj = map.object_map[source_obj]
|
||||
remap_user(source_obj, target_obj)
|
||||
transfer_data_clean(target_obj)
|
||||
|
Loading…
Reference in New Issue
Block a user