I tried to call some functions in Python module, but it failed.
This problem occurs irregularly, so I can't specify the reason.
Why I can't call my functions? How to avoid this problem?
HDA fails to load python module.
1708 2 0- Escatra
- Member
- 9 posts
- Joined: 5月 2017
- Offline
- graham
- Member
- 1906 posts
- Joined: 11月 2006
- Offline
It looks like all your function definitions are in event handling script sections of your asset and not the "PythonModule" section which is what you can access via the hdaModule() calls. If you move those definitions to that section you should be able to access them from callbacks and stuff.
Alternatively you can use the toolutils.createModuleFromSource to create modules from other sections, though that's probably more annoying to do for actual callbacks: https://www.sidefx.com/docs/houdini/hom/locations.html#asset_modules [www.sidefx.com]
Alternatively you can use the toolutils.createModuleFromSource to create modules from other sections, though that's probably more annoying to do for actual callbacks: https://www.sidefx.com/docs/houdini/hom/locations.html#asset_modules [www.sidefx.com]
Graham Thompson, Technical Artist @ Rockstar Games
- Escatra
- Member
- 9 posts
- Joined: 5月 2017
- Offline
-
- Quick Links