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 ---------------------- .../default/xui/en-us/floater_build_options.xml | 54 +-------------- 2 files changed, 1 insertion(+), 132 deletions(-) (limited to 'linden') 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 diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_build_options.xml b/linden/indra/newview/skins/default/xui/en-us/floater_build_options.xml index e7a1f89..7331aa6 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_build_options.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_build_options.xml @@ -1,6 +1,6 @@ @@ -40,16 +40,10 @@ bottom_delta="0" drop_shadow_visible="true" enabled="true" follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="10" left_delta="130" mouse_opaque="false" name="text_box4" v_pad="0" width="150"> Settings - Texture - Rubber - - - - - - - - None - Low - Medium - High - - - - Drop an inventory item here to have it added to the prim contents. - -