Oct 122012
 

PyQt4 UI Development for Maya

Just released my 3rd python-based online training video through cmiVFX.com

Introduction

This tutorial is about learning PyQt4 python bindings for the Qt Framework, and how to introduce new UI elements to Maya as a platform.
We discuss what comprises a “Framework” and a “GUI Framework”, and how Qt and PyQt4 work together.

 

Getting Started With PyQt4

There are multiple ways of getting a working installation of PyQt4, both for the general system and for Maya. We look into these approaches to get your system up and running to begin working with PyQt4!
We also talk about what is included, such as command line tools and applications, tips on how to test and learn the code, and how to structure a project.

 

PyQt4 Fundamentals

Lets get crackin’ and learn the basics!
• What is a QObject? What is a QWidget? Common PyQt4 classes are explained in detail
• Working with the Qt Designer application, to build a UI visually
• Layouts: Making widgets resize elegantly and stay organized in your design
• Coordinate space: How do widgets transform in your 2D screen space?
• QApplication and the Qt Event Loop: The engine that runs your UI
• Events, Signals, and Slots: How components communicate changes and how the application can respond to changes to make it dynamic

 

General Examples

With an understanding of the framework components, we can begin working with fully functional stand-alone examples.
• Common PyQt4 app template
• Subclassing Widgets: Creating custom functionality to the existing classes provided by PyQt4
• Dialogs: Raising dialog windows above existing windows, Modal vs Non-modal, and creating forms. We look at different ways to validate the data provided by the user, to these dialog forms.

 

PyQt4 And Maya Introduction

Finally, some Maya action! Maya has a slightly different approach to using PyQt4…
• How does the QApplication and event loop work?
• Common Maya PyQt4 app template
• Looking at the Maya API’s MQtUtil class
• The sip module: Helping us translate between Maya’s Qt and our own PyQt4 code

 

Replicating Maya’s UI Components

What better way to see examples of creating UI for Maya than to replicate some existing functionality? This gives us the opportunity expand with custom functionality
In this chapter we will take two different UI components in Maya, and do a basic custom version of our own, and show to how link them up to Maya’s own callbacks.
Some Features Of This Chapter Include
• The QTableWidget
• Model / View separation with QTreeView
• Docking windows into the Maya interface
• Mixing together PyQt4, the Maya API, Maya commands, and callbacks
• Sorting model data

 

Customizations

A button can be a button, and a slider might look alright in its stock form, but sometimes we want to customize the look of our widgets. This chapter introduces multiple ways of achieving custom looks to our components
• Stylin’ Stylesheets: Use CSS-like syntax for applying style sheets to widgets
• Painting By … Paint events: For even more control, we can tell a widget exactly how to draw itself on the screen. We will look at two different examples of how to use custom painting.

Previous cmiVFX tutorials:

Nov 152011
 

Second video in the python for maya series, just released through cmiVFX!

Python For Maya – Volume 2

If you watched the first video, you now have a good grasp on Python. Sweet. Let’s plow through some more involved concepts like python juggernauts!

With a working knowledge of the python scripting language, and the Maya Python commands API, we can continue to learn new ways to solve more challenging problems, create complete scripts, and build user interfaces around our tools. We also introduce the Maya Python API; a lower-level interface into Maya.

This video focuses more on breaking down full scripts, as opposed to typing out syntax. Its jam packaged with information and moves fast to deliver you as much brain food as possible. The first segment of the video transitions from beginning to intermediate level, with the majority of the video being intermediate, and finishing out by touching on advanced concepts. The included project files are abundant, complete, and full of helpful documentation so that you can take your time and learn about each piece of the tools.

If you check it out, leave me feedback!
http://cmivfx.com/store/328-Python+For+Maya+Vol+02

First video can be found here

Oct 082011
 

Just released my first online video tutorial, through cmiVFX

Python Introduction Vol 01 – Maya

Amazing at Animation? Master of Modeling? Conquistador of Character Rigging?

But how is your Python?

This course brings the talented artist into the fold of the technical-side of Maya. Learn the basics of Python, and its place in your 3D workflow, with visual examples and real world problems. Get a kick-start on adding some automation into your life, and solving common problems in a fraction of the time. By the end of this video, you should have a deeper understanding of one of the languages Maya speaks under the hood, and how to start viewing your scenes in terms of glorious Python code!

Check it out: http://cmivfx.com/store/320-Python+Introduction+Vol+01+-+Maya

If you check out this course, please leave me some feedback! I would love to hear your thoughts.
Stay tuned for more installments to come!