katana opscript – localizing texture files
At work we had to localize all the texture maps in a shot for packaging.
Localization was due to happen from a particular folder onward, keeping the folder structure from that point on.
This would need to work at asset level (local material networks) as well as klf assigned network materials.
This opScript takes 2 user attributes from the opscript node: oldPath, new Path, and crawls through the material.nodes finding pxrTexture nodes and replacing the string.
The CEL can run either at /root/materials//* for local materials, as well as on the /root/world/geo//* on scene graph locations where klf’s are assigned