Open aXu-AP opened 1 year ago
This would possibly supersede #266
@KoBeWi as UV editor currently works only on Polygon2D, not necessarily. Down the line we could consider adding CollisionPolygon2D and LightOccluder2D support to it. But this proposal doesn't cover that.
Ah right. Well, at least it would make it possible to easily resolve that proposal, as the required functionality already exists.
Interestingly, @reduz implied multiple times in #4565 that polygon editor is in the bottom dock. Citing:
This makes sense for the most part because most things in the bottom panels (console, debugger, animation editor, tile editor, polygon editor, etc) would simply not function on the side.
Contextual editors like Tile Editor, Polygon Editor, Animation Tree Editor and many others (which only one should open at the same time and only when the node or resource is being edited) should still remain hard-coded to the bottom panels
Was this at some point planned or does he talk about something else entirely?
He was probably referring to the texture region editor, which was since then moved to a dedicated dialog opened from the inspector.
I didn't know that texture region editor was in the dock at some point, but it makes sense that it's its own dialog now as it's for one off edits. Unlike polygon editor, which can be more of an iterative work, hence bottom dock ftw 😊
I'm interested in this rework of the polygon2d editor becoming a reality, and would even be willing to work on it. I've been working on a card game where I want character animations to use 2D skeleton animations, and the process of editing "meshes" (polygons) is really not great as it stands, heh.
I can finish my work on this and make a pr, I believe it more or less just needs a rebase and some small things. I have been waiting because there wasn't much support on this proposal. Altough there seems to be some at least, and notably I have seen no criticism towards the idea. I guess the best thing you can do to get this implemented is to try to get more community backing for the idea. It's not hard to implement, but the maintainers need to see that this is a valuable change.
I made a reddit post about this and other proposed modifications to polygon editor, which generated some buzz (votes stand at +52, with 96% upvote rate), but that's hard to convert into github likes.
At last I finished the pr: https://github.com/godotengine/godot/pull/99439
Describe the project you are working on
Looking to resurrect an old 2D platformer game which uses textured polygons for characters and environments.
Describe the problem or limitation you are having in your project
The fact that Polygon2D's UV editor is a separate dialog has currently many limitations:
Undo/redo shortcuts aren't registered inside the dialog.Fixed by godotengine/godot#93898Renaming makes sense because it's not just UV editor. It currently handles also polygon creation and bone weight painting. Also see proposal for color editor: #8195
Describe the feature / enhancement and how it helps to overcome the problem or limitation
When selecting a Polygon2D node, in the bottom dock appears editor named "Polygon". The functionality of the editor is unchanged. You can edit polygons in the dock or use tools that are available in canvas editor's toolbar. To iterate on previous points:
Renaming the editor boosts feature discoverability. The little "UV" button in toolbar doesn't really tell you that this is also how you change bone weights.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I have already made a proof of concept on this, you can check it at aXu-AP/godot/uv-editor-enhanced (WIP)
Allow editor to operate on Polygon2D without a texture.Fixed in godotengine/godot#96731uv_
from a lot of properties.UVMode
enum toAction
,uv_move_current
toaction_current
. This is to make distinction clear between actions (create, transform points) and modes (UV, Bones etc.).Mode
enum to differentiate between editing modes/tabs. Add method_get_current_mode()
. Ie. instead ofuv_edit_mode[3]->is_pressed()
=>_get_current_mode() == MODE_BONES
.Mode
enum toMenu
, as it's used just for checking which menu option was selected, and doesn't really have anything to do withAbstractPolygon2DEditor
's modes out of currently being in the same toolbar._uv_input()
).If this enhancement will not be used often, can it be worked around with a few lines of script?
Used often.
Is there a reason why this should be core and not an add-on in the asset library?
Improves core editor functionality and makes the code easier to maintain.
This is one part of multiple UV editor enhancements: #4118