I’m trying to make a script that find texture with same filename but in different location in the scene and relocate all of them to the same path.
Ex.:
Before running the script:
Material_A = C:\Texture.jpg
Material_B = C:\folder\folder\Texture.jpg
Material_C = D:\Texture.jpg
After running the script:
Material_A = C:\Texture.jpg
Material_B = C:\Texture.jpg
Material_C = C:\Texture.jpg
–My idea was:
AllTex = #()
txs = getclassinstances bitmaptexture
for tx in txs do
(
if tx.filename exist in AllTex then (tx.filename = existing tx.filename) --I don’t know how to write that part
else (append AllTex tx.filename)
)
Thank you