Wednesday, November 20, 2013

BUG: keyframe cmd with option flag

import maya.cmds as cmds
cube=cmds.polyCube()[0]
cmds.setKeyframe(cube,t=[0,8,25])
cmds.keyframe('%s_visibility' % cube, edit=True, r=True, timeChange=5, time=(0,8), option = "insert")

I'm trying to add to the Red9 animTools and want to be able to offset an entire hierarchies animations in one go, this is already supported however I want to add the ability of specifying a timeRange. Imaging you have a huge chunk of anim data and want to shift a section of it for a character by 10 frames. Currently shifting keys in the timeline won't ripple, it uses the segmentOver and causes a mess. Also you need to have all the objects selected when doing it and there's no numeric input. So I want to add it to the offestTime code.

This is all up and running except I've hit another crash bug, 100% repeatable crash and it boils down to the 'option' flag as used above. Give it a go, boom. Now I accept that in this case the sparse keys are an issue, but really the code should catch this.

cheers

Mark

Monday, October 28, 2013

Maya.standalone audio handler bug

Found a confirmed bug in maya.standalone at work this week which totally threw me.

 We have a backend process that our build machines trigger that involves the import of audio files for processing. Now by the look of it you can't import audio in Maya standalone, or rather, the audio you import looks like placeholder as it always has no length... which was a real issue for us. I've modified the Red9.AudioHandler to by-pass this for future but it's still a really starnge bug. Sounds like the audio loading requires something from the UI to be processed correctly.

thanks

Mark

import maya.standalone
maya.standalone.initialize(name='python')
import maya.cmds as cmds
audioPath="mywavfile.wav"
cmds.file(audioPath, i=True, type='audio', options='o=0')
audioNode=cmds.ls(type='audio')[0]
cmds.getAttr('%s.endFrame' % audioNode)

Monday, October 7, 2013

Lost Animation Part3 !!

Well it seems this bug is very much still in Maya 2013 and for some reason we seem to be hitting it with more frequency at work. For those of you not aware this it's a bug where the referenceEdits in Maya don't get reconstructed correctly and you end up opening Maya scenes with characters in T-pose and all the anim data thrown back to the referenceNode.

Now over the years I've posted 2 options for reconnecting this data and had SOOO many emails about it, but now that we all run animLayers reconstructing this lost data is a damn sight harder. I'm just wondering if anybody else out there had any ideas of why animation keeps disconnecting itself from referenced rigs with chSets. I've been working past this bug for nearly 7 years now and thought it was quashed!

 Back to Autodesk I guess.

 Mark

Thursday, August 8, 2013

ProgressBar Bug??

I've been building a simple context manager to wrap Maya's progressBar and come across a nice little Maya bug, or so it seems.

Run the following with the script editor open. Now press escape once, it aborts right, run it again, the sequence still runs and prints out the counter. Now next time you hit escape hit it a few times, as most people do when escaping a large task. Next time you run the code, it'll only do a single test before aborting.... it's like the progress bar is holding the escape key in a cache, so hit it once and next time it's clear to run, hit it twice and it's almost like it's storing it up...


import maya.cmds as cmds
import maya.mel as mel
i=0
gMainProgressBar = mel.eval('$tmp = $gMainProgressBar')
cmds.progressBar( gMainProgressBar,
    edit=True,
    beginProgress=True,
    isInterruptable=True,
    status='Example Calculation ...',
    maxValue=5000 )
for i in range(5000) :
    print i
    if cmds.progressBar(gMainProgressBar, query=True, isCancelled=True ) :
        break
    cmds.progressBar(gMainProgressBar, edit=True, step=1)
    i+=1
cmds.progressBar(gMainProgressBar, edit=True, endProgress=True)



Can somebody else confirm that I'm not going mad!!
cheers
Mark

Wednesday, July 3, 2013

Another Maya Bug - Resample curve major issues




Hopefully you've all seen the new interactive curve filtering I've been working on for the Red9 StudioPack linked above, if not I recommend you watch it if you're ever dealing with dense MoCap data.

Anyway as I was doing this I noticed another bug in the way Maya is managing curve data, thought I had to share this to warn all you animators of the effect of using the 'resampleCurve' to run a bake on dense data.



Ignore the UI, this is a prototype of a new build which will manage filtering on steps, something that's been requested by a few people. What you're seeing here is just the slider pumping values directly into the standard Maya Resample Curve option....what the way the curve shifts in time as you increase the steps!!!!!!

Don't believe me, try it!

I've logged this as a bug so we'll have to see what happens.

cheers

Mark

Tuesday, April 16, 2013

Maya MObjectHandle

I've been fighting a crash bug in the Red9 MetaData for a while now and finally found the solution! The issue is that in the base class I cache the MObject in the node which means that if you reload the scene, or do a scene new, or reload reference etc that MObject pointer becomes invalid and Maya crashes whenever you try and call it. I really wanted to nail this issue as MetaData is absolutely at the core of all the work we're doing at Crytek.

So I did some digging and found the MObjectHandle class!! brilliant, it's a class designed specifically to test the health/validity of MObjects, basically now I'm caching both the MObject and an MOjectHandler for it, all the calls now just run a really simple test before using the MObject:

MObjectHandle.isValid()

Brilliant, all I have to do is raise a good warning and the bug is crushed, should make things a lot more stable hopefully!

cheers

Mark

Thursday, March 7, 2013

Red9 StudioPack v1.29 goes live!

Thought I'd bump the post of my Red9 blog:

http://red9-consultancy.blogspot.co.uk/2013/03/red9-studiopack-v129-released.html

I've just added the latest build to the download link on my Red9 Blog and to CreativeCrash, as always thanks for all the support and feedback, keep it coming! I'm trying to keep the Red9 project semi-separate to my main blog, just makes it cleaner.

thanks

Mark