there are some fairly big changes so be sure to read the "what's new" section first and pay close attention to the "install" documentation, as it has changed since verion 0.9.x. keep in mind that some of the docs are still in progress.
there's also a new beta for 0.9.3 which provides pymel 1.0 forward compatibility
downloads:
http://pymel.googlecode.com/files/pymel-1.0.0b1.zip
http://pymel.googlecode.com/files/pymel-0.9.3b1.zip
docs:
ttp://www.luma-pictures.com/tools/pymel/docs/1.0/
let us know if you have any problems so we can fix them for the final release.
-chad
These were the worse 3 hours of my life. This thin won't work. I am using Maya 200964 bit, not sure if the explanations are correct, perhaps a little bit confusion.
Sorry to be so sharp but it was a waste of time.
--
Martin La Land Romero
www.martinromerovfx.com
martin...@gmail.com
(415)261-2172
On Wed, Dec 23, 2009 at 10:48 AM, Martin La Land Romero
Thanks paul however, this is the error message I get
"The system can find the path specified"
Programs easy to use for this:
http://www.baixaki.com.br/download/camtasia-studio.htm ( very much
used for many )
http://www.baixaki.com.br/download/autoscreenrecorder.htm ( little and
easy )
If I knew, he would do so.
On Dec 23, 1:41 am, Martin La Land Romero <martinmrom...@gmail.com>
wrote:
> Hello Paul,
>
> It just finished installing a lot of stuff.
>
> "Installed c:\program
> files\autodesk\maya2009\python\lib\site-packages\beautifulsoup-3.10
> -py2.5.egg
> Finished processing depencies for pymel == 1.0.0
>
> Ok, I will continue now, I think this time is going to work.
>
> Martin
>
> On Tue, Dec 22, 2009 at 8:36 PM, Martin La Land Romero <
>
>
>
> martinmrom...@gmail.com> wrote:
> > Thanks a lot, it seems to be working now...
>
> > Currently downloading a lot of stuff.
>
> > Cool, I'll keep you posted
>
> > Thanks thanks so much.
>
> > On Tue, Dec 22, 2009 at 8:15 PM, Martin La Land Romero <
> > martinmrom...@gmail.com> wrote:
>
> >> Thanks paul however, this is the error message I get
>
> >> "The system can find the path specified"
>
> >> On Tue, Dec 22, 2009 at 7:22 PM, Paul Molodowitch <elron...@gmail.com>wrote:
>
> >>> You need to run that command from the command-line (DOS)... not from the
> >>> script editor inside maya.
>
> >>> In your case, once you've opened up the shell, you would type the
> >>> following three lines:
>
> >>> c:
> >>> cd C:\Python26\pymel
>
> >>> "C:\Program Files\Autodesk\Maya2009\bin\mayapy.exe" setup.py install
>
> >>> - Paul
>
> >>> ie, open up a shell
>
> >>> On Tue, Dec 22, 2009 at 5:23 PM, Martin La Land Romero <
> >>> martinmrom...@gmail.com> wrote:
>
> >>>> Here you go,
>
> >>>> Ok, I'll tell you exactly what's going on.
>
> >>>> 1.I went to this website.
>
> >>>>http://www.luma-pictures.com/tools/pymel/docs/1.0/install.html#manual...
> >>>> On Tue, Dec 22, 2009 at 4:28 PM, Chad Dombrova <chad...@gmail.com>wrote:
>
> >>>>> did you go through the tutorial in "getting started"?
>
> >>>>> what errors are you getting? you're going to have to be more specific
> >>>>> than "These were the worse 3 hours of my life".
>
> >>>>> -chad
>
> >>>>> On Dec 22, 2009, at 6:50 PM, Martin La Land Romero wrote:
>
> >>>>> I spent like three hours trying to get this to work and nothing. Does
> >>>>> anyone has a more clear tuto.
> >>>>> Thanks
>
> >>>>> On Tue, Dec 22, 2009 at 3:48 PM, Martin La Land Romero <
> >>>>> martinmrom...@gmail.com> wrote:
>
> >>>>>> These were the worse 3 hours of my life. This thin won't work. I am
> >>>>>> using Maya 200964 bit, not sure if the explanations are correct, perhaps a
> >>>>>> little bit confusion.
>
> >>>>>> Sorry to be so sharp but it was a waste of time.
>
> >>>>>> On Tue, Dec 22, 2009 at 1:43 PM, Sylvain Berger <
> >>>>>> sylvain.ber...@gmail.com> wrote:
>
> >>>>>>> Superb! I looked at the what's new and this release looks great.
> >>>>>>> It's a shame that I have to move away from Maya scripting more and more :(
>
> >>>>>> martinmrom...@gmail.com
> >>>>>> (415)261-2172
>
> >>>>> --
> >>>>> Martin La Land Romero
> >>>>>www.martinromerovfx.com
> >>>>> martinmrom...@gmail.com
> >>>>> (415)261-2172
>
> >>>>> --
> >>>>>http://groups.google.com/group/python_inside_maya
>
> >>>>> --
> >>>>>http://groups.google.com/group/python_inside_maya
>
> >>>> --
> >>>> Martin La Land Romero
> >>>>www.martinromerovfx.com
> >>>> martinmrom...@gmail.com
> >>>> (415)261-2172
>
> >>>> --
> >>>>http://groups.google.com/group/python_inside_maya
>
> >>> --
> >>>http://groups.google.com/group/python_inside_maya
>
> >> --
> >> Martin La Land Romero
> >>www.martinromerovfx.com
> >> (415)261-2172
>
> > --
> > Martin La Land Romero
> >www.martinromerovfx.com
> > (415)261-2172
>
> --
> Martin La Land Romerowww.martinromerovfx.com
from pymel.core import *
Martin
On Dec 22, 9:17 pm, Martin La Land Romero <martinmrom...@gmail.com>
wrote:
> Hello Paul and everyone,
>
> The installation went pretty well I guess however once in Maya 2009 64bit.
> When I typed
>
> from pymel.core import *
>
> It starts importing a lot of stuff and after 20 seconds it crashes.
> I have attached an image for you to see it.
>
> 2009/12/22 Vitor Lôbo Ramos <vitaummprima...@gmail.com>
>
>
>
> > It would be good use cases difficult to solve or even complicated to
> > understand, some kind soul made a short video tutorial showing how to
> > install pymel.
>
> > Programs easy to use for this:
>
> >http://www.baixaki.com.br/download/camtasia-studio.htm( very much
> > used for many )
> >http://www.baixaki.com.br/download/autoscreenrecorder.htm( little and
> martinmrom...@gmail.com
> (415)261-2172
>
> pymelCrash.jpg
> 1131KViewDownload
The installation went pretty well I guess however once in Maya 2009 64bit.
When I typedfrom pymel.core import *
It starts importing a lot of stuff and after 20 seconds it crashes.
I have attached an image for you to see it.
On Dec 24, 10:25 am, Sylvain Berger <sylvain.ber...@gmail.com> wrote:
> Eclipse is my editor of choice. I was on wing before. And some people here
> use Komodo.
>
>
>
> On Thu, Dec 24, 2009 at 3:57 AM, David Shaw <flopp...@gmail.com> wrote:
> > Exclipse with PyDev for an opensource one, for WingIDE for the other (they
> > have a personal version as well, just without some of the bells and
> > whistles)
>
> > Dave
>
> > On Thu, Dec 24, 2009 at 8:07 AM, Martin La Land Romero <
> > martinmrom...@gmail.com> wrote:
>
> >> Do you have any other alternatives if Maxya does not work? what other IDE
> >> could I use?
>
> >> On Wed, Dec 23, 2009 at 2:02 PM, Martin La Land Romero <
> >> martinmrom...@gmail.com> wrote:
>
> >>> Yeah, I'll email then and see what they say.
>
> >>> Thanks
>
> >>> Martin
>
> >>> On Wed, Dec 23, 2009 at 1:57 PM, Chad Dombrova <chad...@gmail.com>wrote:
>
> >>>> sounds like you'll have to take that one up with the author of maxya
>
> >>>> On Dec 23, 2009, at 4:34 PM, Martin La Land Romero wrote:
>
> >>>> Ok Chad, it seems to be working just fine!
>
> >>>> I have the professional version of Maxya Maya Scripter but when I run
> >>>> any pymel I get error messages, I guess it does not work with pymel so do I
> >>>> have to stick with the boring "script editor" I need syntax highlighting and
> >>>> all the good stuff.
>
> >>>> Martin
>
> >>>> On Wed, Dec 23, 2009 at 12:45 PM, Martin La Land Romero <
> >>>> martinmrom...@gmail.com> wrote:
>
> >>>>> Trying it again, I'll let you know how that goes, ok Chad?
>
> >>>>> I am really excited about this, I have been learning some python and I
> >>>>> know some mel so this will be a good opurtunity to start creating some good
> >>>>> stuff with Pymel.
>
> >>>>> Cheers,
>
> >>>>> Martin
>
> >>>>> On Wed, Dec 23, 2009 at 12:05 AM, Chad Dombrova <chad...@gmail.com>wrote:
>
> >>>>>> The installation went pretty well I guess however once in Maya 2009
> >>>>>> 64bit.
> >>>>>> When I typed
>
> >>>>>> from pymel.core import *
>
> >>>>>> It starts importing a lot of stuff and after 20 seconds it crashes.
> >>>>>> I have attached an image for you to see it.
>
> >>>>>> hi Martin,
> >>>>>> thanks for testing this out so early and getting us your feedback.
> >>>>>> turns out that there was a bug in install script. my fault, sorry! i've
> >>>>>> cleaned up the installation instructions as well, split them by OS, and
> >>>>>> made them more explicit and straight-forward. check them out and let me
> >>>>>> know what you think.
>
> >>>>>> Beta2 is up here:http://pymel.googlecode.com/files/pymel-1.0.0b2.zip
>
> >>>>>> I also updated the what's new as i left out some nice new features.
>
> >>>>>> -chad
>
> >>>>>> --
> >>>>>>http://groups.google.com/group/python_inside_maya
>
> >>>>> --
> >>>>> Martin La Land Romero
> >>>>>www.martinromerovfx.com
> >>>>> martinmrom...@gmail.com
> >>>>> (415)261-2172
>
> >>>> --
> >>>> Martin La Land Romero
> >>>>www.martinromerovfx.com
> >>>> martinmrom...@gmail.com
> >>>> (415)261-2172
>
> >>>> --
> >>>>http://groups.google.com/group/python_inside_maya
>
> >>>> --
> >>>>http://groups.google.com/group/python_inside_maya
>
> >>> --
> >>> Martin La Land Romero
> >>>www.martinromerovfx.com
> >>> martinmrom...@gmail.com
> >>> (415)261-2172
>
> >> --
> >> Martin La Land Romero
> >>www.martinromerovfx.com
I've just upgraded via the easy install. So far so good!
I mentioned to you a couple weeks back the auto-rigging script I've
been working on - I'm going to convert it to be compatible with PyMel
1.0, and I'll release it once it's complete. Ever since converting
all those someNode.setScale() commands to someNode.scale.set(), I
haven't had any problems, so thanks again for that tip. I still have
a ton of error checking to implement, as right now there are some very
rigid requirements for joint orientation (amongst other things), and
I'll give the new UI indentation stuff a whirl.
On Dec 22, 3:53 pm, Chad Dombrova <c...@chadrikvon.com> wrote:
> hi all,
> we've been working hard on the next major release of PyMEL and it's ready to beta test! check out what's new here: http://www.luma-pictures.com/tools/pymel/docs/1.0/whats_new.html
>
> there are some fairly big changes so be sure to read the "what's new" section first and pay close attention to the "install" documentation, as it has changed since verion 0.9.x. keep in mind that some of the docs are still in progress.
>
> there's also a new beta for 0.9.3 which provides pymel 1.0 forward compatibility
>
> downloads:http://pymel.googlecode.com/files/pymel-1.0.0b1.ziphttp://pymel.googlecode.com/files/pymel-0.9.3b1.zip
sounds good. look forward to checking it out.
> Ever since converting
> all those someNode.setScale() commands to someNode.scale.set(), I
> haven't had any problems, so thanks again for that tip.
we made some adjustments to the api wrap in 1.0 that *may* remedy the setScale problem. would you mind putting those back in place and letting us know if you notice any more instabilities?
-chad
#Get the current panel.
myPanel = pm.getPanel(withFocus=True)
#Get active panel type of.
myPanelType = pm.getPanel(type='myPanel')
sphere1, hist = polySphere(name='mySphere')
grp = group(sphere1)
sphere1
# Result: group1|mySphere #
instead of:
Transform(u'group1|mySphere')
If I get the list of cameras in the scene it shows the node type:
ls(type='camera')
# Result: [nt.Camera(u'frontShape'), nt.Camera(u'perspShape'),
nt.Camera(u'sideShape'), nt.Camera(u'topShape')] #
but if I assign the first camera to a variable:
camF = ls(type='camera')[0]
camF
# Result: frontShape #
Also I can't get it with the type() function:
type(camF)
# Result: #
print type(camF)
<class 'pymel.core.nodetypes.Camera'>
type("test")
# Result: <type 'str'> #
print type("test")
<type 'str'>
I'm doing something wrong?
Thanks!
On Tue, Dec 22, 2009 at 9:53 PM, Chad Dombrova <ch...@chadrikvon.com> wrote:
> hi all,
> we've been working hard on the next major release of PyMEL and it's ready to beta test! check out what's new here: http://www.luma-pictures.com/tools/pymel/docs/1.0/whats_new.html
>
> there are some fairly big changes so be sure to read the "what's new" section first and pay close attention to the "install" documentation, as it has changed since verion 0.9.x. keep in mind that some of the docs are still in progress.
>
> there's also a new beta for 0.9.3 which provides pymel 1.0 forward compatibility
>
> downloads:
> http://pymel.googlecode.com/files/pymel-1.0.0b1.zip
> http://pymel.googlecode.com/files/pymel-0.9.3b1.zip
>
> docs:
> ttp://www.luma-pictures.com/tools/pymel/docs/1.0/
>
> let us know if you have any problems so we can fix them for the final release.
>
> -chad
>
>
sphere1, hist = polySphere(name='mySphere')
grp = group(sphere1)
sphere1
# Result: group1|mySphere #
where I was trying to get dt.Vector and I was thinking there was a
problem in my installation or something wrong.
Thanks again,
miguel.
I had an easy time using the included installer, however I'm having a
little trouble with a manual installation (which I need to set up to
put the PyMEL resources on our network).
What I'm doing instead of altering the system environment variables or
maya.env is running a procedure within usersetup.py that inserts the
path to the top-level pymel-1.x.x directory to sys.path. Here is my
sys.path after inserting:
for p in sys.path: print p
C:/Users/John/Documents/maya/scripts/pymel-1.0.0b2
C:\Program Files\Autodesk\Maya2009\bin
C:\Program Files\Autodesk\Maya2009\bin
C:\Program Files\Autodesk\Maya2009\bin\python25.zip
C:\Program Files\Autodesk\Maya2009\Python\DLLs
C:\Program Files\Autodesk\Maya2009\Python\lib
C:\Program Files\Autodesk\Maya2009\Python\lib\plat-win
C:\Program Files\Autodesk\Maya2009\Python\lib\lib-tk
C:\Program Files\Autodesk\Maya2009\Python
C:\Program Files\Autodesk\Maya2009\Python\lib\site-packages
C:/Users/John/Documents/maya/2009-x64/prefs/scripts
C:/Users/John/Documents/maya/2009-x64/scripts
C:/Users/John/Documents/maya/scripts
C:/Users/John/Documents/maya/scripts/.svn
C:/Users/John/Documents/maya/scripts/aor
C:/Users/John/Documents/maya/scripts/comet
C:/Users/John/Documents/maya/scripts/dev
C:/Users/John/Documents/maya/scripts/gnomonStudios
C:/Users/John/Documents/maya/scripts/jasonSchleifer
C:/Users/John/Documents/maya/scripts/jp
C:/Users/John/Documents/maya/scripts/kevinPoly
C:/Users/John/Documents/maya/scripts/maya
C:/Users/John/Documents/maya/scripts/stopStarring
C:/Users/John/Documents/maya/scripts/toolsGeneral
C:/Users/John/Documents/maya/scripts/toolsRigging
C:/Users/John/Documents/maya/scripts/toolsScripting
C:/Users/John/Documents/maya/scripts/toolsTexture
After this, I try to import pymel.core, and get this error:
# Error: If you manually installed pymel, ensure that pymel comes
before Maya's site-packages directory on PYTHONPATH / sys.path. See
pymel docs for more info.
The docs recommend adding this top-level directory to the path, but I
also tried individually adding the pymel and maya subdirectories to
sys.path with the same result.
If anyone has any thoughts as to what's happening here, I'm all ears!
Thanks all!
-JP
On Dec 28 2009, 4:04 am, Miguel González Viñé <lichi...@gmail.com>
wrote:
> Thanks for the explanation, Chad.
> I was following the tutorial and I was totally confused. There's a few
> examples like:
> cam = ls(type='camera')[0]
> parent = cam.getParent()
> trans = parent.getTranslation() # <---
> trans
> # Result: dt.Vector([28.0, 21.0, 28.0])
>
> where I was trying to get dt.Vector and I was thinking there was a
> problem in my installation or something wrong.
>
> Thanks again,
> miguel.
>
string $pymelPath = "C:\\Users\\John\\Documents\\maya\\scripts\
\pymel-1.0.0b2";
python("import sys");
python("sys.path.insert(0,\"" + $pymelPath + "\")");
However, I still get the same error message when importing pymel.core.
The funny thing is that when I set up and place the pymel.pth file
(included in extras) into mayapy's site-packages folder, everything
works great. I'm not up to speed on the intricacies of .pth files,
but my impression is that it basically does the same thing? It looks
like this file adds the PyMEL directory to the path and then
rearranges sys.path so that PyMEL comes first.
So long story short, it *works*, just not exactly the way I'd prefer,
and I feel like there's some path-related magic I'm not quite
understanding. I'm moving on for now, but if anyone can enlighten me,
I'd very much appreciate it!
Executing the diagnostic script from below gives:
pymelDir: /home/felix/dev/pymel-1.0.0b2/pymel
contents: ['api', 'internal', 'cache', 'all.py', 'mayautils.py',
'pymel.conf', 'util', 'tools', 'versions.py', 'mayautils.pyc',
'__init__.py', 'core', 'versions.pyc', '__init__.pyc']
cache dir present: True
cache contents: ['mayaApi2010.zip', 'mayaApi2008.zip',
'mayaCmdsExamples2009.zip', 'mayaCmdsList2008.zip',
'mayaCmdsDocs2010.zip', 'mayaApiMelBridge.zip',
'mayaCmdsDocs2009.zip', 'mayaCmdsDocs2008.zip', 'mayaApi2009.zip',
'mayaCmdsList2010.zip', 'mayaCmdsExamples2008.zip',
'mayaCmdsExamples2010.zip', 'mayaCmdsList2009.zip']
Thanks
Felix
On 23 Dez. 2009, 07:02, Paul Molodowitch <elron...@gmail.com> wrote:
> Hmm... odd. It's trying to regenerate the api cache files, which it
> shouldn't have to do.
>
> Could you copy and paste this into the python script editor in maya, and let
> me know what it prints out?
>
> import imp
> import os
> pymelDir = imp.find_module('pymel')[1]
> print "pymelDir:", pymelDir
> pymelContents = os.listdir(pymelDir)
> print "contents:", pymelContents
> cacheDir = os.path.join(pymelDir, 'cache')
> foundCache = os.path.isdir(cacheDir)
> print "cache dir present:", foundCache
> if foundCache:
> cacheContents = os.listdir(cacheDir)
> print "cache contents:", cacheContents
>
> - Paul
>
> On Tue, Dec 22, 2009 at 9:19 PM, martinmrom...@gmail.com <
>
> martinmrom...@gmail.com> wrote:
> > I tried it again and it keeps crashing, not sure what's going on.
>
> > Martin
>
> > On Dec 22, 9:17 pm, Martin La Land Romero <martinmrom...@gmail.com>
> > wrote:
> > > Hello Paul and everyone,
Hi Paul,
first of all thanks very much for your quick response and thanks for all the effort. Attached is the log file.
Best regards
Felix
Paul Molodowitch schrieb:
Well finally I got Pymel version 1.0 working properly on Maya 2009 and
2010 64 bit, I know i had some problems in the beginning but After
getting Beta2 from Chad everything seem to be working
properly.Eclipse is also working properly with pymel. NOW, since this
is a public group I will continue to post all of my questions here,
regardless of how simpler my problems or issues are, sometimes we need
that experienced feed back, wink. I have been getting to involve with
pymel and I would like to continue playing with the tool and creating
stuff.Ok now, lets finally start using the tool.
Regards,
Martin
On Dec 24 2009, 5:25 am, Sylvain Berger <sylvain.ber...@gmail.com>
wrote:
> Eclipse is my editor of choice. I was on wing before. And some people here
> use Komodo.
>
>
>
>
>
> On Thu, Dec 24, 2009 at 3:57 AM, David Shaw <flopp...@gmail.com> wrote:
> > Exclipse with PyDev for an opensource one, for WingIDE for the other (they
> > have a personal version as well, just without some of the bells and
> > whistles)
>
> > Dave
>
> > On Thu, Dec 24, 2009 at 8:07 AM, Martin La Land Romero <
> > martinmrom...@gmail.com> wrote:
>
> >> Do you have any other alternatives if Maxya does not work? what other IDE
> >> could I use?
>
> >> On Wed, Dec 23, 2009 at 2:02 PM, Martin La Land Romero <
> >> martinmrom...@gmail.com> wrote:
>
> >>> Yeah, I'll email then and see what they say.
>
> >>> Thanks
>
> >>> Martin
>
> >>> On Wed, Dec 23, 2009 at 1:57 PM, Chad Dombrova <chad...@gmail.com>wrote:
>
> >>>> sounds like you'll have to take that one up with the author of maxya
>
> >>>> On Dec 23, 2009, at 4:34 PM, Martin La Land Romero wrote:
>
> >>>> Ok Chad, it seems to be working just fine!
>
> >>>> I have the professional version of Maxya Maya Scripter but when I run
> >>>> any pymel I get error messages, I guess it does not work with pymel so do I
> >>>> have to stick with the boring "script editor" I need syntax highlighting and
> >>>> all the good stuff.
>
> >>>> Martin
>
> >>>> On Wed, Dec 23, 2009 at 12:45 PM, Martin La Land Romero <
> >>>> martinmrom...@gmail.com> wrote:
>
> >>>>> Trying it again, I'll let you know how that goes, ok Chad?
>
> >>>>> I am really excited about this, I have been learning some python and I
> >>>>> know some mel so this will be a good opurtunity to start creating some good
> >>>>> stuff with Pymel.
>
> >>>>> Cheers,
>
> >>>>> Martin
>
> >>>>> On Wed, Dec 23, 2009 at 12:05 AM, Chad Dombrova <chad...@gmail.com>wrote:
>
> >>>>>> The installation went pretty well I guess however once in Maya 2009
> >>>>>> 64bit.
> >>>>>> When I typed
>
> >>>>>> from pymel.core import *
>
> >>>>>> It starts importing a lot of stuff and after 20 seconds it crashes.
> >>>>>> I have attached an image for you to see it.
>
> >>>>>> hi Martin,
> >>>>>> thanks for testing this out so early and getting us your feedback.
> >>>>>> turns out that there was a bug in install script. my fault, sorry! i've
> >>>>>> cleaned up the installation instructions as well, split them by OS, and
> >>>>>> made them more explicit and straight-forward. check them out and let me
> >>>>>> know what you think.
>
> >>>>>> Beta2 is up here:http://pymel.googlecode.com/files/pymel-1.0.0b2.zip
>
> >>>>>> I also updated the what's new as i left out some nice new features.
>
> >>>>>> -chad
>
> >>>>>> --
> >>>>>>http://groups.google.com/group/python_inside_maya
>
> >>>>> --
> >>>>> Martin La Land Romero
> >>>>>www.martinromerovfx.com
> >>>>> martinmrom...@gmail.com
> >>>>> (415)261-2172
>
> >>>> --
> >>>> Martin La Land Romero
> >>>>www.martinromerovfx.com
> >>>> martinmrom...@gmail.com
> >>>> (415)261-2172
>
> >>>> --
> >>>>http://groups.google.com/group/python_inside_maya
>
> >>>> --
> >>>>http://groups.google.com/group/python_inside_maya
>
> >>> --
> >>> Martin La Land Romero
> >>>www.martinromerovfx.com
> >>> martinmrom...@gmail.com
> >>> (415)261-2172
>
> >> --
> >> Martin La Land Romero
> >>www.martinromerovfx.com
"We're running into some trouble with the new deployment scheme for
1.0. Specifically, pymel now needs to be imported prior to the maya
libs, which means it needs to appear before those maya libs in
sys.path.
This is actually tricky to accomplish if you already have PYTHONPATH
defined as an environment variable, and aren't in a position to change
it. This is because if PYTHONPATH is defined, adding it to the
maya.env does nothing (i'm using maya 2008 and carefully verified
this).
I can move the 2 necessary PyMel folders into the folder that's
currently defined in PYTHONPATH, but that's pretty ugly since our maya
tools are supposed to live elsewhere (not to mention the confusion of
having those 2 folders piled in with a bunch of other modules).
So my question for you guys is does anyone know another way to get
PyMel added to the system paths before the standard maya libs, without
relying on PYTHONPATH (or hacking the maya install itself)."
Any help would be appreciated, I'll post response in other forum if
anybody has a good solution.
-jason
let us know if that does not solve the problem. there is another variant to this 3rd option that we haven't fully explored, but it would only work for maya 2010, since .pth location restrictions were relaxed in python 2.6.
-chad
Thanks to you and Jason for helping me out here.
Do you know if .pth files can have env variables in them? Our pymel
install location will vary from project to project (all project data
is lumped under a project specific directory), so if i do hack the
maya install it would be great if it could play nice when you're
switching between projects.
Even if it does support env vars, i'm still not super comfortable
hacking the maya install itself. I prefer to keep all the maya
customization we do easily tractable from the maya.env. For example a
tools programmer troubleshooting problems a year from now and not
realizing that custom scripts/plugins are being referenced from the
install directory itself. That said, it sounds like the .pth is
probably our best option right now. (and fyi - i am using maya 2008).
For the record, my ideal option would be a PYMELPATH env var
(definable either though windows or the maya.env) that makes all this
magic sauce work. Though I'm sure there are some good reasons why
it's not setup that way.
Thx again!
Drew
On Jan 20, 11:16 pm, Chad Dombrova <chad...@gmail.com> wrote:
> hi zero,
> we know this ordering can be a bit tricky to accomplish for those who are not using the "easy" install method, especially on a windows machine where PYTHONPATH might be set as a system environment variable that the user cannot override. to help out in these situations, we've added a third install option to the 1.0 docs, for those who have write access to their maya site-packages directory: http://www.luma-pictures.com/tools/pymel/docs/1.0/install.html#manual...
What I've been doing is using sitecustomize to inject pymel to the
front of the python path at startup. The `downside` is that pymel
shows up in the python path universally but some of the utils that are
included I've been learning/finding great use for in other places. The
Path class in particular - love that thing. So it's not really that
much of a `downside` after all.
Ian
On Jan 21, 6:35 pm, Ian Jones <i...@ambientdivide.com> wrote:
> Sure can
>
>
>
> On Thu, Jan 21, 2010 at 6:21 PM, Chad Dombrova <chad...@gmail.com> wrote:
> > ian, can you provide some instructions on how to set this up that we can
> > include in the docs?
>
> > On Thu, Jan 21, 2010 at 4:51 PM, Ian Jones <i...@ambientdivide.com> wrote:
>
> >> Drew,
>
> >> What I've been doing is using sitecustomize to inject pymel to the
> >> front of the python path at startup. The `downside` is that pymel
> >> shows up in the python path universally but some of the utils that are
> >> included I've been learning/finding great use for in other places. The
> >> Path class in particular - love that thing. So it's not really that
> >> much of a `downside` after all.
>
> >> Ian
>
github automatically turns the restructuredText into html, which is
awesome.
-chad
On Jan 25, 11:50 am, Chad Dombrova <chad...@gmail.com> wrote:
> i hope to have the official docs updated in a few days. in the
> meantime, ian was nice enough to post his instructions here: http://github.com/shrtcww/pymel/blob/1e4d2fbab671445b21e89c0c7a6f2b7d...
import pymel.core; pymel.core._pluginLoaded("COLLADA14")
import pymel.core; pymel.core._pluginLoaded("DFAnimation")
import pymel.core; pymel.core._pluginLoaded("DFMaterialNode")
import pymel.core; pymel.core._pluginLoaded("DFEditor")
import pymel.core; pymel.core._pluginLoaded("DFTreeControl")
import pymel.core; pymel.core._pluginLoaded("objExport")
import pymel.core; pymel.core._pluginLoaded("DFModelling")
import pymel.core; pymel.core._pluginLoaded("DFPhysics")
file -f -new;
// Result: ./untitled //
commandPort -securityWarning -name commandportDefault;
import pymel.core; pymel.core._pluginLoaded("Fur")
import pymel.core; pymel.core._pluginLoaded("studioImport")
import pymel.core; pymel.core._pluginLoaded("DirectConnect")
import pymel.core; pymel.core._pluginLoaded("ikSpringSolver")
import pymel.core; pymel.core._pluginLoaded("compositingInterop")
import pymel.core; pymel.core._pluginLoaded("VectorRender")
import pymel.core; pymel.core._pluginLoaded("rotateHelper")
import pymel.core; pymel.core._pluginLoaded("fbxmaya")
import pymel.core; pymel.core._pluginLoaded("ik2Bsolver")
updateRendererUI;
thx
drew
pymel-1.0.0rc1\pymel\tools\scriptEditor
-chad
"
import maya.mel as mm
ver = mm.eval("getApplicationVersionAsFloat")
if ver >= 2008: from pymel.core import *
else: from pymel import *
"
We'll have multiple teams using different versions of Maya (some
possibly using Maya 8.5 which does not work w/ pymel 1.0). Each team
will be calling from scripts that will be importing pymel. I need to
make sure every script imports the right version of pymel at the top,
thus my hacky code above. Just a little bulky is all. I tried to
create a little module with those lines and call that, but then, of
course, pymel is not loaded into the namespace of the actual script
I'm trying to run.
Perhaps there is a larger view I'm missing? a better way to install
multiple versions of pymel for multiple versions of Maya and let users
all call from the same Maya Python scripts?
Thanks,
-jason
if you're using 0.9.3 and 1.0 then you can just do:
from pymel.all import *
both versions provide a converter that will change all imports of pymel to pymel.all.
-chad
Maybe I'll try Paul's suggestion, just for kicks. See if it works.
-jason
...
4. save this file as sitecustomize.py somewhere in your system python
path.
"
Only the default maya install locations, (*) paths, seem to inject
pymel path early enough, so you might as well use Method 3: pymel.pth.
(*)C:\Program Files\Autodesk\Maya2008\bin
..
(*)C:\Program Files\Autodesk\Maya2008\Python\DLLs
(*)C:\Program Files\Autodesk\Maya2008\Python\lib
..
(*)C:\Program Files\Autodesk\Maya2008\bin
(*)C:\Program Files\Autodesk\Maya2008\Python
(*)C:\Program Files\Autodesk\Maya2008\Python\lib\site-packages
C:/Documents and Settings/jparks/My Documents/maya/2008/prefs/scripts
C:/Documents and Settings/jparks/My Documents/maya/2008/scripts/
C:/Documents and Settings/jparks/My Documents/maya/scripts
Putthing this in userSetup.mel does not work either:
python("import sys;sys.path.insert(0,'/path/to/top-pymel-dir');");
Nor does this in userSetup.mel:
putenv "PYTHONPATH" (`getenv "PYTHONPATH"` + ";/path/to/top-pymel-
dir");
Adding PYTHONPATH to Maya.env or the system's environment variable
seems to work, but that is a pain to do w/ install scripts.
Anybody know how to get pymel path inserted early enough w/
sitecustomize in a non-Maya install folder?
-jason
On Jan 25, 11:50 am, Chad Dombrova <chad...@gmail.com> wrote:
> i hope to have the official docs updated in a few days. in the
> meantime, ian was nice enough to post his instructions here: http://github.com/shrtcww/pymel/blob/1e4d2fbab671445b21e89c0c7a6f2b7d...
I have a print at the top of mine which you should see in the output
window when you start maya. A nice check is that if that print happens
in the script editor it is being executed too late in the process to
make a different.
Ian
Tried to reply earlier, but don't know if it went through. Google
groups delays the post sometimes.
My sitecustomize.py is just like the instructions:
import sys
sys.path.insert(0,'Y:/Tools/SOEmayaTools/python/pymel-1.0.0rc1')
It is only being executed in these default maya install paths:
(*)C:\Program Files\Autodesk\Maya2008\bin
(*)C:\Program Files\Autodesk\Maya2008\Python\DLLs
(*)C:\Program Files\Autodesk\Maya2008\Python\lib
(*)C:\Program Files\Autodesk\Maya2008\bin
(*)C:\Program Files\Autodesk\Maya2008\Python
(*)C:\Program Files\Autodesk\Maya2008\Python\lib\site-packages
but not in these:
C:/Documents and Settings/jparks/My Documents/maya/2008/prefs/scripts
C:/Documents and Settings/jparks/My Documents/maya/2008/scripts/
C:/Documents and Settings/jparks/My Documents/maya/scripts
nor in any other path added via any kind of userSetup.mel.
Where is your sitecustomize.py? Is it in one of those default install
paths or a custom path? and if it is in a custom path, how was it
added? via sys.path.append/insert or putenv PYTHONPATH?
Thanks for print to output tip.
Thanks,
-jason
> It is only being executed in these default maya install paths:
>
> (*)C:\Program Files\Autodesk\Maya2008\bin
> (*)C:\Program Files\Autodesk\Maya2008\Python\DLLs
> (*)C:\Program Files\Autodesk\Maya2008\Python\lib
> (*)C:\Program Files\Autodesk\Maya2008\bin
> (*)C:\Program Files\Autodesk\Maya2008\Python
> (*)C:\Program Files\Autodesk\Maya2008\Python\lib\site-packages
>
> but not in these:
>
> C:/Documents and Settings/jparks/My Documents/maya/2008/prefs/scripts
> C:/Documents and Settings/jparks/My Documents/maya/2008/scripts/
> C:/Documents and Settings/jparks/My Documents/maya/scripts
i believe that's because the last three are added by maya after it has
already begun it's startup process. check maya.app.startup.basic:
def setupScriptPaths():
"""
Add Maya-specific directories to sys.path
"""
# Extra libraries
#
try:
# Tkinter libraries are included in the zip, add that subfolder
p = [p for p in sys.path if p.endswith('.zip')][0]
sys.path.append( os.path.join(p,'lib-tk') )
except:
pass
# Per-version prefs scripts dir (eg .../maya8.5/prefs/scripts)
#
prefsDir = cmds.internalVar( userPrefDir=True )
sys.path.append( os.path.join( prefsDir, 'scripts' ) )
# Per-version scripts dir (eg .../maya8.5/scripts)
#
scriptDir = cmds.internalVar( userScriptDir=True )
sys.path.append( os.path.dirname(scriptDir) )
# User application dir (eg .../maya/scripts)
#
appDir = cmds.internalVar( userAppDir=True )
sys.path.append( os.path.join( appDir, 'scripts' ) )
On Feb 5, 2010, at 4:05 PM, Count Zer0 wrote:
> Ian,
>
> Tried to reply earlier, but don't know if it went through. Google
> groups delays the post sometimes.
>
> My sitecustomize.py is just like the instructions:
>
> import sys
> sys.path.insert(0,'Y:/Tools/SOEmayaTools/python/pymel-1.0.0rc1')
>
>
>
Are you hand-setting PYTHONPATH in all of your user's system
environment
variables (via windows System Properties-> Advanced -> Environment
Variables, etc.)?
or are you setting PYTHONPATH via Maya.env?
(which is my current plan to do, which means my install scripts
need to hack everybody's Maya.env upon install of our tools).
I tried to 'putenv PYTHONPATH 'via userSetup.mel scripts but it did
not put it
'quick enough', it is too late once it gets to userSetup.mel scripts.
Thanks,
-jason
On Feb 5, 4:26 pm, Ian Jones <i...@ambientdivide.com> wrote:
> Looks like what is inside your sitecustomize.py file is correct
> (assuming the paths etc are all spelled correctly) which means that
> the sitecustomize.py file is likely not in your PYTHONPATH by the time
> maya starts. The folder containing sitecustomize must be in the
> PYTHONPATH when the python interpreter is first initialized.
>
> ...
>
> read more »
I do set this at the operating system but not by hand but rather
another python script that configures the workstations (mapped drives,
environment variables, application installation etc).
This script is essentially our tools 'installer' and runs when artists
log into their machines. That way we can maintain the script and
artists machines apply the changes.
Ian
Just wanted to make sure there wasn't some easier way.
I think I'm going w/ Maya.env hack as the path needs to change per
version of Maya. I cannot have 1 path designated for the entire
machine.
Appreciate your responses,
-jason
On Feb 5, 4:46 pm, Ian Jones <i...@ambientdivide.com> wrote:
> Sort of.
>
> I do set this at the operating system but not by hand but rather
> another python script that configures the workstations (mapped drives,
> environment variables, application installation etc).
>
> This script is essentially our tools 'installer' and runs when artists
> log into their machines. That way we can maintain the script and
> artists machines apply the changes.
>
> Ian
>
> ...
>
> read more »
OK, that's what I suspected.
Just wanted to make sure there wasn't some easier way.
I think I'm going w/ Maya.env hack as the path needs to change per
version of Maya. I cannot have 1 path designated for the entire
machine.
Appreciate your responses,
-jason
On Feb 5, 4:46 pm, Ian Jones <i...@ambientdivide.com> wrote:
> Sort of.
>
> I do set this at the operating system but not by hand but rather
> another python script that configures the workstations (mapped drives,
> environment variables, application installation etc).
>
> This script is essentially our tools 'installer' and runs when artists
> log into their machines. That way we can maintain the script and
> artists machines apply the changes.
>
> Ian
>
The main advantage of this system being that the Maya install stays
nice and clean. All the scripts and plugins get linked up by the
launcher at run time.
This lets our artist switch projects with out the worry of version
miss-matches or conflicts.
> > > >> >>>>>>>>>> maya install it would be great if it could...
>
> read more »
On Mon, Feb 8, 2010 at 10:47 AM, Keir <keir...@gmail.com> wrote:
> Yes do the same thing,
> Our version is a C# app that parses an xml launcher definition, sets
> environmental variables, copies files and launches Maya.
<snip>
#maya
MF_SKIP_INSTALL_SHARED= 1
MAYA_LOCATION=//${SERVER}/RenderfarmConf/Apps/Maya/${PLATFORM}/2009ServicePack1
MAYA_SCRIPT_PATH=${DELIGHT}/maya/scripts;//hal/RenderfarmConf/Maya/scripts;${MAYA_SCRIPT_PATH}
MAYA_PLUG_IN_PATH=${DELIGHT}/maya/plugins;//hal/RenderfarmConf/Maya/plugins/${PLATFORM}/2009;${MAYA_PLUG_IN_PATH}
MAYA_HELP_URL=C:\Program Files\Autodesk\Maya2009\docs\Maya2009\en_US
AW_JPEG_Q_FACTOR=85
PATH=//${SERVER}/RenderfarmConf/Apps/Maya/${PLATFORM}/2009ServicePack1/bin;${PATH}
I have to add, that under linux, this setup is fully functional. I have
no idea what maya needs to properly boot. I use dependency tracking tool
to find all missing DLLS and put them in maya/bin and system32 dirs.
any hints are greatly appreciated, as I have run out of ideas.
thanks
Michal Fratczak
Matt Estela pisze: