Asset Pipeline v2 #145
@ -187,7 +187,6 @@ def merge_task_layer(
|
||||
return error_msg
|
||||
|
||||
if len(map.conflict_ids) != 0:
|
||||
|
||||
for conflict_obj in map.conflict_ids:
|
||||
type_name = get_id_type_name(type(conflict_obj))
|
||||
error_msg += (
|
||||
@ -198,9 +197,7 @@ 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"
|
||||
)
|
||||
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()
|
||||
@ -209,9 +206,7 @@ def merge_task_layer(
|
||||
|
||||
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"
|
||||
)
|
||||
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)
|
||||
|
@ -185,8 +185,9 @@ def apply_transfer_data(context: bpy.types.Context, transfer_data_map) -> None:
|
||||
target_obj=target_obj,
|
||||
)
|
||||
|
||||
def data_type_from_transfer_data_key(obj:bpy.types.Object, td_type:str):
|
||||
""" Returns the data on an object that is referred to by the transfer data type"""
|
||||
|
||||
def data_type_from_transfer_data_key(obj: bpy.types.Object, td_type: str):
|
||||
"""Returns the data on an object that is referred to by the transfer data type"""
|
||||
if td_type == constants.VERTEX_GROUP_KEY:
|
||||
return obj.vertex_groups
|
||||
if td_type == constants.MODIFIER_KEY:
|
||||
@ -200,4 +201,4 @@ def data_type_from_transfer_data_key(obj:bpy.types.Object, td_type:str):
|
||||
if td_type == constants.ATTRIBUTE_KEY:
|
||||
return obj.data.attributes
|
||||
if td_type == constants.PARENT_KEY:
|
||||
return obj.parent
|
||||
return obj.parent
|
||||
|
Loading…
Reference in New Issue
Block a user