HTML project browser with property editor and WebGL view#992
Open
magnesj wants to merge 12 commits into
Open
Conversation
Add RiaHtmlServer built on QHttpServer (Qt6::HttpServer), started together with the GUI. It serves the project tree as nested HTML and a property editor form for any object, addressing objects by a dotted child-index path. Editing a value posts back the form, applies changes via setFromQVariant, fires fieldChangedByUi and refreshes connected editors. The full server URL is logged to the message window on startup.
Render the project tree and property editor in a two-pane layout with a collapsible tree, and show the active 3D view as a PNG snapshot served from a new /viewsnapshot endpoint. Scope the Qt6::HttpServer dependency to ApplicationLibCode instead of the top-level CMakeLists.
Reuse the VdeVizDataExtractor pipeline (the same one RicHoloLensSession feeds to the HoloLens sharing server) to extract the active grid view's triangle meshes and serve them as JSON. A new /trianglesview page renders them with three.js, embedded alongside the existing snapshot on the object page. Cell-result meshes are colored by passing the color-legend texture and per-vertex texture coordinates to the browser, matching the native 3D view.
Add view-state version counters to the HTML server: one bumped on camera navigation (RiuViewer::navigationPolicyUpdate) and one bumped when the display model is rebuilt (Rim3dView), i.e. when the visible cell set changes via filters or time step. A new /viewstate endpoint exposes both. The object page polls it and reloads the snapshot on any change, while the triangle view refetches and rebuilds its geometry only on visible-cell changes, preserving its own orbit camera during plain navigation.
Tree nodes start collapsed. The root node and the chain of nodes leading to the active 3D view are open by default so that view is revealed on load.
Render boolean fields as checkboxes and option fields as drop-downs, applying edits through PdmUiCommandSystemProxy so enums and notifications work like the desktop editors. Pointer fields are shown read-only and never modified. The WebGL triangle view keeps its rotation, zoom and panning when the geometry reloads after a visible-cell change.
The Commands directory is already on the ApplicationLibCode include path, so HoloLensCommands/... resolves directly.
Apply the colors from the dark theme to the generated pages, add a header bar with the application logo and project name, set the page title, and serve the application icon at /appicon.png for use as the favicon.
Render option fields as a native <select> drop-down submitting the option index. Fields with many options (string lists, etc.) get a filter box and a list box so matches stay visible while typing. The option index is applied as a UInt so the option-based field path maps it back to the stored value.
Use caf's UI tree ordering (defineUiTreeOrdering) with the MainWindow.ProjectTree config name to build the tree, so it mirrors the desktop project tree. This makes views appear under their grid model and honors custom ordering, grouping and hidden items. Nodes are addressed by their index path in the ordering, kept consistent across the tree, property editor and child links.
Render each tree node's UI icon to a PNG and serve it via a new /icon route. Icons are deduplicated by content so identical icons share one id, keeping the page small and cacheable. Icons are shown in the tree and the children list.
7 tasks
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.
Adds a lightweight HTTP server (
RiaHtmlServer, onQt6::HttpServer) that exposes the open project in a web browser, started automatically by the GUI application.Features
PdmUiCommandSystemProxyso enums and change notifications behave like the desktop editors. Pointer fields are shown read-only and never modified./viewsnapshot)./trianglesviewrenders the active grid view's triangle meshes with three.js. Geometry is extracted with the sameVdeVizDataExtractorpipeline used byRicHoloLensSession; cell-result coloring is reproduced by passing the color-legend texture and per-vertex texture coordinates to the browser./viewstateversion endpoint. Camera navigation in the desktop app refreshes the snapshot; a visible-cell change (filters, time step) refetches the triangle geometry. The WebGL view preserves its rotation/zoom/panning across geometry reloads.Build
Qt6::HttpServeris scoped toApplicationLibCodeand removed from the top-levelQT_LIBRARIES.