About Me

Saturday, December 31, 2011

Maya Audio Offset in 2012

 In a previous post I mentioned that since Maya2011 they'd changed the way the offset attribute on sound nodes worked:

"So, 2 sets of attrs work together. Offset and EndFrame, SourceStart and SourceEnd. The Offset is no longer what it used to be, this is the start of the clip nothing more. If like us you have tons of sound code designed to offset audio then it's all stuffed! you need to manage both Offset and EndFrame at the same time now in order to shift a sound node along time."

I'd just like to to point out that this looks to have been reverted back to the previous behaviour inb the latest 2012 builds where the offset attribute controls the clip offset as you'd always have expected it to do.


Friday, December 16, 2011

Bug: Duplicate Nodes with Message Links

This is a bug that we had quashed back in 2009 but we've just noticed that it reappeared in 2011 when we were debugging some really unstable animation scenes. Basically you have 2 nodes in Maya with array message links, you duplicate one node and that then generates an exponential amount of message links between the 2 original nodes. In the example below you end up with something close to 100 message links between the 2 original Cube and Cone....EEEEk! 

import pymel.core as pCore

Cone.addAttr('SampleSpace', at='message', m=True, im=False)
Cube.addAttr('SampleSpace', at='message', m=True, im=False)
pCore.connectAttr(Cone.SampleSpace,Cube.SampleSpace, na=True)

for n in range(10):

Thursday, November 24, 2011

Python, shit what did we do before it????

So I've been playing with some string formatting for one of our legacy UI's which is basically just a textScroller that gets filled in a loop with all the export Tag information for the current scene, but I wanted to line up the data nicely. In mel this was just horrible but Python..... 1 line!

The format calls on strings are just fabulous, if you've not taken a look at them them I recommend you do so, here's the Python docs that relate to them:


So in the example here we have some string data that we want to carefully format. We want to make sure each entry in the line is the same length and some of them want to be left, right or center justified.

this='This is'

print '{this:.<15}:{nice:_^12}:{form:<20}:{data:>7}'.format(\

#This is........:___nicely___:formatted           :   data
So :

The above tells the format to replace the key 'this' with the passed in arg, then the '.<' tells it that it's left justified and any gaps should be replaced with '.' finally the number after it is the length to pad the data out to.
Similarly the '_^12' is formatting to center justify and adding '_' to the padding. Now that line fed to a loop thats filling the textScroll with scene data formats and lines everything up (as long as you set the fontType to the scroll to be fixedWidth that is)

Now that in Mel was the length of this blog!

Tuesday, November 8, 2011

Maya 2012 SAP: The CPU is maxed

Maya 2012 SAP: The CPU is maxed out if Maya is idle for more than 15 minutes 

This is a bug we reported earlier this week and luckily there's a work around for it. Thanks to Owen from the support team for the fast turn around! 

From MayaStation: 

With the release of Maya 2012 Subscription Advatage Pack and Service Pack 1, a new licensing feature was introduced that affects how the license server distributes license tokens. If a Maya session goes idle for 15 minutes this feature kicks in and returns that idle license back to the license server. When the user activates the session again Maya will go back and get the license from the server. If no licenses are available, Maya will keep trying for up to 2 hours. At that point if no license is avalable the application will save yourt work and shutdown. While this is a great feature for companies using server based licenses. There is a small problem that was spotted and Autodesk is working to correct this. The main issue you will notice is that when this idling feature kicks is on the artists box one of your cores will be pegged at 100% or very close to it. This occurs on all operating systems. Currently the only workaround we have in place is to disable this feature entirely until further notice. The following variable can be used to do this. 


We also noticed some other issues for users using the OS Native browser on Windows. When the idling feature kicks in and you try to either load or save a file through the OS browser in Maya the browser itself will fail to refresh until the cursor is moved away from the window. Using the above variable will address this as well.

Wednesday, November 2, 2011

Come join us!

We are currently looking to recruit the following positions: • Experienced Gameplay Programmers • Network Programmers (Engine & Game) • Graphics Programmer • Gameplay Designer (ideally with Multiplayer FPS experience) • Cutscene Cinematics Animator • Character Modeller (Face & Head specialist) • Special FX / VFX Artist • Character Modeller • Tools Programmer Full details and requirements for these positions are on our website. cheers

Tuesday, October 25, 2011

MasterClass finally on Vimeo

Finally added the MasterClass to Vimeo for you all to enjoy... thanks for watching!
Autodesk MasterClass - Live Animation Binding from Mark Jackson on Vimeo.
Don't forget the Toolkit link below

Wednesday, October 19, 2011

MasterClass - New Maya cmds compatible version

After a number of requests I've gone through the MasterClass toolkit and made it backward compatible with Maya 2008 onwards (actually I've only run it back to 2009 but should still work on 2008). This is kind of tested but if you get any issues let me know and I'll fix them. Basically all I've done is to remove the PyMel calls and replace them with cmds, also made it Python 2.5 compliant.

Anyway, here's the link to the new AnimationBinderCmds.py module file. Install is easy, like the main class all you do is drop it into the Maya scripts folder, or any folder on the Maya scripts path, then in a Python Tab type: (with no tabs or spaces at the front of each line)

import AnimationBinderCmds as AB

Here's the link:


Thanks for the interest


Monday, October 17, 2011

MasterClass update

I've been asked by a few people for a version of the MasterClass code that will run in earlier versions of Maya. The code I shipped originally relied on PyMel as well as Python 2.6 so wouldn't run under Maya 2009. I'm just finishing converting the module, no bug deal really. Hopefully should have a version ready in the next day or two.



Thursday, September 29, 2011

Maya 2012 Subscription Advantage Pack is available for download

Maya 2012 SAP's pack released for download on subscription center:

The Autodesk® Subscription Advantage Pack for Autodesk® Maya® 2012 is available exclusively for Autodesk Subscription customers through download at the Autodesk Subscription Center.

Alembic point caching—Efficiently manage complex simulated and animated data, with the ability to read and write Alembic open computer graphics interchange format.

Bullet Physics—Create highly realistic soft body, rigid body, and ragdoll simulations with high-performance open source AMD Bullet Physics engine.

New Node Editor—Manage and debug complex node networks with a new Node Editor that features drag-and-drop connections, color coding, and three levels of detail.

Friday, September 23, 2011

Maya2012 Export Selected with DisplayLayers

This is just a warning for anybody who, like use uses Export Selected as an optimize method. Be warned, in 2012 if you select objects with display layers then exportSelected and then re-import, those display layers will be lost. Never had this before, 2011 was fine. This only showed up in 2012 and again, has broken another internal pipeline tool, another bug logged.

Monday, September 19, 2011

HotKey Alt<> broken in 2012

Just a quick post about the hotkey mapping in 2012. The main Alt<> keys which advance time in the UI's are now broken in the GrapthEditor, this has been driving some of our animator mad as you can imagine. The command thats now bound to it in 2012 is wrong (a fix in due from Autodesk but not sure if it'll get into the SP1 release). So the bug is that the commands bound to the NextFrame and PreviousFrame calls look if the current UI is a scriptedPanel and only advance the time if that panel is the CameraSequencer...Wrong! Here's the fix for the NextFrame, for Previous from just put -1 in the `cuurentTime -q` -1 block
string $currentPanel = `getPanel -withFocus`; 
if((`getPanel -to $currentPanel`== "scriptedPanel") && (`scriptedPanel -q -type $currentPanel`== "sequenceEditorPanel"))
sequenceManager -ct ( `sequenceManager -q -ct ` + 1 ); 
else { currentTime ( `currentTime -q` + 1 );}

Maya's current command bound to the Alt> key
string $currentPanel = `getPanel -withFocus`; 
string $panelType = `getPanel -to $currentPanel`; 
if ($panelType == "scriptedPanel") 
    string $scriptedPanelType = `scriptedPanel -q -type $currentPanel`; 
    if ( $scriptedPanelType == "sequenceEditorPanel")
    { sequenceManager -ct ( `sequenceManager -q -ct ` + 1 ); }
else { currentTime ( `currentTime -q` + 1 ); }

Thursday, August 18, 2011

Maya Command Completion issues in Python

Something Dave discovered a while ago and has just come back to bite us again is that the dot code completion in the scriptEditor in Maya is actually RUNNING the code inside Python property blocks when you call a dot complete (Ctrl+Space). It's not just returning the function/property list by using something like the inspect module, but actually running the property itself. The same is true when
you hit return to accept and fill that function/property in the script editor.

Test it, add this in a Python Script window:

import pymel.core as pCore

class AutoCompleteTest(object):

    def __init__(self):

    def Test(self):
        print "Im being CALLED Multiple times!!!!!\n" 

Now do the following:


turn on ’Command Completion’ and do a dot complete to inspect the com object you just made!

The property is now being RUN. So what you ask? Well lets say you are doing something stupid like the fileNew example above, just by trying to get code completion you've actually nuked your scene. Also because it's doing this for all the inspect calls it means that it's running all code, in all property blocks which makes it very, very slow!


Tuesday, August 16, 2011

More Playblast issues - Frame Syncing issues with Xvid

So we thought all was good, we've moved from wrapping the FFDS encoder to using a native 64bit version of Xvid in playblasts and all is good.... or so we thought. It turns out that the default Xvid Encoder settings DO NOT maintain frame counts correctly, randomly inserting padding frames into the Avi. So if you load an avi with baked in FrameCounter from Maya into Virtual Dub and step through it you'll see the frame counters get out of sync. We're only talking 2 or 3 frames but that's enough to completely stuff facial lip sync up and cause anybody using these avi's as master guides to have problems.

The cure is simple, launch the Configure Encoder settingsUI from your Start>Programs>Xvid folder and make sure you turn OFF the B-VOP's (b-frames) under the Profiles@level>more>profile UI. All of a sudden all is in sync and happy. God damned all the time we've wasted getting these working!


Monday, August 8, 2011

MasterClass links now up!

Just checked on TheArea and it looks like the MasterClass links are up a day early:


Also it looks like Autodesk forgot to add the download link to the Python Module so I've added it here for the time being until they sort the site out:


Hope you enjoy....and yes you do have to register to see them, I think they're tracking numbers.

If you're having issues logging in please be aware that when you've registered you have to logout and log back in to view it, as per the banner that Autodesk put up which nobody, including me has read:


Thursday, August 4, 2011

MasterClass - Live Animation Binding

A few folk have mailed to ask when the MasterClass is being presented so I thought I'd do some blatant self promotion and spill the beans...... The MasterClasses are now online only, Autodesk figure they get a bigger audience this way and it stops me looking like an arse doing it live! (well, less of an arse anyway!) It should go live on TheArea under their Siggraph feed on Tuesday 9th. Here's the basic outline, although it got expanded slightly since this into using HIK as an intermediate object, and mapping to raw optical moCap data. Hope you find it useful!

"This Master Class will outline a method of transferring character animations between any source data and a given animation rig using a binder template file. This method was originally designed to enable Motion Capture data to be mapped to our in-house rigging systems whilst allowing for easy manipulation, but quickly evolved into a retargeting system in its own right. In the most basic form it allows for MoCap fbx files to be dropped directly onto your animation rigs. However, expanding the technique allows you to transfer animations between characters even when their skeletal structures and proportions are completely different. Because it relies on a Binder File and isn't code based it gives you the flexibility to manage any skeleton structure, allowing you to add custom bind nodes between any character specific joint and it's relative Rig Controller. Finally because the bind is a preset file it makes it very easy to bulk process animations, casting CharacterA's animation library straight to CharacterB."

Wednesday, July 13, 2011

Lost Animation when loading Referenced Rigs

This is Particularly relevant to referenced Rigs which have characterSets.

So this has come up a few times on the forums and I've also had emails asking how to fix it so thought I'd drop some info up here. The issue is that at some point the referenceEdits that connect Animation Data to a referenced rig can get broken or corrupted. This means you can be animating away all day, saving incrementals as you go, completely unaware that when you load this scene in, all animation will be lost..or so it would seem.

see this post recently:

The issue is usually the referenceEdits themselves. What sometimes happens is that the 'connectAttr' block in the referenceEdits gets blanked. We have no idea why, neither does Autodesk, it's completely random. Its also more common on files that came from 2010 and have been loaded in 2011. It also was an issue with rigs that had characterSets on the early release of 2011 IF you were using AnimLayers. (pre hotfix2)

So what to look for?

If you open up the Reference Editor then go to file>referenceEdits. In there you should get a list of all the edits performed since that file was initially referenced in. It's basically a macro that the file load uses to reconstruct the file. So, take a look in the list, see if you still have a large 'connectAttr' block. These should be the connections from the characterSet (placeholder list) to the anim curves themselves. If these edits get corrupted then as I said, you can spend all day saving incremental saves which are all broken but you wouldn't have been aware of them until you reloaded the scenes and the reference list got re-passed.

Now there are some good things to help you. Firstly the fact that the connections aren't there doesn't mean that there's no link from the anim curves to the reference. What happens is that the curves will be left connected to the references RN reference node. If you graph the referenceNode in the hypershade you should still see the connected anim data. It's what happens when you unload a reference, the anim data is cast back to the referenceNode for safe keeping.

So, graph the data, see if it's there, look at the referenceEdit list, see if it is correct or not. If you have no 'ConnectAttrs' then its the same issues we have.

Fixing it is a different issue. Basically we need to write a little tool which spins through the characterSet plugs, then the animCurves left connected to the RN node, does a nameMatch, then reconnects the data. The following dropped into a Python script Tab should do it, just select the characterSet you want reconnected!

import pymel.core as pm
import maya.cmds as cmds

if not type=='character':
   raise StandardError('You must select a CharacterSet to reconnect')
if not refNode:
   raise StandardError('Given characterSet is not from a referenced file')


for plug in cSetPlugs[::2]:
   for anim in animCurves:
       if anim.split(':')[-1].endswith(plug):
           print '%s >> %s' % (anim,plug)
           pm.connectAttr('%s.output' % anim,'%s.%s' % (cSet,plug),force=True)

Simple but effective fix to get round the bug. I think in light of the amount of people posting things like this I'll follow this up with the Maya dev team again. We get this maybe once a month if that, actually probably less than that now we're all on 2011SAP release.

hope that helps folks. I know, referencing is like a black art, god knows I had enough help 7 or 8 years ago when we first started with referenced pipelines.... so thought I'd share the Bug work around.


Friday, July 8, 2011

MasterClass - FINISHED!

Autodesk MasterClass 'Live Animation Binding':

Damn that took a lot of work, hope its worth it and people actually find it interesting. So hopefully in the next few weeks it'll be up on the Area just before Siggraph, not sure when Autodesk start the advertising push so keep your eyes open for it. Think I deserve a beer now, might even treat myself to a nice bottle of single malt...

Tuesday, June 21, 2011

Maya Playblast Fixes 2 (64bit)

So all the stuff below in the previous post is still valid, but it looks like the FFDS wrapper is causing memory issues and unstability when Playblasting. So, the answer after some hunting is to use the 64 bit Xvid installer below:

Xvid 64bit codec

This then gives you XVID back as a default compression option in Maya and runs much more stable than the FFDS every did.

Wednesday, June 15, 2011

Hotbox display issues

So, we've been haunted in every Maya release with different bodges for getting the graphics card to work correctly. Firstly there's all the environment settings that have been added and removed over the years.


All of which have in the past been linked to fixing GeForce card draw issues. Now we're in QT as of 2011 most of these are defunct, so what now?

Well, now it seems that in Win7 it's actually more to do with people customizing their Windows settings. Below is a typical issue to do with the HotBox overlay and we've had 3 or 4 people round the studio moan at having this.

Fix is simple, go into Windows customize and set the theme back to Aero.... job done, all good and happy.

Now wouldn't it be nice if Autodesk would add at least the top level GeForce cards to the qualified hardware, lets face it, most games studios are running them.

Oh joys, more fixes to remember!

Friday, June 10, 2011

MasterClass Approved - Live Animation Binding

Just had the nod from Autodesk that the MasterClass I've been preparing for the last few months has been approved for the Autodesk MasterClass sessions for this years Siggraph! HAPPY DAYS! Should go live on the Area a few weeks before Siggraph late July. Just got to finish it now...

Tuesday, May 31, 2011

And as if by magic! - Hotfix2

Fix list:
* Goal issue when using a straight curve
* Load render pass doesn't work when project is on network share
* Shadow artifacts occurs with large differences in object size
* Connecting luminance node to bump channel of mental ray shader causes crash
* UNC path bookmarks are not saved in new filebrowser
* Final gather map visualization not working
* Painting blendshapes problems
* Wacom tablet not working correctly in mouse mode
* dagContainer collapses at every DAG operation
* Unpredictable results referencing HIK characters
* Creating Framebuffer with a Geometry shader causes a crash
* Joint orient channels not accepting setAttr correctly
* Graph editor: cannot view multiple f‐curves on a character set
* Polysplit crash
* Metacarpal fingers not created when creating HIK control rig
* Pinning an effector is causing the pivot display to jump
* Missing manipulator handles in perspective view
* Adaptivesampling gives lower shading quality in framebuffers
* mia_material_x preset 'Satined Metal' renders differently
* Scenes with dense final gather settings may have longer render time
* Render with mental ray errors with multi‐shape polygons
* HIK: Shift+LMBdoes not allow for selection of keys on timeline if HIK in scene
* New option in move tool broken
* Human IK: Parenting Auxiliary Effectors to an object doesn't work

Thanks for the characterSet fix Cory (although not had chance to test it)

Thursday, May 26, 2011

Another day, another bug....

So I've been testing Maya2012 to see if it's ready to push out to the studio and found a couple of killer bugs.

#Bug:CharacterSets and GraphEditor
The first is a true show-stopper. If you have any node linked to characterSets, the graphEditor fails to show you your animation curves for the transform correctly. No stacked view, no curves unless you select each channel separately. No 'F' frame-all. Nothing. Kind of stops us in our tracks seeing as all our Rigs link via a characterSet. Hopefully this will be fixed in the next HotFix.

#Bug: HumanIK setAttr/channelBox/callback
So let's say you have a HumanIK Rig in 2012 and you move one of the IK effectors, now you'll see the callback where the rig only updates on mouse release, this is a limitation they put in for performance reasons apparently. But crutially if you try and do anything under the hood, or even changing data in the channelBox, this call back prevents any of the attributes from being modified. Seriously try it, grab an IK effector on the HIK Rig and just try changing a value in the channelBox....ooops!

So let's say you were trying to setAttr in code, the only way to do this is to wrap the call in context that Maya is internally calling... and this is selection sensitive too.

select the control....
hikManipStart(1,1); //(trans,rots)
do something.......

Not a good day for 2012.. coffee!

Sunday, April 10, 2011

Maya Playblast Fixes

Playblast Management in Maya

Possible Issues:
  • Missing codecs, or very limited selection
  • Missing Compression setting button in Maya
  • Skewed AVI's once generated
  • Maya error message 'Unable to create video track. Check format.'

Playblast issues have shown up in Maya since 2011 and / or Maya under Windows7 and a lot of people on many forums, and indeed at our studio, have been moaning about this for a while, I thought it was about time to put a few answers out there....

The first problem is that most of the codecs that you're used to seeing in XP/Vista won't be there in Win7, so if you're used to playblasting Xvid/DivX then you need to do a little bit extra to get these back.The fix is to hook Maya up with the FFDShow encoder, usually distributed via codec packs like K-Lite or Cole2K. Once you've installed one of these you'll see a new compressor show up in Maya, 'FFDS', this is the ffdshow video encoder.

In Maya2011 they also missed out the button that lets you setup compression settings like you could in Maya2010, you can choose the codec, but not set any options! You can by-pass this issue though, if you enter the following in the script editor:

playblast -compression ""

Now the standard Windows compression UI will pop up, letting you set the compression options (for FFDS this'll actually pop up the ffdsVFW encoder UI. If you don't do this then you can set the encoder up by opening the FFDSVFW window which you'll find under your windows Start>K-Lite>ffdsVFW
Here you can once again get access to most of your standard codecs like Xvid,DivX etc. We tend to set ours up to something like the following:

Skewed Avi's or Unable to Generate errors: 
These 2 symptoms are both linked, and not actually Maya's fault. If you try and compress an Xvid then the compressor is expecting the AVI to be on height and width bounds that are of multiples of 4 (if memory serves me correctly!).

So if you try and blast 640*480 all is good, if you do 641*480 you'll get the 'unable to generate' error, if you do 642*480 you get a skewed movie...so movie sizes under xvid/divx and ffds can give either a skewed avi, or the dreaded 'Unable to create video track' message. This basically means that the codec couldn't make the avi at the given size. The best thing to do is to use a Custom window size (or render settings) and stick to it.

Anyway, enough, hope that helps a few folk.


Sunday, April 3, 2011

Maya Bug: pointOnPolyConstraint

I was playing over the weekend and found a bug in the pointOnPolyConstraint code that ships with Maya2011, it doesn't support namespaces. Just to clarify, if you select a component, then a transform and use the 'constrain>point on poly' menuItem it'll fail on source objects with namespaces. The bug is in the Python code that assembles the command prior to passing it to the mel scope. Reading through this you have to query why the hell they build up the commands like this, built it in python, then pass a string back to mel to then run and eval on the string?? Why the hell not just run it from the python scope?

Anyway, the problem file is this one:

C:\Program Files\Autodesk\Maya 2011 Subscription Advantage Pack\Python\lib\site-packages\maya\app\general\pointOnPolyConstraint.py

Around line 18 there's a .split() to get the node name back, unfortunately in the constraint node that gets generated it doesn't support the nodes namespace in the attributes that get generated and the command fails. Easy to fix, open the file up and replace the following:

name = strings[0].split( '.' )[0]
#replace with the following
name = strings[0].split( '.' )[0].split(':')[-1]

Fixes it. Another one to log with support. Not yet tried it on Maya 2012 but I suspect the same will be the case


Friday, March 4, 2011

Nice Python function for dictionaries

Not my code but found this whilst browsing for some functionality. Basically allows you to use .dot formatting when accessing keys in a dict:

class dotdictify(dict):
    marker = object()
    def __init__(self, value=None):
        if value is None:
        elif isinstance(value, dict):
            for key in value:
                self.__setitem__(key, value[key])
            raise TypeError, 'expected dict'

    def __setitem__(self, key, value):
        if isinstance(value, dict) and not isinstance(value, dotdictify):
            value = dotdictify(value)
        dict.__setitem__(self, key, value)

    def __getitem__(self, key):
        found = self.get(key, dotdictify.marker)
        if found is dotdictify.marker:
            found = dotdictify()
            dict.__setitem__(self, key, found)
        return found

    __setattr__ = __setitem__
    __getattr__ = __getitem__

Now we can use '.' rather than having to use standard ['key'] syntax: eg:

life = {'bigBang' :  {'stars':  {'planets': {} }}}

life = dotdictify(life)

print life.bigBang.stars.planets
instead of:
print life['bigBang']['stars']['planets']

life.bigBang.stars.planets.earth = { 'singleCellLife' : {} }
print life.bigBang.stars.planets

Ok, so it's just syntax candy, but does makes things easier to read in code.

Tuesday, March 1, 2011

Maya 2012

At last we can start to talk about it, I think anyway. Looking good so far, Viewport2 particularly is looking and feeling quite solid, or it is in the latest build :)

Official Maya 2012 release details here:


more release details from Cory here: