Why Use Pymel

27 views
Skip to first unread message

Pyrokinesis

unread,
Dec 13, 2009, 9:44:56 PM12/13/09
to python_inside_maya
Hello,
I would like to gain more insight into why you would want to use Pymel
in production?
Would anyone mind sharing their experiances?
Thanks.

Chris Mills

unread,
Dec 13, 2009, 11:15:44 PM12/13/09
to python_in...@googlegroups.com
I too would like to know this as well. How portable is it and does one
have to have pymel installed on every workstations where tools are
deployed to, or is it only required on the development computer?

Chris

Lizard Lounge Graphics, LTD.
Wellington, NZ
http://lizardlounge.com

Int'l: +644-977-5400 / +642-174-8770
NZ local: 04-977-5400 / 021-748-770

Brandon Harris

unread,
Dec 14, 2009, 11:51:36 AM12/14/09
to python_inside_maya
Well, I'm definitely no expert in the uses of Pymel, but there are a
whole lot of benefits I have seen in using it. While python in Maya is
kinda nice, it's not object oriented, so if you are going to use
Python to it's fullest extent you have to take the time to build all
your classes and modules from the ground floor up, and if you want to
do this properly you'll have to take a pretty hefty amount of time
planning it out and executing it. (especially if you want to use super
classes and inheritance) Pymel solves that problem by having all the
classes built already so it functions in an Object Oriented manner,
while also allowing you to build your own classes as you need. Also,
since it is a tool born out of production, it already has a wealth of
extra modules built into classes that Maya doesn't have built in
natively, I've noticed this a lot in the GUI portion of pymel.

I'm pretty sure that it has to be on all machines that intend on using
the tools built in Pymel, but that isn't very difficult to do.
Hopefully that gives some insight. I'm pretty sure more Pymel fluent
people here will know more.

Brandon L. Harris

hapgilmore

unread,
Dec 15, 2009, 11:52:34 AM12/15/09
to python_inside_maya
I used python in maya w/o pymel for 6 months or so. Pymel was a
revelation when I discovered it.
The best part is that a PyNode gives easy access to all the associated
maya node's attributes, AND all the API functions related to the node
type.

For example, getting API info from a polymesh is as easy as
myMeshPyNode.numVertices() or myMeshPyNode.vtx[0].connectedEdges()

To get that in python without pymel, or MEL even, would require
several lines of code. Occasionally I bump into an API function that
doesn't work right in pymel and I have to do it old-school with
Maya.OpenMaya.MFn commands, but those are few and far between.

Pymel and remote debugging in WingIDE have made my job 100X easier.

Chad Dombrova

unread,
Dec 15, 2009, 11:59:35 AM12/15/09
to python_in...@googlegroups.com
keep in mind when you have to go to maya.OpenMaya you can use the various low-level methods for getting access to the api objects

PyNode.__apimfn__, PyNode.__apiobject__, PyNode.__apimobject__, PyNode.__apimplug__, etc

just be aware that we're considering changing the names to avoid the reserved __*__ namespace.

-chad
> --
> http://groups.google.com/group/python_inside_maya

hapgilmore

unread,
Dec 17, 2009, 12:48:19 PM12/17/09
to python_inside_maya
I have used PyNode.__apimdagpath__() with much success! Are there
docs, or even a list for all of these api object names? I can't
remember where I found .__apimdagpath__, but I recall I just stumbled
upon it somewhere.

-Ian

Paul Molodowitch

unread,
Dec 17, 2009, 1:45:53 PM12/17/09
to python_in...@googlegroups.com
There are no docs, as they're intended to be implementation details, subject to change (and, in fact, their name is highly likely to change for 1.0).

- Paul


Reply all
Reply to author
Forward
0 new messages