Jump to content

How to use extra files in HDAs in python


sanostol

Recommended Posts

hello,

in the script tab of a otl the is a way to ad custom scripts, but how can I use them for a button in that hda, or even better in the python module. until now i used always the python module or imported addition code with import, but I want to package some hdas together not using external imports and I don't want to have double code on several assets, as some functions are used by all of them

thanks

Martin

Link to comment
Share on other sites

  • 2 weeks later...
import toolutils
bar = toolutils.createModuleFromSection

https://www.sidefx.com/docs/houdini/hom/hou/HDAModule

 

If you want package bunch of operators together, nothing stops you from defining all your common Python code in one PythonModule of one operator, and then reference this module using opdef: syntax. in other operators.

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