diff options
Diffstat (limited to 'indra/newview/llpanelface.h')
-rw-r--r-- | indra/newview/llpanelface.h | 66 |
1 files changed, 57 insertions, 9 deletions
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 2d57d89a44..cc46116545 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -47,6 +47,8 @@ class LLUICtrl; class LLViewerObject; class LLFloater; class LLMaterialID; +class LLMediaCtrl; +class LLMenuButton; // Represents an edit for use in replicating the op across one or more materials in the selection set. // @@ -97,8 +99,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 +118,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 @@ -125,9 +135,15 @@ protected: void sendShiny(U32 shininess); // applies and sends shininess void sendFullbright(); // applies and sends full bright void sendGlow(); - void sendMedia(); void alignTestureLayer(); + void updateCopyTexButton(); + + void onCommitPbr(const LLSD& data); + void onCancelPbr(const LLSD& data); + void onSelectPbr(const LLSD& data); + static BOOL onDragPbr(LLUICtrl* ctrl, LLInventoryItem* item); + // this function is to return TRUE if the drag should succeed. static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item); @@ -150,6 +166,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) // @@ -191,9 +210,14 @@ protected: static void onCommitMaterialGloss( LLUICtrl* ctrl, void* userdata); static void onCommitMaterialEnv( LLUICtrl* ctrl, void* userdata); static void onCommitMaterialMaskCutoff( LLUICtrl* ctrl, void* userdata); + static void onCommitMaterialID( LLUICtrl* ctrl, void* userdata); static void onCommitMaterialsMedia( LLUICtrl* ctrl, void* userdata); static void onCommitMaterialType( LLUICtrl* ctrl, void* userdata); + static void onCommitPbrType(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); @@ -205,6 +229,18 @@ 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(); // to specific face + void onPasteColor(LLViewerObject* objectp, S32 te); // to specific face + void onCopyTexture(); + void onPasteTexture(); + void onPasteTexture(LLViewerObject* objectp, S32 te); + +protected: + void menuDoToSelected(const LLSD& userdata); + bool menuEnableItem(const LLSD& userdata); + static F32 valueGlow(LLViewerObject* object, S32 face); @@ -234,6 +270,10 @@ private: F32 getCurrentShinyOffsetU(); F32 getCurrentShinyOffsetV(); + LLComboBox *mComboMatMedia; + LLMediaCtrl *mTitleMedia; + LLTextBox *mTitleMediaText; + // Update visibility of controls to match current UI mode // (e.g. materials vs media editing) // @@ -241,10 +281,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! :) // @@ -400,7 +436,12 @@ 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); + void onPbrSelectionChanged(LLInventoryItem* itemp); + void onPbrStartEditing(); + + LLMenuButton* mMenuClipboardColor; + LLMenuButton* mMenuClipboardTexture; bool mIsAlpha; @@ -415,7 +456,12 @@ private: * up-arrow on a spinner, and avoids running afoul of its throttle. */ bool mUpdateInFlight; - bool mUpdatePending; + bool mUpdatePending; + + LLSD mClipboardParams; + + LLSD mMediaSettings; + bool mNeedMediaTitle; public: #if defined(DEF_GET_MAT_STATE) @@ -497,6 +543,7 @@ 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(LLUUID, const LLUUID&, setMaterialID); }; class LLSelectedTE @@ -506,6 +553,7 @@ public: static void getFace(class LLFace*& face_to_return, bool& identical_face); static void getImageFormat(LLGLenum& image_format_to_return, bool& identical_face); static void getTexId(LLUUID& id, bool& identical); + static void getPbrMaterialId(LLUUID& id, bool& identical); static void getObjectScaleS(F32& scale_s, bool& identical); static void getObjectScaleT(F32& scale_t, bool& identical); static void getMaxDiffuseRepeats(F32& repeats, bool& identical); |