Building PyQt for Maya 2012 ( Linux x64 )

                   

SIP needs to be built prior to building PyQt.

Download SIP from here

Maya 2012 uses Qt 4.7.1.

Download it from here

Download PyQt from here

First step is to build qt from source. Extract the tarball and CD in to the directory

./configure

While running configure, if you get the following error

Basic XLib functionality test failed!

You might need to modify the include and library search paths by editing

QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/anoop/apps/sources/qt-everywhere-opensource-src-4.7.1 /mkspecs/linux-g++-64.

install teh libXext development package. I used zypper to install the package from the web

zypper install xorg-x11-libXext-devel

executing the configure after the installation gave the following error

cannot find -lXrender

this was happening because configure couldn’t find libXrender.so. This can be fixed by creating a symlink to libXrender.so.1 in the /usr/lib64 directory

ln -s /usr/lib64/libXrender.so.1 /usr/lib64/libXrender.so

After successful configuration run the following to install Qt to /usr/local/Trolltech/Qt-4.7.1 directory

make

make install

Building SIP

Extract the SIP zip archive to /home/username/SIP

cd /home/username/SIP

After setting the variables, run the following

/usr/autodesk/maya2012/bin/mayapy configure.py

make

make install

Building PyQt

Extract the archive to /home/username/PyQt-x11-gpl-4.7.4

cd PyPyQt-x11-gpl-4.7.4

/usr/autodesk/maya2012/bin/mayapy configure.py -q /usr/local/Trolltech/Qt-4.7.1/bin/qmake

make -j4

make install

PyQt4 for Maya2011 on Windows XP x64

Finally got some time to get back to python after a long break, only to find that I don’t have a working copy of PyQt4. Instead of spending time on google trying to figure out whether anyone has decided to share a copy of PyQt built against Qt4.5.3, decided to build one myself. Having Windows SDK already installed on my XP proved out to be handy since the Visual Studio version I was running was still 32-bit one. Downloaded SIP4.12 source and Qt4.5.3 SDK and within few seconds the PyQt4 module was successfully added to the site-packages.

Thought of sharing the build for those of you who are planning ahead to design awesome GUIs in Maya.You may download it here

Qt 4.5.3 SDK for Maya 2011

My search for a compatible version of Qt SDK for Maya 2011 Hotfix3 x64 ended up with a few results which I thought of sharing with you guys in case you need any. Maya 2011 Hotfix 3 uses Qt 4.5.3 to draw the interface. Below are a list of links to Qt 4.5.3 for Linux, Mac OS and Windows.

Qt 4.5.3 OpenSource Edition SDK

Qt 4.5.3 SDK for Open Source C++ development on Windows [178Mb]

http://get.qt.nokia.com/qtsdk/qt-sdk-win-opensource-2009.04.exe

Qt 4.5.3 SDK for Open Source C++ development on Linux/X11 32-bit [275Mb]

http://get.qt.nokia.com/qtsdk/qt-sdk-linux-x86-opensource-2009.04.bin

Qt 4.5.3 SDK for Open Source C++ development on Linux/X11 64-bit [353Mb]

http://get.qt.nokia.com/qtsdk/qt-sdk-linux-x86_64-opensource-2009.04.bin

Qt 4.5.3 SDK for Open Source C++ development on Mac OS [442Mb]

http://get.qt.nokia.com/qtsdk/qt-sdk-mac-opensource-2009.04.dmg

Qt 4.5.3 OpenSource Edition Framework Only

Qt 4.5.3 for Open Source C++ development on Windows [166Mb]

http://get.qt.nokia.com/qt/source/qt-win-opensource-4.5.3-mingw.exe

http://get.qt.nokia.com/qt/source/qt-win-opensource-src-4.5.3.zip

Qt 4.5.3 for Open Source C++ development on Linux/X11 [120Mb]

http://get.qt.nokia.com/qt/source/qt-x11-opensource-src-4.5.3.tar.gz

Qt 4.5.3 for Open Source C++ development on Mac OS [132Mb]

http://get.qt.nokia.com/qt/source/qt-mac-opensource-4.5.3.dmg

http://get.qt.nokia.com/qt/source/qt-mac-opensource-4.5.3-debug-libs.dmg

http://get.qt.nokia.com/qt/source/qt-mac-cocoa-opensource-4.5.3.dmg

http://get.qt.nokia.com/qt/source/qt-mac-cocoa-opensource-4.5.3-debug-libs.dmg

http://get.qt.nokia.com/qt/source/qt-mac-opensource-src-4.5.3.tar.gz

HUGO vs LINO Character Workflow

Maya Muscle again!!!.This time not just in the form of a test to explore the features Autodesk has provided, but a case study on the project HUGO Vs LINO which proved out to be a huge challenge in terms of the quality expected. Even though I had got used to the Muscle tool set Maya provided, incorporating new features in to the existing character pipeline proved to be a tough task. The decision to go with Muscle System for HUGO demanded all the geometries to be cached out before being forwarded to the lighting and the Fx departments. The next stage was to automate the caching process. With a couple of tools for batch export and import of the cache, the process was well under control. Use of smart collision for the arm pits and elbows helped us get believable collision effects. Added to that self collision and smooth attributes were painted on shot basis in order to tackle the mesh artifacts that were encountered in extreme poses.

Qcalendar widget for Maya GUI using PyQt

QCalendar widget is one of the handy widgets provided by PyQt that can be included in your maya custom UI for the user to deal with date information.Apart from providing current date information to the user, Qcalendar widget can be used to get valid date inputs from the user.It includes a set of signals like selectionChanged() and currentPageChanged() which can be used to update the information based on user selection.

The selected date can be retrieved using the method selectedDate() which will return a Qdate.The day() and month() methods of QDate can be used to get seperate day and month values. Similarly longMonthName() method can be used to get the long names of the month since the method month() gives the month in number format (12 for December).

The usage is as follows:

myDate = myCalendar.selectedDate()

month = myDate.month()

day = myDate.day()

monthName = myDate.longMonthName(myDate.month())

The calendar grid visibility can be set for east readability using the setGridVisible() method which will accept a boolean value.

myCalendar.setGridVisible(True)

Autodesk Backburner job submission using cmdjob.exe

Autodesk’s decision to ship Backburner 2008 with Maya2010 has leveraged  the utilisation of resources across the network for executing batch rendering task from a single node point. Backburner jobs can be easily created from within Maya 2010 using the Create Backburner Job command under the Render menuset as shown in the  figure below.

This will bring up a window similar to the one shown below.

Here you can specify the job name, frame range, number of tasks, Renderer and also specify the IP address of the machine in which the backburner Manager is running.

But the real power of backburner is revealed when you get under the hood and explore the power of the command line based utiliy cmdjob.exe. This is a handy tool for adding jobs to backburner manager for  literally any version of maya and not even just maya even Softimage, Aftereffects, and Nuke projects with a change in the passed arguments.The cmdjob utility can be accessed from within the backburner installation directory.

The basic syntax for the cmdjob is as follows CMDJOB <Options> executable to run <executable parameters>

By specifying the executable for the specific version of maya and passing the arguments for the maya batch we can trigger renders across multiple machines in the network and still monitor the progress using the backburner monitor.For example:

cmdjob.exe -jobName myRenderJob -jobNameAdjust -manager localhost -priority 50 -numTasks noOfTasks -taskName 1 -leaveInQueue “C:Program Files (x86)AutodeskMaya2009binRender.exe” -r mr -s 0 -e 196 -of tiff -proj projectPath -rd renderDirectory fileName.ma

will add a job named myRenderJob to manager running in the same machine(localhost) using Maya2009 batch using renderer mentalray(mr) for frame range o to 196 with file format of tiff to renderDirectory location for file named fileName.ma.It will distribute the job to noOfTasks number of machines in which backburner server is running.

You can get a list of all the valid parameters accepted by cmbjob from the list below

ak_rgbMatteTool.mel

ak_rgMatteTool

This is the tool I created for easy assignment of RGB Mattes for the objects in the scene during the maya render process.For those who havn’t used RGB matte passes in render, RGB matte passes help in extracting individual 3d elements from a maya scene render containing multiple objects. This handy tool helps in creating mattes for ambient, diffuse, Incandescence, and reflect channels with the click of a button.

The usage of the script is as follows
source ak_rgbMatteTool.mel;
ak_rgbMatteTool();

you can download the script here