Skip to content

Commit

Permalink
removed guards from add and remove affixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshQuake committed Nov 30, 2024
1 parent cd927d4 commit d2cb771
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/addons/send2ue/resources/extensions/affixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ def add_affixes():
)
else:
append_affix(mesh_object, properties.extensions.affixes.static_mesh_name_affix)
if properties.import_materials_and_textures:
for slot in mesh_object.material_slots:
if slot.material:
append_affix(slot.material, properties.extensions.affixes.material_name_affix)

for slot in mesh_object.material_slots:
if slot.material:
append_affix(slot.material, properties.extensions.affixes.material_name_affix)

texture_images = get_texture_images(mesh_object)
for image in texture_images:
save_image_filepath(image)
rename_all_textures(texture_images, append_affix, properties)
texture_images = get_texture_images(mesh_object)
for image in texture_images:
save_image_filepath(image)
rename_all_textures(texture_images, append_affix, properties)

for rig_object in rig_objects:
actions = utilities.get_actions(rig_object, properties.export_all_actions)
Expand Down Expand Up @@ -72,12 +72,12 @@ def remove_affixes():
discard_affix(mesh_object, properties.extensions.affixes.skeletal_mesh_name_affix)
if old_mesh_object_name == mesh_object.name:
break
if properties.import_materials_and_textures:
for slot in mesh_object.material_slots:
discard_affix(slot.material, properties.extensions.affixes.material_name_affix)

for slot in mesh_object.material_slots:
discard_affix(slot.material, properties.extensions.affixes.material_name_affix)

texture_images = get_texture_images(mesh_object)
rename_all_textures(texture_images, discard_affix, properties)
texture_images = get_texture_images(mesh_object)
rename_all_textures(texture_images, discard_affix, properties)

for rig_object in rig_objects:
actions = utilities.get_actions(rig_object, properties.export_all_actions)
Expand Down

0 comments on commit d2cb771

Please sign in to comment.