Referencing a node other than by its .name?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2012   #1
Referencing a node other than by its .name?

Is there a way to reference objects in the scene other than by it's screen name?
Problem I'm having is trying to keep track of objects that have either been deleted or just renamed, is there some object ID tag that I can use to explicitly reference the object rather than by some fickle screen name?

Any suggestions appreciated.

D.

Edit: Sorry answered my own question, Node handles are what I was thinkin of..
__________________
"i'd rather have a full bottle in front of me than a full frontal lobotomy"

Last edited by Riffmaster : 03 March 2012 at 05:43 PM. Reason: Resolved the problem
 
Old 03 March 2012   #2
AnimHandle system:
GetHandleByAnim - GetAnimByHandle


Node Handles:
inode.handle

Note that getAnimByHandle and getHandleByAnim are different every time when you reload the scene. For example:
GetHandleByAnim $Box001 -- 3890P
Reload the scene
GetHandleByAnim $Box001 -- 4565P

The inode.handle is saved with the scene, and when you reload the scene, the value will be the same. But, if you are merge scenes, the objects from the merged scene will have different inode.handle.

P.S. I didn't saw your Edit.

Last edited by miauu : 03 March 2012 at 08:30 PM.
 
Old 03 March 2012   #3
Thanks miauu. The "GetHandleByAnim - GetAnimByHandle" was actually what i was thinking of to begin with, although thanks for pointing out that the anim handles change on reload.

The node handle will be most appropriate for my needs anyway as I need these handles remain persistent on reloads.

Cheers,

D.
__________________
"i'd rather have a full bottle in front of me than a full frontal lobotomy"
 
Old 03 March 2012   #4
Don't forget that they are only persistent in the given file, merge the node into a new file and it then has a new handle. Have you looked at weak references using nodeTransformMonitor?
__________________
Paul Neale
http://paulneale.com
 
Old 03 March 2012   #5
Thanks Pen. No I hadn't looked at the nodeTransformMonitor, but will give it a try.
__________________
"i'd rather have a full bottle in front of me than a full frontal lobotomy"
 
Old 03 March 2012   #6
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:07 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.