Loading custom dll from Python startup script.

   3290   4   1
User Avatar
Member
3 posts
Joined: May 2013
Offline
Hello,

I am evaluating Houdini to possibly add it to our game pipeline that already supports Maya, Max, Mobu and XSI.

I would like to execute a Python script to execute some logic and decide a specific dll to load at start. I get my logic to get executed at start (through $HOME/python2.6libs/pythonrc.py on Win7) but I can't seem to find the equivalent of, lets say, Maya's Python command: maya.cmds.loadPlugin().

Is it possible in Houdini? How?

Maybe it's not too late to copy a dll into a Houdini's lookup folder for plugins in the startup script?

Many thanks.
- Francois
User Avatar
Member
58 posts
Joined: Sept. 2009
Offline
set HOUDINI_DSO_PATH environment variable in your Houdini startup script.

http://www.sidefx.com/docs/hdk12.5/hdk_intro_creatingplugins.html#HDK_Intro_CreatingPlugins_HOUDINI_DSO_PATH [sidefx.com]
User Avatar
Member
3 posts
Joined: May 2013
Offline
laiwayne: That won't help me loading mylibA.dll instead of mylibB.dll if certain conditions. Not sure you've understand my problematic…

Thanks
User Avatar
Member
229 posts
Joined: May 2006
Offline
you could use

hou.NodeTypeCategory's loadDSO() function.

I have not used it, and there is afaik no way to unload .dsos.

What laiwayne is describing is a often used way, where you have your .dso/.dll in different directories (e.g. a folder for each version). When your application is starting (BootStrap) up you remove/add theses paths to the HOUDINI_PATH/HOUDINI_DSO_PATH according to your needs (e.g. based on your shot/sequence/show env)

Infernal
User Avatar
Member
3 posts
Joined: May 2013
Offline
Thanks for the info. I will look into loadDSO(). If that doesn't work, I'll play with the HOUDINI_DSO_PATH.

Cheers!
  • Quick Links