3 Replies Latest reply on Jun 10, 2013 2:59 AM by Dave Merchant

    scene.nodes.getByName("...").transform in animated U3D annotation

    mrfale67 Level 2

      Hi,

      I am using scene.nodes.getByName("...").transform to retrieve a part to world transformation matrix (Matrix4x4). When I run the animation of an U3D file annotation, this part is moving with respect to the origin axis and I suppose its matrix should change. However, I get the same values as before. Is there any chances to read actual position of a part in an animated 3D annotation?

      Thanks

        • 1. Re: scene.nodes.getByName("...").transform in animated U3D annotation
          Dave Merchant MVP & Adobe Community Professional

          If a node is moving but the .transform matrix isn't changing, then it's being driven by a moving parent node - so there's no movement in the local coordinate system (which is what .transform stores). You'll need to go up a level and inspect the node which is driving the motion, whatever that is.

          • 2. Re: scene.nodes.getByName("...").transform in animated U3D annotation
            mrfale67 Level 2

            Yes Dave,

            in fact now it is working. Strangely, when I exported my U3D file I just had this tree (though I know we should not consider it a real tree):

             

            - assembly
            - - node
            - - - mesh
            - - node
            - - - mesh
            ...


            it seems that Acrobat actually finds:
            - assembly
            - - node
            - - - (new_node)
            - - - - mesh
            - - node
            - - - (new_node)
            - - - - mesh
            ...


            so there's one more node which has taken the name of the "child" mesh but with period, ".", at the end; therefore: (new_node)_name==child_mesh_name(.) [<-- period with no parenthesis].
            It may just be a matter of U3D file exporting. I don't know if you have ever experienced it.
            Anyway, by working with .transform I can work it out but I still have one more related question:
            is there any way to export the canvas and all is drawn inside it as an image/icon?
            Thanks a lot

            Yours very faithful

            • 3. Re: scene.nodes.getByName("...").transform in animated U3D annotation
              Dave Merchant MVP & Adobe Community Professional

              The extra 'nodes' may be the reasult of your U3D export program including the origin gizmos for meshes (when the local origin isn't at the geometric center of the mesh it can end up being treated as a parent node in the exported structure).

               

              There's no way to export the canvas, other than by manually taking a shot of the screen.

              1 person found this helpful