-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe move to Qt.py as a Qt Shim #46
Comments
Hi, sounds interesting, Always interested in seeing a better way. I'm familiar with qt.py, used it a lot myself in the past. I'm not following exactly what you mean with the app detect and sys.executable. can you rxplain a bit more or perhaps dhow that PR. |
And for app detect if optimization is needed we can also always swap to importlib instead of attempt an import. Checking the package name. Its a lot faster but a bit more code |
Hey, ok I thought that sys.executable would be reliable. I just guess the more dccs are supported then the check can become longer and longer if it actually tries to import all packages... For the qt.py switch it is not needed at all... I guess all can stay as it is... again this moves the try except loop into a onetime action. I tried unimenu last week on friday and I am not sure I am using it wrong, but for maya to correctly be detected I had to modify the NON_QT list and add MAYA there, otherwise it was throwing errors. I only tried the code sample. I could rework app detect to sys.executable where I know it should work and then I could make a PR to use it as a dependecy for unimenu?! We use REZ as a package manager so getting all in via PIP is easy. Cheers |
Can you let me know which code you rsted in maya? Adding MAYA will use the old maya unimenu, instead of the new and easier to maintain qt maya menu setup. Both work but new one also has more features i believe. The test code migt need updating. If not it's a bug |
Can you make a pr for the sys exec. But just for 1 app? To see how you have it in mind. Maybe maya or blender? |
import unimenu
menu = unimenu.Node(label="my menu") # create a menu
item = unimenu.Node(label="hi", command='print("hi")') # create a menu item
menu.items.append(item) # add the item to the menu
menu.setup() # setup the menu in the app, parented by default to the main menu bar produces this in Maya 2022. Errror: 'NoneType' object has no attribute 'findChild' |
Here is the sample pr how I would implement the app detection for dccs where it is possible |
since this issue is startign to contain several topics, i will close it and split it up
|
Hey @hannesdelbeke
I really like all your repos, I was wondering if you would consider a PR moving unimenu to Qt.py ?
https://github.com/mottosso/Qt.py
And in Appdetect instead of importing running for
sys.executable would be faster... I could also prep a PR for that..
But wanted to know if these would be welcome changes or not ?
Let me know what you think
The text was updated successfully, but these errors were encountered: