Skip to content

#5543 PBR support for pipette#5549

Merged
akleshchev merged 2 commits intodevelopfrom
andreyk/5543_pipette
Mar 20, 2026
Merged

#5543 PBR support for pipette#5549
akleshchev merged 2 commits intodevelopfrom
andreyk/5543_pipette

Conversation

@akleshchev
Copy link
Contributor

Implement pbr asset picking using pipette.

P.S. This does not cover overrides as those aren't assets and this is specifically an asset picker.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the in-world “pipette” picking flow to pass richer context (object + face/TE index) to consumers, enabling pick-from-object behavior to support both textures and materials and simplifying color picking.

Changes:

  • Expand LLToolPipette selection signal to include the hit object and TE index, and emit directly from the pick callback.
  • Update texture picker pipette handling to support material picks via getRenderMaterialID(te_index).
  • Update color picker pipette handling to consume a picked color rather than a full texture entry.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
indra/newview/lltoolpipette.h Changes pipette callback signal signature to include object + TE index + TE pointer.
indra/newview/lltoolpipette.cpp Removes internal TE copy and emits the new signal directly from pickCallback.
indra/newview/lltexturectrl.h Renames/updates texture picker pipette callback to match new signal signature.
indra/newview/lltexturectrl.cpp Connects pipette callback via lambda and adds material-aware selection logic.
indra/newview/llfloatercolorpicker.h / .cpp Switches pipette selection to pass LLColor4 and updates callback wiring.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@akleshchev akleshchev force-pushed the andreyk/5543_pipette branch 2 times, most recently from ce1b951 to 761bbd1 Compare March 18, 2026 00:28
@akleshchev akleshchev requested a review from Copilot March 18, 2026 00:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the pipette (eyedropper) selection callback to provide the picked object and TE (face) index instead of a copied LLTextureEntry, enabling downstream consumers (texture/material picker, color picker) to query additional per-face data (e.g., render material ID) directly from the object.

Changes:

  • Update LLToolPipette callback signal signature to emit (object, te_index) and add TE bounds checking in the pick callback.
  • Update texture picker and color picker to use the new pipette callback and add material-specific pipette handling/errors.
  • Add a new localized string for “material not in inventory” feedback.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
indra/newview/skins/default/xui/en/strings.xml Adds InventoryNoMaterial user-facing string for material pipette failures.
indra/newview/lltoolpipette.h Changes pipette signal signature and callback registration API to return a connection.
indra/newview/lltoolpipette.cpp Emits pipette selection as (object, te_index) and adds TE index bounds validation.
indra/newview/lltexturectrl.h Renames pipette handler and stores a scoped signal connection.
indra/newview/lltexturectrl.cpp Wires new pipette callback, implements material vs texture selection logic, and reports new error string.
indra/newview/llfloatercolorpicker.h Updates pipette handler interface and stores a scoped signal connection.
indra/newview/llfloatercolorpicker.cpp Uses new pipette callback to extract TE color and apply it to the picker.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@akleshchev akleshchev force-pushed the andreyk/5543_pipette branch 2 times, most recently from 71b2111 to 603c397 Compare March 18, 2026 01:33
@akleshchev akleshchev requested a review from Copilot March 18, 2026 01:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the pipette tool integration so UI pickers can identify the clicked object/face and support picking GLTF material IDs (in addition to textures/colors), including a new localized error string when the picked material isn’t in inventory.

Changes:

  • Change LLToolPipette callback payload from LLTextureEntry to (LLViewerObject, te_index) and return a signals2 connection for scoped lifetime management.
  • Extend LLFloaterTexturePicker pipette handling to pick/apply GLTF materials (and show a specific “no material in inventory” message).
  • Update LLFloaterColorPicker pipette handling to use picked face color instead of passing a full LLTextureEntry.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
indra/newview/skins/default/xui/en/strings.xml Adds an inventory error string for missing materials.
indra/newview/lltoolpipette.h Updates pipette callback signal signature to provide object + face index.
indra/newview/lltoolpipette.cpp Emits the pipette selection signal with object + face index and adds a TE bounds check.
indra/newview/lltexturectrl.h Renames/updates texture picker pipette callback to accept object + TE index and stores a scoped connection.
indra/newview/lltexturectrl.cpp Wires scoped callback connection; implements material/texture selection via pipette.
indra/newview/llfloatercolorpicker.h Updates pipette callback to accept a picked LLColor4 and stores a scoped connection.
indra/newview/llfloatercolorpicker.cpp Converts pipette selection into a picked face color and applies it to the picker.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Removed the limitation as pipette now works for pbr materials.
Logic wasn't working correctly as pipette stayed visible regardless of
state.
@akleshchev akleshchev force-pushed the andreyk/5543_pipette branch from 603c397 to 2b1644b Compare March 18, 2026 02:08
@akleshchev akleshchev marked this pull request as draft March 18, 2026 03:44
@akleshchev akleshchev marked this pull request as ready for review March 18, 2026 10:54
@akleshchev akleshchev merged commit 69cbb48 into develop Mar 20, 2026
15 checks passed
@akleshchev akleshchev deleted the andreyk/5543_pipette branch March 20, 2026 01:15
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants