Practical Maya Programming with Python by 2014
Author:2014
Language: eng
Format: mobi
Publisher: Packt Publishing
We create a setdefault callback function, and connect it to the action's triggered signal. The triggered signal is emitted when the menu item is clicked.
Let's see this in action. We'll need to reset our font and then re-register the item. Run this from the Script Editor.
action.setFont(QtGui.QFont()) reload(newmenumarker) newmenumarker.register_menuitem(menuitem)
Our menu item should now have a bold font. After we click it, the font should return to normal.
While the current code serves as a demonstration for customizing menus, it still needs some work to be functional enough for non-demonstration use. Let's go ahead and set up a more complex use case, and add a persistence layer so that the menu items remember whether they are marked or not between Maya sessions.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(20885)
Hello! Python by Anthony Briggs(20166)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(18512)
Dependency Injection in .NET by Mark Seemann(18332)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(17845)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(17618)
Kotlin in Action by Dmitry Jemerov(17487)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(16937)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(16436)
Grails in Action by Glen Smith Peter Ledbrook(15586)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(13422)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(11500)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10582)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(10460)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(9486)
Hit Refresh by Satya Nadella(9087)
The Kubernetes Operator Framework Book by Michael Dame(8523)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8348)
Robo-Advisor with Python by Aki Ranin(8295)