Asset Pipeline v2 #145
@ -26,7 +26,7 @@ def copy_transfer_data_ownership(
|
|||||||
|
|
||||||
def transfer_data_clean(obj):
|
def transfer_data_clean(obj):
|
||||||
transfer_functions.vertex_groups_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.uv_layer_clean(obj)
|
||||||
transfer_functions.modifiers_clean(obj)
|
transfer_functions.modifiers_clean(obj)
|
||||||
transfer_functions.constraints_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.modifier_is_missing(transfer_data_item)
|
||||||
or transfer_functions.material_slot_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.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.uv_layer_is_missing(transfer_data_item)
|
||||||
or transfer_functions.shape_key_is_missing(transfer_data_item)
|
or transfer_functions.shape_key_is_missing(transfer_data_item)
|
||||||
or transfer_functions.attribute_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_material_slots(scene, obj)
|
||||||
transfer_functions.init_modifiers(scene, obj)
|
transfer_functions.init_modifiers(scene, obj)
|
||||||
transfer_functions.init_constraints(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_uv_layers(scene, obj)
|
||||||
transfer_functions.init_shap_keys(scene, obj)
|
transfer_functions.init_shap_keys(scene, obj)
|
||||||
transfer_functions.init_attributes(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:
|
if target_obj is None:
|
||||||
print(f"Failed to Transfer data for {transfer_info.id_data.name}")
|
print(f"Failed to Transfer data for {transfer_info.id_data.name}")
|
||||||
continue
|
continue
|
||||||
|
if transfer_info is None:
|
||||||
|
continue
|
||||||
if source_obj != target_obj:
|
if source_obj != target_obj:
|
||||||
if transfer_info.type == constants.VERTEX_GROUP_KEY:
|
if transfer_info.type == constants.VERTEX_GROUP_KEY:
|
||||||
print(f"Transfering Data {constants.VERTEX_GROUP_KEY}: {name}")
|
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,
|
target_obj=target_obj,
|
||||||
source_obj=source_obj,
|
source_obj=source_obj,
|
||||||
)
|
)
|
||||||
if transfer_info.type == constants.VERTEX_COLOR_KEY:
|
# if transfer_info.type == constants.VERTEX_COLOR_KEY:
|
||||||
transfer_functions.transfer_vertex_color(
|
# transfer_functions.transfer_vertex_color(
|
||||||
vertex_color_name=transfer_info.name,
|
# vertex_color_name=transfer_info.name,
|
||||||
target_obj=target_obj,
|
# target_obj=target_obj,
|
||||||
source_obj=source_obj,
|
# source_obj=source_obj,
|
||||||
)
|
# )
|
||||||
if transfer_info.type == constants.MODIFIER_KEY:
|
if transfer_info.type == constants.MODIFIER_KEY:
|
||||||
print(f"Transfering Data {constants.MODIFIER_KEY}: {name}")
|
print(f"Transfering Data {constants.MODIFIER_KEY}: {name}")
|
||||||
transfer_functions.transfer_modifier(
|
transfer_functions.transfer_modifier(
|
||||||
|
@ -25,37 +25,37 @@ def draw_transfer_data(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Draw UI List of Transfer Data"""
|
"""Draw UI List of Transfer Data"""
|
||||||
vertex_groups = []
|
vertex_groups = []
|
||||||
vertex_colors = []
|
# vertex_colors = []
|
||||||
material_slots = []
|
material_slots = []
|
||||||
modifiers = []
|
modifiers = []
|
||||||
constraints = []
|
constraints = []
|
||||||
uv_layers = []
|
# uv_layers = []
|
||||||
shape_keys = []
|
shape_keys = []
|
||||||
attributes = []
|
attributes = []
|
||||||
|
|
||||||
for transfer_info in transfer_data:
|
for transfer_info in transfer_data:
|
||||||
if transfer_info.type == constants.VERTEX_GROUP_KEY:
|
if transfer_info.type == constants.VERTEX_GROUP_KEY:
|
||||||
vertex_groups.append(transfer_info)
|
vertex_groups.append(transfer_info)
|
||||||
if transfer_info.type == constants.VERTEX_COLOR_KEY:
|
# if transfer_info.type == constants.VERTEX_COLOR_KEY:
|
||||||
vertex_colors.append(transfer_info)
|
# vertex_colors.append(transfer_info)
|
||||||
if transfer_info.type == constants.MATERIAL_SLOT_KEY:
|
if transfer_info.type == constants.MATERIAL_SLOT_KEY:
|
||||||
material_slots.append(transfer_info)
|
material_slots.append(transfer_info)
|
||||||
if transfer_info.type == constants.MODIFIER_KEY:
|
if transfer_info.type == constants.MODIFIER_KEY:
|
||||||
modifiers.append(transfer_info)
|
modifiers.append(transfer_info)
|
||||||
if transfer_info.type == constants.CONSTRAINT_KEY:
|
if transfer_info.type == constants.CONSTRAINT_KEY:
|
||||||
constraints.append(transfer_info)
|
constraints.append(transfer_info)
|
||||||
if transfer_info.type == constants.UV_LAYERS_KEY:
|
# if transfer_info.type == constants.UV_LAYERS_KEY:
|
||||||
uv_layers.append(transfer_info)
|
# uv_layers.append(transfer_info)
|
||||||
if transfer_info.type == constants.SHAPE_KEY_KEY:
|
if transfer_info.type == constants.SHAPE_KEY_KEY:
|
||||||
shape_keys.append(transfer_info)
|
shape_keys.append(transfer_info)
|
||||||
if transfer_info.type == constants.ATTRIBUTE_KEY:
|
if transfer_info.type == constants.ATTRIBUTE_KEY:
|
||||||
attributes.append(transfer_info)
|
attributes.append(transfer_info)
|
||||||
|
|
||||||
draw_transfer_data_type(layout, vertex_groups)
|
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, modifiers)
|
||||||
draw_transfer_data_type(layout, material_slots)
|
draw_transfer_data_type(layout, material_slots)
|
||||||
draw_transfer_data_type(layout, constraints)
|
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, shape_keys)
|
||||||
draw_transfer_data_type(layout, attributes)
|
draw_transfer_data_type(layout, attributes)
|
||||||
|
Loading…
Reference in New Issue
Block a user