Skip to content

feat(paint): QML falloff slider + vertex color preview toggle - #351

Merged
fernandotonon merged 7 commits into
masterfrom
feat/paint-ui-vertex-falloff-preview
Apr 30, 2026
Merged

feat(paint): QML falloff slider + vertex color preview toggle#351
fernandotonon merged 7 commits into
masterfrom
feat/paint-ui-vertex-falloff-preview

Conversation

@fernandotonon

@fernandotonon fernandotonon commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Vertex Paint controls to the QML Inspector (Edit Mode Tools): radius, strength, falloff.
  • Add a Vertex Color Preview toggle that applies a non-destructive per-entity material override in Edit Mode.
  • Make brush falloff configurable (distance weight exponent).

Closes #315.

Test plan

  • Build UnitTests and run EditModeControllerGeometry.ApplyVertexColorBrushAffectsVerticesWithinRadius.
  • In GUI: enter Edit Mode, enable Vertex Paint, adjust radius/strength/falloff and paint; toggle preview on/off and verify original materials restore.

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Vertex Color Preview toggle in edit mode for real-time color visualization.
    • Configurable Paint Falloff slider in brush settings to control gradient behavior.
    • Toolbar/menu controls synced with the new preview and falloff settings.
  • Bug Fixes

    • Preserve existing vertex color buffers when committing edits to avoid replacing buffer bindings.
  • Tests

    • Added regression tests verifying vertex color commit behavior and brush falloff application.

- Add Vertex Paint section to QML Edit Mode Tools with radius/strength/falloff
- Expose brush falloff parameter and apply it in distance weighting
- Add per-entity vertex color preview material override toggle

Made-with: Cursor
@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7b88ca5e-974f-466b-9c1d-f08f441abb13

📥 Commits

Reviewing files that changed from the base of the PR and between c85aad6 and 07bf31c.

📒 Files selected for processing (6)
  • src/EditModeController.cpp
  • src/EditModeController.h
  • src/EditModeController_test.cpp
  • src/EditableMesh.cpp
  • src/EditableMesh_test.cpp
  • src/mainwindow.cpp
💤 Files with no reviewable changes (1)
  • src/EditableMesh.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/EditModeController.cpp

📝 Walkthrough

Walkthrough

Adds a vertex color preview toggle in the QML inspector, implements a render-time material override for preview, introduces a configurable vertex-paint falloff threaded into brush application, and updates related tests and mesh commit behavior.

Changes

Cohort / File(s) Summary
QML Inspector UI
qml/PropertiesPanel.qml
Added "Vertex Color Preview" checkbox state bound to EditModeController.vertexColorPreviewEnabled and change handler to reflect external updates.
EditMode Controller (public API)
src/EditModeController.h
Added Q_PROPERTYs vertexPaintFalloff and vertexColorPreviewEnabled, getters/setters, vertexColorPreviewChanged signal, and updated applyVertexColorBrush signature to accept falloff.
EditMode Controller (impl.)
src/EditModeController.cpp
Implemented preview material override apply/remove methods, added setVertexColorPreviewEnabled and setVertexPaintFalloff, created preview material, reconciled preview state with wireframe logic, and threaded falloff into brush application.
Toolbar / UI sync
src/mainwindow.cpp
Added Falloff slider in vertex-paint settings, synchronized initial value and bidirectional updates with EditModeController::vertexPaintFalloff, and refreshed controls on menu show.
Mesh buffer commit
src/EditableMesh.cpp, src/EditableMesh_test.cpp
Changed commit path to modify existing diffuse buffer contents in-place (no upgrade to dynamic buffer) and added unit test verifying buffer binding remains the same after commit.
Brush tests
src/EditModeController_test.cpp
Updated test call to pass explicit falloff (e.g., 0.5f) to the new applyVertexColorBrush signature.

Sequence Diagram

sequenceDiagram
    participant QML as "QML/Inspector"
    participant EMC as "EditModeController"
    participant MatSys as "Material Manager"
    participant Renderer as "Renderer"

    QML->>EMC: setVertexColorPreviewEnabled(true)
    EMC->>EMC: store preview flag
    EMC->>MatSys: applyVertexColorPreviewMaterials()
    MatSys->>MatSys: record original materials
    MatSys->>MatSys: override materials with EditMode/VertexColorPreview
    MatSys->>Renderer: update bindings
    Renderer->>Renderer: render with vertex colors visible

    QML->>EMC: setVertexPaintFalloff(value)
    EMC->>EMC: clamp/store falloff
    QML->>EMC: apply brush stroke (center, radius, color, strength)
    EMC->>EMC: compute per-vertex weight using falloff exponent
    EMC->>Renderer: update vertex color buffers / request redraw

    QML->>EMC: setVertexColorPreviewEnabled(false)
    EMC->>MatSys: removeVertexColorPreviewMaterials()
    MatSys->>MatSys: restore original materials
    MatSys->>Renderer: update bindings
    Renderer->>Renderer: render with original materials
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I nibble at pixels, brush in paw,

Falloff tuned to gentle draw,
A toggle sparks the preview light,
Vertex colors bloom in sight ✨
Hop, paint, repeat—what a delight!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The changes include unexpected modifications to EditableMesh::writeVertexColors buffer handling and a new regression test about vertex buffer bindings, which go beyond the #315 scope of UI controls and preview toggle. Clarify the relationship between EditableMesh buffer changes and the PR objectives, or move those changes to a separate PR focused on the vertex buffer regression fix.
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: adding a falloff slider and vertex color preview toggle to the QML UI, which aligns with the primary focus of the PR.
Description check ✅ Passed The description follows the template, includes a summary of features, references the closed issue (#315), provides a clear test plan, and explains the technical changes made.
Linked Issues check ✅ Passed The PR implements all acceptance criteria from #315: QML Paint section with radius/strength/falloff sliders, non-destructive vertex color preview toggle, and configurable brush falloff with distance weighting.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/paint-ui-vertex-falloff-preview

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e33126648

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/EditModeController.cpp Outdated
Comment on lines +531 to +533
if (m_vertexColorPreviewEnabled) {
removeVertexColorPreviewMaterials();
m_vertexColorPreviewEnabled = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore preview overrides before wireframe teardown

When both wireframe and vertex-color preview are enabled, this exit path removes wireframe materials first and then restores preview-saved materials. The preview snapshot can contain wireframe material names, so after removeWireframeMaterials() deletes those resources, removeVertexColorPreviewMaterials() reapplies stale names instead of the original entity materials. In that state, leaving Edit Mode can restore the wrong material set (or missing resources); preview cleanup needs to run before wireframe teardown.

Useful? React with 👍 / 👎.

Comment thread src/EditModeController.cpp Outdated
Comment on lines +5263 to +5266
// If preview is on, re-apply after toggling wireframe so we snapshot/restore
// the current (wireframe or solid) material state correctly.
if (m_vertexColorPreviewEnabled)
applyVertexColorPreviewMaterials();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid resnapshotting preview materials after wireframe toggle

This reapply path runs while preview is already active and applyVertexColorPreviewMaterials() clears/rebuilds m_vertexColorPreviewSavedMaterials from the currently overridden sub-entity materials. If the user toggles wireframe while preview is on, the saved baseline becomes preview-derived materials, so turning preview off no longer returns to the real underlying material state. This makes the preview toggle non-reversible in that workflow.

Useful? React with 👍 / 👎.

@fernandotonon

Copy link
Copy Markdown
Owner Author

Addressed both preview/wireframe edge cases in commit 2c68bfb:

  • Exit Edit Mode now removes vertex-color preview overrides before wireframe teardown, so preview restoration can’t reapply deleted wireframe clone names.
  • Toggling wireframe while preview is enabled now temporarily restores underlying materials, toggles wireframe, then reapplies preview (so the preview baseline is never snapshotted from the preview override and the toggle remains reversible).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/EditModeController_test.cpp (1)

168-179: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Strengthen this test to verify falloff math, not just partial blending.

The current v1 checks only prove the vertex is partially painted; they don’t prove the new falloff parameter is applied correctly. Please assert the expected weighted result (or compare two different falloff values) so exponent regressions fail deterministically.

Proposed test hardening
     // v1 is within radius but falloff should keep it not fully red.
-    EXPECT_LT(sub.vertices[1].color.g, 1.0f);
-    EXPECT_GT(sub.vertices[1].color.g, 0.0f);
+    const float expectedWeight = std::pow(1.0f - (1.0f / 1.1f), 0.5f);
+    const float expectedG = 1.0f - expectedWeight;
+    EXPECT_NEAR(sub.vertices[1].color.g, expectedG, 1e-3f);

As per coding guidelines src/**/*_test.cpp: “Add Google Test unit tests for new functionality.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/EditModeController_test.cpp` around lines 168 - 179, The test currently
only checks v1 was partially painted; instead compute and assert the exact
expected blended color using the same falloff formula used by
EditModeController::applyVertexColorBrush: calculate distance from brush center
to sub.vertices[1], compute normalized influence = clamp(1.0f - dist / radius,
0.0f, 1.0f), apply falloff exponent to get weight (e.g. w = pow(influence,
falloff) * strength), then compute expected color = lerp(original color,
paint.color, w) and replace the loose EXPECT_LT/EXPECT_GT with an EXPECT_NEAR
comparing sub.vertices[1].color (r/g/b) to that expected value; alternatively
add a second call with a different falloff and assert the color changes
accordingly to catch exponent regressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/EditModeController.cpp`:
- Around line 241-255: The current setter flips m_vertexColorPreviewEnabled and
emits vertexColorPreviewChanged before verifying buffer setup; change
setVertexColorPreviewEnabled to first attempt preparation (call
ensureVertexColorBuffers or call applyVertexColorPreviewMaterials and check its
success) and only set m_vertexColorPreviewEnabled and emit
vertexColorPreviewChanged if the setup succeeds; update
applyVertexColorPreviewMaterials (or add a boolean-returning helper) to return
success/failure so setVertexColorPreviewEnabled can abort and leave the preview
disabled when buffer creation fails, and keep removeVertexColorPreviewMaterials
behavior for disabling as-is.
- Around line 509-517: The teardown code clears m_vertexColorPreviewEnabled and
emits vertexColorPreviewChanged() which forces the UI toggle off and prevents
enterEditMode()'s reapply path from working; instead, call
removeVertexColorPreviewMaterials() to remove materials but do NOT reset
m_vertexColorPreviewEnabled or emit vertexColorPreviewChanged() here so the
persistent preview flag remains true and enterEditMode() can reapply it. Ensure
only removeVertexColorPreviewMaterials() is invoked during teardown and leave
m_vertexColorPreviewEnabled and the signal handling to the normal
toggle/enterEditMode() flow.

In `@src/mainwindow.cpp`:
- Around line 996-1000: Add breadcrumb logging for falloff changes by attaching
a handler to falloffSlider->sliderReleased that reads the current value (use
falloffSlider->value() or emPaint->vertexPaintFalloff()), formats it (e.g.,
percent or float with two decimals) and calls
SentryReporter::addBreadcrumb("brush.falloff", formattedMessage). Leave the
existing valueChanged connection (connect(falloffSlider, &QSlider::valueChanged,
...)) and the vertexPaintChanged connection intact; the new sliderReleased
handler should only log once per completed drag so telemetry isn't noisy. Ensure
the handler references falloffSlider and emPaint (or
emPaint->vertexPaintFalloff()) and creates a clear message like "Falloff set to
X" before calling SentryReporter::addBreadcrumb.

---

Outside diff comments:
In `@src/EditModeController_test.cpp`:
- Around line 168-179: The test currently only checks v1 was partially painted;
instead compute and assert the exact expected blended color using the same
falloff formula used by EditModeController::applyVertexColorBrush: calculate
distance from brush center to sub.vertices[1], compute normalized influence =
clamp(1.0f - dist / radius, 0.0f, 1.0f), apply falloff exponent to get weight
(e.g. w = pow(influence, falloff) * strength), then compute expected color =
lerp(original color, paint.color, w) and replace the loose EXPECT_LT/EXPECT_GT
with an EXPECT_NEAR comparing sub.vertices[1].color (r/g/b) to that expected
value; alternatively add a second call with a different falloff and assert the
color changes accordingly to catch exponent regressions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5fc2b3b1-eaa5-47df-a926-05a8910c2718

📥 Commits

Reviewing files that changed from the base of the PR and between 3e8d507 and c85aad6.

📒 Files selected for processing (5)
  • qml/PropertiesPanel.qml
  • src/EditModeController.cpp
  • src/EditModeController.h
  • src/EditModeController_test.cpp
  • src/mainwindow.cpp

Comment on lines +241 to +255
void EditModeController::setVertexColorPreviewEnabled(bool enabled)
{
if (m_vertexColorPreviewEnabled == enabled)
return;

m_vertexColorPreviewEnabled = enabled;
if (enabled)
applyVertexColorPreviewMaterials();
else
removeVertexColorPreviewMaterials();

SentryReporter::addBreadcrumb(
"ui.action",
QStringLiteral("Vertex color preview %1").arg(enabled ? "enabled" : "disabled"));
emit vertexColorPreviewChanged();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Only expose preview as enabled after buffer setup succeeds.

beginVertexPaintStroke() already treats ensureVertexColorBuffers() as fallible, but this path sets m_vertexColorPreviewEnabled and emits vertexColorPreviewChanged() before verifying setup, while applyVertexColorPreviewMaterials() ignores the return value entirely. If buffer creation fails, the UI can report preview enabled even though the entity was never prepared for the preview material.

Possible fix
-void EditModeController::setVertexColorPreviewEnabled(bool enabled)
+void EditModeController::setVertexColorPreviewEnabled(bool enabled)
 {
     if (m_vertexColorPreviewEnabled == enabled)
         return;
 
-    m_vertexColorPreviewEnabled = enabled;
-    if (enabled)
-        applyVertexColorPreviewMaterials();
-    else
+    if (enabled) {
+        if (!applyVertexColorPreviewMaterials())
+            return;
+    } else {
         removeVertexColorPreviewMaterials();
+    }
+
+    m_vertexColorPreviewEnabled = enabled;
 
     SentryReporter::addBreadcrumb(
         "ui.action",
         QStringLiteral("Vertex color preview %1").arg(enabled ? "enabled" : "disabled"));
     emit vertexColorPreviewChanged();
 }
-void EditModeController::applyVertexColorPreviewMaterials()
+bool EditModeController::applyVertexColorPreviewMaterials()
 {
     if (!m_editModeActive || !m_editEntity || !m_editableMesh)
-        return;
+        return false;
 
     // Ensure the mesh actually has vertex color buffers; default-initialize to white if missing.
-    m_editableMesh->ensureVertexColorBuffers(m_editEntity);
+    if (!m_editableMesh->ensureVertexColorBuffers(m_editEntity))
+        return false;
 
     m_vertexColorPreviewSavedMaterials.clear();
     for (unsigned int i = 0; i < m_editEntity->getNumSubEntities(); ++i) {
         auto* subEnt = m_editEntity->getSubEntity(i);
         if (!subEnt)
             continue;
         m_vertexColorPreviewSavedMaterials[i] = subEnt->getMaterialName();
         subEnt->setMaterialName(
             "EditMode/VertexColorPreview",
             Ogre::ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME);
     }
+    return true;
 }

Also applies to: 5171-5189

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/EditModeController.cpp` around lines 241 - 255, The current setter flips
m_vertexColorPreviewEnabled and emits vertexColorPreviewChanged before verifying
buffer setup; change setVertexColorPreviewEnabled to first attempt preparation
(call ensureVertexColorBuffers or call applyVertexColorPreviewMaterials and
check its success) and only set m_vertexColorPreviewEnabled and emit
vertexColorPreviewChanged if the setup succeeds; update
applyVertexColorPreviewMaterials (or add a boolean-returning helper) to return
success/failure so setVertexColorPreviewEnabled can abort and leave the preview
disabled when buffer creation fails, and keep removeVertexColorPreviewMaterials
behavior for disabling as-is.

Comment on lines +509 to +517
// Restore material overrides (preview first, then wireframe).
// If preview was enabled while wireframe was on, the preview baseline can contain
// wireframe clone names; restoring preview after deleting those would reapply
// stale names. Always remove preview before tearing down wireframe.
if (m_vertexColorPreviewEnabled) {
removeVertexColorPreviewMaterials();
m_vertexColorPreviewEnabled = false;
emit vertexColorPreviewChanged();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep the preview toggle out of teardown state-reset.

Line 515 clears m_vertexColorPreviewEnabled on every exit, so the UI toggle flips off even though enterEditMode() already has a reapply path for an enabled preview at Lines 464-465. That makes the setting non-persistent across edit sessions and turns the enter-time reapply into dead code for normal usage.

Suggested fix
     if (m_vertexColorPreviewEnabled) {
         removeVertexColorPreviewMaterials();
-        m_vertexColorPreviewEnabled = false;
-        emit vertexColorPreviewChanged();
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/EditModeController.cpp` around lines 509 - 517, The teardown code clears
m_vertexColorPreviewEnabled and emits vertexColorPreviewChanged() which forces
the UI toggle off and prevents enterEditMode()'s reapply path from working;
instead, call removeVertexColorPreviewMaterials() to remove materials but do NOT
reset m_vertexColorPreviewEnabled or emit vertexColorPreviewChanged() here so
the persistent preview flag remains true and enterEditMode() can reapply it.
Ensure only removeVertexColorPreviewMaterials() is invoked during teardown and
leave m_vertexColorPreviewEnabled and the signal handling to the normal
toggle/enterEditMode() flow.

Comment thread src/mainwindow.cpp
Comment on lines +996 to +1000
connect(falloffSlider, &QSlider::valueChanged, this, [this, emPaint, falloffLabel](int v) {
emPaint->setVertexPaintFalloff(v / 100.0);
falloffLabel->setText(tr("Falloff: %1").arg(emPaint->vertexPaintFalloff(), 0, 'f', 2));
});
connect(emPaint, &EditModeController::vertexPaintChanged, this, syncFalloff);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add breadcrumb tracking for falloff adjustments.

This is a new user-facing brush control path, but changes to vertexPaintFalloff are not currently breadcrumbed. Log once per completed drag (sliderReleased) to avoid noisy telemetry while satisfying action tracking.

Proposed instrumentation
     connect(falloffSlider, &QSlider::valueChanged, this, [this, emPaint, falloffLabel](int v) {
         emPaint->setVertexPaintFalloff(v / 100.0);
         falloffLabel->setText(tr("Falloff: %1").arg(emPaint->vertexPaintFalloff(), 0, 'f', 2));
     });
+    connect(falloffSlider, &QSlider::sliderReleased, this, [falloffSlider]() {
+        SentryReporter::addBreadcrumb(
+            "ui.action",
+            QStringLiteral("Vertex paint falloff set to %1")
+                .arg(falloffSlider->value() / 100.0, 0, 'f', 2));
+    });

As per coding guidelines **/*.cpp: “All user-facing actions and significant operations must be tracked with SentryReporter::addBreadcrumb(category, message).”

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
connect(falloffSlider, &QSlider::valueChanged, this, [this, emPaint, falloffLabel](int v) {
emPaint->setVertexPaintFalloff(v / 100.0);
falloffLabel->setText(tr("Falloff: %1").arg(emPaint->vertexPaintFalloff(), 0, 'f', 2));
});
connect(emPaint, &EditModeController::vertexPaintChanged, this, syncFalloff);
connect(falloffSlider, &QSlider::valueChanged, this, [this, emPaint, falloffLabel](int v) {
emPaint->setVertexPaintFalloff(v / 100.0);
falloffLabel->setText(tr("Falloff: %1").arg(emPaint->vertexPaintFalloff(), 0, 'f', 2));
});
connect(falloffSlider, &QSlider::sliderReleased, this, [falloffSlider]() {
SentryReporter::addBreadcrumb(
"ui.action",
QStringLiteral("Vertex paint falloff set to %1")
.arg(falloffSlider->value() / 100.0, 0, 'f', 2));
});
connect(emPaint, &EditModeController::vertexPaintChanged, this, syncFalloff);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/mainwindow.cpp` around lines 996 - 1000, Add breadcrumb logging for
falloff changes by attaching a handler to falloffSlider->sliderReleased that
reads the current value (use falloffSlider->value() or
emPaint->vertexPaintFalloff()), formats it (e.g., percent or float with two
decimals) and calls SentryReporter::addBreadcrumb("brush.falloff",
formattedMessage). Leave the existing valueChanged connection
(connect(falloffSlider, &QSlider::valueChanged, ...)) and the vertexPaintChanged
connection intact; the new sliderReleased handler should only log once per
completed drag so telemetry isn't noisy. Ensure the handler references
falloffSlider and emPaint (or emPaint->vertexPaintFalloff()) and creates a clear
message like "Falloff set to X" before calling SentryReporter::addBreadcrumb.

@fernandotonon

Copy link
Copy Markdown
Owner Author

Added regression coverage for the 'paint invisible until Convert to Quads' bug: asserts we don't swap the VES_DIFFUSE vertex buffer binding after enabling vertex colors + committing a color (guards against VAO/buffer caching regressions).

@fernandotonon

Copy link
Copy Markdown
Owner Author

Added regression coverage for the 'paint invisible until Convert to Quads' bug: the new gtest asserts we don't swap the vertex buffer binding after enabling vertex colors + committing a color (guards against VAO/buffer caching regressions).

@fernandotonon

Copy link
Copy Markdown
Owner Author

Added regression coverage for the 'paint invisible until Convert to Quads' bug:

  • New gtest: EditableMeshTest.VertexColorsCommitDoesNotSwapDiffuseVertexBuffer
  • Asserts we don't swap the VES_DIFFUSE vertex buffer binding after enabling vertex colors + committing a color (guards against VAO/buffer caching regressions).

@sonarqubecloud

Copy link
Copy Markdown

@fernandotonon
fernandotonon merged commit fa71a14 into master Apr 30, 2026
19 checks passed
@fernandotonon
fernandotonon deleted the feat/paint-ui-vertex-falloff-preview branch April 30, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Paint: Vertex Paint UI in Inspector (QML)

1 participant