I’m using egg-palettize to group my textures and hit an interesting problem.
To make parameters for an image file to work I need to specify the filename without any directory part in it.
Let me explain. Here’s a txa file that doesn’t do what I want:
:group group1 dir group1 :imagetype .png canapee.egg : group1 shelf.egg : group1 # textures for static geometry data/textures/world/indoor/furniture/canapee01.png : force-rgba data/textures/world/indoor/furniture/shelf_stock_1.png : force-rgba
in principle, it works fine: I get a palettized image, in the group1 directory and all, but the textures are not forced to RGBA.
To get it to work, I need to change the txa as follows:
:group group1 dir group1 :imagetype .png canapee.egg : group1 shelf.egg : group1 # textures for static geometry # I need to strip data/textures/world/indoor/furniture/ for force-rgba canapee01.png : force-rgba shelf_stock_1.png : force-rgba
So as you see, I need to strip the leading relative path of the textures to get it to work.
This is fine for this example, but for our production code that’s like a ticking time-bomb because some textures might have the same basename, although they are in different directories.
Is there a way to make egg-palettize to accept the full path for the image options?
Again, in my simplified example one could also fix it by a *.png: force-rgba, but for production code with loads and loads of files that wouldn’t work either because not all pngs referenced in the txa should be forced to rgba