TrevisanGMW / gt-tools

GT Tools is a free collection of scripts for Autodesk Maya
https://github.com/TrevisanGMW/gt-tools
MIT License
142 stars 20 forks source link

[BUG]: Can not put shortcut in shelf anymore #141

Closed thegreenpuppet closed 1 year ago

thegreenpuppet commented 1 year ago

I usually put the gt-tools feature as a shortcut in maya shelf, but now it does not work anymore.

TrevisanGMW commented 1 year ago

Hey @thegreenpuppet, Do you get any errors? Can you list the steps you went through so I can try to replicate the issue?

I opened the drop-down menu here, then "Ctrl + Shift + RMB" on a tool and it was added to the current shelf without any issues.

If you're refering to copying and pasting the content of the script into a shelf button. That won't work anymore because the tools are now importing code that exists inside other scripts. For example, multiple tools will make use of utilities, so they all import from utilities (instead of repeating code)

If you don't want to install the script package, you can use the "Run-Only" option. Installing will just create a copy in your "Documents/maya" folder, so it would be easier.

TrevisanGMW commented 1 year ago

In case your goal is to have shelf buttons, but no menu. You'll be able to do this in future versions. I'm planning to include preferences, so you can tweak the package behaviour. For example, not creating a menu even when installed.

TrevisanGMW commented 1 year ago

I think I managed to replicate the issue. If a call function for a tool is added to the shelf and then maya is restarted, the partial function address changes. I fixed it in the development branch, I'll release an update with a complete fix for it soon 👍

TrevisanGMW commented 1 year ago

I'll close this issue. Feel free to re-open or open a new one in case what I mention didn't clarify the issue 👍