Closed ivogrig closed 4 years ago
Oh! nice! I didn't know you can pass the command as str. Thanks btw: do you know if using strings command, the Maya middle click to repeat the last action on the menu will work? This is something I always wanted to research since never worked in mGear menu :P
I just tried. Yes, it appears to work for the commands that I modified. You mean middle clicking on the top menu like this, don't you?
If there were icon-files available, we could also pass them as image
argument to be used when creating the shelf icon. I did that for our internal menu, it can also conveniently use SVG files.
yes, middle-click on the top menu.
to be more specific. With the previous implementation, the middle click was kind of working but only trigger the first command of the sub-menu
for example
if I click in settings by going to the menu. If I use middle-click next time. It will open the guide manager. that was the issue
Yes, on my end it properly remembers and opens the Settings dialog every time
about the icon files, we are vendoring this library https://feathericons.com/ But are too generic. I would like to have nice icons/logo for the tools. indeed there is this ticket open https://github.com/mgear-dev/mgear_dist/issues/12
Thanks for this I will check and merge all ASAP :) Please keep it coming if you have more good ideas :D
I am adding the same format to all the modules ;)
Hi,
Problem: Maya has a feature where holding Ctrl+Shift while selecting a menu item adds a shelf-icon instead of running it. Currently this does not work with shifter as the shelf command will only hold a memory-pointer to a python function object. My solution is to pass the command argument as a string rather than a function. A welcome side effect is that the corresponding modules are not imported at startup (might save some time).
I hope this makes sense, let me know if not.
Cheers, Ivo