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:…
you only imort the first time. In my example above if I made any changes to the module after the import I would use reload() so: reload(testCode) so try: reload(test) So just to be clear, you import your module the first time and only the first time, then everytime you make a change you use reload. Not at work so can't…
alright it works now with : from _SAMA_LIB.PY.OpenGL import SAMA_ExportToOpenGL as testtest.SAMA_ExportToOpenGL() Thank you a lot! I am updating my script now but I have a set of error,conflict, problem etc... and I cannot launch several time the same following command from Maya... I Need to restart maya for each test :…
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:…