Open aXu-AP opened 1 year ago
We already have a Polygon2D UV editor. I wonder if both should be merged in the same dialog (and rename the tool to "Polygon2D attribute editor" in the process, with UV and color modes). This would reduce the need for code duplication.
Yes, this is exactly my intention, see the part "Inside UV editor, there would be a Color mode." Altough it's called UV editor, it's also bone weight and and general polygon editor, so renaming it would make sense.
EDIT: @Calinou also note this discussion here, where I have listed few other improvements I would like to implement into this Polygon Editor: #4118
Renaming the editor would be part of the idea to move the editor to bottom like animation/tileset/tilemap etc. editors. Practically it would just mean to get rid of "UV" button in the toolbar and add it as "Polygon" tab in the dock. Even the editor class is already called Polygon2DEditor
, it's called uv editor only in the toolbar and dialog title. And most of class variables and enums are named like uv_this_or_that
, but that can be left in I guess.
Made a separate proposal for bottom dock & refactoring to reflect editor's intention better: #8209 Refactor would help adding Color editor on the road, as currently magic numbers are used for distincting between modes, suggested change to use enum.
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
Polygon2D supports vertex colors but there's no way to edit this data outside of setting it manually or by code. Vertex colors are useful for coloring polygons (duh), and for various vfx like adjusting amount of wind affecing leaves.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Inside UV editor, there would be a Color mode. User would be able to apply color to their vertices with brush and fill tools.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Color editor would support following functionality:
Small note: on the above mockup I use sliders but in the actual editor I would use EditorSpinSlider for compactness.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Used more or less as often as uv and weight editor.
Is there a reason why this should be core and not an add-on in the asset library?
Adds editor support for existing core functionality.
This is one part of multiple UV editor enhancements: #4118