feat: Remote rendering 3.1b - implement per-part apply logic on the renderer and node pipeline - #51
Merged
Merged
Conversation
LKasianAnsys
changed the base branch from
main
to
feat/3.1a-registry-per-part-write-path
August 28, 2026 20:00
LKasianAnsys
force-pushed
the
feat/3.1b-per-part-apply-logic
branch
from
August 28, 2026 20:03
bdd6ec6 to
4f7deb5
Compare
LKasianAnsys
force-pushed
the
feat/3.1a-registry-per-part-write-path
branch
from
August 31, 2026 15:29
029c950 to
ff688aa
Compare
LKasianAnsys
force-pushed
the
feat/3.1b-per-part-apply-logic
branch
from
August 31, 2026 15:29
7b61414 to
0c50362
Compare
LKasianAnsys
marked this pull request as ready for review
August 31, 2026 16:38
margalva
self-requested a review
September 1, 2026 20:16
margalva
previously approved these changes
Sep 1, 2026
Base automatically changed from
feat/3.1a-registry-per-part-write-path
to
main
September 1, 2026 21:42
Collaborator
Author
|
@margalva Thank you for approving; after the 3.1a merge this branch was updated to the new base (main), and needs a re-approval. |
margalva
approved these changes
Sep 2, 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.
Issue
Addresses #18
Context
This is the second of 5 PRs for user story 3.1 (#18) of the phased implementation plan (here) for adding remote rendering in VISOR.
Per-part visual state (visibility, opacity, diffuse color, color variable), is currently held client-side on
VisorPartStateand reaches the server only viagetAppStateAsyncwhen thesave_stateAPI is called. This story inverts that, makingVisorDatasetRegistrythe source of truth for per-part state by the end of 3.1.This PR is the second step: filling in the no-op
apply_*logic on the renderer so the server can drive VTK for a single part. There are still no callers in this PR. The trigger handlers are added on the server in PR 3, the client-initiated triggers are added in PR 4, and this is extended to save/load state in PR 5.Notes:
VtkNodePipeline. The renderer resolves the node and delegates, and does no VTK work of its own. As much as possible, the VTK logic common between the LOCAL (vtk-wasm) and REMOTE modes will be shared.set_color_variabledoes array validation and mapper calls only. Moving color variable ownership color LUT authority and application on the server is scheduled for user story 3.5, so this is deferred here.Copilot summary
This pull request implements per-part apply logic for the renderer and node pipeline, enabling fine-grained visual control over individual parts in the VTK pipeline. The main changes introduce concrete implementations for visibility, opacity, diffuse color, selection, and color variable application at the part level, moving the logic from no-ops to actual delegation to the
VtkNodePipeline.Renderer and Node Pipeline Enhancements:
apply_visibility,apply_opacity,apply_diffuse_color,apply_selected,apply_color_variable, andclear_color_variableinVisorLocalRenderer, delegating to corresponding methods onVtkNodePipeline. These methods now resolve the pipeline for a given node ID, log a debug message if the node is unknown, and never raise exceptions. (src/ansys/visor/viewer/renderer/local_renderer.py) [1] [2]VtkNodePipelineforset_selected,set_visibility,set_opacity,set_diffuse_color,set_color_variable, andclear_color_variable, with detailed docstrings and robust handling of invalid associations or missing arrays. (src/ansys/visor/viewer/vtk/node_pipeline.py)Testing Improvements:
test_local_renderer.pyto verify that each per-part apply method delegates correctly to the pipeline, including handling of unknown node IDs as logged no-ops. Added a new test classTestDelegatedApplyBodiesfor this purpose. (tests/unit/renderer/test_local_renderer.py)test_node_pipeline.pyto enable testing of color variable application with realistic VTK datasets containing named point and cell arrays. (tests/unit/vtk/test_node_pipeline.py)These changes collectively enable fine-grained, per-part visual control in the renderer, laying groundwork for further features.