Repository navigation
feat: [Remote rendering 3.5a] move variable ownership to server - #152
LKasianAnsys wants to merge 12 commits into
Conversation
e64851b to
1916c0e
Compare
d5b9b47 to
a6e2619
Compare
1916c0e to
f5cf3cb
Compare
a6e2619 to
328ccf1
Compare
08b8ab1 to
be7deda
Compare
|
@LKasianAnsys Cool stuff. I tested it and it seems to work as described. However, the description mentions that "every mapper write on the color and range path re-serializes." From what I can see, this is true for the mapper state itself: any UI changes related to the active variable on a VTK actor stay in sync and are correctly saved and restored when reloading the scene. That said, the ranges do not appear to stay in sync. Changes to the range seem not to be serialized/restored in the same way as the active variable selection. Is this expected behavior, or am I misunderstanding what the description is referring to? |
|
Hey @ansBAkula thank you for testing! What you saw is expected for this PR on its own. The range editor in the UI still only changes the client actors and does not call the new The client starts sending The "re-serialize" callout was about the serialized VTK state that |
Issue
Addresses #23
Context
This is the first PR for user story 3.5 in Phase 3 of the remote rendering epic, which sees the visualizer state authority move from client to server.
In this PR, the server now defines the variables in a scene (name, type (POINT/CELL), # components, which parts carry it, and the magnitude and per-component ranges) and delivers them to the client on the scene details push. Custom ranges live on the server record and are set through a new
set_variable_rangetrigger. The client in this PR is unchanged and still builds its own list (and doesn't use the new trigger yet); it switches over in the PR for 3.5b (#153).Callouts:
VisorLocalRenderer._serialize_part_state().set_variable_rangetrigger and sees the ranges sent back to the server.Sanity checks:
add_datasetand thenremove_datasetafter starting VISOR with a dataset loaded. Check that the part colors are as expected.Copilot summary
This pull request introduces server-side ownership of variable ranges for VISOR. The main change is that the backend now maintains and manages variable ranges, rather than having the frontend provide them for each operation. This improves consistency and centralizes control. The update includes a new model for variable records, an API for setting variable ranges, and changes to payload handling and persistence.
Key changes:
Server-side variable ownership and management:
VisorVariableRecordandVisorVariableRecordsinvisor_variable_record.pyto represent and manage variable range state on the server, including logic for merging ranges and tracking per-variable metadata.VisorVariableStateto clarify that it is now a persisted projection of the server-ownedVisorVariableRecord, not a passthrough from the client.API and trigger updates:
set_variable_rangetrigger and correspondingSetVariableRangePayloadmodel, enabling the frontend to request range changes for variables, which are then applied scene-wide by the backend. [1] [2]set_part_color_variabletrigger to ignore theminandmaxvalues from the payload, instead always using the server's effective range for the referenced variable slot. [1] [2]Persistence and state handling:
PersistedViewerStateV1.from_components) to require explicit variable state input, reflecting the server's ownership of variable ranges. [1] [2] [3]Documentation and examples: