PyMEL 1.3.0 Released

573 views
Skip to first unread message

Chad Dombrova

unread,
Apr 7, 2023, 11:22:56 AM4/7/23
to Maya Python Group

Hi all,
PyMEL 1.3.0 has been released to PyPI. Those of you paying attention to recent releases of Maya may have noticed that PyMEL is no longer distributed with Maya. The new approach is to use pip to install PyMEL from PyPI, and you can find instructions on how to do this on the PyMEL PyPI page (as well as github).

I know that pip installing is a bit less convenient, but on the bright side distributing via PyPI will give us the ability to make patch releases as needed. If access to PyPI is not available in your working environment due to restricted internet, I highly recommend getting your IT team to set up an internal mirror that can do pull-through caching, like Nexus or Artifactory, both of which have free versions.

On to the release. There are two big improvements in 1.3.0:

  1. support for Maya 2023 and fixes for 2022 in python3 mode
  2. very accurate stubs for code completion and static analysis, distributed as PEP 561-compliant pyi files.

The second feature means if you use an editor that understands pyi stubs, like PyCharm and VS Code with Pylance, you should begin to see immediate improvements just by pip installing pymel into a virtual env that your editor knows about.

I wrote a blog post about the stubs if you’re interested: https://dev.to/chadrik/pymels-new-type-stubs-2die

The new stubs include arguments and their types for nearly all functions in pymel, as well as many return types and even many return types that are conditional based on input arguments. 

I know that this release has been a long time coming.  Finding the time to put together this announcement added some delays (I’m currently writing this while on vacation), so I apologize to those of you who have been waiting. And yes, we’ll get started on Maya 2024 soon.

-chad

Marcus Ottosson

unread,
Apr 17, 2023, 4:11:07 AM4/17/23
to python_in...@googlegroups.com

I know that pip installing is a bit less convenient

Just adding my two cents to this on how it is not just a bit less convenient, but a complete killer in some cases; the cases that are most important from my perspective. Namely, external tools development. Take mGear for example. A general purpose auto rigging solution built on PyMEL. Their potential userbase went from all Maya users to the few who are capable of using pip. From riggers to riggers with scripting and pipeline experience. A tiny fraction of what it used to be. As a result, they will likely need to move away from PyMEL to regain their audience. And in my case, had I built Ragdoll Dynamics on PyMEL, I would not only had lost userbase, but the vast majority of revenue for my business. My audience isn’t even riggers, but animators. An audience that is not expected to know anything about pip or even Python. And certainly would not be able to do pull-through caching on Nexus or Artifactory.

I have great respect and appreciation for PyMEL; it’s how I personally went from learning Python with maya.cmds to object-oriented thinking and API design. But it’s now in the tough position of drawing a crowd of Python beginners who is now also expected to know the down and dirty of Python and package management. Not to mention that their audience will now have an unpredictable version of PyMEL installed their users system, and having to account for the differences in their own tools.

A possible solution that I’d recommend is making PyMEL vendorable. Something tools developers can embed into their project such that (1) the end-user won’t need to install anything and (2) the version developed against remain consistent with the tool. For a project like PyMEL, I’d imagine this to be a tall order. But unless something is done, pip installing isn’t merely less convenient, but a PyMEL killer, IMO.


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAGq9Q7FaPt%3DYr1uwTAr3z1LR_So%3DY86jTmww9yyQ_8%3DhqBfYXg%40mail.gmail.com.

Justin Israel

unread,
Apr 17, 2023, 5:56:22 AM4/17/23
to python_in...@googlegroups.com


On Mon, 17 Apr 2023, 8:11 pm Marcus Ottosson, <konstr...@gmail.com> wrote:

I know that pip installing is a bit less convenient

Just adding my two cents to this on how it is not just a bit less convenient, but a complete killer in some cases; the cases that are most important from my perspective. Namely, external tools development. Take mGear for example. A general purpose auto rigging solution built on PyMEL. Their potential userbase went from all Maya users to the few who are capable of using pip. From riggers to riggers with scripting and pipeline experience. A tiny fraction of what it used to be. As a result, they will likely need to move away from PyMEL to regain their audience. And in my case, had I built Ragdoll Dynamics on PyMEL, I would not only had lost userbase, but the vast majority of revenue for my business. My audience isn’t even riggers, but animators. An audience that is not expected to know anything about pip or even Python. And certainly would not be able to do pull-through caching on Nexus or Artifactory.


I don't know. This sounds quite over-dramatic to me. We are talking about the requirement of a single command to install PyMEL, documented by Autodesk, using mayapy and a bundled pip module. Is it a stretch to expect a user to run the command? Is it considered a significantly more complex step than the instructions a given plugin will list to copy/install the plugin in the first place? It just seems far fetched to suggest the new requirement will lose the majority of the user base because it is too technical. It could be one more step added to the install instructions of the plugin. 
But maybe there are other complications, such as breaking changes between PyMEL releases and 2 different plugins having different requirements on old and new behavior and really only one can be installed in Maya. That seems like more of a potential problem than the installation step issue. You mentioned vendoring support for PyMEL into plugin projects. 

I have great respect and appreciation for PyMEL; it’s how I personally went from learning Python with maya.cmds to object-oriented thinking and API design. But it’s now in the tough position of drawing a crowd of Python beginners who is now also expected to know the down and dirty of Python and package management. Not to mention that their audience will now have an unpredictable version of PyMEL installed their users system, and having to account for the differences in their own tools.

A possible solution that I’d recommend is making PyMEL vendorable. Something tools developers can embed into their project such that (1) the end-user won’t need to install anything and (2) the version developed against remain consistent with the tool. For a project like PyMEL, I’d imagine this to be a tall order. But unless something is done, pip installing isn’t merely less convenient, but a PyMEL killer, IMO.


On Fri, 7 Apr 2023 at 16:22, Chad Dombrova <cha...@gmail.com> wrote:

Hi all,
PyMEL 1.3.0 has been released to PyPI. Those of you paying attention to recent releases of Maya may have noticed that PyMEL is no longer distributed with Maya. The new approach is to use pip to install PyMEL from PyPI, and you can find instructions on how to do this on the PyMEL PyPI page (as well as github).

I know that pip installing is a bit less convenient, but on the bright side distributing via PyPI will give us the ability to make patch releases as needed. If access to PyPI is not available in your working environment due to restricted internet, I highly recommend getting your IT team to set up an internal mirror that can do pull-through caching, like Nexus or Artifactory, both of which have free versions.

On to the release. There are two big improvements in 1.3.0:

  1. support for Maya 2023 and fixes for 2022 in python3 mode
  2. very accurate stubs for code completion and static analysis, distributed as PEP 561-compliant pyi files.

The second feature means if you use an editor that understands pyi stubs, like PyCharm and VS Code with Pylance, you should begin to see immediate improvements just by pip installing pymel into a virtual env that your editor knows about.

I wrote a blog post about the stubs if you’re interested: https://dev.to/chadrik/pymels-new-type-stubs-2die

The new stubs include arguments and their types for nearly all functions in pymel, as well as many return types and even many return types that are conditional based on input arguments. 

I know that this release has been a long time coming.  Finding the time to put together this announcement added some delays (I’m currently writing this while on vacation), so I apologize to those of you who have been waiting. And yes, we’ll get started on Maya 2024 soon.

-chad

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAGq9Q7FaPt%3DYr1uwTAr3z1LR_So%3DY86jTmww9yyQ_8%3DhqBfYXg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Juan Moraga

unread,
Apr 17, 2023, 3:32:00 PM4/17/23
to python_in...@googlegroups.com
I think that using pip with python 3 is not as incovinient as it was with python 2, where you may had to look for built wheels sometimes, because 2 had been legacy for years, so maybe now more people use it, I guess you need to be aware of things like walrus op, which I love, but its not available until 3.8, so Maya 2022 doesn't have it.
I have always used the maya modules, so in a way I appreciate not having PyMEL bundled, as I don't use it, but I can imagine that libs that depend on PyMEL will explain how to run pip and install it.

Deke Kincaid

unread,
Apr 17, 2023, 6:13:23 PM4/17/23
to python_in...@googlegroups.com
The install instructions for PyMel have been in the maya docs for the last 3 versions.  They shouldn't be terribly hard to point users to and have them follow.


nixe...@gmail.com

unread,
Apr 18, 2023, 2:53:26 AM4/18/23
to Python Programming for Autodesk Maya
On one hand I side with Marcus - if you are making a commercial product like Ragdoll Dynamics or BroTools you put a lot of thought into UI\UX, and that includes making installation as easy and smooth as possible. You'd want to have as large of a userbase as you can to sustain development of such tools while keeping the price convenient, profitable and competitive. And with this point of view - every extra step, every extra action that user has to perform will be a negative impact on the UX, and it may influence selling numbers. I can easily name a lot of very good artists and animators who would look at documentation, see that it requires running some CLI commands and say "naw, too technical for me". 

On the other hand - can't it be made part of the automated installer? We already use installations script or even full blown installers, it should not be too hard to run pip install from within Maya. I haven't checked it out yet, but with standalone Python programs you can import pip and run it from within Python, without even resorting to os.system or subprocess commands.

Reply all
Reply to author
Forward
0 new messages