ben5ch
Nov. 6, 2014 12:32:14
Hi there,
I'm having some trouble here with using certain Python modules inside a Pre/Post Frame script.
Following Python code gives different results:
import sys; print ‘P4’ in sys.modules.keys(); import P4; print ‘P4’ in sys.modules.keys()
in Maya shell it gives: TrueTrue
in Houdini shell is gives: FalseTrue
inside Houdini as Pre/Post Frame script it gives: FalseTrue
inside Maya using Engine Plugin and in Pre/post script in an HDA is gives: False
So it seems to break where it tries to import P4. I guess its not in the right path. Or there is no path at all..
anyone?
cheers,
benS
awong
Nov. 7, 2014 11:38:16
Yeah, it seems like the import is failing somehow. Were there any errors printed out?
Maybe the P4 module has library conflicts when being loaded into this environment. The environment variables to check would be PYTHONPATH, LD_LIBRARY_PATH (for Linux), and PATH (for Windows). If you have different P4 module (and libraries) for Maya and Houdini, you'd want to use the Maya one under Houdini Engine.
ben5ch
Nov. 10, 2014 10:12:41
Thanx… it's solved by doing a sys.path.append() here and there.
There was also some confusion about which paths where loaded in Maya.
cheers,
benS