I tried these different combination once I did a clean"import" : from _SAMA_LIB.PY reload(LoadLib) as testtest.LoadLib("OpenGL")# Error: ('invalid syntax', ('<maya console>', 2, 24, 'from _SAMA_LIB.PY reload(LoadLib) as testn'))# File "<maya console>", line 1# from _SAMA_LIB.PY reload(LoadLib) as test# ^# SyntaxError:…
Can you tell me what directory structure you're using? Are you using something similar to what I have shown? I don't include the .py in my imports. And once you do a clean import you only need to run: reload(test). Diffult to know what exactly is going on when I don't know your exact module structure. I've never run a from…
Ok let's choose the following one: -|scripts (Maya defaul scripts directory) ---|_SAMA_LIB|PY|OpenGL|SAMA_ExportToOpenGL.py Maybe easier like this> "C:\Users\sama\Documents\maya\2009-x64\scripts\_SAMA_LIB\PY\OpenGL" The right command to import the SAMA_ExportToOpenGL.py file with his function is : from _SAMA_LIB.PY.OpenGL…
At work now, let me see if I can get something working with your directory structure Okay so I've made a file structure similar to what you have, just put the content into your scripts folder: http://www.digitalartisan.ca/python__init.zip now run: import __SAMA_LIB.PY.OpenGL as OpenGL as your initial import, then:…