Enabling/Disabling bind export in point VOP
3245 4 0- mrCatfish
- Member
- 731 posts
- Joined: Dec. 2006
- Offline
I have a VOP network that has a bind export. Sometimes I want to export the attribute, and sometimes I don't, (using a toggle). I can't see any way to do this… I tried an elaborate if statement in the callback with opwire and unwires, but it doesn't work, (although it works in the textport).
I'm petty sure this is possible, I just don't remember how.
I'm petty sure this is possible, I just don't remember how.
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
CG Supervisor
Machine FX - Cinesite MTL
- bonsak
- Member
- 459 posts
- Joined: Oct. 2011
- Offline
- mrCatfish
- Member
- 731 posts
- Joined: Dec. 2006
- Offline
Yup that worked.
I'm putting the workflow here for posterity's sake.
I'm putting the workflow here for posterity's sake.
- In the hscript callback of the button:
opdef:.?flip `ch("exportN")`
- In the node tab I added the node I will be modifying the the “editable nodes” parm
- In the “extra files” tab I added a new hscript section called “flip”
- The code for that is:
if ($arg1 == "1") then opparm ./rotate_normals vex_outputmask ("*") else opparm ./rotate_normals vex_outputmask ("* ^up") endif
Edited by mrCatfish - Dec. 14, 2018 10:41:00
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
CG Supervisor
Machine FX - Cinesite MTL
- tamte
- Member
- 8538 posts
- Joined: July 2007
- Online
rather than making editable nodes and callbacks which will make your HDA very unflexible especially during updating or if you want to animate your toggle
you can directly reference your toggle value in the Export Parameters parm like this"
attached example
you can directly reference your toggle value in the Export Parameters parm like this"
`ifs(ch("exportN"),"N","")` `ifs(ch("exportup"),"up","")`
attached example
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Sifis
- Member
- 10 posts
- Joined: Oct. 2010
- Offline
tamte
rather than making editable nodes and callbacks which will make your HDA very unflexible especially during updating or if you want to animate your toggle
you can directly reference your toggle value in the Export Parameters parm like this"`ifs(ch("exportN"),"N","")` `ifs(ch("exportup"),"up","")`
attached example
Thank you Tomas, I always had a hard time to selectively export attributes from VOPs. Very useful trick.
-
- Quick Links