Update parameters scripting syntax

   910   2   0
User Avatar
Member
157 posts
Joined: 7月 2005
Offline
Am modifying simple rendering scripts previously used with Sops/Mantra, but cannot find the correct syntax for Lops/Karma.

For example:

To change the render visibility of an object to "phantom" in a Render Geometry Settings LOP, (primvars:karma:object:rendervisibilty), I've been reduced to using...

opparm RGS_lop_for_object xn__primvarskarmaobjectrendervisibility_4xbfg ( "-primary" )

It works, but it's nasty.

What is the proper syntax to set this example parameter?
Should I be using something other than "opparm" in LOPs?
Edited by fgillis - 2023年12月21日 09:29:31
Floyd Gillis
User Avatar
スタッフ
4525 posts
Joined: 7月 2005
Offline
hscript has the encodeparm() function. So you could make this more legible by doing:

opparm RGS_lop_for_object `encodeparm("primvars:karma:object:rendervisibility")` ( "-primary" )
Edited by mtucker - 2023年12月21日 19:28:44
User Avatar
Member
157 posts
Joined: 7月 2005
Offline
Thank you Mark.

Works great, and much easier than hunting through opscript outputs for (bizarre) variable names.
Floyd Gillis
  • Quick Links