From 1e1707d532560583744bb877adfed11864f2db31 Mon Sep 17 00:00:00 2001 From: Kadah_Coba Date: Mon, 14 Oct 2019 20:35:44 -0700 Subject: [Project Copy/Paste] Texture support --- indra/newview/llpanelface.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 0b40d7d41a..064262a312 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -47,6 +47,7 @@ class LLUICtrl; class LLViewerObject; class LLFloater; class LLMaterialID; +class LLMenuButton; // Represents an edit for use in replicating the op across one or more materials in the selection set. // @@ -113,6 +114,8 @@ public: LLRender::eTexIndex getTextureChannelToEdit(); + void pasteFace(LLViewerObject* object, S32 te); + protected: void getState(); @@ -203,9 +206,13 @@ protected: static void onCommitRepeatsPerMeter( LLUICtrl* ctrl, void* userinfo); static void onClickAutoFix(void*); - static F32 valueGlow(LLViewerObject* object, S32 face); + void onCopyFaces(); + void onPasteFaces(); + bool pasteCheckMenuItem(const LLSD& userdata); + void pasteDoMenuItem(const LLSD& userdata); + bool pasteEnabletMenuItem(const LLSD& userdata); - + static F32 valueGlow(LLViewerObject* object, S32 face); private: @@ -232,6 +239,20 @@ private: F32 getCurrentShinyOffsetU(); F32 getCurrentShinyOffsetV(); + LLButton *mBtnCopyFaces; + LLButton *mBtnPasteFaces; + LLMenuButton *mBtnPasteMenu; + + LLSD mClipboard; + BOOL mPasteColor; + BOOL mPasteAlpha; + BOOL mPasteGlow; + BOOL mPasteDiffuse; + BOOL mPasteNormal; + BOOL mPasteSpecular; + BOOL mPasteMapping; + BOOL mPasteMedia; + // Update visibility of controls to match current UI mode // (e.g. materials vs media editing) // @@ -495,6 +516,8 @@ public: DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setNormalID); DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setSpecularID); DEF_EDIT_MAT_STATE(LLColor4U, const LLColor4U&,setSpecularLightColor); + + DEF_EDIT_MAT_STATE(LLSD, const LLSD&, fromLLSD); }; class LLSelectedTE -- cgit v1.2.3 From c34f9c28b08a3dba50b831cde9a884f831366bee Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 19 Feb 2020 17:15:20 +0200 Subject: SL-12473 FIXED Copied texture params get duplicated when pasting to objects that use different face counts. --- indra/newview/llpanelface.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 76673c6444..770f10e2ee 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -255,6 +255,8 @@ private: BOOL mPasteMapping; BOOL mPasteMedia; + BOOL mPopulateAllTEs; + // Update visibility of controls to match current UI mode // (e.g. materials vs media editing) // -- cgit v1.2.3 From 090bb3e6de6d5cb70ed372748a76e391f61cb32e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 2 Jun 2020 15:27:34 +0300 Subject: SL-13359 #1 Revert floater_tools and object panel changes --- indra/newview/llpanelface.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 770f10e2ee..dbf3531332 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -115,6 +115,13 @@ public: LLRender::eTexIndex getTextureChannelToEdit(); void pasteFace(LLViewerObject* object, S32 te); + static bool isLibraryTexture(LLUUID image_id); + + // Finds copy-enabled texture with specified asset from inventory + // This can be performance unfriendly and doesn't warranty that + // the texture is original source of asset + static LLUUID getCopyPermInventoryTextureId(LLUUID image_id); + static bool canCopyTexture(LLUUID image_id); protected: void getState(); -- cgit v1.2.3 From 1310fac3b10b3927cb502008c156c16631b97663 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 17 Jun 2020 23:38:55 +0300 Subject: SL-13359 #5 Implemented revised changes --- indra/newview/llpanelface.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index dbf3531332..770f10e2ee 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -115,13 +115,6 @@ public: LLRender::eTexIndex getTextureChannelToEdit(); void pasteFace(LLViewerObject* object, S32 te); - static bool isLibraryTexture(LLUUID image_id); - - // Finds copy-enabled texture with specified asset from inventory - // This can be performance unfriendly and doesn't warranty that - // the texture is original source of asset - static LLUUID getCopyPermInventoryTextureId(LLUUID image_id); - static bool canCopyTexture(LLUUID image_id); protected: void getState(); -- cgit v1.2.3 From 15f02e2da231827a7cac18a2444c212efc8c1d1c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 19 Jun 2020 17:34:57 +0300 Subject: SL-13359 #8 Reverted changes to texture tab This reverts commit 1e1707d532560583744bb877adfed11864f2db31. --- indra/newview/llpanelface.h | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 770f10e2ee..2d57d89a44 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -47,7 +47,6 @@ class LLUICtrl; class LLViewerObject; class LLFloater; class LLMaterialID; -class LLMenuButton; // Represents an edit for use in replicating the op across one or more materials in the selection set. // @@ -114,8 +113,6 @@ public: LLRender::eTexIndex getTextureChannelToEdit(); - void pasteFace(LLViewerObject* object, S32 te); - protected: void getState(); @@ -208,14 +205,10 @@ protected: static void onClickAutoFix(void*); static void onAlignTexture(void*); - void onCopyFaces(); - void onPasteFaces(); - bool pasteCheckMenuItem(const LLSD& userdata); - void pasteDoMenuItem(const LLSD& userdata); - bool pasteEnabletMenuItem(const LLSD& userdata); - static F32 valueGlow(LLViewerObject* object, S32 face); + + private: bool isAlpha() { return mIsAlpha; } @@ -241,22 +234,6 @@ private: F32 getCurrentShinyOffsetU(); F32 getCurrentShinyOffsetV(); - LLButton *mBtnCopyFaces; - LLButton *mBtnPasteFaces; - LLMenuButton *mBtnPasteMenu; - - LLSD mClipboard; - BOOL mPasteColor; - BOOL mPasteAlpha; - BOOL mPasteGlow; - BOOL mPasteDiffuse; - BOOL mPasteNormal; - BOOL mPasteSpecular; - BOOL mPasteMapping; - BOOL mPasteMedia; - - BOOL mPopulateAllTEs; - // Update visibility of controls to match current UI mode // (e.g. materials vs media editing) // @@ -520,8 +497,6 @@ public: DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setNormalID); DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setSpecularID); DEF_EDIT_MAT_STATE(LLColor4U, const LLColor4U&,setSpecularLightColor); - - DEF_EDIT_MAT_STATE(LLSD, const LLSD&, fromLLSD); }; class LLSelectedTE -- cgit v1.2.3 From 052e1adcd052e5e9a9fc29612daf6ec5d568f895 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 19 Jun 2020 22:18:31 +0300 Subject: SL-13359 #9 Texture tab --- indra/newview/llpanelface.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 2d57d89a44..5c1fb7f64d 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -47,6 +47,7 @@ class LLUICtrl; class LLViewerObject; class LLFloater; class LLMaterialID; +class LLMenuButton; // Represents an edit for use in replicating the op across one or more materials in the selection set. // @@ -205,6 +206,16 @@ protected: static void onClickAutoFix(void*); static void onAlignTexture(void*); +public: // needs to be accessible to selection manager + void onCopyColor(); // records all selected faces + void onPasteColor(LLViewerObject* objectp, S32 te); // to specific face + void onCopyTexture(); + void onPasteTexture(LLViewerObject* objectp, S32 te); + +protected: + void menuDoToSelected(const LLSD& userdata); + bool menuEnableItem(const LLSD& userdata); + static F32 valueGlow(LLViewerObject* object, S32 face); @@ -400,7 +411,10 @@ private: * If agent selects texture which is not allowed to be applied for the currently selected object, * all controls of the floater texture picker which allow to apply the texture will be disabled. */ - void onTextureSelectionChanged(LLInventoryItem* itemp); + void onTextureSelectionChanged(LLInventoryItem* itemp); + + LLMenuButton* mMenuClipboardColor; + LLMenuButton* mMenuClipboardTexture; bool mIsAlpha; @@ -415,7 +429,9 @@ private: * up-arrow on a spinner, and avoids running afoul of its throttle. */ bool mUpdateInFlight; - bool mUpdatePending; + bool mUpdatePending; + + LLSD mClipboardParams; public: #if defined(DEF_GET_MAT_STATE) -- cgit v1.2.3 From 23f20c207d1e69c03e2ce2cb9100ad216ac60708 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 23 Jun 2020 22:02:33 +0300 Subject: SL-12688 Warnings part #1 --- indra/newview/llpanelface.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 5c1fb7f64d..948d33c2c1 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -208,8 +208,10 @@ protected: public: // needs to be accessible to selection manager void onCopyColor(); // records all selected faces + void onPasteColor(); // to specific face void onPasteColor(LLViewerObject* objectp, S32 te); // to specific face void onCopyTexture(); + void onPasteTexture(); void onPasteTexture(LLViewerObject* objectp, S32 te); protected: -- cgit v1.2.3 From 8ea7867528cf2c03f2fc60a361663af2a4084bfb Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 17 Jan 2022 20:45:46 +0200 Subject: SL-16344 #3 Moved LLPanelFace related code into LLPanelFace --- indra/newview/llpanelface.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 2d57d89a44..c1ef42317a 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -47,6 +47,7 @@ class LLUICtrl; class LLViewerObject; class LLFloater; class LLMaterialID; +class LLMediaCtrl; // Represents an edit for use in replicating the op across one or more materials in the selection set. // @@ -97,8 +98,10 @@ public: virtual ~LLPanelFace(); void refresh(); - void setMediaURL(const std::string& url); - void setMediaType(const std::string& mime_type); + void refreshMedia(); + void unloadMedia(); + + /*virtual*/ void draw(); LLMaterialPtr createDefaultMaterial(LLMaterialPtr current_material) { @@ -114,6 +117,12 @@ public: LLRender::eTexIndex getTextureChannelToEdit(); protected: + void navigateToTitleMedia(const std::string url); + bool selectedMediaEditable(); + void clearMediaSettings(); + void updateMediaSettings(); + void updateMediaTitle(); + void getState(); void sendTexture(); // applies and sends texture @@ -140,6 +149,9 @@ protected: void onCommitNormalTexture(const LLSD& data); void onCancelNormalTexture(const LLSD& data); void onSelectNormalTexture(const LLSD& data); + void onClickBtnEditMedia(); + void onClickBtnDeleteMedia(); + void onClickBtnAddMedia(); void onCommitColor(const LLSD& data); void onCommitShinyColor(const LLSD& data); void onCommitAlpha(const LLSD& data); @@ -150,6 +162,9 @@ protected: void onCloseTexturePicker(const LLSD& data); + static bool deleteMediaConfirm(const LLSD& notification, const LLSD& response); + static bool multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response); + // Make UI reflect state of currently selected material (refresh) // and UI mode (e.g. editing normal map v diffuse map) // @@ -234,6 +249,9 @@ private: F32 getCurrentShinyOffsetU(); F32 getCurrentShinyOffsetV(); + LLMediaCtrl *mTitleMedia; + LLTextBox *mTitleMediaText; + // Update visibility of controls to match current UI mode // (e.g. materials vs media editing) // @@ -417,6 +435,9 @@ private: bool mUpdateInFlight; bool mUpdatePending; + LLSD mMediaSettings; + bool mNeedMediaTitle; + public: #if defined(DEF_GET_MAT_STATE) #undef DEF_GET_MAT_STATE -- cgit v1.2.3 From 2b47ed1eebea7c9caefac384c7ce56d446e5478a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 17 Jan 2022 23:44:07 +0200 Subject: SL-16344 #4 Only load 'title' media if it is needed Mostly for the sake of MAC. setVolume(0) doesn't work on MAC which resulted in invisible media playing in background when editor was open. --- indra/newview/llpanelface.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index c1ef42317a..35ac2d161d 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -249,6 +249,7 @@ private: F32 getCurrentShinyOffsetU(); F32 getCurrentShinyOffsetV(); + LLComboBox *mComboMatMedia; LLMediaCtrl *mTitleMedia; LLTextBox *mTitleMediaText; -- cgit v1.2.3 From 05693d480fdbfcda44f8670c8970338a4b66fc45 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 18 Jan 2022 19:44:09 +0200 Subject: SL-16344 #5 Cleanup --- indra/newview/llpanelface.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 35ac2d161d..0e3ee0ac63 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -260,10 +260,6 @@ private: // void updateVisibility(); - // Make material(s) reflect current state of UI (apply edit) - // - void updateMaterial(); - // Hey look everyone, a type-safe alternative to copy and paste! :) // -- cgit v1.2.3 From bb71cbed04bdda9092abfc0418986be6e504ef5c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 1 Feb 2022 23:51:51 +0200 Subject: SL-16344 #6 Fixed 'choose media' button not working in some cases --- indra/newview/llpanelface.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 0e3ee0ac63..58c66bfdac 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -149,9 +149,6 @@ protected: void onCommitNormalTexture(const LLSD& data); void onCancelNormalTexture(const LLSD& data); void onSelectNormalTexture(const LLSD& data); - void onClickBtnEditMedia(); - void onClickBtnDeleteMedia(); - void onClickBtnAddMedia(); void onCommitColor(const LLSD& data); void onCommitShinyColor(const LLSD& data); void onCommitAlpha(const LLSD& data); @@ -209,6 +206,9 @@ protected: static void onCommitMaterialsMedia( LLUICtrl* ctrl, void* userdata); static void onCommitMaterialType( LLUICtrl* ctrl, void* userdata); + static void onClickBtnEditMedia(LLUICtrl* ctrl, void* userdata); + static void onClickBtnDeleteMedia(LLUICtrl* ctrl, void* userdata); + static void onClickBtnAddMedia(LLUICtrl* ctrl, void* userdata); static void onCommitBump( LLUICtrl* ctrl, void* userdata); static void onCommitTexGen( LLUICtrl* ctrl, void* userdata); static void onCommitShiny( LLUICtrl* ctrl, void* userdata); -- cgit v1.2.3 From 2445525cc573024f8eb64cabac1e6e3dc3362085 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 19 Apr 2022 02:33:59 +0300 Subject: SL-17231 Copying textures should be disabled if object content was not yet updated --- indra/newview/llpanelface.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 948d33c2c1..e3b925c1d4 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -97,6 +97,8 @@ public: LLPanelFace(); virtual ~LLPanelFace(); + void draw(); + void refresh(); void setMediaURL(const std::string& url); void setMediaType(const std::string& mime_type); @@ -129,6 +131,8 @@ protected: void sendMedia(); void alignTestureLayer(); + void updateCopyTexButton(); + // this function is to return TRUE if the drag should succeed. static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item); -- cgit v1.2.3 From 51efcfea259ef425c42895e0b6b5d77c2371fdf3 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 4 Aug 2022 01:51:07 +0300 Subject: DRTVWR-544 Post-merge build fix --- indra/newview/llpanelface.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llpanelface.h') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 688bdc7278..44bc442bbb 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -98,8 +98,6 @@ public: LLPanelFace(); virtual ~LLPanelFace(); - void draw(); - void refresh(); void refreshMedia(); void unloadMedia(); -- cgit v1.2.3