Asset Pipeline v2 #145
@ -31,6 +31,8 @@ def transfer_vertex_group(
|
||||
def transfer_modifier(item, obj_target):
|
||||
# remove old and sync existing modifiers
|
||||
obj_source = item.id
|
||||
if obj_source == obj_target:
|
||||
return
|
||||
old_mod = obj_target.modifiers.get(item.name)
|
||||
if 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):
|
||||
obj_source = item.id
|
||||
if obj_source == obj_target:
|
||||
return
|
||||
# Delete existing material slot if exists
|
||||
for idx in range(len(obj_source.material_slots)):
|
||||
slot = obj_source.material_slots[idx]
|
||||
|
Loading…
Reference in New Issue
Block a user