godot icon indicating copy to clipboard operation
godot copied to clipboard

Fix GraphEdit layering

Open Geometror opened this issue 3 years ago • 4 comments
trafficstars

This PR fixes/improves the ordering of comment nodes as children of GraphEdit as well as the position of the connections layer. Split from #61414.

Detailed changes:

  • the order of comment nodes is now calculated similar to a 2D BVH: when a comment node encloses other comment nodes, the index of the enclosing node is kept below
    • the order is updated when resizing a comment node
  • the connections layer is now kept between the comment nodes and the normal graph (due to technical limitations it is no longer an internal node)

Before: before

This PR: after

Geometror avatar Jun 07 '22 16:06 Geometror

The nesting in GraphEdit::_top_layer_input is very deep. will review more.

fire avatar Jun 08 '22 04:06 fire

This looks good to me, what is it missing?

reduz avatar Aug 06 '22 21:08 reduz

This looks good to me, what is it missing?

Mostly a contributor that feels confident enough with GraphEdit to approve the feature and implementation :)

akien-mga avatar Aug 06 '22 22:08 akien-mga

I'll take a look. Can it be rebased and ready to merge?

fire avatar Aug 06 '22 23:08 fire

@fire Rebased. Just for reference: For now(4.0) I think this will do, but since it is a bit hacky I would like to refactor the current GraphNode/GraphEdit system including the restructuring(#61414) and implementation of layers (or something similar) in the next few months after I opened a proper proposal. A problem might be compatibility breakage so that needs to be discussed.

Geometror avatar Aug 07 '22 13:08 Geometror

There's some conflicts.

fire avatar Aug 27 '22 13:08 fire

So, from some quick testing this doesn't seem to work completely as expected. For a new shader the comments are still in front of the connections: image

But closing and reopening the file fixes it, even for the nodes added afterwards: image

Am I doing something wrong?

YuriSizov avatar Sep 06 '22 16:09 YuriSizov

Superseded by #67152.

akien-mga avatar Jan 24 '23 16:01 akien-mga