Jump to content

How To Get Data From A Node


Recommended Posts

Hi all,

How do you go about reading data from a node that isn't the one you currently are, if you see what I mean?

Ie say I want to read the transform info from /obj/foo.

I think it's something along the lines of

int                   test;
UT_Matrix4            mat;
OBJ_Node              *node;

***do something here that makes node be the one I'm interested in***
test = node->getWorldTransform(mat,context);

What I can't see is how to make node relate to the one already in the scene.

Link to comment
Share on other sites

Well, wouldn't you have a node path? eg.

UT_String node_path( "/obj/model");
OP_Node *node;

node = OPgetDirector()->findNode( node_path );

// or if node_path might be relative:
OP_Node *cwd = OPgetDirector()->getCwd();
node = cwd->findNode( node_path );

Link to comment
Share on other sites

Well, wouldn't you have a node path? eg.

UT_String node_path( "/obj/model");
OP_Node *node;

node = OPgetDirector()->findNode( node_path );

// or if node_path might be relative:
OP_Node *cwd = OPgetDirector()->getCwd();
node = cwd->findNode( node_path );

20607[/snapback]

Well I guess I would if I knew what I was doing :D

Haven't dealt with OP_Director methods yet.

Cheers.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...