I have a large scene that uses a huge number of texturemap (bitmap, mix, composite etc. etc.), but many different texturemap have the same name, although they are different texturemap (not instances). How can I find texturemap with duplicate names and assign a new name to such a texturemap?
I tried different methods using uniqueName, but this did not give the desired result - some texturemap are renamed again and still have the same names, although they are different texturemap. Is there some quick and reliable way to do this?
Here is one of the methods I tried, but it didn’t give the desired result:
here mapsArray - all texturemaps array from scene
fn renMapsName mapsArray = ( uniques = #() dups = #() for i in mapsArray where not (appendifunique uniques i.name) do ( appendIfUnique dups i ) for n in dups do ( n.name=uniqueName n.name ) ) renMapsName mapsArray