Jump to content
salik

Only load presets in certain conditions

Recommended Posts

Hi all, I am relatively new to the behind-the-scenes of Houdini.
I have created some presets (.idx) - contains "presetA" amd "presetB" that only effects when Mantra node is being created.

One question that I have is - 
I am trying to only allow these presets to be surface if it checks a certain environment variable, in python terms it is derived using `os.getenv('USER')`. FYI, the presets that I have done are currently available across a list of users and I would like to know if it can be limited.

For example, if the 'USER' is 'adam', this presets will be loaded when he created the mantra node. If the 'USER' is 'peter', the presets will then not be loaded.

Is this possible to be done? Many thanks in advance!

Share this post


Link to post
Share on other sites

Hey, 

You have several options here.

  • Wrap Houdini executable into a launcher script and append a path containing a presets to the HOUDINI_PATH, based on a condition.
  • Wrap Houdini node into an HDA and implement your custom presets in Python.
  • Wait for the next Houdini version, where there is going to be possible to customize node's gear menu with XML (and use <labelExpression> tag to enable/disable menu entries)

 

Edited by Stalkerx777

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

×