MCP: scene visualization properties + ui.progressStatus#5982
Merged
Conversation
New `visualization` sub-object in setObjectState input and getObjectInfo output: selectedColor / unselectedColor / globalAlpha (any VisualObject); flatShading / showEdges (mesh only); edgeWidth (mesh or polyline); pointSize (point cloud only). Colors are [r,g,b] or [r,g,b,a] floats in [0,1]; alpha is a [0,1] float mapped to uint8. Fields sent to an object type that doesn't support them return a typed error. Colors and visualize flags push ChangeObjectColorAction / ChangeVisualizePropertyAction for undo; globalAlpha / edgeWidth / pointSize lack dedicated actions so they fall outside the SCOPED_HISTORY block.
Read-only snapshot of MR::ProgressBar. Returns {active: false} when no
long-running op is in flight, else {active: true, title, percent}. Uses
only the existing public API (isOrdered/isFinished/getProgress/
getLastOperationTitle) — no new getters added. Lets an agent poll
through a 'Progress' modal until ui.* dispatch unblocks.
Fedr
approved these changes
Apr 25, 2026
oitel
approved these changes
Apr 27, 2026
HolyBlackCat
approved these changes
Apr 27, 2026
adalisk-emikhaylov
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small additive changes to existing MCP namespaces:
scene.setObjectState/scene.getObjectInfo—visualizationsub-object. Lets agents read and write per-object render-time properties: front-color (selected and unselected), global alpha, and (where applicable) flat-shading toggle, show-edges toggle, edge width / line width, point size. Fields sent to an object type that doesn't support them return a typed error. Color and visualize-flag changes participate in the existingSCOPED_HISTORYblock so multi-field calls are reverted atomically by Ctrl+Z.ui.progressStatus. Read-only snapshot of the globalMR::ProgressBar. Returns{active: false}when no long-running op is in flight; else{active: true, title: string, percent: number}. Lets an agent poll through a'Progress'modal and resumeui.*dispatch once the op completes. Uses only the existing public API (isOrdered/isFinished/getProgress/getLastOperationTitle) — no new getters added.Commits
MCP: add visualization properties to scene.setObjectState/getObjectInfo— extends two existing tools, no new tools registered.MCP: add ui.progressStatus— one new tool.Test plan
Verified live via the MCP server:
scene.getObjectInforeturnsvisualization: {selectedColor, unselectedColor, globalAlpha, flatShading, showEdges, edgeWidth}for a mesh; round-trip withsetObjectStateproduces matching values.setObjectState+pointSizeon a non-points object returns a typed error.setObjectState+ invalid color array (length 2) and out-of-rangeglobalAlphareturn typed errors.setObjectStatecall (color + flatShading + showEdges + edgeWidth) reverts atomically with one Ctrl+Z.ui.progressStatusreturns{active: false}on idle MI.{active: true, title: \"test #0\", percent}is returned with percent rising from 0 toward 100, then back to{active: false}after completion.Follow-ups
ui.dismissModals— initially included in this PR; deferred to a separate PR after testing showed that some MI dialogs (e.g. the F1 Hotkeys dialog) re-open every frame because of internal sticky flags. The right fix needs a per-modal-aware close path (Esc-first + ClosePopupToLevel fallback) which deserves its own review.globalAlpha,edgeWidth,pointSize(currently applied without enteringSCOPED_HISTORYsince no per-field action exists yet).🤖 Generated with Claude Code