I am trying to make a custom UV layout setup that takes into account which materials are assigned to a primitive and grouping their UV islands together. Depending on which material a primitive has assigned to it it has a prim attribute that corresponds to the material.
My plan was to create a for loop that takes the total number of materials used as the number of iterations. I created a detail attribute that has a list of all the materials in an array and I want to use the iteration number to iterate over that array and use that to only create a uv layout for one material at a time. When the loop is done and every material has a layout that has the uv islands grouped together, I would use the uv layout node aga
in and keep the islands connected via the connectivity override.
Unfortunately I cannot figure out how to drive the group parameter in the uv layout node with the content of my "currentGroup" attribute. In my current state I use this expression:
`detail("../get_current_group", "currentGroup", 0)`
however it does not seem to work.
Can anyone tell me how one would achieve this or even have a more clever way of achieving the same thing?
Cheers!