Showing posts with label Bugs. Show all posts
Showing posts with label Bugs. Show all posts

Wednesday, September 10, 2014

Lost Animation - part?? 3 ??





So this stupid bloody bug is still showing up in Maya, animation reloading in T-pose, all the animCurves still in the scene but Maya failing to reconnect the data on file load.

We've debugged this so many times in the last 10years I've lost count and yet it still pops up. So I've added more in-depth support for the fix methods in the Red9 Studio Pack.

There's now a new UI that opens up, this has 2 base methods.

Method 1: You're running character sets and referencing, Maya has failed to connect the data up BUT left the animCurves connected to the ReferenceNode.

Method 2: Maya has had a full blown fuck fest and left you with no hint to what data goes where. This method uses the names of the selected objects, and their animatable channels, then looks for all animCurves that may match.

Two flags, StripNamespaces.... does just that, removes the namespaces of the node before doing the curve match (curves are usually in root namespace). StripMergedLayerData, allows for the additional 'Merged_Layer_inputB' naming that animLayers use.

Hopefully that'll save somebodies life, I've had so many emails over these fixes over the last few years it's ridiculous

thanks

Mark

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

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

Monday, November 12, 2012

Maya string attr - 32k limit

Just thought I'd spread this in case anybody else is thinking of using a json string to dump data to an attribute in Maya.

Discovered last week that you can happily set a string attr to any length BUT, and it's a big but, if you subsequently select the textfield (you don't even have to edit it, just select it) then Maya runs a change callback and the string is now clamped to 16bit = 32,767 characters. It was driving me mad last week as I kept getting errors in the json decoder when I tried to read a pose back that I'd serialized to a string on our characterNode. I want to store a zero pose on the Character Node along with some extra data that I'm pushing to a dict, json.dumps is a really nice way to that push that dict to a string and store it and then retrieve it back in it's original form with json.load()

Try it for yourself!
import pymel.core as pCore
Cone=pCore.polyCone()[0]
Cone.addAttr('json_test', dt='string')
data= "x" * 40000
Cone.json_test.set(data)

len(Cone.json_test.get()) #>>40000
Now just open the Attribute Editor and just select the json_test textfield - don't edit it, just select it
len(Cone.json_test.get()) #>>32767
Only thing you can do to stop this truncation is to lock the attr, that way it gets stored correctly and doesn't get truncated.

Mark

Thursday, September 6, 2012

Lost Animation - Part2!

God how many times have I been asked for this since posting the 'Lost Animation' thread nearly a year ago now. So here's a complete and utter dirty hack for those who have requested it. Unlike the other fix code this is completely blind. You select the controllers that are no longer connected to the animation data that they should be, and this, in an ideal world, will reconnect the required animCurves for you.

There are a few HUGE expectations here, mainly that the scene is clean and that the animCurves are still consistently named against the channel they were keyed against. As I said, this is a hack but it seems to be what a lot of people are in need of.

So the expectation is that an attr on a controller called NameSpace:L_Foot.translateX should be connected to NameSpace:L_Foot_translateX, or L_Foot_translateX depending on the flag stripNamespace thats in the code.

As I said, this is a really quick hack, but I figured what the hell. Oh and if the data went through AnimLayers....sorry, you're stuffed!

Mark

import maya.cmds as cmds
nodes=cmds.ls(sl=True,l=True)
chns=[]

#Change this to False if the curves are not in the rootNamespace but
#in the sameNamespace as the controllers.
stripNamespace=True

#build up the main lists
animCurves=cmds.ls(type='animCurve',s=True)
[chns.extend(cmds.listAnimatable(node)) for node in nodes]    
    
for chn in chns:
    if stripNamespace:
        animCurveExpected=chn.split(':')[-1].split('|')[-1].replace('.','_')
    else:
        animCurveExpected=chn.split('|')[-1].replace('.','_')
    if animCurveExpected in animCurves:
        if not cmds.isConnected('%s.output' % animCurveExpected,chn):
            print '%s >> %s' % (animCurveExpected,chn)
            cmds.connectAttr('%s.output' % animCurveExpected,chn,force=True)

Friday, June 29, 2012

BUG: Just to confirm!!!

2013 SAP rotate Order, here you go! Not good, do NOT INSTALL for animations as you're going to be in a world of pain with this release. Confirmed as a bug with AD.

MAYA 2013SAP : BUG: rotateOrders from Mark Jackson on Vimeo.

Thursday, June 28, 2012

BUG 2013 - Huge Bug for Animation

WARNING: we've, or rather Brad's just found a kick ass bug in 2013 SAP release. The rotation orders are broken, doesn't matter what you change them too, gimbal still happens as if it were set to xyz order. Kind of a major bug me thinks, see what AD have to say about it. It's fine in the initial 2013 release.

Monday, May 14, 2012

Bug: listCameras

Never noticed this bug before, you look in the Camera drop down to select a camera for a panel and some of the cameras show the shape name not the transform, so we did a bit of digging. Turns out the code that builds the Panels>Perspective menu is buggy.

From the code reference: listCameras  
Command to list all cameras. If no flags are given, both perspective and orthographic cameras will be displayed. This command returns an array of camera names. When the transform name uniquely identifies the camera it is used, otherwise the shape name will be returned.

Which is wrong as if you simply parent a cube under a camera transform all of a sudden in the camera menu you'll get perspShape not persp. So who cares right? Well in our case I'm using cmds.modelPanel(self.Panel,q=True,cam=True), which must use the same code under the hood and thus returns the CameraShape node and not the Transform depending on if you have something parented to the camera or not.

Mark

Tuesday, April 10, 2012

Taking Animations from 2012 back to 2011

AutoTangent type:

  This is something we discovered last week, to be honest I should have figured it before but as a lot of the data passing between 2012 and 2011 at the studio is baked MoCap nobody spotted this issue. 

The problem is the new 'AutoTangent' type in Maya 2012. So lets say you start animating in 2012 but need to pass that data back to somebody running 2011. We already know Maya binaries between the two are incompatible, so you save and an Ascii file and that works. The issue is that by default in Maya2012 the tangent type is set in the prefs as the new 'AutoTangent'. Now this is great and to be honest a big improvement over the standard spline tangents. BUT.... Maya 2011 doesn't know anything about it. The key data still loads up, but the tangent types of each keyframe in2011 remain unset which means any interpolation between keys you did in 2012 is now screwed! 




 If you intend to do this, go from 2012 back to 2011 DO NOT use AutoTangent when keying.

Thursday, January 26, 2012

ReferenceQuery Madness!

If you're managing references in Maya and coding functions around it you'll know that the reference commands and query commands available to you are very limited. But here's a kicker that I found yesterday that to me, makes absolutely no sense what-so-ever!
So we all know how flaky the referenceEdit list is, but here's a bit of logic for you that we didn't realize until one of our tools started playing around.

Simple test, make a sphere in a fresh scene and save it, then reference it back into a new scene. Now make a cube and parentConstraint the referenced sphere to it. Now look at the referenceEdits, you should see this:

All well and good. So you'd think that if you queried the refEdits that's exactly what you'd get right? No
cmds.referenceQuery('SphereRN', successfulEdits=True, failedEdits=False, es=True) 
#Result:
[u'parent -s -r "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1" "|Sphere:pSphere1"',
 u'connectAttr "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintTranslateX" "|Sphere:pSphere1.translateX"',
 u'connectAttr "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintTranslateY" "|Sphere:pSphere1.translateY"',
 u'connectAttr "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintTranslateZ" "|Sphere:pSphere1.translateZ"',
 u'connectAttr "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintRotateX" "|Sphere:pSphere1.rotateX"',
 u'connectAttr "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintRotateY" "|Sphere:pSphere1.rotateY"',
 u'connectAttr "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintRotateZ" "|Sphere:pSphere1.rotateZ"',
 u'connectAttr "|Sphere:pSphere1.rotateOrder" "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintRotateOrder"',
 u'connectAttr "|Sphere:pSphere1.parentInverseMatrix" "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintParentInverseMatrix"',
 u'connectAttr "|Sphere:pSphere1.rotatePivot" "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintRotatePivot"',
 u'connectAttr "|Sphere:pSphere1.rotatePivotTranslate" "|SphereRNfosterParent1|Sphere:pSphere1_parentConstraint1.constraintRotateTranslate"']
So when you use the default query calls you actually get the edits back as if the refNode was in an unloaded state, note the connections to the fosterParent which would get created if I actually did unload the reference! Why, why the hell would you want the default option to return the data in an format that was currently invalid.

So there is a way round it, you use the 'liveEdits' flag. All good right, NO, the liveEdit flag returns the data WITHOUT THE DAG PATH! Short names, who the hell returns short names in any code blocks.
cmds.referenceQuery('SphereRN', successfulEdits=True, failedEdits=False, es=True, le=True)
Rant over, gotta go find a way round this now!

Mark

Tuesday, January 10, 2012

fileDialog2 in Maya2012

Just thought I'd point out a change in the Maya fileDialog2 command return in 2012. So lets say you run the following and in the dialogue you type in a filename 'BloodyGreat' but don't add any file extension
import maya.cmds as cmds
print cmds.fileDialog2(fm=0)[0]
In Maya2011 the return would be what ever the path you browsed to + 'BloodyGreat' but in 2012 the return now handles filenames without extensions by adding .* to the path, so the return would now be 'BloodyGreat.*' This has broken a number of our old UI's as we expect to be able to strip the extension off inorder to force the correct one. Easy fix, but a bugger to find the bug in the first place!

Our issue was that we were using `substitute $ext $filepath ""` so now that the $ext is .* you're substituting a wildcard for nothing, which returns, NOTHING!

One last thing to point out with this, if you'd passed in any fileType filters to the command then the return will pick the current type and return that extension, which I guess is a good thing. This .* is only when the dialog is set to 'All Files' Mark

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=pCore.polyCone()[0]
Cube=pCore.polyCube()[0]

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):
    pCore.duplicate(Cone)

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. 

MAYA_DISABLE_IDLE_LICENSE=1 

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.

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

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:
http://forums.cgsociety.org/showthread.php?f=7&t=990314

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
cSet,type=pm.ls(sl=True,st=True)
refNode=cSet.referenceFile().refNode

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')

animCurves=refNode.listConnections(type='animCurve',s=True)
cSetPlugs=pm.aliasAttr(cSet,q=True)

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.


Mark

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.......
hikManipStop;

Not a good day for 2012.. coffee!