Posted this over on Odforce a while back and garnared no replies (not sure if no-one knows, or it's a silly question); thought I'd try my luck here.
Having a look at stylesheets and having a bit of difficulty with them, and was hoping someone could point me in the right direction
What I’m looking to do is bind the intrinsic:indexorder at one level and then use this value to randomise an attribute at a lower (group) level. This should be relatively straightforward if I'm understanding this paragraph from the docs right:
Higher target levels in a targeting hierarchy can also bind the value of attributes at that level. You can then make those bound data available as arguments to the CVEX script.
So I’ve got a sop object containing 7 packed objects. Inside those packed objects is a primitive attribute, @tag, which I want to control a material parameter (basecolor).
SOP Level Geometry
- Target (Packed Objects)
Bind id here (intrinsic:indexorder)
– Subtarget (Prim Group, e.g. @tag=tank)
Apply override using id from higher level
Since an example is probably better than my explanation, I’ve attached an example scene. The scene has got two stylesheets, one using the path attribute, which works fine and one is attempting to use the @tag attribute, which doesn't. The stylesheet ui looks like this:
I’m relatively certain I’m missing something obvious (style sheets being an exciting new world), but can’t seem to work out what it is (I keep moving the bind around to no avail…).