Changing bmp to png files as a batch

Changing bmp to png files as a batch

euchreplayer23
Participant Participant
98 Views
2 Replies
Message 1 of 3

Changing bmp to png files as a batch

euchreplayer23
Participant
Participant

As the title says I would like to have a script to change all my referenced *.bmp files to become referenced *.png files. I have no experience with python or mel.

 

thx u

0 Likes
Accepted solutions (1)
99 Views
2 Replies
Replies (2)
Message 2 of 3

FirespriteNate
Advocate
Advocate
Accepted solution

You may need to clarify a few things here. Do you mean you have a Maya file that uses bmp textures, and you simply want to change the string path name in the scene to be .png instead of .bmp? For example your scene has a texture pointing to: "c:/work/scenes/textures/car_paint_red_Normal.bmp" and you want this changed to point to "c:/work/scenes/textures/car_paint_red_Normal.png" instead? or do you mean you want to literally convert any bmp files you're using into png format files?

You also mention "batch"? is this a script you just want to run manually on any scene you open (e.g. from a shelf button), or is it something you want to batch run on multiple files or folders, either inside or outside of Maya (standalone)?

 

Changing the path string from ".bmp" to ".png" in a single scene is pretty simple to do, but in all honesty, if we are not talking about more than a handful of files, the quickest and easiest solution (for someone with no scripting knowledge) is to save the scene as .MA format (ascii) then open it in a text editor (like Notepad++) and do a search and replace, no scripting necessary.

0 Likes
Message 3 of 3

euchreplayer23
Participant
Participant

Changing the path string from ".bmp" to ".png" in a single scene is pretty simple to do, but in all honesty, if we are not talking about more than a handful of files, the quickest and easiest solution (for someone with no scripting knowledge) is to save the scene as .MA format (ascii) then open it in a text editor (like Notepad++) and do a search and replace, no scripting necessary.

 

Changing to .ma and editing in text editor works great, thanks a lot.