diff options
-rw-r--r-- | indra/llcommon/llrefcount.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelface.cpp | 278 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_material_editor.xml | 767 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_tools_texture.xml | 2 |
4 files changed, 568 insertions, 481 deletions
diff --git a/indra/llcommon/llrefcount.cpp b/indra/llcommon/llrefcount.cpp index 5cbd346411..6852b5536a 100644 --- a/indra/llcommon/llrefcount.cpp +++ b/indra/llcommon/llrefcount.cpp @@ -30,7 +30,7 @@ #include "llerror.h" // maximum reference count before sounding memory leak alarm -const S32 gMaxRefCount = 65536; +const S32 gMaxRefCount = S32_MAX; LLRefCount::LLRefCount(const LLRefCount& other) : mRef(0) diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 9300b161f4..c205efb436 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -101,7 +101,9 @@ const S32 MATTYPE_SPECULAR = 2; // Specular map const S32 ALPHAMODE_MASK = 2; // Alpha masking mode const S32 BUMPY_TEXTURE = 18; // use supplied normal map const S32 SHINY_TEXTURE = 4; // use supplied specular map -const S32 PBRTYPE_ALBEDO = 0; // PBR ALBEDO +const S32 PBRTYPE_ALBEDO = 0; // PBR Albedo +const S32 PBRTYPE_NORMAL = 1; // PBR Normal +const S32 PBRTYPE_METALLIC = 2; // PBR Metallic BOOST_STATIC_ASSERT(MATTYPE_DIFFUSE == LLRender::DIFFUSE_MAP && MATTYPE_NORMAL == LLRender::NORMAL_MAP && MATTYPE_SPECULAR == LLRender::SPECULAR_MAP); @@ -867,35 +869,26 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChildView("button align")->setEnabled(editable); LLComboBox* combobox_matmedia = getChild<LLComboBox>("combobox matmedia"); - if (combobox_matmedia) - { - if (combobox_matmedia->getCurrentIndex() < MATMEDIA_MATERIAL) - { - combobox_matmedia->selectNthItem(MATMEDIA_MATERIAL); - } - } - else - { - LL_WARNS() << "failed getChild for 'combobox matmedia'" << LL_ENDL; - } + if (combobox_matmedia->getCurrentIndex() < MATMEDIA_MATERIAL) + { + combobox_matmedia->selectNthItem(MATMEDIA_MATERIAL); + } combobox_matmedia->setEnabled(editable); LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type"); - if(radio_mat_type) - { - if (radio_mat_type->getSelectedIndex() < MATTYPE_DIFFUSE) - { - radio_mat_type->selectNthItem(MATTYPE_DIFFUSE); - } + if (radio_mat_type->getSelectedIndex() < MATTYPE_DIFFUSE) + { + radio_mat_type->selectNthItem(MATTYPE_DIFFUSE); + } + radio_mat_type->setEnabled(editable); - } - else - { - LL_WARNS("Materials") << "failed getChild for 'radio_material_type'" << LL_ENDL; - } + LLRadioGroup* radio_pbr_type = getChild<LLRadioGroup>("radio_pbr_type"); + if (radio_pbr_type->getSelectedIndex() < PBRTYPE_ALBEDO) + { + radio_pbr_type->selectNthItem(PBRTYPE_ALBEDO); + } + radio_pbr_type->setEnabled(editable); - getChildView("radio_material_type")->setEnabled(editable); - getChildView("radio_pbr_type")->setEnabled(editable); getChildView("checkbox_sync_settings")->setEnabled(editable); childSetValue("checkbox_sync_settings", gSavedSettings.getBOOL("SyncMaterialSettings")); updateVisibility(); @@ -906,8 +899,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) bool identical_spec = false; // pbr material - bool is_pbr_material = false; - LLTextureCtrl* pbr_ctrl = getChild<LLTextureCtrl>("pbr_control"); + bool has_pbr_material = false; + LLTextureCtrl* pbr_ctrl = findChild<LLTextureCtrl>("pbr_control"); if (pbr_ctrl) { LLUUID pbr_id; @@ -918,7 +911,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) pbr_ctrl->setTentative(identical_pbr ? FALSE : TRUE); pbr_ctrl->setEnabled(editable); pbr_ctrl->setImageAssetID(pbr_id); - is_pbr_material = pbr_id.notNull(); + has_pbr_material = pbr_id.notNull(); } LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control"); @@ -931,9 +924,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) // Color swatch { - getChildView("color label")->setEnabled(editable && !is_pbr_material); + getChildView("color label")->setEnabled(editable && !has_pbr_material); } - LLColorSwatchCtrl* mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); + LLColorSwatchCtrl* mColorSwatch = findChild<LLColorSwatchCtrl>("colorswatch"); LLColor4 color = LLColor4::white; bool identical_color = false; @@ -946,17 +939,17 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) mColorSwatch->setOriginal(color); mColorSwatch->set(color, force_set_values || (prev_color != color) || !editable); - mColorSwatch->setValid(editable && !is_pbr_material); - mColorSwatch->setEnabled(editable && !is_pbr_material); + mColorSwatch->setValid(editable && !has_pbr_material); + mColorSwatch->setEnabled(editable && !has_pbr_material); mColorSwatch->setCanApplyImmediately( editable ); } // Color transparency - getChildView("color trans")->setEnabled(editable && !is_pbr_material); + getChildView("color trans")->setEnabled(editable && !has_pbr_material); F32 transparency = (1.f - color.mV[VALPHA]) * 100.f; getChild<LLUICtrl>("ColorTrans")->setValue(editable ? transparency : 0); - getChildView("ColorTrans")->setEnabled(editable && !is_pbr_material); + getChildView("ColorTrans")->setEnabled(editable && !has_pbr_material); // Specular map LLSelectedTEMaterial::getSpecularID(specmap_id, identical_spec); @@ -1215,9 +1208,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChild<LLUICtrl>("shinyScaleU")->setValue(spec_scale_s); getChild<LLUICtrl>("bumpyScaleU")->setValue(norm_scale_s); - getChildView("TexScaleU")->setEnabled(editable); - getChildView("shinyScaleU")->setEnabled(editable && specmap_id.notNull()); - getChildView("bumpyScaleU")->setEnabled(editable && normmap_id.notNull()); + if (combobox_matmedia->getCurrentIndex() == MATMEDIA_PBR) + { + getChildView("TexScaleU")->setEnabled(editable && has_pbr_material); + getChildView("shinyScaleU")->setEnabled(editable && has_pbr_material); + getChildView("bumpyScaleU")->setEnabled(editable && has_pbr_material); + } + else + { + getChildView("TexScaleU")->setEnabled(editable); + getChildView("shinyScaleU")->setEnabled(editable && specmap_id.notNull()); + getChildView("bumpyScaleU")->setEnabled(editable && normmap_id.notNull()); + } BOOL diff_scale_tentative = !(identical && identical_diff_scale_s); BOOL norm_scale_tentative = !(identical && identical_norm_scale_s); @@ -1254,9 +1256,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) BOOL norm_scale_tentative = !identical_norm_scale_t; BOOL spec_scale_tentative = !identical_spec_scale_t; - getChildView("TexScaleV")->setEnabled(editable); - getChildView("shinyScaleV")->setEnabled(editable && specmap_id.notNull()); - getChildView("bumpyScaleV")->setEnabled(editable && normmap_id.notNull()); + if (combobox_matmedia->getCurrentIndex() == MATMEDIA_PBR) + { + getChildView("TexScaleV")->setEnabled(editable && has_pbr_material); + getChildView("shinyScaleV")->setEnabled(editable && has_pbr_material); + getChildView("bumpyScaleV")->setEnabled(editable && has_pbr_material); + } + else + { + getChildView("TexScaleV")->setEnabled(editable); + getChildView("shinyScaleV")->setEnabled(editable && specmap_id.notNull()); + getChildView("bumpyScaleV")->setEnabled(editable && normmap_id.notNull()); + } if (force_set_values) { @@ -1300,9 +1311,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChild<LLUICtrl>("shinyOffsetU")->setTentative(LLSD(norm_offset_u_tentative)); getChild<LLUICtrl>("bumpyOffsetU")->setTentative(LLSD(spec_offset_u_tentative)); - getChildView("TexOffsetU")->setEnabled(editable); - getChildView("shinyOffsetU")->setEnabled(editable && specmap_id.notNull()); - getChildView("bumpyOffsetU")->setEnabled(editable && normmap_id.notNull()); + if (combobox_matmedia->getCurrentIndex() == MATMEDIA_PBR) + { + getChildView("TexOffsetU")->setEnabled(editable && has_pbr_material); + getChildView("shinyOffsetU")->setEnabled(editable && has_pbr_material); + getChildView("bumpyOffsetU")->setEnabled(editable && has_pbr_material); + } + else + { + getChildView("TexOffsetU")->setEnabled(editable); + getChildView("shinyOffsetU")->setEnabled(editable && specmap_id.notNull()); + getChildView("bumpyOffsetU")->setEnabled(editable && normmap_id.notNull()); + } } { @@ -1330,9 +1350,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChild<LLUICtrl>("shinyOffsetV")->setTentative(LLSD(norm_offset_v_tentative)); getChild<LLUICtrl>("bumpyOffsetV")->setTentative(LLSD(spec_offset_v_tentative)); - getChildView("TexOffsetV")->setEnabled(editable); - getChildView("shinyOffsetV")->setEnabled(editable && specmap_id.notNull()); - getChildView("bumpyOffsetV")->setEnabled(editable && normmap_id.notNull()); + if (combobox_matmedia->getCurrentIndex() == MATMEDIA_PBR) + { + getChildView("TexOffsetV")->setEnabled(editable && has_pbr_material); + getChildView("shinyOffsetV")->setEnabled(editable && has_pbr_material); + getChildView("bumpyOffsetV")->setEnabled(editable && has_pbr_material); + } + else + { + getChildView("TexOffsetV")->setEnabled(editable); + getChildView("shinyOffsetV")->setEnabled(editable && specmap_id.notNull()); + getChildView("bumpyOffsetV")->setEnabled(editable && normmap_id.notNull()); + } } // Texture rotation @@ -1356,10 +1385,19 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) F32 diff_rot_deg = diff_rotation * RAD_TO_DEG; F32 norm_rot_deg = norm_rotation * RAD_TO_DEG; F32 spec_rot_deg = spec_rotation * RAD_TO_DEG; - - getChildView("TexRot")->setEnabled(editable); - getChildView("shinyRot")->setEnabled(editable && specmap_id.notNull()); - getChildView("bumpyRot")->setEnabled(editable && normmap_id.notNull()); + + if (combobox_matmedia->getCurrentIndex() == MATMEDIA_PBR) + { + getChildView("TexRot")->setEnabled(editable && has_pbr_material); + getChildView("shinyRot")->setEnabled(editable && has_pbr_material); + getChildView("bumpyRot")->setEnabled(editable && has_pbr_material); + } + else + { + getChildView("TexRot")->setEnabled(editable); + getChildView("shinyRot")->setEnabled(editable && specmap_id.notNull()); + getChildView("bumpyRot")->setEnabled(editable && normmap_id.notNull()); + } getChild<LLUICtrl>("TexRot")->setTentative(diff_rot_tentative); getChild<LLUICtrl>("shinyRot")->setTentative(LLSD(norm_rot_tentative)); @@ -1376,8 +1414,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) LLSelectedTE::getGlow(glow,identical_glow); getChild<LLUICtrl>("glow")->setValue(glow); getChild<LLUICtrl>("glow")->setTentative(!identical_glow); - getChildView("glow")->setEnabled(editable && !is_pbr_material); - getChildView("glow label")->setEnabled(editable && !is_pbr_material); + getChildView("glow")->setEnabled(editable && !has_pbr_material); + getChildView("glow label")->setEnabled(editable && !has_pbr_material); } { @@ -1425,42 +1463,61 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) LLComboBox* mComboTexGen = getChild<LLComboBox>("combobox texgen"); if (mComboTexGen) - { + { S32 index = mComboTexGen ? mComboTexGen->getCurrentIndex() : 0; - BOOL enabled = editable && (index != 1); - BOOL identical_repeats = true; + bool enabled = editable && (index != 1); + bool identical_repeats = true; + S32 material_selection = combobox_matmedia->getCurrentIndex(); F32 repeats = 1.0f; - U32 material_type = (combobox_matmedia->getCurrentIndex() == MATMEDIA_MATERIAL) ? radio_mat_type->getSelectedIndex() : MATTYPE_DIFFUSE; + U32 material_type = MATTYPE_DIFFUSE; + if (material_selection == MATMEDIA_MATERIAL) + { + material_type = radio_mat_type->getSelectedIndex(); + } + else if (material_selection == MATMEDIA_PBR) + { + enabled = editable && has_pbr_material; + material_type = radio_pbr_type->getSelectedIndex(); + } LLSelectMgr::getInstance()->setTextureChannel(LLRender::eTexIndex(material_type)); - switch (material_type) - { - default: - case MATTYPE_DIFFUSE: - { - enabled = editable && !id.isNull(); - identical_repeats = identical_diff_repeats; - repeats = repeats_diff; - } - break; + switch (material_type) + { + default: + case MATTYPE_DIFFUSE: + { + if (material_selection != MATMEDIA_PBR) + { + enabled = editable && !id.isNull(); + } + identical_repeats = identical_diff_repeats; + repeats = repeats_diff; + } + break; - case MATTYPE_SPECULAR: - { - enabled = (editable && ((shiny == SHINY_TEXTURE) && !specmap_id.isNull())); - identical_repeats = identical_spec_repeats; - repeats = repeats_spec; - } - break; + case MATTYPE_SPECULAR: + { + if (material_selection != MATMEDIA_PBR) + { + enabled = (editable && ((shiny == SHINY_TEXTURE) && !specmap_id.isNull())); + } + identical_repeats = identical_spec_repeats; + repeats = repeats_spec; + } + break; - case MATTYPE_NORMAL: - { - enabled = (editable && ((bumpy == BUMPY_TEXTURE) && !normmap_id.isNull())); - identical_repeats = identical_norm_repeats; - repeats = repeats_norm; - } - break; - } + case MATTYPE_NORMAL: + { + if (material_selection != MATMEDIA_PBR) + { + enabled = (editable && ((bumpy == BUMPY_TEXTURE) && !normmap_id.isNull())); + } + identical_repeats = identical_norm_repeats; + repeats = repeats_norm; + } + break; + } BOOL repeats_tentative = !identical_repeats; @@ -1731,25 +1788,32 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata) // static void LLPanelFace::updateVisibility() -{ - LLComboBox* combo_matmedia = getChild<LLComboBox>("combobox matmedia"); - LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type"); - LLComboBox* combo_shininess = getChild<LLComboBox>("combobox shininess"); - LLComboBox* combo_bumpiness = getChild<LLComboBox>("combobox bumpiness"); - if (!radio_mat_type || !combo_matmedia || !combo_shininess || !combo_bumpiness) +{ + LLComboBox* combo_matmedia = findChild<LLComboBox>("combobox matmedia"); + LLRadioGroup* radio_mat_type = findChild<LLRadioGroup>("radio_material_type"); + LLRadioGroup* radio_pbr_type = findChild<LLRadioGroup>("radio_pbr_type"); + LLComboBox* combo_shininess = findChild<LLComboBox>("combobox shininess"); + LLComboBox* combo_bumpiness = findChild<LLComboBox>("combobox bumpiness"); + if (!radio_mat_type || !radio_pbr_type || !combo_matmedia || !combo_shininess || !combo_bumpiness) { LL_WARNS("Materials") << "Combo box not found...exiting." << LL_ENDL; return; } U32 materials_media = combo_matmedia->getCurrentIndex(); U32 material_type = radio_mat_type->getSelectedIndex(); + U32 pbr_type = radio_pbr_type->getSelectedIndex(); bool show_media = (materials_media == MATMEDIA_MEDIA) && combo_matmedia->getEnabled(); bool show_material = materials_media == MATMEDIA_MATERIAL; bool show_pbr = materials_media == MATMEDIA_PBR; bool show_texture = (show_media || (show_material && (material_type == MATTYPE_DIFFUSE) && combo_matmedia->getEnabled())); bool show_bumpiness = show_material && (material_type == MATTYPE_NORMAL) && combo_matmedia->getEnabled(); bool show_shininess = show_material && (material_type == MATTYPE_SPECULAR) && combo_matmedia->getEnabled(); - getChildView("radio_material_type")->setVisible(show_texture); + bool show_pbr_albedo = show_pbr && (pbr_type == PBRTYPE_ALBEDO) && combo_matmedia->getEnabled(); + bool show_pbr_normal = show_pbr && (pbr_type == PBRTYPE_NORMAL) && combo_matmedia->getEnabled(); + bool show_pbr_metallic = show_pbr && (pbr_type == PBRTYPE_METALLIC) && combo_matmedia->getEnabled(); + + radio_mat_type->setVisible(show_material); + radio_pbr_type->setVisible(show_pbr); // Media controls getChildView("media_info")->setVisible(show_media); @@ -1759,19 +1823,20 @@ void LLPanelFace::updateVisibility() // Diffuse texture controls getChildView("texture control")->setVisible(show_texture && show_material); - getChildView("label alphamode")->setVisible(show_texture && (show_material || show_pbr)); - getChildView("combobox alphamode")->setVisible(show_texture && (show_material || show_pbr)); + getChildView("label alphamode")->setVisible((show_texture && show_material) || show_pbr); + getChildView("combobox alphamode")->setVisible((show_texture && show_material) || show_pbr); getChildView("label maskcutoff")->setVisible(false); getChildView("maskcutoff")->setVisible(false); - if (show_texture && show_material) + if ((show_texture && show_material) || show_pbr) { updateAlphaControls(); } - getChildView("TexScaleU")->setVisible(show_texture || show_pbr); - getChildView("TexScaleV")->setVisible(show_texture || show_pbr); - getChildView("TexRot")->setVisible(show_texture || show_pbr); - getChildView("TexOffsetU")->setVisible(show_texture || show_pbr); - getChildView("TexOffsetV")->setVisible(show_texture || show_pbr); + // texture scale and position controls are shared between bpr and non-pbr textures + getChildView("TexScaleU")->setVisible(show_texture || show_pbr_albedo); + getChildView("TexScaleV")->setVisible(show_texture || show_pbr_albedo); + getChildView("TexRot")->setVisible(show_texture || show_pbr_albedo); + getChildView("TexOffsetU")->setVisible(show_texture || show_pbr_albedo); + getChildView("TexOffsetV")->setVisible(show_texture || show_pbr_albedo); // Specular map controls getChildView("shinytexture control")->setVisible(show_shininess); @@ -1787,11 +1852,11 @@ void LLPanelFace::updateVisibility() { updateShinyControls(); } - getChildView("shinyScaleU")->setVisible(show_shininess); - getChildView("shinyScaleV")->setVisible(show_shininess); - getChildView("shinyRot")->setVisible(show_shininess); - getChildView("shinyOffsetU")->setVisible(show_shininess); - getChildView("shinyOffsetV")->setVisible(show_shininess); + getChildView("shinyScaleU")->setVisible(show_shininess || show_pbr_normal); + getChildView("shinyScaleV")->setVisible(show_shininess || show_pbr_normal); + getChildView("shinyRot")->setVisible(show_shininess || show_pbr_normal); + getChildView("shinyOffsetU")->setVisible(show_shininess || show_pbr_normal); + getChildView("shinyOffsetV")->setVisible(show_shininess || show_pbr_normal); // Normal map controls if (show_bumpiness) @@ -1801,15 +1866,14 @@ void LLPanelFace::updateVisibility() getChildView("bumpytexture control")->setVisible(show_bumpiness); getChildView("combobox bumpiness")->setVisible(show_bumpiness); getChildView("label bumpiness")->setVisible(show_bumpiness); - getChildView("bumpyScaleU")->setVisible(show_bumpiness); - getChildView("bumpyScaleV")->setVisible(show_bumpiness); - getChildView("bumpyRot")->setVisible(show_bumpiness); - getChildView("bumpyOffsetU")->setVisible(show_bumpiness); - getChildView("bumpyOffsetV")->setVisible(show_bumpiness); + getChildView("bumpyScaleU")->setVisible(show_bumpiness || show_pbr_metallic); + getChildView("bumpyScaleV")->setVisible(show_bumpiness || show_pbr_metallic); + getChildView("bumpyRot")->setVisible(show_bumpiness || show_pbr_metallic); + getChildView("bumpyOffsetU")->setVisible(show_bumpiness || show_pbr_metallic); + getChildView("bumpyOffsetV")->setVisible(show_bumpiness || show_pbr_metallic); // PBR controls getChildView("pbr_control")->setVisible(show_pbr); - getChildView("radio_pbr_type")->setVisible(show_pbr); } // static 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 0a05a4f868..eda28c5a4b 100644 --- a/indra/newview/skins/default/xui/en/floater_material_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_material_editor.xml @@ -1,355 +1,378 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - can_resize="false" + can_resize="true" default_tab_group="1" height="887" + width="256" + min_height="500" + min_width="256" layout="topleft" name="material editor" help_topic="material_editor" - title="[MATERIAL_NAME]" - width="256"> + title="[MATERIAL_NAME]"> <string name="no_upload_fee_string">no upload fee</string> <string name="upload_fee_string">L$[FEE] 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" - width="246" - height="196" - layout="topleft" - left="5" - mouse_opaque="false" - name="albedo_texture_pnl" - top_pad="5" - > - <text - type="string" - font.style="BOLD" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="10" - top="5" - width="64"> - Albedo: - </text> - <texture_picker - can_apply_immediately="true" - default_image_name="Default" - fallback_image="materials_ui_x_24.png" - allow_no_texture="true" + + <scroll_container + name="materials_scroll" + top="14" + left="4" + height="768" + width="247" + follows="all" + layout="topleft" + color="DkGray2" + opaque="true" + reserve_scroll_corner="false" + > + <panel + border="false" + name="scroll_panel" + top="0" + left="0" + height="768" + width="247" + > + <check_box + follows="left|top" + label="Double Sided" + left="10" + top="0" + name="double sided" + height="25" + width="120" /> + <panel + border="true" follows="left|top" - top_pad="8" - height="151" + width="246" + height="196" layout="topleft" - left="10" - 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" + left="1" + mouse_opaque="false" + name="albedo_texture_pnl" + top_pad="5" + > + <text + type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + layout="topleft" + left="10" + top="5" + width="64"> + Albedo: + </text> + <texture_picker + can_apply_immediately="true" + 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" + 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" - follows="left|top" - height="10" - layout="topleft" - left_pad="5" - top="8" + No upload fee + </text> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + top="8" > - Tint - </text> - <color_swatch - can_apply_immediately="true" - follows="left|top" - height="40" - label_height="0" - layout="topleft" - left_delta="0" - top_pad="5" - name="albedo color" - width="40" /> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_delta="0" - top_pad="5" - width="96" + Tint + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="40" + label_height="0" + layout="topleft" + left_delta="0" + top_pad="5" + name="albedo color" + width="40" /> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_delta="0" + top_pad="5" + width="96" > - Transparency - </text> - <spinner - decimal_digits="3" - follows="left|top" - height="19" - increment="0.01" - initial_value="1" - layout="topleft" - left_delta="0" - top_pad="5" - min_val="0" - max_val="1" - name="transparency" - width="64" + Transparency + </text> + <spinner + decimal_digits="3" + follows="left|top" + height="19" + increment="0.01" + initial_value="1" + layout="topleft" + left_delta="0" + top_pad="5" + min_val="0" + max_val="1" + name="transparency" + width="64" /> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_delta="0" - name="label alphamode" - text_readonly_color="LabelDisabledColor" - top_pad="5" - width="90"> - Alpha mode - </text> - <combo_box - height="23" - layout="topleft" - left_delta="0" - name="alpha mode" - top_pad="4" - width="96"> - <combo_box.item - label="None" - name="None" - value="OPAQUE" /> - <combo_box.item - label="Alpha blending" - name="Alpha blending" - value="BLEND" /> - <combo_box.item - label="Alpha masking" - name="Alpha masking" - value="MASK" /> - </combo_box> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_delta="0" - top_pad="5" - width="96" + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_delta="0" + name="label alphamode" + text_readonly_color="LabelDisabledColor" + top_pad="5" + width="90"> + Alpha mode + </text> + <combo_box + height="23" + layout="topleft" + left_delta="0" + name="alpha mode" + top_pad="4" + width="96"> + <combo_box.item + label="None" + name="None" + value="OPAQUE" /> + <combo_box.item + label="Alpha blending" + name="Alpha blending" + value="BLEND" /> + <combo_box.item + label="Alpha masking" + name="Alpha masking" + value="MASK" /> + </combo_box> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_delta="0" + top_pad="5" + width="96" > - Alpha Cutoff - </text> - <spinner - decimal_digits="3" - follows="left|top" - height="19" - increment="0.01" - initial_value="1" - layout="topleft" - left_delta="0" - top_pad="5" - min_val="0" - max_val="1" - name="alpha cutoff" - width="64" + Alpha Cutoff + </text> + <spinner + decimal_digits="3" + follows="left|top" + height="19" + increment="0.01" + initial_value="1" + layout="topleft" + left_delta="0" + top_pad="5" + min_val="0" + max_val="1" + name="alpha cutoff" + width="64" /> - </panel> - <panel - border="true" - follows="left|top" - width="246" - height="175" - layout="topleft" - left="5" - mouse_opaque="false" - name="metallic_texture_pnl" - top_pad="5" - > - <text - type="string" - font.style="BOLD" - length="1" + </panel> + <panel + border="true" follows="left|top" - height="10" + width="246" + height="175" layout="topleft" - left="10" - top="5" + left="1" + mouse_opaque="false" + name="metallic_texture_pnl" + top_pad="5" + > + <text + type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + layout="topleft" + left="10" + top="5" > - Metallic-Roughness: - </text> - <texture_picker - can_apply_immediately="true" - 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" - tool_tip="GLTF metallic-roughness map with optional occlusion. Red channel is occlusion, green channel is roughness, blue channel is metalness." - top_pad="8" + Metallic-Roughness: + </text> + <texture_picker + can_apply_immediately="true" + 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" + 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" + <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="8" + No upload fee + </text> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + top="8" > - Metallic Factor - </text> - <spinner - decimal_digits="3" - follows="left|top" - height="19" - increment="0.01" - initial_value="0" - layout="topleft" - left_delta="0" - top_pad="5" - min_val="0" - max_val="1" - name="metalness factor" - width="64" + Metallic Factor + </text> + <spinner + decimal_digits="3" + follows="left|top" + height="19" + increment="0.01" + initial_value="0" + layout="topleft" + left_delta="0" + top_pad="5" + min_val="0" + max_val="1" + name="metalness factor" + width="64" /> - <text - type="string" - length="1" + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_delta="0" + top_pad="5" + width="96" + > + Roughness Factor + </text> + <spinner + decimal_digits="3" + follows="left|top" + height="19" + increment="0.01" + initial_value="0" + layout="topleft" + left_delta="0" + top_pad="5" + min_val="0" + max_val="1" + name="roughness factor" + width="64" + /> + </panel> + <panel + border="true" follows="left|top" - height="10" + width="246" + height="175" layout="topleft" - left_delta="0" + left="1" + mouse_opaque="false" + name="emissive_texture_pnl" top_pad="5" - width="96" - > - Roughness Factor - </text> - <spinner - decimal_digits="3" - follows="left|top" - height="19" - increment="0.01" - initial_value="0" - layout="topleft" - left_delta="0" - top_pad="5" - min_val="0" - max_val="1" - name="roughness factor" - width="64" - /> - </panel> - <panel - border="true" - follows="left|top" - width="246" - height="175" - layout="topleft" - left="5" - mouse_opaque="false" - name="emissive_texture_pnl" - top_pad="5" > - <text - type="string" - font.style="BOLD" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="10" - top="5" - width="64"> - Emissive: - </text> - <texture_picker - can_apply_immediately="true" - 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" - 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" + <text + type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + layout="topleft" + left="10" + top="5" + width="64"> + Emissive: + </text> + <texture_picker + can_apply_immediately="true" + 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" + 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="8" + No upload fee + </text> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + top="8" > - Tint - </text> - <color_swatch - can_apply_immediately="true" - follows="left|top" - height="40" - label_height="0" - layout="topleft" - left_delta="0" - top_pad="5" - name="emissive color" - width="40" /> - <!--<text + Tint + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="40" + label_height="0" + layout="topleft" + left_delta="0" + top_pad="5" + name="emissive color" + width="40" /> + <!--<text type="string" length="1" follows="left|top" @@ -373,64 +396,66 @@ max_val="100" width="64" />--> - </panel> - <panel - border="true" - follows="left|top" - width="246" - height="175" - layout="topleft" - left="5" - mouse_opaque="false" - top_pad="5" - name="normal_texture_pnl" + </panel> + <panel + border="true" + follows="left|top" + width="246" + height="175" + layout="topleft" + left="1" + mouse_opaque="false" + top_pad="5" + name="normal_texture_pnl" > - <text - type="string" - font.style="BOLD" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="10" - top="5" - width="64"> - Normal: - </text> - <texture_picker - can_apply_immediately="true" - 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" - 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="normal_upload_fee" + <text + type="string" + font.style="BOLD" + length="1" + follows="left|top" + height="10" + layout="topleft" + left="10" + top="5" + width="64"> + Normal: + </text> + <texture_picker + can_apply_immediately="true" + 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" + 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="normal_upload_fee" > - No upload fee - </text> - </panel> + No upload fee + </text> + </panel> + </panel> + </scroll_container> <panel follows="right|bottom" width="246" height="97" layout="bottomright" - top_delta="-2" + top_pad="0" left="5" name="button_panel" > 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 922c58fa94..54a00da294 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -153,7 +153,6 @@ value="Media" /> </combo_box> <radio_group - control_name="ComboMaterialType" height="50" layout="topleft" left_pad="5" @@ -184,7 +183,6 @@ value="2"/> </radio_group> <radio_group - control_name="ComboMaterialType" height="50" layout="topleft" left_delta="0" |