[Maya-Python] Re: Komodo->Maya
Hey Chris! Have you tried Textmate, it works nicely with mac/maya/python. Right now I am using Maxya MEL/PYTHON in my pc as well. I tried the Komodo thing for maya but I didn't get any answers but maybe you'll have a better luck this time around. Martin On Dec 7, 1:34 pm, Chris Mills wrote: > Greetings, > > I'd like to use Komodo more directly with Maya. I use a Mac and have > Maya 2010 and Komodo IDE 5.2.3. > > Are there any Maya/Python/Komodo people who have gotten this combination > to play nicely together? The ActiveState web site has little > documentation on this and it appears that when I point to the Maya App > Python interpreter that Komodo claims that debugging and syntax checking > are both "Not Functioning". Why? > > The Komodo Python Interactive Shell looks like it starts up fine, but I > am too new to all of this to know where to look next to figure out if it > is actually working or not. > > My skills with MEL are good, but I am fairly lost when it comes to > getting Komodo/Python/Maya to play nice and need some basic orientation. > It seems to me that most people expect that someone who wants to use > Python with Maya already knows Python and has a firm grasp on their IDE, > setting system environments and the like. > > What I'd really like is some instruction on either where to go to get > the information I need, or suggestions on how to frame the questions > that need to be asked to get what feels like is probably very basic > stuff in hand and working for me. > > Kind regards, > Chris > > Lizard Lounge Graphics, LTD. > Wellington, NZhttp://lizardlounge.com > > Int'l: +644-977-5400 / +642-174-8770 > NZ local: 04-977-5400 / 021-748-770 -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Re: PyMEL 1.0.0 Beta
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 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 > > > > > 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 > > easy ) > > > If I knew, he would do so. > > > On Dec 23, 1:41 am, Martin La Land Romero > > 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 > >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... > > > > >>>> 2. Open the shel, I am using Windows xp 64 bit, so I opened up DOS > > > > >>>> 3. "on Windows, open the Start menu then go to “Run...”, then put in > > cmd > > > >>>> and press “OK” > > > >>>> cd to the directory where you extracted the pymel zip file. A > > file > > > >>>> called “setup.py” should exist directly below this directory. > > > >>>> In my Case is located here , "C:\Python26\pymel" > > > > >>>> On Windows you can copy the path from Explorer and paste into the > > shell > > > >>>> by right clicking. You don’t need to escape spaces. > > > > >>>> 4. In DOS I typed C:\"Python26\pymel>setup.py > > > > >>>> "The step below is already confusing, Now, where is this located ? > > > >>>> 5. Now run the installation for each version of Maya that you have > > > >>>> installed using Maya’s own python interpreter – aka mayapy. This > > ensures > > > >>>> that PyMEL is installed to the site-packages directory of each, and > > that it > > > >>>> will always be on your PYTHONPATH when using Maya. > > > >>>> Maya’s own python interpreter – aka mayapy. WHAT. > > > >>>> RUN THE INSTALLATION, where is the exe file, run what? > > > > >>>> 6. Using the script editor I typed this out in the Python tab? ME
[Maya-Python] Regarding "Names cannot be empty" error message in Eclipse 3.5.1
Hello Everyone, I just finished setting up Eclipse with Pymel. I had already Pymel installed in my machine Windows xp 64 and I am using Maya 2009 and so far has worked out pretty well, pydev is properly placed as well, the entire set up has been properly been done however, when I go to Eclipse > File> New> File, and I enter the name, foo.py I get the error saying "Names cannot be empty" not sure what this means, I have never worked with Eclipse before so I am not sure about this message. Thank you guys Martin -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Eclipse as Maya IDE while using pymel not working properly
Hi there, I got everything working sort of ok right now in terms of having Eclipse as my Maya IDE, I had Pymel is working just fine with Maya 2009, I downloaded Eclipse and Pydev and I followed all the directions etc. In Eclipse when I hit the button or press Ctrl + Enter nothing happens, there is a little pause but then nothing. # Send the entire contents of an editor to Maya not working # Send a highlighted selection to Maya -not working # Get results back from Maya in it's own console view -not working # Anything done within Maya's own script editor is also echoed in the console view ---not working I am not getting any error messages either. Here is a simple example of what I entered in eclipse and I still nothing in Maya. from__future__ import from pymel import * import pymel.core.general as pm import maya.cmds as cmds pm.ls(type ='camera') cmds.ls(type='camera') Thanks Martin -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Re: Eclipse as Maya IDE while using pymel not working properly
Hello there, I still having issues with Eclipse as my Maya IDE, is anyone else having any problems with this workflow? every time I execute or press Ctrl + Enter from Eclipse, the program takes a long pause but nothing happens in Maya. Thanks On Jan 12, 3:51 am, "martinmrom...@gmail.com" wrote: > Hi there, > > I got everything working sort of ok right now in terms of having > Eclipse as my Maya IDE, I had Pymel is working just fine with Maya > 2009, I downloaded Eclipse and Pydev and I followed all the directions > etc. > > In Eclipse when I hit the button or press Ctrl + Enter nothing > happens, there is a little pause but then nothing. > # Send the entire contents of an editor to Maya not > working > # Send a highlighted selection to Maya -not > working > # Get results back from Maya in it's own console view -not > working > # Anything done within Maya's own script editor is also echoed in the > console view ---not working > > I am not getting any error messages either. > > Here is a simple example of what I entered in eclipse and I still > nothing in Maya. > > from__future__ import > from pymel import * > import pymel.core.general as pm > import maya.cmds as cmds > > pm.ls(type ='camera') > > cmds.ls(type='camera') > > Thanks > > Martin -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Re: PyMEL 1.0.0 Beta
Hello Everyone, 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 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 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 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 > >>>>> 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 > >> martinmrom...@gmail.com > >> (415)261-2172 > > >> -- > >>http://groups.google.com/group/python_inside_maya > > > -- > >http://groups.google.com/group/python_inside_maya > > -- > "A pit would not be complete without a Freeman coming out of it." > The Vortigaunt -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Regarding the creation of windows using either Pymel or Python
Hello Everyone, I was just wondering. The Maya docs says "If you want to create your own UI in Maya, we recommend that you use Python" Does anyone know of good UI tutorials done in python? I tried running The following are some helpful tips. We recommend that you use the shelfEditorWindow.py file as a start and customize it accordingly. You can find the shelfEditorWindow.py file in the Maya installation directory, under the following path: * (Windows) ...\Python\Lib\site-packages\maya\app\general \shelfEditorWindow.py I got the error below, does anyone else got this? "# Error: line 1: AttributeError: file C:\Program Files\Autodesk \Maya2011\Python\lib\site-packages\pymel-1.0.0-py2.6.egg\maya\utils.py line 51: 'module' object has no attribute '__file__' # Thanks -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Regarding curve generated from animated object's translation
Hello Everyone, Here is a tool that it is WIP. I know Maya has something already similar to it however, I figured it could be a good exercise for me while I am learning python. The issue that I am running into is, that I only want one full curve from the selected animated object however as you will see it creates a curve on every frame. import maya.cmds as cmds """ This tool creates a curve or multiple curves from an animated object's translation. Author: Martin LaLand Romero """ def main(): """ This function runs the genCurvefromObj function. """ for i in genCurvefromObj(1, 95, 1): print(i) """ This function generates a curve based on the object's animation path. """ def genCurvefromObj(frameStart, frameStop, step): myObject = cmds.ls(selection = True) #This loop queries the position of the animated object and creates a curve based on its position. for object in myObject: i = frameStart while i <=frameStop: yield i i += step print('The current frame is', cmds.currentTime( i, edit = True)) animationCurve = cmds.curve( p = [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)], name = ('Jack_' + str(object) )) cmds.currentTime(i, edit = True) #Get the object position on everyFrame. pos = cmds.xform((object), r=True, query = True, t=True ) cmds.curve(animationCurve, append = True, p = pos,) cmds.delete(animationCurve + ".cv[0]") if __name__ == "__main__": main() Even after revising the loop as shown below, I am still just getting a two point curve and a smooth curve. frameStart = 1 frameStop = 100 step = 1 myObject = cmds.ls(selection = True) #This loop queries the position of the animated object and creates a curve based on its position. for object in myObject: i = frameStart while i <=frameStop: #yield i i += step print('The current frame is', cmds.currentTime( i, edit = True)) animationCurve = cmds.curve( p = [(0, 0, 0), (0, 0, 0), (0, 0, 0)], name = ('Jack_' + str(object) )) cmds.currentTime(i, edit = True) #Get the object position on everyFrame. pos = cmds.xform((object), r=True, query = True, t=True ) cmds.curve(animationCurve, append = True, p = pos,) cmds.delete(animationCurve + ".cv[0]") Thank you guys, Cheers Martin -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Regarding curve generated from an animated object's translation
Hello Everyone, I am currently working on a basic tool, it is WIP. The purpose of the tool is to create a curve from an object's translation. I know that Maya has something like this already however, I wanted to create the actual script myself using Python. I have a problem with the script, it seems to be creating a curve at every frame instead of creating one whole curve drawing the whole path, any hints? Thanks so much! import maya.cmds as cmds """ This tool creates a curve or multiple curves from an animated object's translation. Author: Martin LaLand Romero """ def main(): """ This function runs the genCurvefromObj function. """ for i in genCurvefromObj(1, 95, 1): print(i) """ This function generates a curve based on the object's animation path. """ def genCurvefromObj(frameStart, frameStop, step): myObject = cmds.ls(selection = True) #This loop queries the position of the animated object and creates a curve based on its position. for object in myObject: i = frameStart while i <=frameStop: yield i i += step print('The current frame is', cmds.currentTime( i, edit = True)) animationCurve = cmds.curve( p = [(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)], name = ('Jack_' + str(object) )) cmds.currentTime(i, edit = True) #Get the object position on everyFrame. pos = cmds.xform((object), r=True, query = True, t=True ) cmds.curve(animationCurve, append = True, p = pos,) cmds.delete(animationCurve + ".cv[0]") if __name__ == "__main__": main() Even after revising the loop as shown below, the tool still doesn't work. frameStart = 1 frameStop = 100 step = 1 myObject = cmds.ls(selection = True) #This loop queries the position of the animated object and creates a curve based on its position. for object in myObject: i = frameStart while i <=frameStop: #yield i i += step print('The current frame is', cmds.currentTime( i, edit = True)) animationCurve = cmds.curve( p = [(0, 0, 0), (0, 0, 0), (0, 0, 0)], name = ('Jack_' + str(object) )) cmds.currentTime(i, edit = True) #Get the object position on everyFrame. pos = cmds.xform((object), r=True, query = True, t=True ) cmds.curve(animationCurve, append = True, p = pos,) cmds.delete(animationCurve + ".cv[0]") Thank you guys, Cheers Martin -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Listing textures from selected objects
Does anyone know the name of the command or the way that I can get the full path of the textures from a selected object? Thanks, -m -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Re: Listing textures from selected objects
Hi Alexander, Basically what I am trying to do is to get a list of all of the textures in my scene. >From time to time I see people working on scenes where they are pulling textures from different locations. I want to make a tool that will gather the location of every texture in my scene. Here is a little bit of my sudo code. def Textures( listOfTexturesFilePaths=[], destinationDir: ''' Parameter Example: listOfTexturesFilePaths = [ 'c:/temp/water.tga', 'c:/temp/ textures/ground.tga', 'c:/temp/textures/stuff.tga' ] destinationDir = 'c:/newLocation' ''' #look at import os pass # Do the copy of the maya file and patch it to the new textures Hope this makes a lot of sense and thanks for your help. Martin On Mar 18, 5:00 am, Alexander Mirgorodsky wrote: > Hi Martin! > Do You mean by word "object" > If this is geometry object that it does not store this information. > You can find it by going througр the chain "geometryShape -> Shading Engine > -> Shader(Surface, Displace, Volumetric etc) > ->Color(Float)Attribute->TextureNode->FileName"). > Can You explain the details of your problem? > > Alex Mirgorodsky. > Shading TD/ Lighting TD > Renovation Entertainment. > > On Fri, Mar 18, 2011 at 9:50 AM, martinmrom...@gmail.com < > > martinmrom...@gmail.com> wrote: > > Does anyone know the name of the command or the way that I can get the > > full path of the textures from a selected object? > > > Thanks, > > -m > > > -- > >http://groups.google.com/group/python_inside_maya -- http://groups.google.com/group/python_inside_maya
[Maya-Python] Re: Listing textures from selected objects
Hi there paradigm3d, No worries, that's why I am in the process of creating the tool :), thanks for sharing. Listing the textures is only a part of the tool that I am working on. Thanks -M On Mar 18, 2:14 am, paradigm3d wrote: > I have this mel script that do that thing, just convert this to python > code, I am just lazy now to convert it... :D sorry :D > > proc string strip( string $object ) > { > > string $buffer[]; > tokenize $object "." $buffer; > return $buffer[0]; > > } > > global proc getFileAttribute() > > { > > //know what is selected. > string $obj[] = `ls -l -sl`; > > //find the size of selection. > int $objSize = size($obj); > //if it is more than one... > if ($objSize > 1) > { > confirmDialog -t "Object Select" > -message "Please select only one object." > -messageAlign "center" > -button "OK" > -defaultButton "OK"; > return; > > } > > //if it is less than one... > else if ($objSize < 1) > { > confirmDialog -t "Object Select" > -message "Please select one object." > -messageAlign "center" > -button "OK" > -defaultButton "OK"; > return; > > } > > //select the shapeNode. > string $objShape[] = `pickWalk -direction "down" $obj`; > > //know what shading engine is connected. > string $connection[] = `listConnections -d true -source false > -p false -type "shadingEngine" $objShape`; > print $connection; > > //strip the ".outColor" from the result of the material > string $sgList[] = `listSets -type 1 -ets -o $objShape`; > string $materialList = strip( `connectionInfo -sfd ($sgList[0] + > ".surfaceShader")`); > print $materialList; > > string $texture = ""; > > string $class[] = getClassification( `nodeType $materialList` ); > > if ( "shader/surface" == $class[0] && `connectionInfo -id > ( $material + ".color" )` ) > { > > $texture = strip( `connectionInfo -sfd ( $material + > ".color" )` ); > > } > > return $texture; > > } > > On Mar 18, 2:50 pm, "martinmrom...@gmail.com" > > wrote: > > Does anyone know the name of the command or the way that I can get the > > full path of the textures from a selected object? > > > Thanks, > > -m -- http://groups.google.com/group/python_inside_maya
[Maya-Python Club:1467] Python and Maya tutorials....
Hello everyone, I am a newbie in Python however, I have been using Maya and 3ds max for fx, lighting, texturing and rendering projects for 4 years now. I would like to learn more about Python and Maya so that I can implement the combination of both in my everyday workflow as a visual effects artist. I recently purchased the python video from http://cmivfx.com/ however the instructor does not really cover Python and Maya, the video is mostly about Python which is fine however, I would like to put in practice ( Maya) anything new that I am learned from python, make sense? I went over "First Steps to start python inside maya" and I really liked it, I wish we could have more of those tutorials, they seem very basic but for newbies they work great. I have also looked at the video by digital tutors http://www.digitaltutors.com/store/product.php?productid=3414&cat=82&page=1 I would like to find more sources, so if you guys know of any please post them here, I am sure there are more newbies out there that probably feel intimidated by this advanced thread but I am sure there is room for newbies as well. --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python Club:1472] Re: Python and Maya tutorials....
Thank you all for your input, I really appreciated all of your comments. Regards, Martin On Jan 21, 8:50 am, Chad Vernon wrote: > And knowing is half the battle...GI Joe! > > > > On Wed, Jan 21, 2009 at 8:22 AM, Ofer Koren wrote: > > > Another approach is to think of a tool/script/plugin you want to write > > and then force through and write it. Along they way you're bound to > > learn lots of stuff. Tutorials are nice, but they don't teach you how > > to do what YOU want to do... > > > On Wed, Jan 21, 2009 at 2:06 AM, Sebastian Thiel > > wrote: > > > > The true power of Python though is not imho to wrap MEL, but to wrap the > > > API and thus making it available without the need to compile c++ code. > > > > So if you want to dive in ( the rough way ), also have a look at the > > > Maya API and how to use it from within python. > > > > Might be overkill, but in FX it will prove the be useful. > > > -- > > > - Ofer > >www.mrbroken.com > > --www.chadvernon.com --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python Club:1492] Re: Python and Maya tutorials....
Thank you Shawn! Martin On Jan 23, 10:38 am, Shawn Patapoff wrote: > May be really boring, but reading the Python MEL help files can be really > good. As a lot of the MEL/Python calls have example code. > > On Wed, Jan 21, 2009 at 9:37 AM, martinmrom...@gmail.com < > > martinmrom...@gmail.com> wrote: > > > Thank you all for your input, I really appreciated all of your > > comments. > > > Regards, > > > Martin > > > On Jan 21, 8:50 am, Chad Vernon wrote: > > > And knowing is half the battle...GI Joe! > > > > On Wed, Jan 21, 2009 at 8:22 AM, Ofer Koren wrote: > > > > > Another approach is to think of a tool/script/plugin you want to write > > > > and then force through and write it. Along they way you're bound to > > > > learn lots of stuff. Tutorials are nice, but they don't teach you how > > > > to do what YOU want to do... > > > > > On Wed, Jan 21, 2009 at 2:06 AM, Sebastian Thiel > > > > wrote: > > > > > > The true power of Python though is not imho to wrap MEL, but to wrap > > the > > > > > API and thus making it available without the need to compile c++ > > code. > > > > > > So if you want to dive in ( the rough way ), also have a look at the > > > > > Maya API and how to use it from within python. > > > > > > Might be overkill, but in FX it will prove the be useful. > > > > > -- > > > > > - Ofer > > > >www.mrbroken.com > > > > --www.chadvernon.com --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python Club:1536] Re: Python and Maya tutorials....
Hello - chad , Thank you for taking the time to give out all that information and also for the examples that you showed us. I am currently learning Python like I mentioned before however; I do not have any experience with Mel, I don't know if this is a big deal, should I at least get familiar with MEL, maybe create a least one tool before jumping to Phython? I have a lot of friends in the CG industry and they talk on how they have to sometimes rewrite scripts that were done in MEL to python and also how they are moving into working with python. Anyway, thanks again and hopefully I'll be able to get my first tool happening soon, not sure how soon but soon. Late M On Feb 1, 12:32 pm, Chad Dombrova wrote: > > Object Oriented > > Lists & Dictionaries > > Access to the API without C++ > > Access to a multitude of external modules > > create and manipulate xml > > plugs into your pipeline > > QT > > this list from shaun is a very good breakdown of python's advantages > over MEL, but i think that for those who haven't messed with python > much, it doesn't have a whole lot of meaning, because they don't know > what each of these things really means. > > > I really havn't found a situation where I couldn't just write a mel > > script for something I wanted to do over and over > > for the beginner, it's not necessarily about doing things that you > can't do in MEL, it's about doing things 10x faster ( with a little > practice of course ) > > > Object Oriented > > a simple demo of object-oriented string power: > > # change the name of the node, preserving references > node = 'foo:bar:spangle' > buf = node.split(':') > buf[-1] = 'newName' > newNode = ':'.join( buf ) > print newNode > 'foo:bar:newName' > > if you're using pymel, you can really leverage object oriented > programming: > > MEL: > > string $sel[] = `ls -sl`; > string $shapes[] = `listRelatives -s $sel[0]`; > string $conn[] = `listConnections -s 1 -d 0 $shapes[0]`; > setAttr ( $conn[0] + ".radius") 3; > > PyMEL: > not just faster to write, but also easier to read: > > selected()[0].getShape().inputs()[0].radius.set(3) > > > Lists & Dictionaries > > lists can have any data type in them, including other lists. this is > a huge selling point for any MEL programmer, who has been forced to > have a separate array for every datatype, or to do hacky things to try > to emulate 2D arrays > > l = [ 'one', 2, 3.0, [ 'node1', 'node2' ] ] > l.pop( 0 ) # remove something > l.append( 'some more data' ) # add something > > if you don't think that this will speed up your programming, then > anything else i say is a waste > > dictionaries are even more of an advantage because there's no data > structure even close to them in MEL: > > d = {} > d['age'] = 28 > d['name'] = 'chad' > d['hobbies'] = [ 'running', 'playing soccer' ] > d['age'] += 1 # increase the age by a year > d['hobbies'].append( 'swimming') # add a hobby to the list > > > Access to the API without C++ > > . > i'll skip this for now, but the fact that the API and MEL essentially > speak the same language provides interesting crossover potential. it > also means learning python to write MEL-like code opens the door for > API programming > > > Access to a multitude of external modules > > not just external modules, but internal ones too. the pickle module > is one that i think every python programmer should know. if you need > to store some data and get it back somewhere or sometime later exactly > as it was, it's the most painless way to do it. > > #start with our list and dictionary from above > import pickle > f = open( '/path/to/file', 'wb' ) > pickle.dump( (l,d), f, 2 ) > > #somewhere else, say on another computer, or a week later > import pickle > f = open( '/path/to/file', 'rb' ) > l, d = pickle.load(f) > # data is exactly as it was > print d['name'] > # Result: chad > > i don't have time to cover everything, but let's just say python > starts as a way to get more done in less time, and eventually opens > the door to a whole new way of programming, with a huge community of > resources. as a friend put it: "python takes a week to learn and a > lifetime to master". It's true that for very simple things MEL > shines, but as soon as you graduate beyond that and attempt even the > most slightly sophisticated algorithm, your code will begin to bloat > as you struggle against the limitations of the language. to put it > another way, python is incredibly scalable and MEL is not. > > - chad > > On Feb 1, 2009, at 11:47 AM, matt thorson wrote: > > > Could you guys give me some practical applications of python in FX? > > I keep hearing this but I really havn't found a situation where I > > couldn't just write a mel script for something I wanted to do over > > and over, or make a GUI of things I use often. > > > On Wed, Jan 21, 2009 at 8:48 AM, wrote: > > > There are many advantages to using python over mel for maya. > > > Object Oriented >
[Maya-Python Club:1537] Mapy and Maya 2009 won't work.
Does anyone knows if Mapy version 2.5.6 and Maya 2009 can work together, I tried it but the connection between them won't happen. I am also using UltraEdit. I followed the direction but it won't happen so I figure I'll post the issue here. If any of you is using this work flow, with the programs and versions mentioned above, could you please post the proper work flow for this to happen? Thank you guys -M --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python Club:1548] Re: Mapy and Maya 2009 won't work.
Thank you for mapy's source code Farsheed. I'll give it a try and If I can't figure it out I'll let you know. Thanks Martin On Feb 4, 3:44 am, Farsheed Ashouri wrote: > You are right. Here is mapy's source code for windows. try to solve it > yourself. I have no idea why it doesn't work with 2k9. > > http://rodmena.com.googlepages.com/mapy_source.rar > > Farsheed. > > On 2/4/09, martinmrom...@gmail.com wrote: > > > > > Does anyone knows if Mapy version 2.5.6 and Maya 2009 can work > > together, I tried it but the connection between them won't happen. I > > am also using UltraEdit. I followed the direction but it won't happen > > so I figure I'll post the issue here. > > > If any of you is using this work flow, with the programs and > > versions mentioned above, could you please post the proper work flow > > for this to happen? > > > Thank you guys > > > -M > > -- > Sincerely, > Farsheed. --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python Club:1549] Re: Python and Maya tutorials....
Hello there Shaun, That was a great way to put it Shaun. Yes, I do have the passion, that's why want to learn more about it. Thanks again, Martin On Feb 4, 4:37 am, sh...@pyrokinesis.co.nz wrote: > Writing a custom deformer > plugin to generate nurbs curves with particles > Driving rman shaders and textures with Python based on partticle data > (velocity, mass, position,etc...) > taking functionality from Houdini and plugging it into Maya > Houdini uses python as its main scripting language > Classic Cloth for Maya is a plugin, it makes more sense to do things like > this in C++, though similar plugins in Python are possible. > etc...etc... > > You may be thinking that you can create a mel script to generate curves > with particles, and you would be correct. But it will be clunky, dirty, > slow, and far from elegant. > > As someone said earlier, you need to look beyond looping functions, > conditionals, and GUI's to begin to grasp and take advantage of Python, > and OOP's full potential. I have only recently begun to step away from a > modular methodology of coding. Making the jump was not easy, I had and > continue to have an incredible amount of support, which helps a great > deal. > > Good Luck, but if your passionate, you wont need it. > > > > > Could you guys give me some practical applications of python in FX? I keep > > hearing this but I really havn't found a situation where I couldn't just > > write a mel script for something I wanted to do over and over, or make a > > GUI > > of things I use often. > > > On Wed, Jan 21, 2009 at 8:48 AM, wrote: > > >> There are many advantages to using python over mel for maya. > > >> Object Oriented > >> Lists & Dictionaries > >> Access to the API without C++ > >> Access to a multitude of external modules > >> create and manipulate xml > >> plugs into your pipeline > >> QT > >> and more... > > >> Mel still has its place, yet Python is much more robust. If you are > >> interested in FX you will find that Python is becoming a necessity. > > >> Once you take Python beyond the basics, you will come to the conclusion > >> that with Python you can find more elegant solutions to more complex > >> problems. > > >> > I think you should look more into MEL if you are interested in > >> learning > >> > python for maya. Once you get the basics of python you'll realize that > >> it > >> > just wraps around MEL. > > >> > I found this book very useful: > > >>http://www.amazon.com/Learning-Python-3rd-Mark-Lutz/dp/0596513984/ref... > > >> > This is the book we got in school. > > >>http://www.amazon.com/Scripting-Animators-Kaufmann-Computer-Graphics/... > > >> > Chris Maraffi ( former teacher ) wrote this book but it might be kinda > >> > outdated. The scripting stuff should still apply but the rig is wack. > > >>http://www.amazon.com/MEL-Scripting-Character-Rig-Maya/dp/0321383532/... > > >> > -- > >> > Matthew Thorson | VFX Student | Full Sail University | Computer > >> Animation > > >> -- > >> Shaun Friedberg > >>http://www.pyrokinesis.co.nz > >> "Fire Is Fun, When You Think About It" > > > -- > > Matthew Thorson | VFX Student | Full Sail University | Computer Animation > > -- > Shaun Friedberg > 04-902-0443http://www.pyrokinesis.co.nz > "Fire Is Fun, When You Think About It" --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python Club:1613] Re: Mapy and Maya 2009 won't work.
Hello Achayan, Would you mind sending me the steps on how to get mapy and maya 2009 working, I still can't mapi and maya working together. Thanks Martin On Feb 7, 6:04 am, Achayan wrote: > Hi Guys > > I am using mapy 2.5.6 and python2.5 and sure maya 2009 > My editor is ultraedit .. its working perfect for me .. > > On Feb 4, 2:11 pm, "martinmrom...@gmail.com" > wrote: > > > Thank you for mapy's source code Farsheed. I'll give it a try and If > > I can't figure it out I'll let you know. > > > Thanks > > > Martin > > On Feb 4, 3:44 am, Farsheed Ashouri wrote: > > > > You are right. Here is mapy's source code for windows. try to solve it > > > yourself. I have no idea why it doesn't work with 2k9. > > > >http://rodmena.com.googlepages.com/mapy_source.rar > > > > Farsheed. > > > > On 2/4/09, martinmrom...@gmail.com wrote: > > > > > Does anyone knows if Mapy version 2.5.6 and Maya 2009 can work > > > > together, I tried it but the connection between them won't happen. I > > > > am also using UltraEdit. I followed the direction but it won't happen > > > > so I figure I'll post the issue here. > > > > > If any of you is using this work flow, with the programs and > > > > versions mentioned above, could you please post the proper work flow > > > > for this to happen? > > > > > Thank you guys > > > > > -M > > > > -- > > > Sincerely, > > > Farsheed. --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python Club:1616] Re: Mapy and Maya 2009 won't work.
Hello Kurian, Farsheed posted this a few days ago as you can see in one of the above responses. http://rodmena.com.googlepages.com/mapy_source.rar 1. Loading mapy inside maya In maya 2009 64 bit or maya 2009 32 bit I have been able to load the script mapy_plugin.py, I put this here: C:\Documents and Settings\Administrator\My Documents\maya\2009\scripts So this part is fine, I go to maya load it up, select the python tab> execute the script and a message comes up saying "mapy has been imported" GOOD until here. 2. Now, in UltraEdit> I go to >Advanced>Tool configuration and do all of this http://rodmena.com.googlepages.com/texpad2 "Read the included ReadMe.txt file and configure mapy. It is so simple." mapy 2.5.6 /* Installation: 1. Add this folder to environment path."I did this" 2. Add this folder to your PYTHONPATH. "not sure where this is" 3. Add these lines to your userSetup.mel file: */ //--mapy Settings-- python("from mSet import *"); python("mapyPort()"); //- This is what I did 1. C:\mapy2.5.6 right? 2. I added the mapy 2.5.6 to the PYTHONPATH 3. I went here C:\Documents and Settings\Administrator\My Documents \maya however I didn't see "userSetup" * Now in UltraEdit if I create a simple mel or python script nothing happens inside Maya. examples print "hello world" and save this as helloworld.py or print ("hello world"); and save this as helloword.mel and hit F5 as my user tool, I get a message saying "The system cannot find the path specified." So at this point mapy inside maya 2009 64 or 2009 32 bit does is not working for me. Executing my scripts or just a few lines of inside of UltraEdit has not effect in maya at all. If anyone could take the time to walk me though the process of setting this up correctly I will really appreciate it. Martin On Feb 8, 5:13 am, kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട! wrote: > Hi Martin > > I Dont know is this will help you , i am using this code in UEdit > > C:\mapy\mapy.exe -pn 2555 %F > > and maya simply i will open this port > > and its working perfect > > On Sat, Feb 7, 2009 at 1:01 PM, martinmrom...@gmail.com < > > > > martinmrom...@gmail.com> wrote: > > > Hello Achayan, > > > Would you mind sending me the steps on how to get mapy and maya 2009 > > working, I still can't mapi and maya working together. > > > Thanks > > > Martin > > > On Feb 7, 6:04 am, Achayan wrote: > > > Hi Guys > > > > I am using mapy 2.5.6 and python2.5 and sure maya 2009 > > > My editor is ultraedit .. its working perfect for me .. > > > > On Feb 4, 2:11 pm, "martinmrom...@gmail.com" > > > wrote: > > > > > Thank you for mapy's source code Farsheed. I'll give it a try and If > > > > I can't figure it out I'll let you know. > > > > > Thanks > > > > > Martin > > > > On Feb 4, 3:44 am, Farsheed Ashouri wrote: > > > > > > You are right. Here is mapy's source code for windows. try to solve > > it > > > > > yourself. I have no idea why it doesn't work with 2k9. > > > > > >http://rodmena.com.googlepages.com/mapy_source.rar > > > > > > Farsheed. > > > > > > On 2/4/09, martinmrom...@gmail.com wrote: > > > > > > > Does anyone knows if Mapy version 2.5.6 and Maya 2009 can work > > > > > > together, I tried it but the connection between them won't happen. > > I > > > > > > am also using UltraEdit. I followed the direction but it won't > > happen > > > > > > so I figure I'll post the issue here. > > > > > > > If any of you is using this work flow, with the programs and > > > > > > versions mentioned above, could you please post the proper work > > flow > > > > > > for this to happen? > > > > > > > Thank you guys > > > > > > > -M > > > > > > -- > > > > > Sincerely, > > > > > Farsheed. > > -- > സ്നേഹിക്കയില്ല ഞാന് > നോവുമാത്മാവിനെ സ്നേഹിച്ചിടാത്തൊരു > തത്വശാസ്ത്രത്തെയും --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python Club:/] Re: Mapy and Maya 2009 won't work.
Thanks Farsheed, I will see if I can get it to work. Martin On Feb 9, 12:28 am, Farsheed Ashouri wrote: > Sorry, I forgot to mention that you should modify the plug-in contents if > you use windows, cause I am on Linux since 6 months ago and The Linux > version of *mapy* is working like a charm. > Download latest code here:http://code.google.com/p/mapy/ > Sincerely, > Farsheed. > > On Mon, Feb 9, 2009 at 11:53 AM, Farsheed Ashouri wrote: > > > Try these plug-in instead and see if it works, Please keep me posted so I > > can update the tool. > > > Sincerely, > > Farsheed. --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python Club:1705] Re: Mapy and Maya 2009 won't work.
No, it didn't work. There are a lot of things that I wouldn't know how to modify. I will try it again once you release the Mapy Package for windows and Maya 2009 completed. Thank you so much Farsheed. Since I have Komodo in my Machine, I looked around and found that Todd Whiteman created a Maya-Mel extension for Komodo that has * maps ".mel" files to the Mel language * syntax highlighting (colorising) * basic completions support on variables and built-in functions/ keywords * commenting/uncommenting support for "//" * smart brace indenting http://community.activestate.com/node/3021 So for now this will do the trick, I still need to copy all my scripts and paste them into the Script Editor however the tool is really handy. Thanks On Feb 9, 12:37 pm, "martinmrom...@gmail.com" wrote: > Thanks Farsheed, > > I will see if I can get it to work. > > Martin > > On Feb 9, 12:28 am, Farsheed Ashouri wrote: > > > Sorry, I forgot to mention that you should modify the plug-in contents if > > you use windows, cause I am on Linux since 6 months ago and The Linux > > version of *mapy* is working like a charm. > > Download latest code here:http://code.google.com/p/mapy/ > > Sincerely, > > Farsheed. > > > On Mon, Feb 9, 2009 at 11:53 AM, Farsheed Ashouri > > wrote: > > > > Try these plug-in instead and see if it works, Please keep me posted so I > > > can update the tool. > > > > Sincerely, > > > Farsheed. > > --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~--~--~---
[Maya-Python] Re: Python IDE
Hi there, you can try http://wingware.com/pub/wingide-101/3.1.7/wingide-101-3.1.7-1.exe really good Martin On Mar 9, 5:38 pm, Beau Garcia wrote: > Hi , > > I apologies if this question has been asked a thousand times, > > but im looking for some recommendations on a good python IDE? > > Is there any out there that has a built in interpreter like IDLE? > > Thanks > Beau --~--~-~--~~~---~--~~ http://groups.google.com/group/python_inside_maya -~--~~~~--~~--~--~---
[Maya-Python] Re: Python IDE
For MEL AND PYTHON, This is the best so far for me. http://tarzworkshop.com/ it's called maxmaya Martin On Mar 10, 5:00 pm, Ben Chess wrote: > The greatest thing about Wing is that you can use it to do remote debugging > with Maya. You can set breakpoints in the python scripts that are executing > from within Maya, trap them and step through code line-by-line from Wing as > it executes in Maya. I've tried some other remote debuggers, including > Komodo and Eclipse, and I haven't been able to get any of the others running > with Maya. It's awesome and well worth the money. > > -Original Message- > From: python_inside_maya@googlegroups.com > [mailto:python_inside_m...@googlegroups.com] On Behalf Of chadrik > Sent: Tuesday, March 10, 2009 10:05 AM > To: python_inside_maya@googlegroups.com > Subject: [Maya-Python] Re: Python IDE > > i used Eric4 briefly. it was dog slow: IMHO, it's too big of an app to > be written in PyQt. > > as far as unit testing, it's something that i never saw the need for > until the most recent version of pymel. we've got multiple developers > working on one large project and we need to make sure its many > features work as expected on multiple platforms, and multiple versions > of maya. our unit tests ensure that by fixing one thing, we don't > cause another thing to regress. right now we're using a combination > of unittest for formal testing, doctest for getting tests out of > documentation strings, and nose for easily gathering it all together > and running the whole thing as a test suite. > > a production pipeline faces many of the same complexities as pymel -- > multiple OS's, multiple developers -- but, at least in our case, it's > much more dynamic so if tests are to be run on the update of every > file they have to be fast. we still have not added tests to our basic > pipeline, but it's definitely under consideration. > > -chad > > On Mar 10, 2009, at 9:32 AM, Jamie Macdougall wrote: > > > Anyone use Eric4? > > > On Tue, Mar 10, 2009 at 7:20 AM, Randy Stebbing > > wrote: > >> Wing itself comes in 3 editions: 101, Personal and Professional. > >> When you > >> pay for the professional edition you'll have some rather nice > >> features > >> enabled like unit testing hooks, interactive debug probe with auto > >> completion, source code assistant, and source control integration. > > >> An open source program, built on WX, called "Editra" ships with the > >> installation of wxPython 2.8. This is another option you can > >> evaluate and > >> you can get more info here:http://editra.org/ > > >> Currently I'm using Editra at home and Wing IDE Professional at > >> work. For > >> larger, more complex programming I'd miss the feature set of a > >> professional > >> level IDE but for smaller projects or if your just learning just > >> about > >> anything will do. > > >> Here is a link to a comparison matrix of Wing editions: > >>http://www.wingware.com/wingide/features > > >> On Tue, Mar 10, 2009 at 6:56 AM, Sylvain Berger > >> wrote: > > >>> I used to use Wing, now I use Eclipse. > > >>> On Mon, Mar 9, 2009 at 10:37 PM, jens jebens > >>> wrote: > > >>>> Eclipse ... > > >>>> On Tue, Mar 10, 2009 at 1:15 PM, chadrik wrote: > > >>>>> my main gripe with wing is that it uses x11: interface on OSX == > >>>>> UG-LY. > > >>>>> On Mar 9, 2009, at 7:00 PM, Ian Jones wrote: > > >>>>>> Same here, Been very happy with wing. > > >>>>>> Though I did try Komodo IDE (http://www.activestate.com/komodo_edit/ > >>>>>> ) and found myself rather impressed with it - thought it had > >>>>>> better > >>>>>> calltips,version control integration. I preferred wings > >>>>>> debugger which > >>>>>> ended up being what sold me. > > >>>>>> Ian > > >>>>>> On Mon, Mar 9, 2009 at 6:34 PM, Sebastian Schoellhammer > >>>>>> wrote: > >>>>>>> I can recommend this IDE too - were using it at work here. > > >>>>>>> On Tue, Mar 10, 2009 at 9:40 AM, martinmrom...@gmail.com > >>>>>>> wrote: > > >>>>>>>> Hi there, > > >>>>>>>> yo