Skip to content

Allow making nodes on instantiated scenes "visible" #14367

@ettiSurreal

Description

@ettiSurreal

Problem or limitation

This is an attempt at a more streamlined alternative for godotengine/godot#84018

Sometimes you may want to:

  • Parent a node to a child of an instantiated scene.
  • Use a child of an instantiated scene as an exported node.

You can already do all this by using editable children, but it will bloat the scene dock UIand in theory it's unsafe as you can edit the properties of all the child nodes.

Proposed improvement

When you right click on an instantiated scene in the scene dock, you will get an option to "Make Scene Child Visible". Pressing this will bring up a dialog that shows all of the child nodes of that scene, and upon selecting a node it becomes "visible". Multiple nodes can be made "visible" on a single instantiated scene.

"Visible" nodes:

  • You can parent nodes to them.
  • You can connect to/from their signals.
  • If the "visible" node is a scene, you can use Editable Children or Make Scene Child Visible on it.
  • Their properties cannot be edited.
  • Can be "stashed".

So basically, this works similarly to Editable Children, except you select a single specific node and the "visible" node is not actually editable.

Additional info:
"Why "visible" as a term?"

  • Temporary name for the proposal, I understand that it's confusing but I couldn't come up with anything better. Maybe "expose" could work but it could make the proposal itself sound confusing since it's written as an alternative to a PR that adds "exposing".

"Why are the properties non-editable?"

"How is a "visible" node displayed in the scene dock?"

  • Similar to Editable Children, it has a color tint (probably a different color from Editable Children). As for how it looks when the node is a child of another node, there's three options:

Automatically all nodes in the path "visible":

 ┖╴MyScene
    ┖╴MyNode
       ┖╴MyChild
          ┖╴MyGrandChild

Minimalist, only show the "visible" node.

 ┖╴MyScene
    ┖╴MyGrandChild

Compact, show the path to the node in it's name:

 ┖╴MyScene
    ┖╴MyNode/MyChild/MyGrandChild

"What are the drawbacks when compared to the original exposing PR?"

  • The main and only thing I can think of is that instead of marking nodes as exposed in the scene and just pressing a check to show them, you now have to select the node in an instantiated scene every time you want to make it "visible".

"What if we just change editable children to let you make specific nodes editable instead of forcing all of them to be editable?"

  • That could also work. This was probably discussed somewhere already but I couldn't find anything.

Proposal review

  • Yes, this proposal is highly specific and actionable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions