This is a follow-up to my previous post, "Update parameters scripting syntax", that was solved by mtucker.
I'm now using an object's Render Geometry Settings node with hscript to control render display using the following line:
opparm object_RGS `encodeparm("primvars:karma:object:rendervisibility")` ( " " )
This works great, but it means any object I want to separately control the display of needs it's own Render Geometry Settings node.
Instead, is there another (simpler) way, using hscript, to set the visibility of a primitive?
Would be convenient if there was something similar to the Scene Graph's "Toggle scene graph primitive's visibility" parameter for render display.
Using hscript to control display of objects
1103 2 0- fgillis
- Member
- 157 posts
- Joined: July 2005
- Offline
- mtucker
- Staff
- 4525 posts
- Joined: July 2005
- Offline
You _can_ implement something in the scene graph tree, but remember that changes made there _only_ affect the viewport. They will never affect your final render. Given that your current approach creates a node, I assume this change in behavior would be undesirable. But using a node I think isn't a big deal if you give the node a particular name based on what it does (clear_render_visibility) and every time you want to hide a prim, add it to the Primitives parameter of this existing node (or create the node if it doesn't exist yet).
- tamte
- Member
- 8833 posts
- Joined: July 2007
- Offline
you may want to elaborate more
the requirement "using hscript" is a bit cryptic
what is your usecase? or process you are triggering those hscript commands from?
why can't you use Python to set the parms in a similar but more flexible way?
or alternatively Python or VEX to set them up during cook procedurally?
the requirement "using hscript" is a bit cryptic
what is your usecase? or process you are triggering those hscript commands from?
why can't you use Python to set the parms in a similar but more flexible way?
or alternatively Python or VEX to set them up during cook procedurally?
Edited by tamte - Jan. 4, 2024 23:04:52
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links