Jump to content

Only load presets in certain conditions


salik

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!

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...