Jump to content
Juraj

python add all deep render properties

Recommended Posts

Hello,
I am struggling with adding all deep render properties inside a mantra node with python. To do so manually via interface is quite simple, I go to node - edit render properties - filter *deep* - add them all.
However I am modifying mantra nodes with python and it would be great if I could do the same thing automatically.

So far it seems rather tedious - I need to create all ParmTemplates, match their signatures and append to a FolderParmTemplate and set this to the node. Another thing worrying me is menu parameters - I do not need to create interface with menus, can I only set the desired value? Is it equivalent to creating a string parameter and setting it's value to menu item's name (not label)?

 

Thanks,
Juraj

Share this post


Link to post
Share on other sites

Now when I think of it, it might be better to pass those properties as command line arguments in mantra driver.
How should I format those arguments? For example for DCM Z Storage property.

Like this?
mantra -vm_dcmpzstorage "16 bit float"

Share this post


Link to post
Share on other sites

So I  realized, that it is not possible to set rendering properties as mantra command line arguments. But I found cool solution for my problem, it can be done easily with hscript.

opproperty -f /out/mantra1 mantra* *dcm*

This did the trick, I am calling it with hou.hscript() in Python.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×