Hello,
In my digital asset I am using a phython module for my functions named
“PythonModule” in the scripts tab in the Edit Operator Type Properties window.
The way I have been accessing those functions is like as in the following code:
node_type = hou.nodeType(hou.objNodeTypeCategory(), “vc_control_tx”)
return node_type.hdaModule().Lower_Range( ch(“base_position_tx”),ch(“offset_base_position_tx”) )
The “problem” is I don't see anywhere this type of code explicitly refers to the “PythonModule” so I am unsure of how to create a second python module and refer to those functions that will be in the second module.
I'm just trying to organize my code a bit differently as in in some of my digital assets they will be only using scripts in the first module but in others, using both.
Any help is appreciated - thanks
Using a differently named PythonModule
2178 2 2-
- BabaJ
- Member
- 2184 posts
- Joined: Sept. 2015
- Offline
-
- awong
- Member
- 818 posts
- Joined: Sept. 2013
- Offline
There's actually a way to setup multiple submodules. It's documented at the bottom of the page here:
http://www.sidefx.com/docs/houdini15.0/hom/hou/HDAModule [sidefx.com]
The idea is to create separate sections for the other Python files. Then, use:
toolutils.createModuleFromSection
to dynamically load them as submodules of PythonModule.
http://www.sidefx.com/docs/houdini15.0/hom/hou/HDAModule [sidefx.com]
The idea is to create separate sections for the other Python files. Then, use:
toolutils.createModuleFromSection
to dynamically load them as submodules of PythonModule.
Andrew / アンドリュー
-
- BabaJ
- Member
- 2184 posts
- Joined: Sept. 2015
- Offline
Thanks awong.
I think a while back I spent some time reading over this particular part of the documentation.
At the time and still now it doesn't seem to make much sense to me.
It seems to suggest a number of different ways to set up and access ones functions.
I think it was you who suggested I use the way as I have listed in my first posting here and I simply “copy and pasted” only replacing the name of the different functions.
I don't understand how all this works, but maybe it's time to reread the documentation you are citing and try to understand it better maybe with other searches too.
Thanks for the input and I will give it a whirl to see how I can get it to work.
I think a while back I spent some time reading over this particular part of the documentation.
At the time and still now it doesn't seem to make much sense to me.
It seems to suggest a number of different ways to set up and access ones functions.
I think it was you who suggested I use the way as I have listed in my first posting here and I simply “copy and pasted” only replacing the name of the different functions.
I don't understand how all this works, but maybe it's time to reread the documentation you are citing and try to understand it better maybe with other searches too.
Thanks for the input and I will give it a whirl to see how I can get it to work.
-
- Quick Links

