Skip to content

Add Z-order controls and dimension-based selection restrictions - #254

Open
ThomasKroes wants to merge 4 commits into
masterfrom
feature/data-driven-z-ordering
Open

Add Z-order controls and dimension-based selection restrictions#254
ThomasKroes wants to merge 4 commits into
masterfrom
feature/data-driven-z-ordering

Conversation

@ThomasKroes

Copy link
Copy Markdown
Contributor

Summary

This PR adds configurable Z ordering and dimension-based selection restrictions to the Scatterplot plugin.

Changes

Z ordering

  • Add a dedicated Z-ordering settings section.
  • Add three Z-ordering modes:
    • Insertion order
    • Dimension-based ordering
    • Randomized depth
  • Add a dimension picker for dimension-based Z ordering.
  • Forward the selected dimension values to the core point renderer.

Selection restrictions

  • Add a canonical Selection Restriction action to the Selection settings.
  • Allow users to restrict selection using:
    • A selected dimension
    • An inclusive lower limit
    • An inclusive upper limit
  • Keep the selectable range visible but read-only in Z-ordering settings unless Z-order coupling is active.
  • Add Restrict selection by Z-order dimension to couple the restriction to the active Z-order dimension.
  • Synchronize the restriction state and selected dimension between the Selection and Z-ordering interfaces.

Selection behavior

  • Maintain an exclusion mask in the scatterplot widget.
  • Ensure excluded points cannot become effectively selected through:
    • Interactive area selection
    • Select all
    • Invert selection
    • Focus sampling
    • Selection-based sampling
    • Selection changes received through linked datasets
  • Preserve the global linked-dataset selection while applying exclusions locally in the scatterplot.
  • Update selection-related action labels and tooltips to report excluded points.

Heads-up display

  • Add a Selection section showing:
    • The number of effectively selected points
    • The number of selectable points

Rendering

  • Mark excluded points for the core renderer so they are displayed using the non-selectable-point style.
  • The current style is an opaque neutral gray.
  • The rendering style of non-selectable points will become customizable in a future update.

Dependency

This PR depends on the accompanying ManiVault core PR that adds:

  • Configurable point Z ordering
  • Per-point Z-order scalar values
  • Non-selectable-point rendering support
  • Correct heads-up display parent-child insertion

Introduce a dedicated `ZOrderingAction` for choosing point depth order by insertion order, dimension, or randomized mode, and expose it in the settings toolbar/menu. The scatterplot plugin and widget now support data-driven z-order scalars, update z ordering when position data changes, and migrate older saved settings that stored randomized depth under miscellaneous options.
Add Z-order selection filtering with a configurable minimum value and enable/disable toggle, wired through `ZOrderingAction` and mirrored in `SelectionAction`. Selection operations now respect excluded points (interactive select, sample, select all, invert), widget highlights are masked for excluded indices, and the HUD reports effective selected vs selectable point counts.
Introduces a new `SelectionRestrictionAction` to manage selection filtering by dimension and value range, and wires it into `SelectionAction` with full serialization/linking support. This removes the old Z-order-specific threshold controls from `ZOrderingAction`, keeps Z-order focused on depth ordering, and adds a trigger to copy the current Z-order dimension into the selection restriction when needed. `SettingsAction` initialization/member order was also adjusted so the shared selection restriction is available where it is referenced.
@ThomasKroes ThomasKroes self-assigned this Aug 18, 2026
@ThomasKroes ThomasKroes added the enhancement New feature or request label Aug 18, 2026
Replace the one-shot "use Z-order dimension" action with a persistent toggle that keeps Z-ordering and selection restriction in sync, including shared dimension updates and range enablement. This also loads selection settings earlier so the coupled state restores correctly, and hides labels in the selection restriction group for a cleaner embedded UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant