NSUV for 2022

NSUV for 2022

justo_figuer
Observer Observer
1,752 Views
3 Replies
Message 1 of 4

NSUV for 2022

justo_figuer
Observer
Observer

Trying to make the NSUV editor work in Maya 2022.3 (worked without problems in ver2018), from here:
www  highend3d   com/maya/script/nightshade-uv-editor-for-maya

Every time I try to import NSUV i get this message: # Error: ModuleNotFoundError: file C:/Users/Jeremy/Documents/maya/2022/prefs/scripts\NSUV__init__.py line 23: No module named 'optVars' #
I definitely have the file in the folder, named optVars.py, and re-downloading it didn't fix the issue either.

In this thread from AD forums I found others experiencing the similar problems with Maya not picking up modules:
www   forums.autodesk   com/t5/maya-programming/maya-2022-no-module-named-xxx-even-if-the-script-is-...
...But applying those syntax fixes didn't do it for me, unless I missed something. Can anyone confirm if this is a simple 1-or-2-line syntax problem easily fixed, or if there are tons more problems due to new changes in python language?

1,753 Views
3 Replies
Replies (3)
Message 2 of 4

ben9YURM
Community Visitor
Community Visitor

I would very much like a solution to this. I've been using Maya 2020 because I don't want to use stock UV editor...

0 Likes
Message 3 of 4

FirespriteNate
Advocate
Advocate

Maya 2022 was the first Maya version that moved from Python2 to Python3, and there are ton of minor and major differences between these two Python versions that break code, unless it's been specifically written to be compatible with both (which, in general, most Maya tools written before 2022 were probably not).

 

There is no easy way to get Python2 code working in Python3 without rewriting it. This could be as simple as making a minor edit to one line, or it could involve a complete refactor due to deprecated types or libraries. There is a ton of info online about doing this and it's potentially very complex and time consuming.

 

However, you can simply run Maya 2022 in Python2 compatibility mode. This isn't 100% ideal because Python2 has been deprecated for years and I'm not sure Maya 23 or 24 support this going forward, but if you're using 22 anyway, and you just want your old tools working, it's worth at least trying this to see if the issue is, in fact, due to Python2/3 compatibility.

 

just add the -pythonver 2 flag to your maya shortcut, so on windows, your shortcut would look something like this:

"C:\Program Files\Autodesk\Maya2022\bin\maya.exe" -pythonver 2

 

Message 4 of 4

kinpatsujin
Community Visitor
Community Visitor

So, umm, I just used GPT5 to fix Nightshade UV Editor. I now have a working version running on Maya 2025 and 2026. And I made sure it's portable, no references to absolute paths on my computer. But I still want other people to try it out to make sure it works. If anyone is interested in testing it out shoot me an email at kinpatsujin@gmail.com

0 Likes