Archive for the ‘Maya’ Category

PyQt in Maya

qtLately, I’ve been working on learning how to develop PyQt UI tools with Maya. Since I work with Maya 2009 daily, I have had to do quite a lot of digging to find out how things were implemented smoothly for it to work with that version. Hopefully, this makes it easier to understand and appreciate it in 2011 and *gasp* :-O 2012, where PyQt is fully integrated! Anyway, if you are in the same predicament, then I should be able to help, send comments and emails my way.

 

Maya.env Configuration of Variables Using userSetup.mel and userSetup.py

maya2011_thumbuserSetup.mel, userSetup.py Tutorial Part 2: Theory and Practical Use

For the Advanced user:

     

Delving into what how userSetup files work can be tedious.  That’s why i’m posting how to configure Maya properly for those people who are perpetually scratching their heads, trying to figure out what way is better or why things aren’t working out like they planned.  Check out my previous post on userSetup and see if you are pondering things after reading all of that.  Of course, i’ve learned some things about the process too since then because my startup process is a lot more complicated than sourcing a couple of tools.  I’m setting up whole programming environments!  Learning Maya startup configuration has been a process of trial and error, searching and finding or sometimes not finding.  Here’s the beef.  Maya loads script paths in a specific order.  Once you learn that order, the daunting task of setting configurations for a whole studio is as simple as pie.  I work at a smaller studio, so the process of discovery falls on my shoulders and so I had to rise to the challenge.

     

Case Study: Finding the Solution to a Problem with userSetup.py


So where do you find the source code to decipher what’s really going on when Maya starts up?  After finding this relic of a thread online, It crystallized one piece of the puzzle.  I was having the hardest time figuring out why PYTHONPATH wasn’t working for all my scripts.  After all, I was pointing it to find my userSetup.py and also my Maya2011 python\libs\site-packages directory so I can have access to all my downloaded modules yet my PyQt modules were failing to import while my userSetup modules were sourcing just fine.

Here's the order of how Maya finds scripts for python taken from the post
linked above, which is directly from module: maya.app.startup.basic

Per-version prefs scripts dir (eg .../maya8.5/prefs/scripts)
Per-version scripts dir (eg .../maya8.5/scripts)
User application dir (eg .../maya/scripts)
Look for userSetup.py in the search path and execute it in the
"__main__" namespace
Set up sys.path to include Maya-specific user script directories.
Set up auto-load stubs for Maya commands implemented in libraries
which are not yet loaded
Run the user's userSetup.py if it exists
Register code to be run on exit

Read more

 

PyQt Makes Your Windows Dockable in Maya 2011

maya2011_thumbMaya 2011 adds PyQt bindings and dockControl command

…and this enables the docking of any custom window you create to the main maya interface. The UI can then be moved docked and undocked from anywhere TO anywhere. I immediately have embraced this godsend to the hellish Maya UI coding world. This isn’t really new news since Maya 2011 has been around for a little while now but I wanted to quickly share my code for making windows dockable. I have expanded my floating tools shelf to have a button that makes the UI dockable when you press it. The old window gets created in my userSetup and is not dockable until now that I added this command as a button to it.

The command gets called only when pressing the button and the command also stores the UI object’s names and specifics so that I can use it to modularly make more buttons on other UIs so that they can also be dockable. The whole key is being modular and not storing global variables which I consider messy.

If you’re gonna make a proc, that is easy

//Given a window name, a name to call the control, and placement in the main maya window,
//add the ability to dock the UI to the main maya UI.
global proc string jaDockUiCommand (string $winName, string $ctrlName, string $placement) {
 global string $gMainWindow;
 string $userPrefs = `internalVar -upd`;
 string $mayaVersion;
 string $buffer[];
 int $numTokens = `tokenize $userPrefs "/" $buffer`;
 $mayaVersion = `substring $buffer[5] 0 4`;
 if ($mayaVersion == "2011")
 {
 string $layout1 = `paneLayout -configuration "single" -parent $gMainWindow`;
 string $myDC = `dockControl
 -allowedArea "all"
 -area $placement
 -content $layout1
 -label $ctrlName`
 ;
 control -e -p $layout1 $winName;
 return 1;
 }
 return 0;
}

Read more

 

Maya: Online Event: Modular Animation & Rigging System

Rigging Dojo Interviews Jan Berger Creator of MCS

Previously I was baffled by MCS, the modular character system used for rigging and animating, and now one of my favorite rigging resources online, Rigging Dojo, is actually having a live online discussion via Vokle.com with the creator Jan Berger!  This could be the next biggest thing to hit the rigging world in a long time, and it’s gonna be incorporated into Autodesk at some point.  I’ll be tuning into the episode that takes an under the hood look at this technology for sure.

MCS

Modular Character System by Jan Berger

Suntoucher Labs

modular rigging tools system

http://vokle.com/lineups/6874-modular-character-system-mcs-under-the-hood-with-jan-from-suntoucher-labs

 

New Maya python/mel rigging tools from macaroniKazoo!

zoo avatar

zooTools make character rigging a breeeze!

Hamish McKenzie (macaroniKazoo) has put out a new release of his tools, now written in Python as well as good ‘ol Mel–YAY!  This is big news since it’s been a whole year since another version has been publicly released!  It’s good to know that someone out there is still enthusiastic about sharing with the online community what he’s learned and developed over a long period of time.  I hope to bring something as useful to the proverbial table one day.  Guess I better keep hitting the books and learn from great the great ones!  I feel like such a noob in comparison and it’ll take years to catch up with these guys.

Read more

 

Maya: Realtime Viewport CGFX Shader Writing

maya2011_thumbFresh tutorial on the web.  I just thought i’d stop by cgbootcamp after remembering that i’d bookmarked a Maya realtime shader tutorial on their Vimeo a while back.  I was surprised to see that they had just put up a brand new tutorial finishing up their series on writing a cgfx shader.

This site is great stuff indeed!  The shaders and videos are there free for the learning!  This inspires me to do spread knowledge of what i’m learning around all the more.  It’s fun to share and why not when you can make a little extra money in the process off of ads and donations.

I will be keeping an eye on these guys in the weeks to come and possibly doing my part to make sure they keep it up.  They make shader writing look sexy!  I’m gonna have to try this in my free time.

 

Maya: Modular Animation & Rigging System


Modular Character System – Feature Demo from Jan Berger on Vimeo.

This blows me away.  It’s got a lot of things riggers love plus what animators need.  I believe at first look it’s a strong tool, but may be a little unintuitive for animators to figure out at first.  When it comes to posing, scaling, squash and stretch, matching, foot control, IK, and FK animation, it looks like a breeze.  The rig seems so easy to set up with kinematics built in and readily customizable along any stage of the animation process given its modularity.

 

Maya.env Configuration of Variables Using “userSetup.mel”

maya2011_thumbuserSetup.mel Tutorial Part 1: Theory and Practical Use

Difficulty: Novice

Do you not want your tools to be on your work computer?  Do you need multiple users to use your tools without a lot of setup?  This is the simplest and most reliable solution.  You can keep your Maya installation directory clean and organized by storing your scripts, icons, shelves, plug-ins, tutorial example files, and the like in one accessible location on your hard drive or an external hard drive.  Most of mine are on my thumb drive I bring with me everywhere and a backup lives on a portable hard drive.  If you’re like me, you can’t live without your tools!

UPDATE: If you wanna know more advanced techniques, read Part 2.

Read more

 

Autodesk Maya 2011 Hotfix 3

maya2011_thumbAutodesk Maya 2011 Hotfix 3 – 1.5 GB

319246 Mac: All error messages do not appear via Python
339016 All windows redraw on hotbox and marking menu use
350611 Sequencer XML Export not compatible with Autodesk Smoke
351769 Remove environment variable for enabling active stereo on Windows Vista and Windows 7
353250 64 bit Mac vector render plugin not built for 64bit Mac
353529 Sequencer : wrong duration for movie files in XML files exported from Maya

Read more

 
Return top

Welcome!

Welcome to my blog that encompasses artistic interests in the Computer Graphics, Music, Film industries, and a few of my personal interests as well. I'm pretty new on the scene, but I hope to contribute a lot more as I have time and color my little dark corner of the interwebs with all kinds of things that make me, and maybe you, excited and inspired. Sometimes bombastic and at times dark and moody but always mischievous, I give you CG Hijinks, please, enjoy your stay!