From 2e165dda988c577c30b131b1410529e97c92f831 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 8 May 2010 01:38:34 -0500 Subject: Removed ability to set default prim texture / inventory. The texture (color, etc.) and inventory settings were inadvertently being applied to objects rezzed from the user's inventory if the Build window was open, potentially resulting in permanent damage to no-copy items. Kept ability to set default size, material, and flags. --- linden/indra/newview/llviewerobjectlist.cpp | 79 ----------------------------- 1 file changed, 79 deletions(-) (limited to 'linden/indra/newview/llviewerobjectlist.cpp') diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index a251d17..bfb248b 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp @@ -259,85 +259,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, // so that the drawable parent is set properly findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); - // Apply custom settings not set in llmanip and lltoolplacer here. - // Don't check for permissions in case opensim ever implements - // default prim permission support serverside -- MC - if (objectp - && just_created - && objectp->permYouOwner() - && objectp->mCreateSelected) - { - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_ObjectImage); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_ObjectData); - msg->addU32Fast(_PREHASH_ObjectLocalID, (U32)(objectp->mLocalID)); - msg->addStringFast(_PREHASH_MediaURL, NULL); - - LLPrimitive obj; - obj.setNumTEs(U8(10)); - S32 shinnyLevel = 0; - if(gSavedPerAccountSettings.getString("BuildPrefs_Shiny")== "None") shinnyLevel = 0; - if(gSavedPerAccountSettings.getString("BuildPrefs_Shiny")== "Low") shinnyLevel = 1; - if(gSavedPerAccountSettings.getString("BuildPrefs_Shiny")== "Medium") shinnyLevel = 2; - if(gSavedPerAccountSettings.getString("BuildPrefs_Shiny")== "High") shinnyLevel = 3; - - for (int i = 0; i < 10; i++) - { - // I'm assuming this is because there's no good workaround for setting the default - // box texture manually without restarting? -- MC - LLTextureEntry tex = LLTextureEntry(LLUUID(gSavedPerAccountSettings.getString("BuildPrefs_Texture"))); - tex.setColor(gSavedPerAccountSettings.getColor4("BuildPrefs_Color")); - tex.setAlpha(1.0 - ((gSavedPerAccountSettings.getF32("BuildPrefs_Alpha")) / 100.0)); - tex.setGlow(gSavedPerAccountSettings.getF32("BuildPrefs_Glow")); - if(gSavedPerAccountSettings.getBOOL("BuildPrefs_FullBright")) - { - tex.setFullbright(TEM_FULLBRIGHT_MASK); - } - - tex.setShiny((U8) shinnyLevel & TEM_SHINY_MASK); - - obj.setTE(U8(i), tex); - } - - obj.packTEMessage(gMessageSystem); - - msg->sendReliable(gAgent.getRegion()->getHost()); - - msg->newMessage("ObjectFlagUpdate"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addU32Fast(_PREHASH_ObjectLocalID, (U32)(objectp->mLocalID) ); - msg->addBOOLFast(_PREHASH_UsePhysics, gSavedPerAccountSettings.getBOOL("BuildPrefs_Physical")); - msg->addBOOL("IsTemporary", gSavedPerAccountSettings.getBOOL("BuildPrefs_Temporary")); - msg->addBOOL("IsPhantom", gSavedPerAccountSettings.getBOOL("BuildPrefs_Phantom") ); - msg->addBOOL("CastsShadows", true ); - msg->sendReliable(gAgent.getRegion()->getHost()); - - if(gSavedPerAccountSettings.getBOOL("BuildPrefs_EmbedItem")) - { - LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem((LLUUID)gSavedPerAccountSettings.getString("BuildPrefs_Item")); - if(item) - { - if(item->getType()==LLAssetType::AT_LSL_TEXT) - { - LLToolDragAndDrop::dropScript(objectp, - item, - TRUE, - LLToolDragAndDrop::SOURCE_AGENT, - gAgent.getID()); - }else - { - LLToolDragAndDrop::dropInventory(objectp,item,LLToolDragAndDrop::SOURCE_AGENT,gAgent.getID()); - } - } - //llinfos << "SENDING CUBE TEXTURE.." << llendl; - } - } - // If we're just wandering around, don't create new objects selected. if (just_created && update_type != OUT_TERSE_IMPROVED -- cgit v1.1