-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add separate editor plugin for TileMap and TileSet #74717
Add separate editor plugin for TileMap and TileSet #74717
Conversation
17015f2
to
a40775b
Compare
a40775b
to
7abcd7c
Compare
Is this a fix for #74543? |
91a6343
to
1565631
Compare
CC @groud |
I think this is a good thing to do. I think the implementation is OK but it's maybe too many layers right now, it becomes a bit complex. I think we should probably remove TilesEditorPlugin and move functions related to TileMaps / TileSets in their respective plugin. For synchronization, we should probably have a |
Hmmm, now that I think about it, TilesEditorPlugin was a hack to allow 2 editors at once, but it's no longer necessary probably 🤔 Removing it might fix some bugs. |
1565631
to
dfc075d
Compare
Ok done. TilesEditorPlugin now handles some singleton things, but otherwise all editing is done by TileMapEditorPlugin and TileSetEditorPlugin. I had to resort to some tricks to make everything work correctly; I didn't do much testing though (yet). |
I think you can renames it then, to avoid any confusion. Something like |
But the class does more than just synchronizing, so if anything, it needs a better name. |
Maybe TilesEditorsCommons? Or TilesEditorShared? TilesEditorHelper? TilesEditorHelpDesk? TilesEditorHotline? TilesEditorReferee? TilesEditorIDK 😅 ? |
Renamed to TilesEditorUtils. |
dfc075d
to
c7c6c95
Compare
d2c1b3d
to
4769fc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superficially looks fine, but I'd still want an approval from @groud.
4769fc8
to
ec24d50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not super convinced by the TileMapSubEditorPlugin name (maybe TileMapEditorTerrainsPlugin should maybe be TileMapSubEditorTerrainsPlugin, and same for TileMapEditorTilesPlugin ?). But it's a bit weird anyway.
Anyway, I'd rather have a better name but I agree it's a bit difficult to find. So I guess we I am in favor of YOLO-ing and it merge as is, as the code looks good anyway.
These plugins are not exposed, so they can be renamed at any time. |
Thanks! |
Is this cherry pickable for 4.1? Or a variation of it? The issue appears to also occur there |
Right now TilesEditorPlugin handles both TileMap and TileSet, which results in some errors when both are edited at the same time. Editing multiple objects is not supported; this PR adds separate dummy plugins for TileMap and TileSet, which just forward their methods to the original plugin.
It's a bit awkward, but it functions the same as before and doesn't spit errors.
I also added a note in EditorPlugin docs.
EDIT:
Fixes #74543
EDIT3:
Fixes #65467