diff options
-rw-r--r-- | indra/llcommon/llassettype.cpp | 2 | ||||
-rw-r--r-- | indra/llinventory/llinventorytype.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llinventoryfilter.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llinventoryicon.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 178 | ||||
-rw-r--r-- | indra/newview/llmaterialeditor.h | 26 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 16 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.h | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/icons/Inv_Material.png | bin | 0 -> 684 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml | 43 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_material_editor.xml | 218 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 42 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 1 |
16 files changed, 473 insertions, 91 deletions
diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp index 0bb1f1a0fd..f08cc18036 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -96,7 +96,7 @@ LLAssetDictionary::LLAssetDictionary() addEntry(LLAssetType::AT_WIDGET, new AssetEntry("WIDGET", "widget", "widget", false, false, false)); addEntry(LLAssetType::AT_PERSON, new AssetEntry("PERSON", "person", "person", false, false, false)); addEntry(LLAssetType::AT_SETTINGS, new AssetEntry("SETTINGS", "settings", "settings blob", true, true, true)); - addEntry(LLAssetType::AT_MATERIAL, new AssetEntry("MATERIAL", "material", "render material", true, true, true)); + addEntry(LLAssetType::AT_MATERIAL, new AssetEntry("MATERIAL", "material", "render material", true, true, true)); addEntry(LLAssetType::AT_UNKNOWN, new AssetEntry("UNKNOWN", "invalid", NULL, false, false, false)); addEntry(LLAssetType::AT_NONE, new AssetEntry("NONE", "-1", NULL, FALSE, FALSE, FALSE)); diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index 57d521429c..ceda2f3caf 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -86,6 +86,7 @@ LLInventoryDictionary::LLInventoryDictionary() addEntry(LLInventoryType::IT_WIDGET, new InventoryEntry("widget", "widget", 1, LLAssetType::AT_WIDGET)); addEntry(LLInventoryType::IT_PERSON, new InventoryEntry("person", "person", 1, LLAssetType::AT_PERSON)); addEntry(LLInventoryType::IT_SETTINGS, new InventoryEntry("settings", "settings", 1, LLAssetType::AT_SETTINGS)); + addEntry(LLInventoryType::IT_MATERIAL, new InventoryEntry("material", "render material", 1, LLAssetType::AT_MATERIAL)); } diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 707ff2b7b6..f7dc493109 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -1306,6 +1306,18 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } + if (isFilterObjectTypesWith(LLInventoryType::IT_MATERIAL)) + { + filtered_types += LLTrans::getString("Materials"); + filtered_by_type = TRUE; + num_filter_types++; + } + else + { + not_filtered_types += LLTrans::getString("Materials"); + filtered_by_all_types = FALSE; + } + if (isFilterObjectTypesWith(LLInventoryType::IT_NOTECARD)) { filtered_types += LLTrans::getString("Notecards"); diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp index 44e493fdf4..e9b0e8404a 100644 --- a/indra/newview/llinventoryicon.cpp +++ b/indra/newview/llinventoryicon.cpp @@ -99,6 +99,8 @@ LLIconDictionary::LLIconDictionary() addEntry(LLInventoryType::ICONNAME_SETTINGS_DAY, new IconEntry("Inv_SettingsDay")); addEntry(LLInventoryType::ICONNAME_SETTINGS, new IconEntry("Inv_Settings")); + addEntry(LLInventoryType::ICONNAME_MATERIAL, new IconEntry("Inv_Material")); + addEntry(LLInventoryType::ICONNAME_INVALID, new IconEntry("Inv_Invalid")); addEntry(LLInventoryType::ICONNAME_UNKNOWN, new IconEntry("Inv_Unknown")); @@ -177,6 +179,9 @@ const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type, case LLAssetType::AT_SETTINGS: idx = assignSettingsIcon(misc_flag); break; + case LLAssetType::AT_MATERIAL: + idx = LLInventoryType::ICONNAME_MATERIAL; + break; case LLAssetType::AT_UNKNOWN: idx = LLInventoryType::ICONNAME_UNKNOWN; default: diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 8b4d3b832b..86f629db95 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -27,9 +27,13 @@ #include "llviewerprecompiledheaders.h" #include "llmaterialeditor.h" + +#include "llappviewer.h" #include "llcombobox.h" +#include "llnotificationsutil.h" +#include "lltexturectrl.h" +#include "lltrans.h" #include "llviewermenufile.h" -#include "llappviewer.h" #include "llviewertexture.h" #include "llselectmgr.h" #include "llvovolume.h" @@ -48,18 +52,41 @@ LLMaterialEditor::LLMaterialEditor(const LLSD& key) BOOL LLMaterialEditor::postBuild() { + mAlbedoTextureCtrl = getChild<LLTextureCtrl>("albedo_texture"); + mMetallicTextureCtrl = getChild<LLTextureCtrl>("metallic_roughness_texture"); + mEmissiveTextureCtrl = getChild<LLTextureCtrl>("emissive_texture"); + mNormalTextureCtrl = getChild<LLTextureCtrl>("normal_texture"); + + mAlbedoTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitAlbedoTexture, this, _1, _2)); + mMetallicTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitMetallicTexture, this, _1, _2)); + mEmissiveTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitEmissiveTexture, this, _1, _2)); + mNormalTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitNormalTexture, this, _1, _2)); + childSetAction("save", boost::bind(&LLMaterialEditor::onClickSave, this)); + childSetAction("save_as", boost::bind(&LLMaterialEditor::onClickSaveAs, this)); + childSetAction("cancel", boost::bind(&LLMaterialEditor::onClickCancel, this)); + return LLFloater::postBuild(); } LLUUID LLMaterialEditor::getAlbedoId() { - return childGetValue("albedo texture").asUUID(); + return mAlbedoTextureCtrl->getValue().asUUID(); } void LLMaterialEditor::setAlbedoId(const LLUUID& id) { - childSetValue("albedo texture", id); + mAlbedoTextureCtrl->setValue(id); + mAlbedoTextureCtrl->setDefaultImageAssetID(id); + + if (id.notNull()) + { + // todo: this does not account for posibility of texture + // being from inventory, need to check that + childSetValue("albedo_upload_fee", getString("upload_fee_string")); + // Only set if we will need to upload this texture + mAlbedoTextureUploadId = id; + } } LLColor4 LLMaterialEditor::getAlbedoColor() @@ -69,7 +96,6 @@ LLColor4 LLMaterialEditor::getAlbedoColor() return ret; } - void LLMaterialEditor::setAlbedoColor(const LLColor4& color) { childSetValue("albedo color", color.getValue()); @@ -101,14 +127,29 @@ void LLMaterialEditor::setAlphaCutoff(F32 alpha_cutoff) childSetValue("alpha cutoff", alpha_cutoff); } +void LLMaterialEditor::setMaterialName(const std::string &name) +{ + setTitle(name); + mMaterialName = name; +} + LLUUID LLMaterialEditor::getMetallicRoughnessId() { - return childGetValue("metallic-roughness texture").asUUID(); + return mMetallicTextureCtrl->getValue().asUUID(); } void LLMaterialEditor::setMetallicRoughnessId(const LLUUID& id) { - childSetValue("metallic-roughness texture", id); + mMetallicTextureCtrl->setValue(id); + mMetallicTextureCtrl->setDefaultImageAssetID(id); + + if (id.notNull()) + { + // todo: this does not account for posibility of texture + // being from inventory, need to check that + childSetValue("metallic_upload_fee", getString("upload_fee_string")); + mMetallicTextureUploadId = id; + } } F32 LLMaterialEditor::getMetalnessFactor() @@ -133,12 +174,21 @@ void LLMaterialEditor::setRoughnessFactor(F32 factor) LLUUID LLMaterialEditor::getEmissiveId() { - return childGetValue("emissive texture").asUUID(); + return mEmissiveTextureCtrl->getValue().asUUID(); } void LLMaterialEditor::setEmissiveId(const LLUUID& id) { - childSetValue("emissive texture", id); + mEmissiveTextureCtrl->setValue(id); + mEmissiveTextureCtrl->setDefaultImageAssetID(id); + + if (id.notNull()) + { + // todo: this does not account for posibility of texture + // being from inventory, need to check that + childSetValue("emissive_upload_fee", getString("upload_fee_string")); + mEmissiveTextureUploadId = id; + } } LLColor4 LLMaterialEditor::getEmissiveColor() @@ -153,12 +203,21 @@ void LLMaterialEditor::setEmissiveColor(const LLColor4& color) LLUUID LLMaterialEditor::getNormalId() { - return childGetValue("normal texture").asUUID(); + return mNormalTextureCtrl->getValue().asUUID(); } void LLMaterialEditor::setNormalId(const LLUUID& id) { - childSetValue("normal texture", id); + mNormalTextureCtrl->setValue(id); + mNormalTextureCtrl->setDefaultImageAssetID(id); + + if (id.notNull()) + { + // todo: this does not account for posibility of texture + // being from inventory, need to check that + childSetValue("normal_upload_fee", getString("upload_fee_string")); + mNormalTextureUploadId = id; + } } bool LLMaterialEditor::getDoubleSided() @@ -171,6 +230,60 @@ void LLMaterialEditor::setDoubleSided(bool double_sided) childSetValue("double sided", double_sided); } +void LLMaterialEditor::onCommitAlbedoTexture(LLUICtrl * ctrl, const LLSD & data) +{ + // might be better to use arrays, to have a single callback + // and not to repeat the same thing for each tecture controls + LLUUID new_val = mAlbedoTextureCtrl->getValue().asUUID(); + if (new_val == mAlbedoTextureUploadId && mAlbedoTextureUploadId.notNull()) + { + childSetValue("albedo_upload_fee", getString("upload_fee_string")); + } + else + { + childSetValue("albedo_upload_fee", getString("no_upload_fee_string")); + } +} + +void LLMaterialEditor::onCommitMetallicTexture(LLUICtrl * ctrl, const LLSD & data) +{ + LLUUID new_val = mMetallicTextureCtrl->getValue().asUUID(); + if (new_val == mMetallicTextureUploadId && mMetallicTextureUploadId.notNull()) + { + childSetValue("metallic_upload_fee", getString("upload_fee_string")); + } + else + { + childSetValue("metallic_upload_fee", getString("no_upload_fee_string")); + } +} + +void LLMaterialEditor::onCommitEmissiveTexture(LLUICtrl * ctrl, const LLSD & data) +{ + LLUUID new_val = mEmissiveTextureCtrl->getValue().asUUID(); + if (new_val == mEmissiveTextureUploadId && mEmissiveTextureUploadId.notNull()) + { + childSetValue("emissive_upload_fee", getString("upload_fee_string")); + } + else + { + childSetValue("emissive_upload_fee", getString("no_upload_fee_string")); + } +} + +void LLMaterialEditor::onCommitNormalTexture(LLUICtrl * ctrl, const LLSD & data) +{ + LLUUID new_val = mNormalTextureCtrl->getValue().asUUID(); + if (new_val == mNormalTextureUploadId && mNormalTextureUploadId.notNull()) + { + childSetValue("normal_upload_fee", getString("upload_fee_string")); + } + else + { + childSetValue("normal_upload_fee", getString("no_upload_fee_string")); + } +} + static void write_color(const LLColor4& color, std::vector<double>& c) { @@ -265,7 +378,40 @@ void LLMaterialEditor::onClickSave() std::string dump = str.str(); - LL_INFOS() << dump << LL_ENDL; + LL_INFOS() << mMaterialName << ": " << dump << LL_ENDL; +} + +void LLMaterialEditor::onClickSaveAs() +{ + LLSD args; + args["DESC"] = mMaterialName; + + LLNotificationsUtil::add("SaveMaterialAs", args, LLSD(), boost::bind(&LLMaterialEditor::onSaveAsCommitCallback, this, _1, _2)); +} + +void LLMaterialEditor::onSaveAsCommitCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == option) + { + std::string new_name = response["message"].asString(); + LLStringUtil::trim(new_name); + if (!new_name.empty()) + { + setMaterialName(new_name); + onClickSave(); + } + else + { + LLNotificationsUtil::add("InvalidMaterialName"); + } + } +} + +void LLMaterialEditor::onClickCancel() +{ + // Todo: confirm usaved changes + closeFloater(); } class LLMaterialFilePicker : public LLFilePickerThread @@ -378,13 +524,14 @@ void LLMaterialFilePicker::loadMaterial(const std::string& filename) if (!loaded) { - // TODO: show error_msg to user + LLNotificationsUtil::add("CannotUploadMaterial"); return; } if (model_in.materials.empty()) { - // TODO: show error message that materials are missing + // materials are missing + LLNotificationsUtil::add("CannotUploadMaterial"); return; } @@ -446,9 +593,12 @@ void LLMaterialFilePicker::loadMaterial(const std::string& filename) mME->setMetalnessFactor(material_in.pbrMetallicRoughness.metallicFactor); mME->setRoughnessFactor(material_in.pbrMetallicRoughness.roughnessFactor); - + mME->setDoubleSided(material_in.doubleSided); + std::string new_material = LLTrans::getString("New Material"); + mME->setMaterialName(new_material); + mME->openFloater(); mME->applyToSelection(); diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h index e773ecd169..1584f2c136 100644 --- a/indra/newview/llmaterialeditor.h +++ b/indra/newview/llmaterialeditor.h @@ -28,6 +28,8 @@ #include "llfloater.h" +class LLTextureCtrl; + class LLMaterialEditor : public LLFloater { public: @@ -40,6 +42,9 @@ public: void applyToSelection(); void onClickSave(); + void onClickSaveAs(); + void onSaveAsCommitCallback(const LLSD& notification, const LLSD& response); + void onClickCancel(); // llpanel BOOL postBuild() override; @@ -59,6 +64,8 @@ public: F32 getAlphaCutoff(); void setAlphaCutoff(F32 alpha_cutoff); + + void setMaterialName(const std::string &name); LLUUID getMetallicRoughnessId(); void setMetallicRoughnessId(const LLUUID& id); @@ -80,5 +87,24 @@ public: bool getDoubleSided(); void setDoubleSided(bool double_sided); + + void onCommitAlbedoTexture(LLUICtrl* ctrl, const LLSD& data); + void onCommitMetallicTexture(LLUICtrl* ctrl, const LLSD& data); + void onCommitEmissiveTexture(LLUICtrl* ctrl, const LLSD& data); + void onCommitNormalTexture(LLUICtrl* ctrl, const LLSD& data); + +private: + LLTextureCtrl* mAlbedoTextureCtrl; + LLTextureCtrl* mMetallicTextureCtrl; + LLTextureCtrl* mEmissiveTextureCtrl; + LLTextureCtrl* mNormalTextureCtrl; + + // 'Default' texture, unless it's null or from inventory is the one with the fee + LLUUID mAlbedoTextureUploadId; + LLUUID mMetallicTextureUploadId; + LLUUID mEmissiveTextureUploadId; + LLUUID mNormalTextureUploadId; + + std::string mMaterialName; }; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 89256b40c4..49562da3f7 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -919,6 +919,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() getChild<LLUICtrl>("check_clothing")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_WEARABLE)); getChild<LLUICtrl>("check_gesture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_GESTURE)); getChild<LLUICtrl>("check_landmark")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LANDMARK)); + getChild<LLUICtrl>("check_material")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_MATERIAL)); getChild<LLUICtrl>("check_notecard")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_NOTECARD)); getChild<LLUICtrl>("check_object")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_OBJECT)); getChild<LLUICtrl>("check_script")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LSL)); @@ -975,6 +976,12 @@ void LLFloaterInventoryFinder::draw() filtered_by_all_types = FALSE; } + if (!getChild<LLUICtrl>("check_material")->getValue()) + { + filter &= ~(0x1 << LLInventoryType::IT_MATERIAL); + filtered_by_all_types = FALSE; + } + if (!getChild<LLUICtrl>("check_notecard")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_NOTECARD); @@ -1129,6 +1136,7 @@ void LLFloaterInventoryFinder::selectAllTypes(void* user_data) self->getChild<LLUICtrl>("check_clothing")->setValue(TRUE); self->getChild<LLUICtrl>("check_gesture")->setValue(TRUE); self->getChild<LLUICtrl>("check_landmark")->setValue(TRUE); + self->getChild<LLUICtrl>("check_material")->setValue(TRUE); self->getChild<LLUICtrl>("check_notecard")->setValue(TRUE); self->getChild<LLUICtrl>("check_object")->setValue(TRUE); self->getChild<LLUICtrl>("check_script")->setValue(TRUE); @@ -1149,6 +1157,7 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data) self->getChild<LLUICtrl>("check_clothing")->setValue(FALSE); self->getChild<LLUICtrl>("check_gesture")->setValue(FALSE); self->getChild<LLUICtrl>("check_landmark")->setValue(FALSE); + self->getChild<LLUICtrl>("check_material")->setValue(FALSE); self->getChild<LLUICtrl>("check_notecard")->setValue(FALSE); self->getChild<LLUICtrl>("check_object")->setValue(FALSE); self->getChild<LLUICtrl>("check_script")->setValue(FALSE); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 1c4a56b549..b761f34790 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -193,10 +193,8 @@ void LLFloaterTexturePicker::setActive( BOOL active ) void LLFloaterTexturePicker::setCanApplyImmediately(BOOL b) { mCanApplyImmediately = b; - if (!mCanApplyImmediately) - { - getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE); - } + + getChild<LLUICtrl>("apply_immediate_check")->setValue(mCanApplyImmediately); updateFilterPermMask(); } @@ -413,11 +411,7 @@ BOOL LLFloaterTexturePicker::postBuild() getChild<LLUICtrl>("apply_immediate_check")->setValue(gSavedSettings.getBOOL("TextureLivePreview")); childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this); - - if (!mCanApplyImmediately) - { - getChildView("show_folders_check")->setEnabled(FALSE); - } + getChildView("apply_immediate_check")->setEnabled(mCanApplyImmediately); getChild<LLUICtrl>("Pipette")->setCommitCallback( boost::bind(&LLFloaterTexturePicker::onBtnPipette, this)); childSetAction("Cancel", LLFloaterTexturePicker::onBtnCancel,this); @@ -483,7 +477,7 @@ void LLFloaterTexturePicker::draw() } getChildView("Default")->setEnabled(mImageAssetID != mDefaultImageAssetID || mTentative); - getChildView("Blank")->setEnabled(mImageAssetID != mBlankImageAssetID || mTentative); + getChildView("Blank")->setEnabled((mImageAssetID != mBlankImageAssetID && mBlankImageAssetID != mDefaultImageAssetID) || mTentative); getChildView("None")->setEnabled(mAllowNoTexture && (!mImageAssetID.isNull() || mTentative)); LLFloater::draw(); @@ -1146,7 +1140,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mOnCloseCallback(NULL), mOnSelectCallback(NULL), mBorderColor( p.border_color() ), - mAllowNoTexture( FALSE ), + mAllowNoTexture( p.allow_no_texture ), mAllowLocalTexture( TRUE ), mImmediateFilterPermMask( PERM_NONE ), mNonImmediateFilterPermMask( PERM_NONE ), diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 92f6f89af6..1475c8c6fc 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -91,7 +91,7 @@ public: : image_id("image"), default_image_id("default_image_id"), default_image_name("default_image_name"), - allow_no_texture("allow_no_texture"), + allow_no_texture("allow_no_texture", false), can_apply_immediately("can_apply_immediately"), no_commit_on_selection("no_commit_on_selection", false), label_width("label_width", -1), diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 82a5b28576..ac9c385405 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -372,8 +372,12 @@ void validate_framebuffer_object(); // for_impostor -- whether or not these render targets are for an impostor (if true, avoids implicit sRGB conversions) bool addDeferredAttachments(LLRenderTarget& target, bool for_impostor = false) { - return target.addColorAttachment(for_impostor ? GL_RGBA : GL_SRGB8_ALPHA8) && //specular - target.addColorAttachment(GL_RGB10_A2); //normal+z + bool pbr = gSavedSettings.getBOOL("RenderPBR"); + bool valid = true + && target.addColorAttachment(for_impostor ? GL_RGBA : GL_SRGB8_ALPHA8) // frag-data[1] specular or PBR packed OcclusionRoughnessMetal + && target.addColorAttachment(GL_RGB10_A2) // frag_data[2] normal+z+fogmask, See: class1\deferred\materialF.glsl & softenlight + && (pbr ? target.addColorAttachment(GL_RGBA) : true); // frag_data[3] emissive + return valid; } LLPipeline::LLPipeline() : diff --git a/indra/newview/skins/default/textures/icons/Inv_Material.png b/indra/newview/skins/default/textures/icons/Inv_Material.png Binary files differnew file mode 100644 index 0000000000..f5918ceaed --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Inv_Material.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index a36b859b6c..b0ae5fe447 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -303,6 +303,7 @@ with the same filename but different name <texture name="Inv_LostClosed" file_name="icons/Inv_LostClosed.png" preload="false" /> <texture name="Inv_LostOpen" file_name="icons/Inv_LostOpen.png" preload="false" /> <texture name="Inv_Landmark" file_name="icons/Inv_Landmark.png" preload="false" /> + <texture name="Inv_Material" file_name="icons/Inv_Material.png" preload="false" /> <texture name="Inv_Mesh" file_name="icons/Inv_Mesh.png" preload="false" /> <texture name="Inv_Notecard" file_name="icons/Inv_Notecard.png" preload="false" /> <texture name="Inv_Object" file_name="icons/Inv_Object.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml index d783d1e23c..e91efb89b2 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml @@ -2,7 +2,7 @@ <floater legacy_header_height="18" can_minimize="false" - height="466" + height="486" layout="topleft" name="Inventory Finder" help_topic="inventory_finder" @@ -95,12 +95,29 @@ width="126" /> <icon height="16" + image_name="Inv_Material" + layout="topleft" + left="8" + mouse_opaque="true" + name="icon_material" + top="122" + width="16" /> + <check_box + height="16" + label="Materials" + layout="topleft" + left_pad="2" + name="check_material" + top_delta="0" + width="126" /> + <icon + height="16" image_name="Inv_Notecard" layout="topleft" left="8" mouse_opaque="true" name="icon_notecard" - top="122" + top="142" width="16" /> <check_box height="16" @@ -117,7 +134,7 @@ left="8" mouse_opaque="true" name="icon_object" - top="142" + top="162" width="16" /> <check_box height="16" @@ -134,7 +151,7 @@ left="8" mouse_opaque="true" name="icon_script" - top="162" + top="182" width="16" /> <check_box height="16" @@ -151,7 +168,7 @@ left="8" mouse_opaque="true" name="icon_sound" - top="182" + top="202" width="16" /> <check_box height="16" @@ -168,7 +185,7 @@ left="8" mouse_opaque="true" name="icon_texture" - top="202" + top="222" width="16" /> <check_box height="16" @@ -185,7 +202,7 @@ left="8" mouse_opaque="true" name="icon_snapshot" - top="222" + top="242" width="16" /> <check_box height="16" @@ -202,7 +219,7 @@ left="8" mouse_opaque="true" name="icon_settings" - top="242" + top="262" width="16" /> <check_box height="16" @@ -220,7 +237,7 @@ layout="topleft" left="8" name="All" - top="262" + top="282" width="100" /> <button height="20" @@ -274,7 +291,7 @@ width="260"/> <check_box height="16" - top="352" + top="372" label="Since Logoff" layout="topleft" left_delta="0" @@ -290,7 +307,7 @@ layout="topleft" left_delta="0" name="- OR -" - top="370" + top="390" width="144"> - OR - </text> @@ -298,7 +315,7 @@ height="16" layout="topleft" name="date_search_direction" - top="388" + top="408" left="8" width="270"> <radio_item @@ -368,6 +385,6 @@ layout="topleft" name="Close" right="-6" - top="434" + top="454" width="76" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_material_editor.xml b/indra/newview/skins/default/xui/en/floater_material_editor.xml index 5d72e6f79d..815a53a887 100644 --- a/indra/newview/skins/default/xui/en/floater_material_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_material_editor.xml @@ -3,12 +3,22 @@ legacy_header_height="18" can_resize="false" default_tab_group="1" - height="777" + height="887" layout="topleft" name="material editor" help_topic="material_editor" - title="Material: [MATERIAL_NAME]" + title="[MATERIAL_NAME]" width="256"> + <string name="no_upload_fee_string">no upload fee</string> + <string name="upload_fee_string">L$10 upload fee</string> + <check_box + follows="left|top" + label="Double Sided" + left="14" + top="14" + name="double sided" + height="25" + width="120" /> <panel border="true" follows="left|top" @@ -18,10 +28,11 @@ left="5" mouse_opaque="false" name="Texture" - top="20" + top_pad="5" > <text type="string" + font.style="BOLD" length="1" follows="left|top" height="10" @@ -31,18 +42,33 @@ width="64"> Albedo: </text> - <texture_picker - can_apply_immediately="true" + <texture_picker + can_apply_immediately="false" default_image_name="Default" fallback_image="materials_ui_x_24.png" + allow_no_texture="true" follows="left|top" top_pad="8" height="151" layout="topleft" left="10" - name="albedo texture" + name="albedo_texture" tool_tip="Albedo map. Alpha channel is optional and used for transparency." width="128" /> + <text + type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + width="128" + layout="topleft" + left="10" + top_pad="-17" + name="albedo_upload_fee" + > + No upload fee + </text> <text type="string" length="1" @@ -50,12 +76,12 @@ height="10" layout="topleft" left_pad="5" - top_delta="-15" + top="8" > Tint </text> <color_swatch - can_apply_immediately="true" + can_apply_immediately="false" follows="left|top" height="40" label_height="0" @@ -152,7 +178,7 @@ border="true" follows="left|top" width="246" - height="160" + height="175" layout="topleft" left="5" mouse_opaque="false" @@ -161,36 +187,52 @@ > <text type="string" + font.style="BOLD" length="1" follows="left|top" height="10" layout="topleft" left="10" - top_pad="5" + top="5" > Metallic-Roughness: </text> - <texture_picker - can_apply_immediately="true" + <texture_picker + can_apply_immediately="false" default_image_name="Default" fallback_image="materials_ui_x_24.png" + allow_no_texture="true" follows="left|top" width="128" height="151" layout="topleft" left="10" - name="metallic-roughness texture" + name="metallic_roughness_texture" tool_tip="GLTF metallic-roughness map with optional occlusion. Red channel is occlusion, green channel is roughness, blue channel is metalness." top_pad="8" /> <text type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + width="128" + layout="topleft" + left="10" + top_pad="-17" + name="metallic_upload_fee" + > + No upload fee + </text> + <text + type="string" length="1" follows="left|top" height="10" layout="topleft" left_pad="5" - top_delta="-15" + top="8" > Metallic Factor </text> @@ -237,7 +279,7 @@ border="true" follows="left|top" width="246" - height="160" + height="175" layout="topleft" left="5" mouse_opaque="false" @@ -246,6 +288,7 @@ > <text type="string" + font.style="BOLD" length="1" follows="left|top" height="10" @@ -256,29 +299,44 @@ Emissive: </text> <texture_picker - can_apply_immediately="true" + can_apply_immediately="false" default_image_name="Default" fallback_image="materials_ui_x_24.png" + allow_no_texture="true" follows="left|top" top_pad="8" height="151" layout="topleft" left="10" - name="emissive texture" + name="emissive_texture" width="128" /> <text type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + width="128" + layout="topleft" + left="10" + top_pad="-17" + name="emissive_upload_fee" + > + No upload fee + </text> + <text + type="string" length="1" follows="left|top" height="10" layout="topleft" left_pad="5" - top_delta="-15" + top="8" > Tint </text> <color_swatch - can_apply_immediately="true" + can_apply_immediately="false" follows="left|top" height="40" label_height="0" @@ -316,7 +374,7 @@ border="true" follows="left|top" width="246" - height="160" + height="175" layout="topleft" left="5" mouse_opaque="false" @@ -324,6 +382,7 @@ > <text type="string" + font.style="BOLD" length="1" follows="left|top" height="10" @@ -334,41 +393,104 @@ Normal: </text> <texture_picker - can_apply_immediately="true" + can_apply_immediately="false" default_image_name="Default" fallback_image="materials_ui_x_24.png" + allow_no_texture="true" follows="left|top" top_pad="8" height="151" layout="topleft" left="10" - name="normal texture" + name="normal_texture" width="128" /> - <!--<check_box - follows="left|top" - label="Mikkt Space" - left_pad="10" - top_delta="0" - height="25" - width="120" />--> + <text + type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + width="128" + layout="topleft" + left="10" + top_pad="-17" + name="normal_upload_fee" + > + No upload fee + </text> + </panel> + + <panel + follows="right|bottom" + width="246" + height="82" + layout="bottomright" + top_delta="-2" + left="0" + name="button_panel" + > + <text + type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + width="200" + layout="topleft" + left="10" + top="0" + > + Usaved changes + </text> + <button + follows="left|top" + height="25" + label="Save" + layout="topleft" + name="save" + top_pad="7" + left="5" + width="120" /> + <button + follows="left|top" + height="25" + label="Save As..." + layout="topleft" + name="save_as" + top_delta="0" + left_pad="6" + width="120" /> + <text + type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + width="240" + layout="topleft" + left="10" + top_pad="5" + > + Total upload fee: L$ [FEE] + </text> + + <view_border + bevel_style="none" + height="0" + layout="topleft" + left="5" + name="button_border" + top_pad="7" + width="246"/> + + <button + follows="left|top" + height="25" + label="Cancel" + layout="topleft" + name="cancel" + top_pad="7" + left="61" + width="121" /> </panel> - <check_box - follows="left|top" - label="Double Sided" - left="5" - top_pad="5" - name="double sided" - height="25" - width="120" /> - <button - follows="right|bottom" - height="25" - label="Save" - layout="bottomright" - name="save" - tool_tip="Browse for an editor (executable) to edit floater XML files" - top_delta="-2" - left="5" - width="246" /> - </floater> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 786cf32e7a..23a9632ada 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9025,7 +9025,47 @@ Unable to upload texture. [REASON] <tag>fail</tag> </notification> - + + <notification + icon="alertmodal.tga" + name="CannotUploadMaterial" + type="alertmodal"> +There was a problem uploading the file + <tag>fail</tag> + </notification> + + <notification + icon="alertmodal.tga" + label="Save Material" + name="SaveMaterialAs" + type="alertmodal"> + <unique/> + Name this material: + <tag>confirm</tag> + <form name="form"> + <input name="message" type="text"> + [DESC] + </input> + <button + default="true" + index="0" + name="OK" + text="OK"/> + <button + index="1" + name="Cancel" + text="Cancel"/> + </form> + </notification> + + <notification + icon="alertmodal.tga" + name="InvalidMaterialName" + type="alertmodal"> +Please enter a non-empty name + <tag>fail</tag> + </notification> + <notification icon="alertmodal.tga" name="LivePreviewUnavailable" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 0866f29355..e1678f418f 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2414,6 +2414,7 @@ If you continue to receive this message, please contact Second Life support for <string name="Clothing" value=" Clothing," /> <string name="Gestures" value=" Gestures," /> <string name="Landmarks" value=" Landmarks," /> + <string name="Materials" value=" Materials," /> <string name="Notecards" value=" Notecards," /> <string name="Objects" value=" Objects," /> <string name="Scripts" value=" Scripts," /> |