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):
        pass

    @property
    def Test(self):
        print "Im being CALLED Multiple times!!!!!\n" 
        pCore.newFile(force=True)


Now do the following:

com=AutoCompleteTest()

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!

Mark


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!

Mark

Monday, August 8, 2011

MasterClass links now up!

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

http://area.autodesk.com/siggraph2011/masterclasses

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:


AnimationBinder.py 

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:





Mark

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."