[sldev] name of an object?
Eelke Folmer
eelke.folmer at gmail.com
Fri Jul 27 18:42:56 PDT 2007
Hi,
How can you get the name of an object? (I just need it for debug purposes)
I got the name of an avatar by looking at the code for muting in lltoolpie.cpp.
if (object->isAvatar()) { // avatar
LLVOAvatar* avatar = (LLVOAvatar*)object;
LLString name = avatar->getFullname();
}
This works but when I use the following code (which is listed below to
mute objects) to get the name of an object name:
LLSelectNode* node = gSelectMgr->getSelection()->getFirstRootNode();
if (node) name = node->mName;
it doesn't work. I have tried to call:
LLToolSelect::handleObjectSelection(object, mask, FALSE, TRUE);
gMenuHolder->setObjectSelection(gSelectMgr->getSelection());
which does make the node to be true, but still I'm not able to get the
object name.
I tried to find out why it doesn't work by trying to mute objects in
SL but I can't find any objects (except) avatars in SL that can be
muted (except when you do it manually) there is no right click mute
for objects?
Anyone have any suggestions?
Cheers Eelke
More information about the SLDev
mailing list