Match all the highest component kind prims

   969   1   0
User Avatar
Member
14 posts
Joined: 1月 2021
Offline
Hi all,

I'm trying to use the '%highest' auto-collection like this:
%highest(%kind:component)
but it's not returning anything and I'm guessing because there are other kinds above the components in my scene graph and the documentation states that traversal of prims that don't match is skipped.
So I'm wondering if anyone knows how to collect just the first-reached component kinds from the root.
Something like '%kind:group/%kind:component' ?

Thanks
Edited by m-cg - 2022年7月19日 11:36:40
User Avatar
スタッフ
4445 posts
Joined: 7月 2005
Offline
What does %kind:component return? Try shift-clicking on the arrow next to any primitive pattern field to get a popup dialog that lets you test primitive patterns. If %kind:component returns nothing, there are two likely issues:
1. Your kind hierarchy is malformed. A valid kind hierarchy should have group or assembly kinds all the way down the hierarchy to a component kind, then no more kinds inside the component kinds except subcomponents.
2. Your component primitives are instanced, and most LOP nodes don't let you operate on instanced primitives. So if your components are "instance proxies", they won't match the %kind:component pattern. To test this, try putting down a Collection LOP (which does allow instance proxy primitives), and shift-click the Primitives parameter to get the prim pattern dialog. If %kind:component returns something in that LOP, then your components are instance proxies. Which means that you can't actually edit those primitives anyway, so you may want to reconsider what you're trying to do, or how you've organized your kind hierarchy.

And finally, if your "kind" hierarchy is well-formed, %highest(%kind:component) should always return exactly the same prims as %kind:component, because a component should never be nested inside another component.
  • Quick Links