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 ed63af71f9 - Show all commits

View File

@ -31,6 +31,8 @@ def transfer_vertex_group(
def transfer_modifier(item, obj_target): def transfer_modifier(item, obj_target):
# remove old and sync existing modifiers # remove old and sync existing modifiers
obj_source = item.id obj_source = item.id
if obj_source == obj_target:
return
old_mod = obj_target.modifiers.get(item.name) old_mod = obj_target.modifiers.get(item.name)
if old_mod: if old_mod:
obj_target.modifiers.remove(old_mod) obj_target.modifiers.remove(old_mod)
@ -85,6 +87,8 @@ def transfer_modifier(item, obj_target):
def transfer_material_slot(item, obj_target): def transfer_material_slot(item, obj_target):
obj_source = item.id obj_source = item.id
if obj_source == obj_target:
return
# Delete existing material slot if exists # Delete existing material slot if exists
for idx in range(len(obj_source.material_slots)): for idx in range(len(obj_source.material_slots)):
slot = obj_source.material_slots[idx] slot = obj_source.material_slots[idx]