mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Make wavefront material parser use relative path for textures
This commit is contained in:
@@ -100,7 +100,9 @@ class IMICFPS
|
|||||||
when 'd' # Dissolved (Transparency)
|
when 'd' # Dissolved (Transparency)
|
||||||
when 'illum' # Illumination model
|
when 'illum' # Illumination model
|
||||||
when 'map_Kd' # Diffuse texture
|
when 'map_Kd' # Diffuse texture
|
||||||
@model.materials[@model.current_material].set_texture(array[1])
|
texture = File.basename(array[1])
|
||||||
|
texture_path = "#{File.expand_path("../../", @model.file_path)}/textures/#{texture}"
|
||||||
|
@model.materials[@model.current_material].set_texture(texture_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user