godot icon indicating copy to clipboard operation
godot copied to clipboard

Remove rect from Path2D

Open KoBeWi opened this issue 10 months ago • 3 comments

When Path2D is selected, it shows the standard orange rectangle with scale handles. The handles can be confused for path points and lead to accidental scaling. Also scaling Path2D is not very useful in general.

This PR removes the rect. Before: image After: image You can still select the path by clicking on its curve.

Removing rect completely has potential drawbacks. The path is not obviously "selected" and you don't see its bounds. While this is a minor problem, an alternative of showing the rect without handles is possible too.

KoBeWi avatar Apr 22 '24 20:04 KoBeWi

I will admit that I myself have often scaled paths (mostly of polygons) hoping / expecting it would reposition the points as opposed to scale the entire object. That feature would be incredibly useful to me and likely to others. I would go as far as say that that's probably expected behavior for having a bunch of points selected. So I think that would be the best alternative to this PR: to have a custom type of "scaling" to reposition the points.

AdriaandeJongh avatar Apr 23 '24 05:04 AdriaandeJongh

Removing rect completely has potential drawbacks. The path is not obviously "selected" and you don't see its bounds. While this is a minor problem, an alternative of showing the rect without handles is possible too.

Perhaps it would be possible to make the path orange when it's selected. That way you would stay in theme with having the orange outline around selected nodes and it would also be more clear in situations where you have two different paths with the same bounding rectangle (as example, imagine you have a path that goes in a square with another path that touches the middle of the first path's edges).

Pheubel avatar Apr 23 '24 20:04 Pheubel

https://github.com/godotengine/godot/assets/2223172/d9d0ef9d-7363-48b9-ac8f-145b6f98fa15

KoBeWi avatar Apr 24 '24 09:04 KoBeWi