summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatercolorpicker.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-03-18 01:59:22 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-03-20 03:15:28 +0200
commit166fa85705bd7501a1af81d4b529fa4b83038be7 (patch)
tree7011e1e575804da5baf5af4b1c6af30dd6c29425 /indra/newview/llfloatercolorpicker.cpp
parent0aa33a144d392c16eaa419ffefa7c98af2e37834 (diff)
#5543 PBR support for pipette
Diffstat (limited to 'indra/newview/llfloatercolorpicker.cpp')
-rw-r--r--indra/newview/llfloatercolorpicker.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index cd45093856..56e086502a 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -233,7 +233,15 @@ bool LLFloaterColorPicker::postBuild()
childSetCommitCallback("sspin", onTextCommit, (void*)this );
childSetCommitCallback("lspin", onTextCommit, (void*)this );
- LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterColorPicker::onColorSelect, this, _1));
+ mPipetteConnection = LLToolPipette::getInstance()->setToolSelectCallback(
+ [this](LLPointer<LLViewerObject> object, S32 te_index)
+ {
+ const LLTextureEntry* entry = object->getTE(te_index);
+ if (entry)
+ {
+ onColorSelect(entry->getColor());
+ }
+ });
return true;
}
@@ -460,10 +468,10 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data)
}
}
-void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te )
+// From pipette
+void LLFloaterColorPicker::onColorSelect( const LLColor4 &color )
{
- // Pipete
- selectCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]);
+ selectCurRgb(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]);
}
void LLFloaterColorPicker::onMouseCaptureLost()