Asset Pipeline v2 #145
@ -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", ""),
|
||||||
]
|
]
|
||||||
|
@ -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'}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user