How access custom attribute value as expression in VEX , Python

   3860   2   0
User Avatar
Member
33 posts
Joined: April 2017
Offline
Hello Houdini community, allow me to ask a question please, I created a custom int attribute, and I want to use its name to access it's value in an expression to extrude one primitive, I want to write the expression both using VEX and also the Python way, but I'm lost, help please……

Attachments:
PROBLEM-python-vex.jpg (67.8 KB)

User Avatar
Member
2523 posts
Joined: June 2008
Offline
You can promote the detail attribute to the primitive level then use an expression like so…
@choose_prim == 2
But of course your primitive numbers may change after the polyextrude because you are adding new faces.
Edited by Enivob - May 17, 2017 16:12:57

Attachments:
ap_detail_prim.hiplc (62.3 KB)

Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
33 posts
Joined: April 2017
Offline
It works!! , really thanks Enivob, now I can continue my learning process
  • Quick Links