www.quadsoftware.com
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages


Post new topic  Reply to topic
 Method of acquiring object unique ID « View previous topic :: View next topic » 
Author Message
takuhiro
PostPosted: Thu Dec 24, 2009 8:13 am    Post subject: Method of acquiring object unique ID Reply with quote



Joined: 02 Dec 2009
Posts: 29

Hi.

I arranged the tree on heightmaps.
How should I do to acquire Object Unique ID displayed to the property of the tree?
The function is not found in iObjectInstance Class.
Back to top
View user's profile Send private message
ALicu
PostPosted: Thu Dec 24, 2009 8:53 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hello,

iObjectInstance, as any Grome SDK interfaces, is derived from iSdkInterface. In this base interface you have two functions that can help you:

virtual const char* InternalUniqueName()
virtual const t_char* UserDefName()

First function returns an internal name which is always unique (pointer to an ASCII string). The second one returns the user defined name (what you see in the tree UI) and which is not necessarily unique. This is a pointer to an UNICODE string (can contain special, language specific characters).

Grome has options in the UI (in preferences dialog) to force uniqueness of the user defined name.

To be noted that you can also create a trigger plugin which is called everytime a new object is created. With this kind of plugin, some clients, associated custom properties to all the instances, one property being their user specific IDs. This is another way to associate your own custom ids to scene entities.

I hope this information helps.

Regards,
Adrian L.
Back to top
View user's profile Send private message
takuhiro
PostPosted: Thu Dec 24, 2009 10:10 am    Post subject: Reply with quote



Joined: 02 Dec 2009
Posts: 29

Thank you for the swift response.
I noticed it be able to be customized freely by your advice.
I was able to acquire the value by using iPropertyTableOwner and iPropertyTable.

Thank you.
Back to top
View user's profile Send private message
ALicu
PostPosted: Thu Dec 24, 2009 10:30 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi, I am glad I could help. You have (but you probably already noticed this) the TriggerSample plugin which does this exact thing (associate custom ID).

Regards,
Adrian
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group