VEX : query primitive type?

   517   4   1
User Avatar
Member
65 posts
Joined: 4月 2020
Offline
is there a VEX way to query what type of polygon a poly is? ie ('polyline' or 'poly', etc).

the only thing i've found so far is the python function to return the list of polys of a said type, but i definitely wouldn't think i'd have to do that. i'd assume there'd be a prim_type() function that vex would have or something?

thanks in advance!
-seneca
User Avatar
Member
9127 posts
Joined: 7月 2007
Offline
to get type name of the primitive get it's "typename" intrinsic value
primintrinsic( 0, "typename", @primnum )
however both poly and polyline will return "Poly" as they are both polygons, the only difference is polyline is an open polygon and poly is closed
so further use
primintrinsic( 0, "closed", @primnum )
Edited by tamte - 2025年2月25日 20:35:05
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
65 posts
Joined: 4月 2020
Offline
omg thank you! i have no clue how you figured that out as even the docs for that command don't mention this stuff. i also searched the web/docs/ai/forums and couldn't find anything, so how you know this blows my mind!

thanks so much!
User Avatar
Member
4858 posts
Joined: 2月 2012
Offline
indigosm
omg thank you! i have no clue how you figured that out as even the docs for that command don't mention this stuff. i also searched the web/docs/ai/forums and couldn't find anything, so how you know this blows my mind!

thanks so much!

Details view aka spreadsheet is your friend

You can get a lot of information analyzing intrinsics beyond what's on docs.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
User Avatar
Member
65 posts
Joined: 4月 2020
Offline
oh very interesting! i have the DETAILS VIEW up all day but never looked into the INTRINSICS section because i didn't know of any uses for it. thanks for the tip!
  • Quick Links