Littte Texture Name Converter Tool

Community Forums/Developer Stations/Littte Texture Name Converter Tool

Knotz(Posted 2005) [#1]
Hi,

We needed a simple way to convert texture names inside a single b3d file or a directory full of b3d files, so i made this little tool.

You can download it from here



In the file/dir textbox fill in the name of the b3d file or the directory (without the trailing slash).

Put the string you searching for in the find box and the replacement string the replace box. The tool accepts simple regular expressions.

Examples

Simple replace:
Find: foo Replace: bar
this_foo_tex.jpg --> this_bar_tex.jpg

Replace a directory name:
Find: .*/ Replace: data/textures/
l:/somedir/somwhere/tex.jpg --> data/textures/tex.jpg

Insert a dierctory name (reg expr. with grouping):
Find: (.*) Replace: data/textures/\01
tex.jpg --> data/textures/tex.jpg

Consider the tool to be beta software.
Using this tool is on your responsibility!
Also make copies of the b3d files before you start modiyfing them!!!!


Beaker(Posted 2005) [#2]
Nice. Will it replace file extensions as well?


Knotz(Posted 2005) [#3]
@Beaker:
Should be no problem:

Find jpg Replace: png
tex.jpg --> tex.png

Or this way (a little safer, it only looks for a jpg at the end of the string)
Find jpg$ Replace: png


Beaker(Posted 2005) [#4]
Do you use gile[s]? Would this be handy in gile[s] as a plugin? If so I might make something simple to do just that.


Knotz(Posted 2005) [#5]
We use Gile[s]. IIRC you can drop the pathnames from the textures while exporting to b3d in gile[s].

I don't know if gile[s] needs such a plugin. Depends on the person who uses it. I made this tool because I wanted to place the textures in a different dir than the models and al the models had different pathnames for the textures like in the screenshot above (blame the artist).

I think it's less work to make a special plugin in gile[s] which does the same than retool this app.