Add signal layer transform updated#240
Conversation
There was a problem hiding this comment.
Pull request overview
This PR splits the signalLayerUpdated/signalLayerChange signal into two distinct signals: signalLayerStructureChanged (for scenegraph topological changes) and signalLayerTransformChanged (for transform-only updates). This enables an optimized rendering path for smooth animations, where only ANARI instance transforms are updated without rebuilding the full scene. It also introduces a new TransformsToAnariVisitor to handle the transform-only update path, and exposes the EnSight importer to Lua scripting.
Changes:
- Splits
signalLayerUpdated/signalLayerChangeintosignalLayerStructureChangedandsignalLayerTransformChangedthroughout all subsystems (rendering index, UI, network, serialization, scripting) - Adds new
TransformsToAnariVisitorfor lightweight per-frame transform updates, and refactorsRenderToAnariObjectsVisitorto not set transforms (delegated to the new visitor) - Exposes
import_ENSIGHTandAnimation::setAsTransformStepsto Lua scripting
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
UpdateDelegate.hpp / .cpp |
Splits signalLayerUpdated into two virtual methods in the base delegate interface |
Scene.hpp / .cpp |
Adds signalLayerStructureChanged and signalLayerTransformChanged methods, updates internal callers |
RenderIndex.hpp / .cpp |
Provides default no-op implementations for the two new virtual signals |
RenderIndexAllLayers.hpp / .cpp |
Implements the two new signals; adds syncLayerTransforms using the new visitor |
TransformsToAnariVisitor.hpp |
New visitor that only updates ANARI instance transforms (for the lightweight path) |
RenderToAnariObjectsVisitor.hpp |
Removes transform-setting logic (now handled by TransformsToAnariVisitor) |
Animation.cpp |
Uses signalLayerTransformChanged for animated transform updates |
NetworkUpdateDelegate.hpp / .cpp |
Implements both new signals (both still transfer the full layer over network) |
CoreBindings.cpp |
Updates Lua binding; adds setAsTransformSteps to the Animation Lua API |
IOBindings.cpp |
Exposes import_ENSIGHT to Lua |
| UI files (ObjectEditor, LayerTree, BaseViewport, IsosurfaceEditor, ImportFileDialog) | Updates call sites to appropriate signal |
| Other files (World.cpp, TransferLayer.cpp, serialization, import_GLTF, InstancingControls) | Updates call sites to signalLayerStructureChanged |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Note that this is a mostly conservative change and the TransformChanged will be equivalent a structural change. Improvements are to come later. Also align most of the signals to be `Changed` postfixed
19a4766 to
9619f76
Compare
9619f76 to
59f19a7
Compare
|
LGTM, thanks! |
This PR introduces a split of signalLayerUpdated into:
This helps splitting the RenderIndex behavior and split the work into two phases:
Also exposes the Ensight importer to Lua