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.
Showing only changes of commit 71ad7bf071 - Show all commits

View File

@ -80,40 +80,42 @@ def apply_transfer_data(context: bpy.types.Context, transfer_data_map) -> None:
"""
for name in transfer_data_map:
transfer_data = transfer_data_map[name]
item = transfer_data[0]
transfer_info = transfer_data[0]
target_obj = transfer_data[1]
if target_obj is None:
print(f"Failed to Transfer data for {item.id_data.name}")
print(f"Failed to Transfer data for {transfer_info.id_data.name}")
continue
if item.type == constants.VERTEX_GROUP_KEY:
if transfer_info.type == constants.VERTEX_GROUP_KEY:
print(f"Transfering Data {constants.VERTEX_GROUP_KEY}: {name}")
transfer_functions.transfer_vertex_group(
context=context,
vertex_group_name=item.name,
vertex_group_name=transfer_info.name,
obj_target=target_obj,
obj_source=item.id_data,
obj_source=transfer_info.id_data,
)
if item.type == constants.VERTEX_COLOR_KEY:
if transfer_info.type == constants.VERTEX_COLOR_KEY:
transfer_functions.transfer_vertex_color(
vertex_color_name=item.name,
vertex_color_name=transfer_info.name,
obj_target=target_obj,
obj_source=item.id_data,
obj_source=transfer_info.id_data,
)
if item.type == constants.MODIFIER_KEY:
if transfer_info.type == constants.MODIFIER_KEY:
print(f"Transfering Data {constants.MODIFIER_KEY}: {name}")
transfer_functions.transfer_modifier(item, target_obj)
if item.type == constants.CONSTRAINT_KEY:
transfer_functions.transfer_constraint(item, target_obj)
if item.type == constants.MATERIAL_SLOT_KEY:
transfer_functions.transfer_modifier(transfer_info, target_obj)
if transfer_info.type == constants.CONSTRAINT_KEY:
transfer_functions.transfer_constraint(transfer_info, target_obj)
if transfer_info.type == constants.MATERIAL_SLOT_KEY:
print(f"Transfering Data {constants.MATERIAL_SLOT_KEY}: {name}")
transfer_functions.transfer_material_slot(item, target_obj)
if item.type == constants.UV_LAYERS_KEY:
transfer_functions.transfer_material_slot(transfer_info, target_obj)
if transfer_info.type == constants.UV_LAYERS_KEY:
transfer_functions.transfer_uv_layer(
obj_target=target_obj, obj_source=item.id_data, uv_name=item.name
obj_target=target_obj,
obj_source=transfer_info.id_data,
uv_name=transfer_info.name,
)
copy_transfer_data_ownership(
transfer_data_item=item,
transfer_data_item=transfer_info,
target_obj=target_obj,
)
@ -153,10 +155,10 @@ def transfer_data_add_entry(
td_type (str): Type of transfer data
task_layer_name (str): Name of current task layer
"""
item = transfer_data.add()
item.name = name
item.owner = task_layer_name.upper()
item.type = td_type
transfer_info = transfer_data.add()
transfer_info.name = name
transfer_info.owner = task_layer_name.upper()
transfer_info.type = td_type
def copy_transfer_data(source_data, target_data):