diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 73f7670c7b..4588806a80 100755 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -301,6 +301,8 @@ BOOL LLPanelObject::postBuild() mCtrlSculptTexture->setOnCancelCallback( boost::bind(&LLPanelObject::onCancelSculpt, this, _2 )); mCtrlSculptTexture->setOnSelectCallback( boost::bind(&LLPanelObject::onSelectSculpt, this, _2 )); mCtrlSculptTexture->setDropCallback( boost::bind(&LLPanelObject::onDropSculpt, this, _2 )); + // FIRE-10125: Textures can be dragged into sculpt texture picker for meshes + mCtrlSculptTexture->setDragCallback( boost::bind(&LLPanelObject::onDragSculpt, this)); // Don't allow (no copy) or (no transfer) textures to be selected during immediate mode mCtrlSculptTexture->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); mCtrlSculptTexture->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); @@ -623,6 +625,10 @@ void LLPanelObject::getState( ) // BUG? Check for all objects being editable? S32 roots_selected = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount(); BOOL editable = root_objectp->permModify(); + // FIRE-10125: Textures can be dragged into sculpt texture picker for meshes + mIsEditable = editable; + mIsMesh = false; + // // Select Single Message // We don't have those in FS (2013-04-28) @@ -1358,6 +1364,8 @@ void LLPanelObject::getState( ) BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT; BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; isMesh = (sculpt_stitching == LL_SCULPT_TYPE_MESH); + // FIRE-10125: Textures can be dragged into sculpt texture picker for meshes + mIsMesh = isMesh; LLTextureCtrl* mTextureCtrl = getChild("sculpt texture control"); if(mTextureCtrl) @@ -2400,6 +2408,12 @@ BOOL LLPanelObject::onDropSculpt(LLInventoryItem* item) return TRUE; } +// FIRE-10125: Textures can be dragged into sculpt texture picker for meshes +BOOL LLPanelObject::onDragSculpt() +{ + return (mIsEditable && !mIsMesh); +} +// void LLPanelObject::onCancelSculpt(const LLSD& data) { diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index 33b58e14bc..02197ea374 100755 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -88,6 +88,8 @@ public: void onSelectSculpt(const LLSD& data); BOOL onDropSculpt(LLInventoryItem* item); static void onCommitSculptType( LLUICtrl *ctrl, void* userdata); + // FIRE-10125: Textures can be dragged into sculpt texture picker for meshes + BOOL onDragSculpt(); protected: void getState(); @@ -225,6 +227,11 @@ protected: LLPointer mObject; LLPointer mRootObject; + + // FIRE-10125: Textures can be dragged into sculpt texture picker for meshes + bool mIsMesh; + bool mIsEditable; + // }; #endif