Python Scripting "Asset Manager - Configuration"

   1065   1   1
User Avatar
Member
8 posts
Joined: Nov. 2022
Offline
Hello.
I am struggling to find a way to automatically set/unset the "Save Operator Definitions to HIP file" option, which can be found in the "Asset Manager - Configuration" window.

I have a Python Script, which packs up a project, so that it can be handed to another artist. In the process I would like to embed the HDAs in the HIP file. By default, I have the "Save Operator Definitions to HIP file" option turned of on my workstation. I just need it when saving a specific HIP file. Right now I can not fully automate this process because I always need to manually set the checkmark for HDA embedding before saving the HIP file and afterwards I manually unset the checkmark again.

Is there a way to automate this step?
Edited by a41b - Feb. 6, 2024 05:26:14

Attachments:
asset_manager_configuration.gif (52.4 KB)

User Avatar
Member
8 posts
Joined: Nov. 2022
Offline
Support provided me with a solution.
There is no direct HOM function for configuring the Asset Manager Configuration.
But there is a HScript command: otconfig [www.sidefx.com].
And HScript can be triggered through the hou.hscript() [www.sidefx.com] function.

In my case "Save Operator Definition to HIP File" would be activated/ deactivated with the following commands:
hou.hscript("otconfig -s 1")
hou.hscript("otconfig -s 0")
  • Quick Links