[Papervision3D] DAE parser fix for ColladaMAX NextGen
Cauê Waneck
waneck at gmail.com
Fri Jul 31 13:29:48 PDT 2009
I was having some difficulties having the DAE parser read an animation
generated with ColladaMAX NextGen, and tracing through the problem, I
arrived at a null reference on DaeDocument.as
var animNode:XML = getNodeById( animLib, ASCollada.DAE_ANIMATION_ELEMENT,
animation.id );
animation.id was null in the case.
I got it fixed by changing this line to:
if ( (animation.id == null) || (animation.id == "") )
var animNode:XML = getNode( animLib, ASCollada.DAE_ANIMATION_ELEMENT);
else
animNode = getNodeById( animLib, ASCollada.DAE_ANIMATION_ELEMENT,
animation.id );
Now everything works fine.
I don't think this fix will break anything, but I don't think so, as it just
prevents from unexpected null referencing. So if you are having a hard time
playing a DAE animation from ColladaMax NextGen, maybe this will help you
too.
Cheers!
Caue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090731/cccca901/attachment.html>
More information about the Papervision3D
mailing list