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 19 additions and 16 deletions
Showing only changes of commit ae48b115bc - Show all commits

View File

@ -26,7 +26,7 @@ def copy_transfer_data_ownership(
def transfer_data_clean(obj):
transfer_functions.vertex_groups_clean(obj)
transfer_functions.vertex_colors_clean(obj)
# transfer_functions.vertex_colors_clean(obj)
# transfer_functions.uv_layer_clean(obj)
transfer_functions.modifiers_clean(obj)
transfer_functions.constraints_clean(obj)
@ -49,6 +49,7 @@ def transfer_data_is_missing(transfer_data_item) -> bool:
or transfer_functions.modifier_is_missing(transfer_data_item)
or transfer_functions.material_slot_is_missing(transfer_data_item)
or transfer_functions.constraint_is_missing(transfer_data_item)
# or transfer_functions.vertex_color_is_missing(transfer_data_item)
# or transfer_functions.uv_layer_is_missing(transfer_data_item)
or transfer_functions.shape_key_is_missing(transfer_data_item)
or transfer_functions.attribute_is_missing(transfer_data_item)
@ -70,7 +71,7 @@ def init_transfer_data(
transfer_functions.init_material_slots(scene, obj)
transfer_functions.init_modifiers(scene, obj)
transfer_functions.init_constraints(scene, obj)
transfer_functions.init_vertex_colors(scene, obj)
# transfer_functions.init_vertex_colors(scene, obj)
# transfer_functions.init_uv_layers(scene, obj)
transfer_functions.init_shap_keys(scene, obj)
transfer_functions.init_attributes(scene, obj)
@ -97,6 +98,8 @@ def apply_transfer_data(context: bpy.types.Context, transfer_data_map) -> None:
if target_obj is None:
print(f"Failed to Transfer data for {transfer_info.id_data.name}")
continue
if transfer_info is None:
continue
if source_obj != target_obj:
if transfer_info.type == constants.VERTEX_GROUP_KEY:
print(f"Transfering Data {constants.VERTEX_GROUP_KEY}: {name}")
@ -106,12 +109,12 @@ def apply_transfer_data(context: bpy.types.Context, transfer_data_map) -> None:
target_obj=target_obj,
source_obj=source_obj,
)
if transfer_info.type == constants.VERTEX_COLOR_KEY:
transfer_functions.transfer_vertex_color(
vertex_color_name=transfer_info.name,
target_obj=target_obj,
source_obj=source_obj,
)
# if transfer_info.type == constants.VERTEX_COLOR_KEY:
# transfer_functions.transfer_vertex_color(
# vertex_color_name=transfer_info.name,
# target_obj=target_obj,
# source_obj=source_obj,
# )
if transfer_info.type == constants.MODIFIER_KEY:
print(f"Transfering Data {constants.MODIFIER_KEY}: {name}")
transfer_functions.transfer_modifier(

View File

@ -25,37 +25,37 @@ def draw_transfer_data(
) -> None:
"""Draw UI List of Transfer Data"""
vertex_groups = []
vertex_colors = []
# vertex_colors = []
material_slots = []
modifiers = []
constraints = []
uv_layers = []
# uv_layers = []
shape_keys = []
attributes = []
for transfer_info in transfer_data:
if transfer_info.type == constants.VERTEX_GROUP_KEY:
vertex_groups.append(transfer_info)
if transfer_info.type == constants.VERTEX_COLOR_KEY:
vertex_colors.append(transfer_info)
# if transfer_info.type == constants.VERTEX_COLOR_KEY:
# vertex_colors.append(transfer_info)
if transfer_info.type == constants.MATERIAL_SLOT_KEY:
material_slots.append(transfer_info)
if transfer_info.type == constants.MODIFIER_KEY:
modifiers.append(transfer_info)
if transfer_info.type == constants.CONSTRAINT_KEY:
constraints.append(transfer_info)
if transfer_info.type == constants.UV_LAYERS_KEY:
uv_layers.append(transfer_info)
# if transfer_info.type == constants.UV_LAYERS_KEY:
# uv_layers.append(transfer_info)
if transfer_info.type == constants.SHAPE_KEY_KEY:
shape_keys.append(transfer_info)
if transfer_info.type == constants.ATTRIBUTE_KEY:
attributes.append(transfer_info)
draw_transfer_data_type(layout, vertex_groups)
draw_transfer_data_type(layout, vertex_colors)
# draw_transfer_data_type(layout, vertex_colors)
draw_transfer_data_type(layout, modifiers)
draw_transfer_data_type(layout, material_slots)
draw_transfer_data_type(layout, constraints)
draw_transfer_data_type(layout, uv_layers)
# draw_transfer_data_type(layout, uv_layers)
draw_transfer_data_type(layout, shape_keys)
draw_transfer_data_type(layout, attributes)