summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelface.cpp11
-rw-r--r--indra/newview/llpanelface.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_tools_texture.xml11
3 files changed, 20 insertions, 3 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index c4d7eb46df..06f69e6fb5 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -203,6 +203,7 @@ BOOL LLPanelFace::postBuild()
childSetAction("button align textures", &LLPanelFace::onAlignTexture, this);
childSetAction("pbr_from_inventory", &LLPanelFace::onClickBtnLoadInvPBR, this);
childSetAction("edit_selected_pbr", &LLPanelFace::onClickBtnEditPBR, this);
+ childSetAction("save_selected_pbr", &LLPanelFace::onClickBtnSavePBR, this);
LLTextureCtrl* mTextureCtrl;
LLTextureCtrl* mShinyTextureCtrl;
@@ -969,6 +970,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
getChildView("pbr_from_inventory")->setEnabled(editable);
getChildView("edit_selected_pbr")->setEnabled(editable && has_pbr_material);
+ getChildView("save_selected_pbr")->setEnabled(objectp->permCopy() && has_pbr_material);
LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control");
LLTextureCtrl* shinytexture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
@@ -1749,8 +1751,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("button align")->setEnabled(FALSE);
getChildView("pbr_from_inventory")->setEnabled(FALSE);
getChildView("edit_selected_pbr")->setEnabled(FALSE);
- //getChildView("has media")->setEnabled(FALSE);
- //getChildView("media info set")->setEnabled(FALSE);
+ getChildView("save_selected_pbr")->setEnabled(FALSE);
updateVisibility();
@@ -2682,6 +2683,7 @@ void LLPanelFace::updateVisibility()
getChildView("pbr_control")->setVisible(show_pbr);
getChildView("pbr_from_inventory")->setVisible(show_pbr);
getChildView("edit_selected_pbr")->setVisible(show_pbr);
+ getChildView("save_selected_pbr")->setVisible(show_pbr);
}
// static
@@ -3669,6 +3671,11 @@ void LLPanelFace::onClickBtnEditPBR(void* userdata)
LLMaterialEditor::loadLive();
}
+void LLPanelFace::onClickBtnSavePBR(void* userdata)
+{
+ LLMaterialEditor::saveObjectsMaterialAs();
+}
+
enum EPasteMode
{
PASTE_COLOR,
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 38d81e44ba..27c1bb5f33 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -230,6 +230,7 @@ protected:
static void onAlignTexture(void*);
static void onClickBtnLoadInvPBR(void* userdata);
static void onClickBtnEditPBR(void* userdata);
+ static void onClickBtnSavePBR(void* userdata);
public: // needs to be accessible to selection manager
void onCopyColor(); // records all selected faces
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 e2d571324f..da74b65848 100644
--- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml
+++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
@@ -267,6 +267,15 @@
name="edit_selected_pbr"
label="Edit Selected"
width="140"/>
+ <button
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left_delta="0"
+ top_pad="4"
+ name="save_selected_pbr"
+ label="Save to inventory"
+ width="140"/>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
@@ -278,7 +287,7 @@
left="10"
name="texture control"
tool_tip="Click to choose a picture"
- top_delta="-27"
+ top_delta="-54"
width="64" />
<text
type="string"