Added in Emerald's 'Derender' option on objects and avatars, tidied up avatar, object and self pie menu xml.

This commit is contained in:
CharleyLevenque
2010-08-23 04:13:03 -04:00
parent 3bdfec7ed5
commit c26050a1ec
5 changed files with 62 additions and 16 deletions

View File

@@ -2030,6 +2030,40 @@ class LLObjectInspect : public view_listener_t
}
};
// <dogmode> Derenderizer. Originally by Phox.
class LLObjectDerender : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLViewerObject* slct = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
if(!slct)return true;
LLUUID id = slct->getID();
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
LLUUID root_key;
LLSelectNode* node = selection->getFirstRootNode();
if(node)root_key = node->getObject()->getID();
if(root_key.notNull())
{
id = root_key;
//LLSelectMgr::getInstance()->removeObjectFromSelections(root_key);
}
LLSelectMgr::getInstance()->removeObjectFromSelections(id);
// ...don't kill the avatar
//if (!(id == gAgentID))
// <dogmode> Kill 'em all
if (true)
{
LLViewerObject *objectp = gObjectList.findObject(id);
if (objectp)
{
gObjectList.killObject(objectp);
}
}
return true;
}
};
//---------------------------------------------------------------------------
// Land pie menu
@@ -9629,6 +9663,8 @@ void initialize_menus()
addMenu(new LLObjectBuy(), "Object.Buy");
addMenu(new LLObjectEdit(), "Object.Edit");
addMenu(new LLObjectInspect(), "Object.Inspect");
// <dogmode> Visual mute, originally by Phox.
addMenu(new LLObjectDerender(), "Object.DERENDER");
addMenu(new LLObjectEnableOpen(), "Object.EnableOpen");
addMenu(new LLObjectEnableTouch(), "Object.EnableTouch");