godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.71k stars 21.12k forks source link

Can't remove or reduce painted weights in Polygon2D UV-editor #51726

Open bluepandion opened 3 years ago

bluepandion commented 3 years ago

Godot version

3.3.2 stable

System information

Windows 10

Issue description

I mistakenly reported this as a bug before because I thought bone weights could not be removed.

Since I don't know how to remove this issue, I'll just report my user experience here:

TLDR; Maybe the brush icon could be an eraser icon instead - The bucket should look like a brush, since that's how it behaves.

Steps to reproduce

Minimal reproduction project

No response

Calinou commented 3 years ago

Someone can implement erasing by clicking with the right mouse button to address this. The eraser tool will remain available in situations where right-clicking a lot is not viable.

aXu-AP commented 1 year ago

I would like to implement right-click to erase, but the input handling of the uv editor is structured quite funkily. The structure might have made sense when there weren't multiple modes in one editor, but now it's hard to navigate and add features like this. Here's how it's now (pseudocode):

if left mouse:
  if pressed
    if this mode:
      if that tool:
        do something
    // other modes and tools
  else:
    if this mode:
      if that tool:
        do something
    // other modes and tools
else if right mouse:
  cancel
  if this mode:
    do extra step

It would make sense to rearrange the code by different modes. Hacking it in with various if clauses is also possible, but I find it distasteful to make the code flow even worse. I'll add this to my refactor wishlist (godotengine/godot-proposals#8209).

As for the issue at hand, I think the source of confusion is poor choice of icons. Seeing a bucket and a brush makes one think about fill and paint tools (moreso in this context). Even if that brush is used elsewhere in the editor as "clear", I didn't make the connection until checking the source for the name of the icon. kuva I suggest using Edit and Eraser icons (I can make a pr if this looks good): kuva