Skip to content

Don't render disabled nodes#114

Open
ArcturusEmrys wants to merge 2 commits intoInochi2D:mainfrom
ArcturusEmrys:disabled-nodes
Open

Don't render disabled nodes#114
ArcturusEmrys wants to merge 2 commits intoInochi2D:mainfrom
ArcturusEmrys:disabled-nodes

Conversation

@ArcturusEmrys
Copy link
Copy Markdown
Contributor

When a node is disabled, it does not render (but it can still be used as a mask in disabled state).

Cases I haven't investigated yet:

  • Children of disabled nodes - if I disable them in Inochi Session, they disappear. I haven't made this explicitly cascade the disabled value to children, and the renderer gets a flattened list, so...
  • Children of a disabled mask - they should still contribute to the mask, but I haven't checked.

@ArcturusEmrys
Copy link
Copy Markdown
Contributor Author

Some updates on this after testing:

  • The only valid masks are Parts. Inochi Creator will not allow you to select any other object as a mask source... except MeshGroups, which fail to render and render the target invisible.
  • Disabled state doesn't matter for masking, even transitively.
  • Disabled state DOES cascade to children. This is actually the only part of rendering that cares about the node hierarchy, so I had to do some really awful tree traversal for every render step.

As part of making a testcase for this, I also found a number of bugs... in Inochi Creator/Session, completely unrelated to Inox:

  • MeshGroups can be selected as a mask source. As mentioned above, this is not a valid mask source, so doing so hides the masked object completely.
  • "Prune unused nodes" export will happily write out a file with masks referencing nodes that don't exist.
    • When Inox reads such a file, it panics.

@ArcturusEmrys ArcturusEmrys marked this pull request as ready for review March 16, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant