Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Juraj

python add all deep render properties

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