Skip to content

Commit

Permalink
fix meaning of 'exact_included' and make it a requirement for project…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
Wumpf committed Feb 28, 2024
1 parent e3b75f3 commit 57f527e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions crates/re_space_view/src/data_query_blueprint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,13 @@ impl<'a> QueryExpressionEvaluator<'a> {
// Ignore empty nodes.
// Since we recurse downwards, this prunes any branches that don't have anything to contribute to the scene
// and aren't directly included.
let direct_included = self.entity_path_filter.is_exact_included(entity_path);
if direct_included || !children.is_empty() || !visualizers.is_empty() {
let exact_included = self.entity_path_filter.is_exact_included(entity_path);
if exact_included || !children.is_empty() || !visualizers.is_empty() {
Some(data_results.insert(DataResultNode {
data_result: DataResult {
entity_path: entity_path.clone(),
visualizers,
direct_included,
direct_included: self.entity_path_filter.is_included(entity_path),
property_overrides: None,
},
children,
Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewport/src/space_view_entity_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fn add_entities_line_ui(

let add_info = entities_add_info.get(entity_path).unwrap();

let is_explicitly_excluded = entity_path_filter.is_explicitly_excluded(entity_path);
let is_explicitly_excluded = entity_path_filter.is_included(entity_path);
let is_explicitly_included = entity_path_filter.is_explicitly_included(entity_path);
let is_included = entity_path_filter.is_included(entity_path);

Expand Down
4 changes: 3 additions & 1 deletion crates/re_viewport/src/viewport_blueprint_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,15 @@ impl Viewport<'_, '_> {
space_view_visible,
);

// Show 'projections' if there's any items that weren't part of the tree under origin.
// Show 'projections' if there's any items that weren't part of the tree under origin but are directly included.
// The later is important since `+ image/camera/**` necessarily has `image` and `image/camera` in the data result tree.
let mut projections = Vec::new();
result_tree.visit(&mut |node| {
if !node
.data_result
.entity_path
.starts_with(&space_view.space_origin)
&& node.data_result.direct_included
{
projections.push(node);
false
Expand Down

0 comments on commit 57f527e

Please sign in to comment.