I would like to check current cook value of a wedge attribute in a Python expression.
The same way that we use `@pdg_index` in string parameters etc. but this time we'd like to grab that value in a script. How can I do that?
How to access current cook value of an attribute in Python?
1097 3 0-
- alexmajewski
- Member
- 76 posts
- Joined: Aug. 2017
- Offline
-
- Soothsayer
- Member
- 874 posts
- Joined: Oct. 2008
- Offline
-
- tpetrick
- Staff
- 613 posts
- Joined: May 2014
- Offline
You can access the active work item using pdg.WorkItem() in a Python Expression, and use that to look up the index, attribute values, etc. There's an example in the documentation for the PDG Python module: https://www.sidefx.com/docs/houdini/tops/pdg/index.html#functions [www.sidefx.com]
The next release also has a top-level pdg.attrib(..) function that mirrors the HScript equivalent.
The next release also has a top-level pdg.attrib(..) function that mirrors the HScript equivalent.
-
- alexmajewski
- Member
- 76 posts
- Joined: Aug. 2017
- Offline
-
- Quick Links