PDA

View Full Version : Need a plugin...or script


G3D
02-24-2006, 02:01 AM
I have a scene that has many different materials some of which use .tif images, others use .jpg, and still others are using .psd
The scene has passed through several hands where I work; part of what I have to do is cleanup all of the images which need to be tif format for our render setup. I need a way of editing the scene file globally so that any reference to a .psd or .jpg can be changed to .tif
This way all I need to do is run a PhotoShop batch process to convert all the images and simply reload the scene. Beats manually going into every material and pointing it at the .tif files.
Any ideas on how to do this quickly?

Thanks in advance!

Per-Anders
02-24-2006, 02:12 AM
you can do this with coffee, but it woudl require a little bit of work to do.

first you'd get the first material in yoru scene from the basedocument.

then you'd loop through all the materials.

in each material you'd go through it's channels, looking for shaders or textures.

if you find a texture you change it's name so that it points to your tif rather than whatever else it might be.

if you find a shader you have to check if it contains a texture, or a shader, if a texture do as above, if a shader check it for shaders/textures and so on.

and that's about it. unless you also have relief objects or any other objects that use textures to drive them, in which case you have to do the same thing as above, but for objects as well.

Sneaker
02-24-2006, 07:51 PM
you can try an xml export and use a text editor to make the changes.

-Sneaker

CGTalk Moderation
02-24-2006, 07:51 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.