ross-g / io_pdx_mesh

Import/Export files for the Clausewitz game engine
GNU General Public License v3.0
81 stars 11 forks source link

Multiple Maya 2023+ errors: PyMEL not found, shelf script incorrect #81

Open AtomicCones opened 1 year ago

AtomicCones commented 1 year ago

After installing the Maya version into the Maya Script folder, and then creating a button on the shelf with the command to run the io_pdx_mesh plugin, I was presented with error 1, as stated in the title "No module named 'pymel'" on line x" after attempting to then understand Python, managed to resolve it, but was presented with both errors 2 and 3, "Consider adding this directory to PATH", and "name error 'reload' is not defined". I have personally resolved all 3, so below will be how I fixed them, won't be assisting others as I have limited knowledge in this field (doing in baby steps as well if anyone else lacks even less knowledge), just bringing this to light for anyone that might have got stuck like me, as well as for the developer of course.

Error 1:

Error 2

Error 3

Screenshot of other Python Version Reload Code

ross-g commented 1 year ago

Thanks for the detailed report (and also for updating it once you found answers!) it's appreciated.

Yes from Maya 2023 onwards Autodesk decided to not include PyMEL by default. I have some in progress work to solve this automatically, but I should update the documentation here to reflect that from 2023 some additional steps are needed when installing.

Likewise, Python 3 is the default in more recent versions of Maya and I should update the install documentation (or just provide a pre-made shelf to install).

AtomicCones commented 1 year ago

Thanks for the detailed report (and also for updating it once you found answers!) it's appreciated.

Yes from Maya 2023 onwards Autodesk decided to not include PyMEL by default. I have some in progress work to solve this automatically, but I should update the documentation here to reflect that from 2023 some additional steps are needed when installing.

Likewise, Python 3 is the default in more recent versions of Maya and I should update the install documentation (or just provide a pre-made shelf to install).

Well, that's the thing I don't understand, I have a script from some Japanese coder for proper circularise functions etc. His used Python and had the same PyMEL error issue, but when it said a fix was to make sure it was ticked in installation / re-install and actually tick it. I just downloaded the packages separately and it worked. So I was super confused when I saw it pop up again with this, and thus went to solution 2 of doing it via the console and other black magic listed above. my only presumption as to why they might of reacted differently in the end is that his was just 2 script py files that talked to each other for other functions. where as yours is, some form of complex folders and multiple scripts that I decided to not lose my brain cells in with another unknown language.

Rodahtnov commented 7 months ago

Any new about this issue? Having it with maya 2024 - partially solved by brute-installing pymel but its pretty obnoxious to use

ross-g commented 7 months ago

There is no bug to fix here, you can blame Autodesk for bundling PyMEL with Maya for 10+ years resulting in it being heavily relied upon... then deciding one year they won't do that anymore and don't care if it breaks everyone's stuff.

It is covered in the Maya docs: https://help.autodesk.com/view/MAYAUL/2024/ENU/?guid=GUID-2AA5EFCE-53B1-46A0-8E43-4CD0B2C72FB4