I'm trying to dynamically hide objects inside instanced standins through a per instance attribute but I can't seem to get it to work so I must be doing something totally wrong or just misunderstanding how to use operators.
For example I have a maya scene with 4 spheres, sphere01-04 which is then exported as a standin. I instance that standin onto a bunch of points in houdini and then add an integer attribute, "i@switchID", on the points that gives each instance a random int between 0-3. I then re-export the instances into a new standin that get loaded into maya. I now want to use operators and the "switchID" attribute to hide the non specified 3 spheres in each instance. Basically having each instance randomly render a sphere.
I tried running a aiUserDataInt node into a aiSwitchOperator node that has a bunch of aiSetParameter that hides and shows the different spheres but it doesn't seem to pick up the user attribute. I know the switch node setup itself works as I can manually set the index and hide the corresponding sphere but I can't for the life of me get it to use the per instance attribute.
Am I approaching this wrong or have I just reached a potential limitation of the operator implementation?
The aiUserDataInt part won't work...you can't have a shader plugged into an operator node.