Repository navigation
cvcGL: a hidden scene node hides its whole subtree, and generated_world's parts follow it - #1037
Merged
Merged
Conversation
…ld's parts follow it
docs/ARIADNE.md says a node hidden with visible: is gone from every view, but a
source: { data } node's items, attached as children when the dataset arrives, drew
under it anyway (a child attached under a hidden parent kept its own true, and an
ordinary node drew by its flag alone), and a generated_world node's meshes and water
are top-level nodes beside it, so hiding it hid only its ground.
Every node now draws by its flag AND its ancestors, the rule LodGraphicsNode already
followed: SceneNode::syncProp puts the prop in the renderer only while the node's flag
is set and ancestorsVisible() (GraphicsNode walks its parents); setVisible,
addToRenderer and the default ancestorVisibilityChanged use it. No flag changes: a
child attached under a hidden parent keeps its own true and draws once the parent is
shown, and the existing LOD tests pass unchanged. drawsChildrenItself() keeps an LOD
node's rungs registered whatever is above. The label follows the hierarchy too.
generated_world's tick pushes the node's visibility to its parts beside it when it
changes.
Tests: cvcgl_ariadne_data's test_a_hidden_data_node_draws_nothing and the
generated_world block of cvcgl_ariadne_realize; both fail without the fix.
This was referenced Nov 7, 2026
Merged
transfix
added a commit
that referenced
this pull request
Nov 7, 2026
Bumps the project version and every recipe's upstream_version from 3.7.11 to 3.7.12. The v3.7.12 tag on this commit is the first release with the multi-car controller template (pycvc_gl.cars, #1031 #1035 #1040), the hidden-subtree fix in cvcGL (#1037), the discrete-gradient dyn_bike step (#978), semi-implicit Euler by default in the nav rollout (#981), the implicit contact damper (#1004, #1038), and generated_world's roads and water (#1032, #1034).
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.
Why
docs/ARIADNE.mdsays a scene node hidden withvisible:"is gone from every view". cvcGL didn't hold to that in two cases:source: { data }node. It draws its dataset's items as children when the dataset arrives. Those children were added under the hidden node and drew anyway.SceneNode::setVisiblepushes a change down to the children it has, but a child attached later kept its owntrue, and an ordinary node drew by that flag alone. OnlyLodGraphicsNodelooked up the hierarchy.generated_worldnode. Its meshes and water are top-level nodes beside it (<id>_props,_foliage,_needles,_buildings,_roads,_water), so hiding the node hid only its ground.Found while building the multi-car template (#1035). Its document holds a data-sourced city and a generated world, shown one at a time. Both drew at once, so the template works around it in
show_world(): it clearsdata.city, and hidesgen_*by name.What
LodGraphicsNodealready had). A node's prop is in the renderer only while its own flag is set and every ancestor is visible:SceneNode::syncProp()puts the prop in or takes it out, idempotently.setVisible(),addToRenderer()(attaching under a hidden parent included) and the defaultancestorVisibilityChanged()all use it.ancestorsVisible()is virtual:SceneNodesays yes, since it has no parent link, andGraphicsNodewalks its parents.trueand draws once the parent is shown. A node hidden on its own stays hidden when an ancestor is shown. The existing LOD tests pin exactly that, and pass unchanged.GraphicsNode::drawsChildrenItself(), true forLodGraphicsNode, keeps its rungs in the renderer whatever is above. It shows the active one by actor visibility, as before.GraphicsNode's label goes by the hierarchy as well.generated_world's parts follow their node. In its tick, when the node'sisVisibleInHierarchy()changes, its meshes and water beside it get the same visibility. That's the push a child gets from its parent.docs/ARIADNE.mdandworld_nodes.hsay so.Tests
cvcgl_ariadne_data, new testtest_a_hidden_data_node_draws_nothing(headless, with a barevtkRenderer):cvcgl_ariadne_realize,generated_worldblock:cvcgl_lod_node,cvcgl_bounds_walk,cvcgl_camera_idle,cvcgl_light_node,cvcgl_ari_switch,cvcgl_ari_golden,cvcgl_ariadne_viewsandcvcgl_ariadne_scenes. Everycvcgl_test passes: 96 of 96, after a full build.After this
#1035's
show_world()workaround can then be dropped; its known-limits note indocs/CARS.mdsays so.