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