Not sure if this is a bug but it seems to be.
When i call; ModelGeo.animation = new VertexAnimation(2, VertexAnimationMode.ABSOLUTE);
The following error occurs:
Error: A Material instance cannot be shared across renderables with different animation instances
at away3d.materials::MaterialBase/addOwner()[\away3d\materials\MaterialBase.as:362]
at away3d.core.base::SubMesh/set material()[\away3d\core\base\SubMesh.as:131]
at away3d.entities::Mesh/onAnimationChanged()[\away3d\entities\Mesh.as:306]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at away3d.core.base::Geometry/set animation()[\class\away3d\core\base\Geometry.as:66]
at mmPaperPortfolio/onAssetComplete()[\mmPaperPortfolio.as:804]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at away3d.library::AssetLibrary/onAssetComplete()[\away3d\library\AssetLibrary.as:584]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at away3d.loaders::AssetLoader/onAssetComplete()[\away3d\loaders\AssetLoader.as:327]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at away3d.loaders.misc::SingleFileLoader/onAssetComplete()[\away3d\loaders\misc\SingleFileLoader.as:315]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at away3d.loaders.parsers::ParserBase/finalizeAsset()[\away3d\loaders\parsers\ParserBase.as:255]
at away3d.loaders.parsers::DAEParser/proceedParsing()[\away3d\loaders\parsers\DAEParser.as:239]
at away3d.loaders.parsers::ParserBase/onInterval()[\away3d\loaders\parsers\ParserBase.as:309]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
As far as i can tell I neatly call a unique material on each of my main models. I don’t really see what it is sharing or why this would be a problem. I am loading a number of vertex subgeometries which I of course am trying to add to this base model, but even clearing the material on those, still leads to this error.
When I tried this workflow with only one main model and its respective morph / vertex / shape target or keys this error did not occur.
I am at a loss, any tips or the confirmation that this is a bug would be most helpfull!
Thanks,
Olivier