ReplaceImageClips

Abstract: Searches all shaders for a certain image clip and replacees it with another one.

Description: This tool searches all shaders in all materials that are associated with the object or its clusters for a certain image clip and replaces it with another one.

Working Scenarios: This tool is a huge time saver for objects that contain complex shader networks and too many materials on clusters, while you need to create a variation on these objects by just changing their texture images.

User Usage: Select the object then run the script.
You’ll be prompted to pick first the image clip you want to replace and then the image clip you want to replace with.

Developer Usage: You can call this tool from any other scripts using the following sub call:
UserReplaceImageClips( oInObjectCollection, iDoClusters, sSrcClip, sDstClip )

Where oInObjectCollection is an XSI objects collection that contains all objects you want to include in the process.
iDoClusters is an integer flag that determine if the tool should process all materials in clusters or not.
This flag could be:
6 to process clusters, 7 to ignore clusters and any other value to ask for user input.
This tool doesn't returns anything.

Nature: Script

Applies To: XSI 3.5 on NT,Win2K,XP

Languages: VBScript