peerke88 / SkinningTools

26 stars 3 forks source link

error maya 2025 #3

Open charcoaleat opened 4 months ago

charcoaleat commented 4 months ago

I use maya 2025 and get this error and message

# Error: Plug-in, "C:\Users\CPU60381-Local\Downloads\Compressed\SkinTools_5.0.20240512\SkinningTools\Maya\plugin/SkinEditPlugin.py", was not found on MAYA_PLUG_IN_PATH.
# Traceback (most recent call last):
#   File "<maya console>", line 3, in <module>
#   File "C:\Users/CPU60381-Local/Downloads/Compressed/SkinTools_5.0.20240512\SkinningTools\__init__.py", line 36, in tool
#   File "C:\Users/CPU60381-Local/Downloads/Compressed/SkinTools_5.0.20240512\SkinningTools\UI\SkinningToolsUI.py", line 738, in showUI
#   File "C:\Users/CPU60381-Local/Downloads/Compressed/SkinTools_5.0.20240512\SkinningTools\UI\SkinningToolsUI.py", line 69, in __init__
#   File "C:\Users/CPU60381-Local/Downloads/Compressed/SkinTools_5.0.20240512\SkinningTools\UI\SkinningToolsUI.py", line 442, in __componentEditSetup
#   File "C:\Users/CPU60381-Local/Downloads/Compressed/SkinTools_5.0.20240512\SkinningTools\Maya\interface.py", line 95, in forceLoadPlugin
# RuntimeError: Plug-in, "C:\Users\CPU60381-Local\Downloads\Compressed\SkinTools_5.0.20240512\SkinningTools\Maya\plugin/SkinEditPlugin.py", was not found on MAYA_PLUG_IN_PATH.
brainexcerpts commented 4 months ago

@peerke88 I'm planning to fix this week as it at showed up at work as well.

peerke88 commented 4 months ago

@brainexcerpts is it specific to maya 2025 or to the new 2025.2 update? looks to me like an issue that comes with the packageinstaller looking at the paths in the message we might need to add our plugin paths dynamically to the MAYA_PLUG_IN_PATH but im not sure if it allows it too easily as this is a method introduced to prevent malware in Maya. unfortunatly im stuck with maya 2022 for the forseeable future so i just did the bare minimum to make the setup work in maya 2025

trevorvanhoof commented 4 months ago

Can't seem to reproduce. If I:

If I try to launch the tool directly after installing I do get the same error; but the manual does mention to restart Maya and after doing so it works fine.

The reason for this is that the installer inserts the package location into sys.path, but then it MOVES the files to the install location. I guess that when launching it finds a SkinningTools module still in memory from the package folder, so then when it uses file to navigate to the plugins folder it indeed is not there because that file has moved. Cleaner would probably be to remove the path from sys.path and unload the SkinningTools module recursively - though I never got that to work super reliably so a Maya restart really is the answer.

My stack trace for comparison:

# Error: Plug-in, "C:\Users\TrevorvanHoof\repos\SkinningTools\SkinningTools\package\SkinTools_5.0.20240805\SkinningTools\Maya\plugin/SkinEditPlugin.py", was not found on MAYA_PLUG_IN_PATH.
# # Traceback (most recent call last):
# #   File "<maya console>", line 2, in <module>
# #   File "C:\Users/TrevorvanHoof/repos/SkinningTools/SkinningTools/package/SkinTools_5.0.20240805\SkinningTools\__init__.py", line 36, in tool
# #   File "C:\Users/TrevorvanHoof/repos/SkinningTools/SkinningTools/package/SkinTools_5.0.20240805\SkinningTools\UI\SkinningToolsUI.py", line 738, in showUI
# #   File "C:\Users/TrevorvanHoof/repos/SkinningTools/SkinningTools/package/SkinTools_5.0.20240805\SkinningTools\UI\SkinningToolsUI.py", line 69, in __init__
# #   File "C:\Users/TrevorvanHoof/repos/SkinningTools/SkinningTools/package/SkinTools_5.0.20240805\SkinningTools\UI\SkinningToolsUI.py", line 442, in __componentEditSetup
# #   File "C:\Users/TrevorvanHoof/repos/SkinningTools/SkinningTools/package/SkinTools_5.0.20240805\SkinningTools\Maya\interface.py", line 95, in forceLoadPlugin
# # RuntimeError: Plug-in, "C:\Users\TrevorvanHoof\repos\SkinningTools\SkinningTools\package\SkinTools_5.0.20240805\SkinningTools\Maya\plugin/SkinEditPlugin.py", was not found on MAYA_PLUG_IN_PATH.
charcoaleat commented 4 months ago

yes, somehow, sometimes when I reinstall, the tool appears again. But after turning off maya, turning it back on doesn't work. I have to delete everything, start over from scratch, then it works and then it happens again

brainexcerpts commented 3 months ago

@peerke88 So contrary to what I thought this issue has nothing to do with what came up at work. (we had an old version that just needed to be updated), sorry about that.

I followed the installation procedure that @trevorvanhoof mentioned, and try to investigate this error in particular, but I could not reproduce it either.

Side notes: I have noticed that the gif don't get decompressed and the tooltips don't work since the gif are not presents. So perhaps the installation process could need some brush up. Also installing somewhere else that Documents\maya\scripts does not work as Maya won't find the python scripts, I'm not sure the installation process does anything to ensure maya knows where to find the tool if installed in some weird place, maybe we should simply force where the tool gets installed in this case?

@charcoaleat Could you tell us/confirm what method exactly you used to install the tool? I recommend you try an alternate method:

Then in maya simply launch the following python commands:

from SkinningTools.UI import SkinningToolsUI
myWindow = SkinningToolsUI.showUI()

This way works the best for me it seems. In my case this fixes the missing gif issue as they are already present in the git. (installation process downloads a zip from some gdrive and fails to uncompress it seems)

Unfortunately I'll be on holidays in august so I won't be able to assist during that time.