hi there brothers , i was trying to make a script that auto-manage my lightmaps i bake using vray in 3dsmax , here wt i want it to do:
1-first wt i got : the lightmapped textures with part of their names have the object name that was lightmapped for ex:
Objectname = Floor , lightmapname = FloorVRayRawTotalLightingMap.
2-i want the script to collect all objects with a tag and put them in array then sort them alphabetically.
3-i want the script to collect all lightmaps textures and put them in array then sort them alphabetically.
4-i want the script to assign a lightmap index (alphabetically) in other words , objects names that start with (a) have and index of (0) then (ab) = (1) … so on
5-compare the names of the lightmaps and objects then assign the lightmap to the related object (as a lightmap not material).
i know that step 5 is pretty hard , so if i reach to step 4 it will be enough for me.
i know not so good with scripts (i am pretty bad with : arrays , loops , String functions) , so i wish from anybody to take me a step by step with this.
note: there is no need for a so optimized script bcz i am going to run this once only in the editor.
thanks a lot in advnacd for anyone takes the time to look into this.