Jump to content
3DCoat Forums

Maya 2024 uplink ?


al_stig
 Share

Recommended Posts

  • Member

Where is update for the Maya Uplink ?
Maya switched to python 3 a while ago and I don't see the new updated uplink.
I think the whole uplink section needs urgent rehash, because at the moment, for new client, it seems that only Blender is supported.


Thanks

Link to comment
Share on other sites

  • Member

Hi,

Maya has an uplink which worked in python 2. It need update to python 3, which I would guess doesn't need too much work.
It's not creating a feature just updating.

It is very important feature for the workflow and speed.
Regarding other features, I'm always more for the bug fixes and stabilizing GUI.
There were many changes, so I would suggest keeping whatever is there and improving existing tools.
Stable application is the most important in my view.

Link to comment
Share on other sites

  • Member

Hi,
I've tried to convert the python with 2to3 using some suggestions from the following website:
https://matiascodesal.com/blog/how-to-convert-maya-python-2-code-to-python-3/
This is the result.
In this code I got by conversion I got an error on line 1020
 

 1020           return wrapinstance(long(ptr), QtGui.QMainWindow)

After I changed long to int, I could actually load the plugin.
I've added the 3D coat path into settings (via mel shelf ) and tried to send the mesh to 3D coat for retopo, etc.
Now I'm getting the error in the following line:

1034               if line.lower().startswith('3d-coat'):

Can you help ?

Thanks
 

conversion_log.txt 3dc_applink.py 3dc_applink.py.bak

  • Thanks 1
Link to comment
Share on other sites

  • Member
2 hours ago, al_stig said:

Hi,
I've tried to convert the python with 2to3 using some suggestions from the following website:
https://matiascodesal.com/blog/how-to-convert-maya-python-2-code-to-python-3/
This is the result.
In this code I got by conversion I got an error on line 1020
 

 1020           return wrapinstance(long(ptr), QtGui.QMainWindow)

After I changed long to int, I could actually load the plugin.
I've added the 3D coat path into settings (via mel shelf ) and tried to send the mesh to 3D coat for retopo, etc.
Now I'm getting the error in the following line:

1034               if line.lower().startswith('3d-coat'):

Can you help ?

Thanks
 

conversion_log.txt 5.49 kB · 1 download 3dc_applink.py 54.22 kB · 1 download 3dc_applink.py.bak 54.22 kB · 1 download

I don't have maya 2024 for test the code, but reading line 1020 you made a good job changing "long" for "int". Now for the line 1034 you can try changing the string '3d-coat'  for '3dcoatgl64'.

Edited by MJonathan
  • Like 1
Link to comment
Share on other sites

  • Member

Hi,

I think this depends on the exchange directory, probably this should be changed:

loadPlugin("3dc_applink.py");
3D-Coat settings:
maya.exe path:    C:/Program Files/Autodesk/Maya2024/bin/maya.exe
user docs path:   C:\Users\USERNAME
3dcoat maya dir:  C:\Users\USERNAME/3D-CoatV4/Exchange/Maya
maya project dir: E:/projects/Jacket/
maya 3dcoat dir:  E:/projects/Jacket/3dcoat/

Except the shader issue, regardless of 3d-coat or 3dcoatgl64 I get the following error:
coatExport(3);
<Applink> Export mode [uv]
// Error: line 1: TypeError: file C:/Users/10/Documents/maya/2024/plugins/3dc_applink.py line 1034: startswith first arg must be bytes or a tuple of bytes, not str

Same line as above...

Not sure if this would be the only issue, but trying to get as far as I can...

                if line.lower().startswith(b'3dcoatgl64'):

If I add b  in front (b'3dcoatgl64') , it doesn't report the error, but still nothing happens.
It seems to be working partially because if 3d coat is not running it opens it.

I might be going silly but maybe there are no options inside 3D coat to except the maya link ?

Edited by al_stig
Link to comment
Share on other sites

  • 1 month later...

Here are the steps on how to convert a Python 2 script to Python 3:

  1. Install the 2to3 module.
Code snippet:
pip install 2to3
  1. Run the 2to3 command on your Python 2 script.
Code snippet:
2to3 my_script.py
  1. Review the changes that 2to3 made to your script.

2to3 will make a number of changes to your script, such as:

  • Changing the print statement to the f-string syntax.
  • Changing the print function to the print() function.
  • Changing the raw_input function to the input() function.
  • Changing the xrange function to the range() function.
  • Changing the unicode literals to the str literals.
  1. Make any necessary changes to your script.

2to3 may not be able to make all of the changes for you automatically. You may need to make some changes manually.

  1. Save your script.

  2. Run your script.

Your script should now run in Python 3.

Here are some additional tips for converting Python 2 scripts to Python 3:

  • Use the --write option to 2to3 to write the converted code to a new file.
  • Use the --verbose option to 2to3 to get more information about the changes that are being made.
  • Use the --diff option to 2to3 to see a diff of the changes that are being made.
  • Use the --in-place option to 2to3 to modify the original file in place.

I hope this helps!

  • Like 1
Link to comment
Share on other sites

If you are getting the error message "pip is not recognized as an internal or external command, operable program or batch file", it means that the pip command is not in your PATH environment variable. To fix this, you can add the path of the pip executable to your PATH variable.

To do this, follow these steps:

  1. Open the Control Panel.
  2. Click on "System".
  3. Click on "Advanced system settings".
  4. Click on the "Environment Variables" button.
  5. In the "System Variables" section, scroll down and find the "Path" variable.
  6. Double-click on the "Path" variable.
  7. In the "Edit environment variable" dialog box, add the path of the pip executable to the end of the "Value" field.
  8. Click on "OK" to close the "Edit environment variable" dialog box.
  9. Click on "OK" to close the "Environment Variables" dialog box.
  10. Click on "OK" to close the "System Properties" dialog box.

Once you have added the path of the pip executable to your PATH environment variable, you should be able to run the pip command without any errors.

Here are some additional tips for fixing the "pip is not recognized as an internal or external command" error:

  • Make sure that you have installed pip. You can install pip by running the following command:
Code snippet:
python -m ensurepip
 
  • Make sure that the pip executable is in your PATH environment variable. You can check the value of your PATH environment variable by running the following command:
Code snippet:
echo %PATH%
 
  • If the pip executable is not in your PATH environment variable, you can add it by following the steps above.
  • If you are still getting the error message after adding the pip executable to your PATH environment variable, you may need to restart your computer.
  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
  • Member

In the meantime I've managed to make it work without this, but this is great instructions and help, thank you so much.
But... I've tried both maya and blender link neither work.
The issue is that if I export from blender it just doesn't register that I've exported something from blender, and more or less the same with maya.
I've upgraded to the latest version of 3D coat and it keeps installing it into 3Dcoat-2021 directory.
Could this be the problem ? How to fix any of this ? How the updater finds where to install ?
Can I rename the directory and try updater again ?
I really think that this should be sorted.
I'm catching up with python, maya applink is still on mental ray, it needs update to arnold and/or maybe USD shader.
I hope I could do something about it, but I think that there is no significant care about the applinks and I don't think this is fair.
Workflow is THE MOST IMPORTANT THING.

 

Thanks

Link to comment
Share on other sites

  • Member

There is a huge missunderstending here. Please read what I wrote.
I've installed 2023 version now and unistalled the one from 2021 even it was the same version.
But that is NOT the issue. The issue is with confusing directories, or something inside the 3D coat which is triggering it to read file from maya or blender.

There is so many 3D coat directories under documents folder, which are sort of referencing each other, but for sure they are not empty.
Also I didn't find anything about reading USD file format either.
Ok, so I did fresh install, lost the packs or not, I don't care at this stage.
We need detailed explanation not only about the applink (which I followed to a T and got me nowhere).
Also some versions back this worked and it doesn't work anymore.
I will continue digging to figure it out, but I feel really not supported in this.
Please check on your end about what triggers 3D coat to read fbx files from blender or maya.

Do I need to use the applink installer ?

Same issue as here:


I wasn't installing the applink before...

Thank you.
 

Screenshot_49.png

Edited by al_stig
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...