diff options
| -rw-r--r-- | indra/newview/llpanelface.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llpanelface.h | 1 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_tools_texture.xml | 14 | 
3 files changed, 29 insertions, 2 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 71657239a6..c34010ce43 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -157,6 +157,7 @@ BOOL	LLPanelFace::postBuild()  	childSetAction("button align",&LLPanelFace::onClickAutoFix,this);  	childSetAction("button align textures", &LLPanelFace::onAlignTexture, this); +	childSetAction("button save material", &LLPanelFace::onSaveMaterial, this);  	LLTextureCtrl*	mTextureCtrl;  	LLTextureCtrl*	mShinyTextureCtrl; @@ -1409,7 +1410,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)  			LLMaterialPtr material;  			LLSelectedTEMaterial::getCurrent(material, identical); -			if (material && editable) +            // QUICKHACK - enable this UI box, indiscriminatly.  TODO discriminate DJH 2022-04 +            childSetEnabled("button save material", true); +             +            if (material && editable)  			{  				LL_DEBUGS("Materials") << material->asLLSD() << LL_ENDL; @@ -2538,6 +2542,16 @@ void LLPanelFace::onAlignTexture(void* userdata)      self->alignTestureLayer();  } +void LLPanelFace::onSaveMaterial(void* userdata) +{ +    LLPanelFace* self = (LLPanelFace*)userdata; +     +    // DRTVWR-559, Q&D material picker - save to inventory goes here +    auto bound = self->getBoundingRect(); +    self->setUseBoundingRect(self->getUseBoundingRect()); +    //self->saveMaterialToInventory(); +} +  // TODO: I don't know who put these in or what these are for???  void LLPanelFace::setMediaURL(const std::string& url) diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 2d57d89a44..183e5736ca 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -204,6 +204,7 @@ protected:  	static void		onCommitRepeatsPerMeter(	LLUICtrl* ctrl, void* userinfo);  	static void		onClickAutoFix(void*);      static void		onAlignTexture(void*); +    static void		onSaveMaterial(void*);  	static F32     valueGlow(LLViewerObject* object, S32 face); 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 90f32ae452..9aaac7ac85 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -793,4 +793,16 @@               height="4"               start_url="about:blank"               decouple_texture_size="true" /> -	   </panel> +      <button +       left="90" +       top="222" +       height="20" +       label="Save as Material" +       label_selected="Save current face as a Material" +       layout="topleft" +       name="button save material" +       top_delta="0" +       tool_tip="Save material to inventory" +       width="110" /> + +</panel>  | 
