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.
3 changed files with 13 additions and 0 deletions
Showing only changes of commit ac76652d97 - Show all commits

View File

@ -11,4 +11,5 @@ TRANSFER_DATA_TYPES = [
("NONE", "None", ""), ("NONE", "None", ""),
("VERTEX_GROUP", "Vertex Group", ""), ("VERTEX_GROUP", "Vertex Group", ""),
("MODIFIER", "Modifier", ""), ("MODIFIER", "Modifier", ""),
("MATERIAL_SLOT", "Material Slot", ""),
] ]

View File

@ -16,6 +16,7 @@ class ASSETPIPE_OT_update_ownership(bpy.types.Operator):
task_layer_name = file_name.split(".")[-2] task_layer_name = file_name.split(".")[-2]
transferable_data.vertex_groups_update(obj, task_layer_name) transferable_data.vertex_groups_update(obj, task_layer_name)
transferable_data.modifiers_update(obj, task_layer_name) transferable_data.modifiers_update(obj, task_layer_name)
transferable_data.material_slot_update(obj, task_layer_name)
return {'FINISHED'} return {'FINISHED'}

View File

@ -75,3 +75,14 @@ def modifiers_update(obj, task_layer_name):
matches = check_transfer_data_entry(ownership, mod.name, "MODIFIER") matches = check_transfer_data_entry(ownership, mod.name, "MODIFIER")
if len(matches) == 0: if len(matches) == 0:
transfer_data_add_entry(ownership, mod.name, "MODIFIER", task_layer_name) transfer_data_add_entry(ownership, mod.name, "MODIFIER", task_layer_name)
# MATERIAL SLOT
def material_slot_update(obj, task_layer_name):
ownership = obj.transfer_data_ownership
for slot in obj.material_slots:
matches = check_transfer_data_entry(ownership, slot.name, "MATERIAL_SLOT")
if len(matches) == 0:
transfer_data_add_entry(
ownership, slot.name, "MATERIAL_SLOT", task_layer_name
)