Asset Pipeline v2 #145
@ -92,7 +92,7 @@ def transfer_material_slot(item, obj_target):
|
||||
# Delete existing material slot if exists
|
||||
for idx in range(len(obj_source.material_slots)):
|
||||
slot = obj_source.material_slots[idx]
|
||||
if asset_suffix.get_asset_basename(slot.material.name) == item.name:
|
||||
if asset_suffix.get_basename(slot.material.name) == item.name:
|
||||
obj_target.active_material_index = idx
|
||||
bpy.ops.object.material_slot_remove({"object": obj_target})
|
||||
|
||||
@ -101,7 +101,7 @@ def transfer_material_slot(item, obj_target):
|
||||
for idx in range(len(obj_source.material_slots)):
|
||||
if idx >= len(obj_target.material_slots):
|
||||
slot = obj_source.material_slots[idx]
|
||||
if asset_suffix.get_asset_basename(slot.material.name) == item.name:
|
||||
if asset_suffix.get_basename(slot.material.name) == item.name:
|
||||
bpy.ops.object.material_slot_add({"object": obj_target})
|
||||
obj_target.material_slots[idx].link = obj_source.material_slots[
|
||||
idx
|
||||
|
@ -21,9 +21,9 @@ def apply_transfer_data(
|
||||
):
|
||||
for item in transfer_data_list:
|
||||
for target_obj in target_col.objects:
|
||||
if asset_suffix.get_asset_basename(
|
||||
target_obj.name
|
||||
) == asset_suffix.get_asset_basename(item.id.name):
|
||||
if asset_suffix.get_basename(target_obj.name) == asset_suffix.get_basename(
|
||||
item.id.name
|
||||
):
|
||||
if item.type == "VERTEX_GROUP":
|
||||
transfer_functions.transfer_vertex_group(
|
||||
context=context,
|
||||
|
Loading…
Reference in New Issue
Block a user