summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelface.cpp19
-rw-r--r--indra/newview/skins/default/textures/materials_ui_x_24.pngbin0 -> 602 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_tools_texture.xml10
4 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 1fbf4a39e6..f55d53fa29 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1791,6 +1791,8 @@ void LLPanelFace::updateMaterial()
LLMaterialPtr material_to_set = mMaterial;
+ bool subselection = false;
+
// If we're editing a single face and not the entire material for an object,
// we need to clone the material so that our changes to the material's settings
// don't automatically propagate to the non-selected faces
@@ -1804,6 +1806,7 @@ void LLPanelFace::updateMaterial()
{
llinfos << "Cloning material to apply to subselection." << llendl;
material_to_set = new LLMaterial(mMaterial->asLLSD());
+ subselection = true;
}
else
{
@@ -1888,7 +1891,21 @@ void LLPanelFace::updateMaterial()
LL_DEBUGS("Materials") << "Updating material: " << material_to_set->asLLSD() << LL_ENDL;
- LLSelectMgr::getInstance()->selectionSetMaterial( material_to_set );
+
+ if (node && node->getObject() && node->getObject()->permModify() && subselection)
+ {
+ int selected_te = node->getLastSelectedTE();
+ if (selected_te >= 0)
+ {
+ LLMaterialMgr::getInstance()->put(node->getObject()->getID(),selected_te,*material_to_set);
+ node->getObject()->getTE(selected_te)->setMaterialParams(material_to_set);
+ node->getObject()->sendTEUpdate();
+ }
+ }
+ else
+ {
+ LLSelectMgr::getInstance()->selectionSetMaterial( material_to_set );
+ }
}
else
{
diff --git a/indra/newview/skins/default/textures/materials_ui_x_24.png b/indra/newview/skins/default/textures/materials_ui_x_24.png
new file mode 100644
index 0000000000..6d88554914
--- /dev/null
+++ b/indra/newview/skins/default/textures/materials_ui_x_24.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index fcab966dee..b0e4b71d21 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -743,6 +743,7 @@ with the same filename but different name
<texture name="default_land_picture.j2c" />
<texture name="default_profile_picture.j2c" />
<texture name="locked_image.j2c" />
+ <texture name="materials_ui_x_24.png" />
<texture name="Progress_1" file_name="icons/Progress_1.png" preload="true" />
<texture name="Progress_2" file_name="icons/Progress_2.png" preload="true" />
diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
index 678b4f43cd..a5425062ec 100644
--- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml
+++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
@@ -2,7 +2,7 @@
<panel
border="false"
follows="all"
- height="400"
+ height="420"
label="Texture"
layout="topleft"
left="0"
@@ -139,7 +139,7 @@
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
- fallback_image="locked_image.j2c"
+ fallback_image="materials_ui_x_24.png"
follows="left|top"
height="80"
label="Texture "
@@ -216,7 +216,7 @@
allow_no_texture="true"
can_apply_immediately="true"
default_image_name="Default"
- fallback_image="locked_image.j2c"
+ fallback_image="materials_ui_x_24.png"
follows="left|top"
height="80"
label="Texture "
@@ -327,7 +327,7 @@
allow_no_texture="true"
can_apply_immediately="true"
default_image_name="Default"
- fallback_image="locked_image.j2c"
+ fallback_image="materials_ui_x_24.png"
follows="left|top"
height="80"
label="Texture "
@@ -743,7 +743,7 @@
left="7"
name="checkbox planar align"
tool_tip="Align textures on all selected faces with the last selected face. Requires Planar texture mapping."
- top_delta="26"
+ top_delta="16"
width="260" />
<web_browser
visible="false"