Jump to content

Update the help in a digital asset via Python


Recommended Posts

Hi,

I'm stuck. I was working on a tool that would assist it writing the help for a bunch of digital assets. I'm able to extract the help to a string using the embeddedHelp method in HDADefinition, but I can't figure out how to save help changes to the HDADefinition. Appears to me this functionality is missing.

Is there an alternative approach to this problem. Is there a way to convert a HDADefinition to code like asCode() or something, where I could do search/replace to update the help.

EDIT: One idea is to expand the OTL to a folder and then modify the Help text file, but that requires refactoring my Python code. So if there is a way to do this inside Houdini that would be much better for me right now.

Edited by hopbin9
Link to comment
Share on other sites

Help is just stored in the "Help" asset section. You can easily get/set it.

help_section = asset_definition.sections()["Help"]
# hou.HDADefinition.embeddedHelp() is basically just doing the previous and next line.
contents = help_section.contents()

help_section.setContents("Some new help thing")

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...