Results 1 to 5 of 5

Thread: Fragment in extra tag

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    3

    Fragment in extra tag

    Hi,

    I've been writing an importer for COLLADA and everything has been going great till today. My issue is that I'm using OpenCOLLADA so cameras have an extra node that specifies a target. Now this means I have the normal camera data and a

    Code :
          </optics>
          <extra>
            <technique profile="OpenCOLLADA3dsMax">
              <target>#Camera01.Target</target>
            </technique>

    And for the life of me I can't resolve this back to the node that actually points at this. If anyone could provide me with a hint how to resolve that fragment back to the node element it points at I would really appreciate it.

    Code :
      <node id="node-Camera01.Target" name="Camera01.Target">
            <matrix>-1.6 -4.3 -1 -3.0 -1 7.1 1.6 -6.9 0 1 -4.3 15.0 0 0 0 1</matrix>
          </node>

    I've tried

    Code :
    	daeElement *target = camera->getDescendant("target");
    	domAny* target_val = daeSafeCast<domAny>(target);
    	daeSIDResolver resolver(target->getAncestor("visual_scene"), target_val->getValue());
     
    	daeElement *element = resolver.getElement();

    but this always returns a state of 2 (so it can't find the element) while the node is clearly there. Anyone have any ideas?

  2. #2
    Junior Member
    Join Date
    May 2010
    Posts
    3

    Re: Fragment in extra tag

    Ok so the problem is that OpenCOLLADA when exporting the camera sets the nodes name not id to the name it gives in the target of the camera instance. Is there anyway to resolve the fragment based on name and not id?

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Fragment in extra tag

    This looks like a bug in OpenCOLLADA. The name attribute is not functional. It is user metadata only.

    That <target> element appears to be a URI fragment (type xs:anyURI) and so must point to an id attribute in the same document.

  4. #4
    Junior Member
    Join Date
    May 2010
    Posts
    3

    Re: Fragment in extra tag

    Thanks for the reply Marcus From reading the spec this is what I figured but was looking for confirmation. I'll give the Max inbuilt COLLADA exporter a try to see if it does any better otherwise I'll just go ahead an submit a bug report. Other than OpenCOLLADA are there any other free plugins for 3ds Max that export .dae export that you're aware of?

  5. #5
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Fragment in extra tag

    OpenCOLLADA is the actively developed open source plug-in for Max and Maya these days. if you want to contribute bug fixes or features then I suggest focusing on that project.

    Another inactive project is ColladaMaya on sourceforge.

    See all the the project links at the top of the Implementation forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •