aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
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
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
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_build_options.xml54
2 files changed, 1 insertions, 132 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
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 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater bottom="-297" can_close="true" can_drag_on_left="false" can_minimize="true" 2<floater bottom="-297" can_close="true" can_drag_on_left="false" can_minimize="true"
3 can_resize="false" follows="right" height="370" min_height="370" 3 can_resize="false" follows="right" height="300" min_height="300"
4 min_width="530" mouse_opaque="true" name="build options floater" 4 min_width="530" mouse_opaque="true" name="build options floater"
5 rect_control="FloaterBuildOptionsRect" title="Advanced Build Options" width="530"> 5 rect_control="FloaterBuildOptionsRect" title="Advanced Build Options" width="530">
6 6
@@ -40,16 +40,10 @@
40 bottom_delta="0" drop_shadow_visible="true" enabled="true" follows="left|top" font="SansSerifSmall" 40 bottom_delta="0" drop_shadow_visible="true" enabled="true" follows="left|top" font="SansSerifSmall"
41 h_pad="0" halign="left" height="10" left_delta="130" mouse_opaque="false" 41 h_pad="0" halign="left" height="10" left_delta="130" mouse_opaque="false"
42 name="text_box4" v_pad="0" width="150"> Settings</text> 42 name="text_box4" v_pad="0" width="150"> Settings</text>
43 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
44 bottom_delta="0" drop_shadow_visible="true" enabled="true" follows="left|top" font="SansSerifSmall"
45 h_pad="0" halign="left" height="10" left_delta="190" mouse_opaque="false"
46 name="text_box5" v_pad="0" width="150"> Texture</text>
47 <view_border bevel_style="none" border_thickness="1" bottom_delta="-98" follows="top|left" height="90" 43 <view_border bevel_style="none" border_thickness="1" bottom_delta="-98" follows="top|left" height="90"
48 left="14" name="SizeBorder" width="120" /> 44 left="14" name="SizeBorder" width="120" />
49 <view_border bevel_style="none" border_thickness="1" bottom_delta="-0" follows="top|left" height="90" 45 <view_border bevel_style="none" border_thickness="1" bottom_delta="-0" follows="top|left" height="90"
50 left_delta="134" name="SettingsBorder" width="100" /> 46 left_delta="134" name="SettingsBorder" width="100" />
51 <view_border bevel_style="none" border_thickness="1" bottom_delta="0" follows="top|left" height="90"
52 left_delta="114" name="TextureBorder" width="250" />
53 47
54 <spinner bottom="-200" decimal_digits="5" follows="left|top" height="16" increment="0.05" 48 <spinner bottom="-200" decimal_digits="5" follows="left|top" height="16" increment="0.05"
55 label="X Size" label_width="40" left="20" max_val="10" min_val="0.01" 49 label="X Size" label_width="40" left="20" max_val="10" min_val="0.01"
@@ -81,52 +75,6 @@
81 <combo_item name="Rubber" value="Rubber">Rubber</combo_item> 75 <combo_item name="Rubber" value="Rubber">Rubber</combo_item>
82 </combo_box> 76 </combo_box>
83 77
84 <texture_picker allow_no_texture="false" bottom="-265" can_apply_immediately="true" default_image_name="Default"
85 follows="left|top" height="80" label="Texture" left="270" mouse_opaque="true"
86 name="texture control" tool_tip="Click to choose a picture"
87 width="64"/>
88 <color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom_delta="0" can_apply_immediately="true"
89 color="1, 1, 1, 1" follows="left|top" height="80" label="Color" left_delta="75"
90 mouse_opaque="true" name="colorswatch" tool_tip="Click to open Color Picker" width="64" />
91
92 <spinner bottom="-200" decimal_digits="0" follows="left|top" height="16" increment="1"
93 label="Alpha" label_width="40" left_delta="70" max_val="100" min_val="0"
94 mouse_opaque="true" name="alpha" width="90" />
95 <spinner bottom_delta="-20" enabled="true" decimal_digits="2" follows="left|top" height="16"
96 increment="0.05" label="Glow" label_width="40" left_delta="0" max_val="1"
97 min_val="0" mouse_opaque="true" name="glow" width="90" />
98 <check_box bottom_delta="-20" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
99 label="Full Bright" left_delta="0" mouse_opaque="true" name="FBToggle" radio_style="false"
100 width="100" />
101 <combo_box allow_text_entry="false" bottom_delta="-20" follows="left|top" height="18" left_delta="0"
102 max_chars="20" mouse_opaque="true" name="combobox shininess" tool_tip="Set the amount of shine for the object"
103 width="90">
104 <combo_item name="None" value="None"> None</combo_item>
105 <combo_item name="Low" value="Low"> Low</combo_item>
106 <combo_item name="Medium" value="Medium"> Medium</combo_item>
107 <combo_item name="High" value="High"> High</combo_item>
108 </combo_box>
109
110 <view_border blevel_style="in" bottom_delta="-40" follows="left|top" height="16" left="14"
111 mouse_opaque="false" name="im_give_drop_target_rect" width="400"/>
112 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" bottom_delta="0"
113 drop_shadow_visible="true" follows="left|top" font="SansSerifSmall" h_pad="0" halign="center"
114 height="16" left_delta="0" mouse_opaque="true" name="Give inventory" tool_tip="Drop an inventory item here."
115 v_pad="2" width="400"> Drop an inventory item here to have it added to the prim contents.</text>
116 <view_border blevel_style="in" bottom_delta="-18" follows="left|top" height="16" left_delta="0"
117 mouse_opaque="false" name="build_item_add_disp_rect" width="400"/>
118 <button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20"
119 label="Clear Item" left_delta="405" mouse_opaque="true"
120 name="btn_clear" scale_image="true" width="90" />
121 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" bottom_delta="0"
122 drop_shadow_visible="true" follows="left|top" font="SansSerifSmall" h_pad="0" halign="center"
123 height="16" left="14" mouse_opaque="true" name="build_item_add_disp_rect_txt" tool_tip=""
124 v_pad="2" width="400"> Currently set to: ITEM</text>
125 <check_box name="BuildPrefsEmbedItem" bottom_delta="-25" enabled="true"
126 follows="left|top" font="SansSerifSmall" height="16"
127 initial_value="false" label="Embed an item into the newly created object" left_delta="0"
128 mouse_opaque="true" radio_style="false" width="270" />
129
130 <view_border bevel_style="none" border_thickness="1" bottom="-145" follows="top|left" height="105" 78 <view_border bevel_style="none" border_thickness="1" bottom="-145" follows="top|left" height="105"
131 left="198" name="PivotBorder" width="135"/> 79 left="198" name="PivotBorder" width="135"/>
132 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 80 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"