From 62aa0e807f9eb1eeb2db0296fc942bab2faa0e13 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 16 Nov 2022 12:04:16 -0800 Subject: SL-18632: Un-hide planar align options when editing GLTF textures in build floater --- indra/newview/llpanelface.cpp | 10 ++++++---- indra/newview/skins/default/xui/en/panel_tools_texture.xml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index f43a5d7dbe..d620704019 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1003,6 +1003,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) radio_pbr_type->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID); } radio_pbr_type->setEnabled(editable); + const bool pbr_selected = mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR; + const bool texture_info_selected = pbr_selected && radio_pbr_type->getSelectedIndex() != PBRTYPE_RENDER_MATERIAL_ID; getChildView("checkbox_sync_settings")->setEnabled(editable); childSetValue("checkbox_sync_settings", gSavedSettings.getBOOL("SyncMaterialSettings")); @@ -1251,9 +1253,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) LLCheckBoxCtrl* cb_planar_align = getChild("checkbox planar align"); align_planar = (cb_planar_align && cb_planar_align->get()); - bool enabled = (editable && isIdenticalPlanarTexgen()); + bool enabled = (editable && isIdenticalPlanarTexgen() && (!pbr_selected || texture_info_selected)); childSetValue("checkbox planar align", align_planar && enabled); - childSetVisible("checkbox planar align", enabled); + childSetVisible("checkbox planar align", enabled); childSetEnabled("checkbox planar align", enabled); childSetEnabled("button align textures", enabled && LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1); @@ -2737,8 +2739,8 @@ void LLPanelFace::updateVisibility() // Shared material controls getChildView("checkbox_sync_settings")->setVisible(show_material || show_media || show_texture_info); - getChildView("tex gen")->setVisible(show_material || show_media); - getChildView("combobox texgen")->setVisible(show_material || show_media); + getChildView("tex gen")->setVisible(show_material || show_media || show_texture_info); + getChildView("combobox texgen")->setVisible(show_material || show_media || show_texture_info); getChildView("button align textures")->setVisible(show_material || show_media); // Media controls 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 06e2a6e98e..ba5a20dd22 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -963,7 +963,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="16" + top_delta="43" width="260" />