aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerobjectlist.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2010-05-08 01:38:34 -0500
committerJacek Antonelli2010-05-08 04:14:41 -0500
commit2e165dda988c577c30b131b1410529e97c92f831 (patch)
tree1a986589cb506fb80fe82a4d4c40efe77659c869 /linden/indra/newview/llviewerobjectlist.cpp
parentFixed show selection outlines checkbox in the advanced build window (and tidi... (diff)
downloadmeta-impy-2e165dda988c577c30b131b1410529e97c92f831.zip
meta-impy-2e165dda988c577c30b131b1410529e97c92f831.tar.gz
meta-impy-2e165dda988c577c30b131b1410529e97c92f831.tar.bz2
meta-impy-2e165dda988c577c30b131b1410529e97c92f831.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerobjectlist.cpp79
1 files changed, 0 insertions, 79 deletions
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,
259 // so that the drawable parent is set properly 259 // so that the drawable parent is set properly
260 findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort()); 260 findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
261 261
262 // Apply custom settings not set in llmanip and lltoolplacer here.
263 // Don't check for permissions in case opensim ever implements
264 // default prim permission support serverside -- MC
265 if (objectp
266 && just_created
267 && objectp->permYouOwner()
268 && objectp->mCreateSelected)
269 {
270 LLMessageSystem* msg = gMessageSystem;
271 msg->newMessageFast(_PREHASH_ObjectImage);
272 msg->nextBlockFast(_PREHASH_AgentData);
273 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
274 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
275 msg->nextBlockFast(_PREHASH_ObjectData);
276 msg->addU32Fast(_PREHASH_ObjectLocalID, (U32)(objectp->mLocalID));
277 msg->addStringFast(_PREHASH_MediaURL, NULL);
278
279 LLPrimitive obj;
280 obj.setNumTEs(U8(10));
281 S32 shinnyLevel = 0;
282 if(gSavedPerAccountSettings.getString("BuildPrefs_Shiny")== "None") shinnyLevel = 0;
283 if(gSavedPerAccountSettings.getString("BuildPrefs_Shiny")== "Low") shinnyLevel = 1;
284 if(gSavedPerAccountSettings.getString("BuildPrefs_Shiny")== "Medium") shinnyLevel = 2;
285 if(gSavedPerAccountSettings.getString("BuildPrefs_Shiny")== "High") shinnyLevel = 3;
286
287 for (int i = 0; i < 10; i++)
288 {
289 // I'm assuming this is because there's no good workaround for setting the default
290 // box texture manually without restarting? -- MC
291 LLTextureEntry tex = LLTextureEntry(LLUUID(gSavedPerAccountSettings.getString("BuildPrefs_Texture")));
292 tex.setColor(gSavedPerAccountSettings.getColor4("BuildPrefs_Color"));
293 tex.setAlpha(1.0 - ((gSavedPerAccountSettings.getF32("BuildPrefs_Alpha")) / 100.0));
294 tex.setGlow(gSavedPerAccountSettings.getF32("BuildPrefs_Glow"));
295 if(gSavedPerAccountSettings.getBOOL("BuildPrefs_FullBright"))
296 {
297 tex.setFullbright(TEM_FULLBRIGHT_MASK);
298 }
299
300 tex.setShiny((U8) shinnyLevel & TEM_SHINY_MASK);
301
302 obj.setTE(U8(i), tex);
303 }
304
305 obj.packTEMessage(gMessageSystem);
306
307 msg->sendReliable(gAgent.getRegion()->getHost());
308
309 msg->newMessage("ObjectFlagUpdate");
310 msg->nextBlockFast(_PREHASH_AgentData);
311 msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
312 msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
313 msg->addU32Fast(_PREHASH_ObjectLocalID, (U32)(objectp->mLocalID) );
314 msg->addBOOLFast(_PREHASH_UsePhysics, gSavedPerAccountSettings.getBOOL("BuildPrefs_Physical"));
315 msg->addBOOL("IsTemporary", gSavedPerAccountSettings.getBOOL("BuildPrefs_Temporary"));
316 msg->addBOOL("IsPhantom", gSavedPerAccountSettings.getBOOL("BuildPrefs_Phantom") );
317 msg->addBOOL("CastsShadows", true );
318 msg->sendReliable(gAgent.getRegion()->getHost());
319
320 if(gSavedPerAccountSettings.getBOOL("BuildPrefs_EmbedItem"))
321 {
322 LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem((LLUUID)gSavedPerAccountSettings.getString("BuildPrefs_Item"));
323 if(item)
324 {
325 if(item->getType()==LLAssetType::AT_LSL_TEXT)
326 {
327 LLToolDragAndDrop::dropScript(objectp,
328 item,
329 TRUE,
330 LLToolDragAndDrop::SOURCE_AGENT,
331 gAgent.getID());
332 }else
333 {
334 LLToolDragAndDrop::dropInventory(objectp,item,LLToolDragAndDrop::SOURCE_AGENT,gAgent.getID());
335 }
336 }
337 //llinfos << "SENDING CUBE TEXTURE.." << llendl;
338 }
339 }
340
341 // If we're just wandering around, don't create new objects selected. 262 // If we're just wandering around, don't create new objects selected.
342 if (just_created 263 if (just_created
343 && update_type != OUT_TERSE_IMPROVED 264 && update_type != OUT_TERSE_IMPROVED