Hi everyone,
Have to say after being directed to this forum a month ago, I was more than a little surprised Tech Artists talking to each other so openly about their processes and preferences when tackling problems - this is certainly something I’ve missed during my years in the games industry as full-time artist, part-time scripter. But this could stem from the fact few people at my company know about scripting, aside from copying the contents of the script editor
I’ve been spurred on recently by the many posts here about using Python as an environment to launch applications and manipulate say, Photoshop documents and cross communication with Maya which is perfect for a tool I wish to write for my fellow artists at my company. But alas, I’ve hit a wall: How do I get Python working in the first place? I’ve found the Maya documention regarding external Python interpreters a little hard to follow.
I’m running Vista x64, Maya 2008 x64 extension 2. But I will have to install this environment on XP x86 too as the other artists are using that. I understand Maya 2008 has Python 2.4, but win32com (2.4, 32bit) won’t install as it can’t detect a Python 2.4 entry in the registry. Will I need to edit this entry myself?
If I install say, Python 2.5.2, win32com (2.5) installs fine without problems, but then I need to set up the system paths, that is:
PATH (C:\Python25)
PYTHONPATH (C:\Python25 and C:\Python25\Lib\site-packages) <- do I really need that second string?
MAYA_LOCATION (C:\Program Files\Autodesk\Maya2008) <- this is 64bit Maya
From a DOS prompt, I can launch the python console (">>>") with “python”.
The next step, “import maya.standalone” appears to do something (whatever it is, the Python console doesn’t provide feedback). And" maya.standalone.initialize( name=‘python’ )" appears to do more stuff but again, no feedback. According to the Maya documentation, it’s meant to launch Maya in a similar way to “batch mode”. But I don’t see a Maya window or process. Clearly I’ve missed a step.
If I launch Maya manually and in the Python script editor type:
import win32com.client
I get this response, which could be due to Maya pointing at its own Python 2.4 implementation:
Error: No module named win32com.client
Traceback (most recent call last):
File “<maya console>”, line 1, in <module>
ImportError: No module named win32com.client
I know this is a lot of questions, but I would appreciate any insight into where I’m going wrong here.
Kind regards,
Wai-Hung