Skip to content

Commit

Permalink
~ Importer material name strip refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
bbeaulant committed Aug 2, 2021
1 parent 04aa55f commit 25302a4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ def run
# Retrieve material (or create it)
material = nil
unless part[:material].nil?
material = materials[part[:material].strip()]
material_name = part[:material].strip
material = materials[material_name]
unless material
material = materials.add(part[:material].strip())
material = materials.add(material_name)
material.color = MATERIALS_PALETTE[material_palette_index]
material_palette_index = (material_palette_index + 1) % MATERIALS_PALETTE.length
end
Expand Down

0 comments on commit 25302a4

Please sign in to comment.