Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow opening of polygon editor without texture #96731

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

aXu-AP
Copy link
Contributor

@aXu-AP aXu-AP commented Sep 8, 2024

Gets rid of a nonsensical limitation. There's no reason to deny access to polygon editor when there's no texture set. While uv editor might not be very useful without texture (unless for custom shaders), the other editors are fully usable and useful regardless.
uvedit

There's no reason to deny access to polygon editor when there's no texture set.
@aXu-AP aXu-AP requested a review from a team as a code owner September 8, 2024 20:29
@KoBeWi KoBeWi added this to the 4.x milestone Sep 8, 2024
Copy link
Contributor

@RadiantUwU RadiantUwU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static analysis looking great.

@akien-mga
Copy link
Member

I suppose this makes sense, but I wonder how user-friendly it is.

While uv editor might not be very useful without texture (unless for custom shaders)

How does the UV editor look in this case?

And it's a bit confusing IMO that one needs to click a "uv" button to open the "Polygon 2D UV Editor" to edit anything but UVs.

@aXu-AP
Copy link
Contributor Author

aXu-AP commented Sep 13, 2024

And it's a bit confusing IMO that one needs to click a "uv" button to open the "Polygon 2D UV Editor" to edit anything but UVs.

See godotengine/godot-proposals#8209, which aims to solve this issue and more UX problems.

How does the UV editor look in this case?

If there's a polygon, the outline (uv positions) are shown, just as with texture, but on a blank background:
kuva
If there's no polygon, then it's just blank canvas and essentially useless as there's no points to modify (the same applies to polygons and bones tabs). But this problem isn't exclusive to this pr, in current state it's the same. The proposal I linked solves this by putting "Points" tab as a first option.

@KoBeWi
Copy link
Member

KoBeWi commented Sep 15, 2024

Maybe we could put a warning label that no texture is assigned? Probably more friendly than displaying empty editor window.

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine.

Usability improvements can be done later as well, empty editor is not the only problem tbh.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 16, 2024
@akien-mga akien-mga merged commit 6b67d44 into godotengine:master Sep 16, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@aXu-AP
Copy link
Contributor Author

aXu-AP commented Sep 16, 2024

For solving the "blank canvas" issue, here's 2 enhancements:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants