diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llpanelface.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/llpanelface.h | 4 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_tools_texture.xml | 16 | 
3 files changed, 25 insertions, 10 deletions
| diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 790c693a3d..21651899db 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1102,7 +1102,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)  		getChildView("checkbox_sync_settings")->setEnabled(editable);  		childSetValue("checkbox_sync_settings", gSavedSettings.getBOOL("SyncMaterialSettings")); -		updateVisibility(); +		updateVisibility(objectp);  		// Color swatch  		{ @@ -1899,7 +1899,6 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,      const bool inventory_pending = objectp->isInventoryPending();      getChildView("pbr_from_inventory")->setEnabled(settable); -    // TODO: Put message on these two buttons when material permissions are still loading      getChildView("edit_selected_pbr")->setEnabled(editable && !inventory_pending && !has_faces_without_pbr);      getChildView("save_selected_pbr")->setEnabled(saveable && !inventory_pending && identical_pbr);      if (inventory_pending) @@ -1938,9 +1937,10 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,      }  } -void LLPanelFace::updateVisibilityGLTF() +void LLPanelFace::updateVisibilityGLTF(LLViewerObject* objectp /*= nullptr */)  {      const bool show_pbr = mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR && mComboMatMedia->getEnabled(); +    const bool inventory_pending = objectp && objectp->isInventoryPending();      LLRadioGroup* radio_pbr_type = findChild<LLRadioGroup>("radio_pbr_type");      radio_pbr_type->setVisible(show_pbr); @@ -1951,8 +1951,9 @@ void LLPanelFace::updateVisibilityGLTF()      getChildView("pbr_control")->setVisible(show_pbr_render_material_id);      getChildView("pbr_from_inventory")->setVisible(show_pbr_render_material_id); -    getChildView("edit_selected_pbr")->setVisible(show_pbr_render_material_id); -    getChildView("save_selected_pbr")->setVisible(show_pbr_render_material_id); +    getChildView("edit_selected_pbr")->setVisible(show_pbr_render_material_id && !inventory_pending); +    getChildView("save_selected_pbr")->setVisible(show_pbr_render_material_id && !inventory_pending); +    getChildView("material_permissions_loading_label")->setVisible(show_pbr_render_material_id && inventory_pending);      getChildView("gltfTextureScaleU")->setVisible(show_pbr);      getChildView("gltfTextureScaleV")->setVisible(show_pbr); @@ -2793,7 +2794,7 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)  	self->refreshMedia();  } -void LLPanelFace::updateVisibility() +void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)  {      LLRadioGroup* radio_mat_type = findChild<LLRadioGroup>("radio_material_type");      LLRadioGroup* radio_pbr_type = findChild<LLRadioGroup>("radio_pbr_type"); @@ -2884,7 +2885,7 @@ void LLPanelFace::updateVisibility()      getChild<LLSpinCtrl>("rptctrl")->setVisible(show_material || show_media);      // PBR controls -    updateVisibilityGLTF(); +    updateVisibilityGLTF(objectp);  }  // static diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index d737665ad0..d07be2e4b4 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -296,7 +296,7 @@ private:  	//  	// Do NOT call updateUI from within this function.  	// -	void updateVisibility(); +	void updateVisibility(LLViewerObject* objectp = nullptr);  	// Hey look everyone, a type-safe alternative to copy and paste! :)  	// @@ -457,7 +457,7 @@ private:      void onPbrSelectionChanged(LLInventoryItem* itemp);      void updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material, bool& has_faces_without_pbr, bool force_set_values); -    void updateVisibilityGLTF(); +    void updateVisibilityGLTF(LLViewerObject* objectp = nullptr);      void updateSelectedGLTFMaterials(std::function<void(LLGLTFMaterial*)> func);      void updateGLTFTextureTransform(float value, U32 pbr_type, std::function<void(LLGLTFMaterial::TextureTransform*)> edit); 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 51e6099ceb..5b15752eb7 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -284,12 +284,26 @@               name="pbr_from_inventory"               label="Choose from inventory"               width="140"/> +            <text +             visible="false" +             type="string" +             length="1" +             follows="left|top" +             height="10" +             layout="topleft" +             top_pad="4" +             left_delta="0" +             name="material_permissions_loading_label" +             text_readonly_color="LabelDisabledColor" +             width="160"> +                Loading contents... +            </text>              <button               follows="left|top"               height="23"               layout="topleft"               left_delta="0" -             top_pad="4" +             top_delta="0"               name="edit_selected_pbr"               label="Edit Selected"               width="140"/> | 
