Jump to content

Code organization for a shelf tool and python library


andersc

Recommended Posts

Hi,

I'm fairly new to Houdini scripting, but I've written tools/scripts for many other vfx applications. Many thing seems very straight forward, but I haven't found any good recources to handle shelf-tools and my own python libraries.

I'll try to describe what I'm looking to do:

First of all I've added a custom directory to the houdini.env file so I can store my tools on a server (global location for all artists). In that location I'm trying to add a custom tool.
 

houdini_tools

    toolbar
        magic_shelf.shelf
        magic_tool1.shelf
        magic_tool2.shelf

    tools
        magic
            __init__.py
            importers.py
            exporters.py
            utils.py

 

Questions:

1. What do I add in my magic_tool1.shelf so I can for example run code that is in magic.importers? I don't want to sys.path.append(<path>), I want it to be dynamic.

2. Can I make the whole thing more "self contained"? I want to share my "magic" tool to others, so it would be great if I could have it all under a single directory, i.e magic_tools. How would users "install" this?

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