Hi,
I am using the COLLADA_DOM
Is there such a thing as a target attribute syntax resolver?
“target attribute syntax” is the syntax used in an <animation> <channel>'s target attribute.
I am reading the spec and seeing domChannel::getTarget() return an xsToken (which boils down to a char*), cringing at the idea of having to write a parser for it and then manually resolve the element. :shock:
if there is none, whats the best way to go about it?
Also, <animation_clip>s don’t seem to reference <skin>s or <skeleton>s, nor do <skin>s or <skeleton>s seem to reference <animation_clip>s, how do you find out what clips belong to which skin?
and is there a way to get to an <animation_clip> from <scene> (hopefully passing by an <instance_controller> or <instance_geometry> on the way)?
I am asking because AFAIK <scene> is the place were you should start importing and creating instances but my DAE files don’t seem to ever get to <library_animation_clips> or an <animation_clip> using the <scene> route.
Thanks!
Is there such a thing as a target attribute syntax resolver?
The daeSIDResolver class is what you’re looking for.
daeSIDResolver resolver(channel, channel->getTarget());
daeElement* result = resolver.getElement();
I’m not that familiar with Collada’s animation system so I’m not sure about your other questions.
Steve
daeSIDResolver of course! I had a mental blackout there, I am using it for skin bone names, for some reason I was under the impression it was a different thing.
Anyway, Thanks yet again Steve :D.
I understand the basics of the animation system, however I think there might be something wrong with the specification here in regard to how animations are related to skins, probably a side effect of skins being introduced so recently.
The thing is skins may reference JOINT <node>s via <joints> by sid, to quote the spec:
“sids are used instead of IDREFs to allow a skin controller
to be instantiated multiple times, where each
instance can be animated independently”
However animations transform joint nodes directly by ID, without regard to either <skeleton> or <skin>, in practice defeating the use of sids to reference joint nodes IMO.
I might be missing something here though, its definitely something to look at before a new version of the spec is out.
Unfortunately I’m not sure if the spec authors read this message board anymore. The best thing to do is post a bug to the Khronos bugzilla. I can’t guarantee that your point will be addressed before the next version of the schema though. I submitted a bug a little while ago about an issue I consider to be pretty important, but I’m not sure it’s been looked at.
Maybe someone with a better knowledge of Collada’s skinning system has something to say.