Takanu / Capsule

(Blender 4.1) Universal batch export manager
https://takanu.itch.io/capsule-blender-addon
GNU General Public License v3.0
191 stars 12 forks source link

OBJ Exporter - Relative MTL Paths #27

Closed Mophs closed 2 years ago

Mophs commented 3 years ago

Exporting OBJ files in Capsule creates MTL files which do not respect the blender exporters default path settings. This requires manual editing of the MTL files to make them relative which would be nice to have automated. This might be linked to the OBJ exporter strip path settings.

The expected behaviour would be that a relative or subdirectory capsule export location would use relative paths in the mtl files.

Tested on blender 2.93.1, Windows and capsule 1.3.1.

Mophs commented 2 years ago

I looked further into the situation and don't think there is a simple fix, the issue is more on the blender obj exporter side than the Capsule side.

Capsule locations respect relative paths and convert them to absolute paths in the export stage, the catch is that the mtl file path is derived directly from the io_scene_obj exporter file path. The capsule locations (absolute paths) will always result in absolute paths unless you force relative paths which isn't ideal either.

Doesn't look like there is an easy way to implement this without some sort of OBJ post processing or changes coming out of the core exporter.