So basically you right click and object, open the pie menu, choose my new option, and it fires this code. The code grabs the first object that's selected and looks at it's object description. If the description matches what it expects, it attempts to modify the description
ALL THIS WORKS but when the function exits the modified object (with a longer description) does NOT get saved to the server. Thus, after the function runs its description remains the same as it was.
Anybody know how to save the modified LLSelectNode (or the LLSelectNode->getObject()) to the server so the object honors the altered description field value? Or can anyone think of a better way to pass text data into the object from the code (notecard maybe?).
btw, XML-RPC is too limiting (14 day cleanup of unused channels, only 255 characters/transfer, induced delays) to be effective at this.
CODE
llviewermenu.cpp
class LLObjectNewPieMenu: public view_listener_t
{
public:
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLHandle<LLObjectSelection> object_selection = gSelectMgr->getSelection();
if (object_selection->getNumNodes() == 1)
{
LLSelectNode* x = object_selection->getFirstNode();
if (x->mDescription == SOME_STRING)
{
x->mDescription = SOME_STRING + " Other stuff";
...
}