-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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 support for creating tiles when adding multiple atlases to a tileset #70790
Add support for creating tiles when adding multiple atlases to a tileset #70790
Conversation
|
||
void TileSetAtlasSourceEditor::_auto_create_tiles(Vector<Ref<TileSetAtlasSource>> const &new_tile_set_atlas_sources) { | ||
|
||
Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo(); |
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.
Single undo scope for all tile generation
6a9b1ef
to
3fd152b
Compare
@@ -259,7 +259,9 @@ class TileSetAtlasSourceEditor : public HSplitContainer { | |||
void _unhandled_key_input(const Ref<InputEvent> &p_event); | |||
|
|||
// -- Misc -- | |||
void _auto_create_tiles(Vector<Ref<TileSetAtlasSource>> const &new_tile_set_atlas_sources); |
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.
Better naming?
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.
Should be const Vector<...> &
, and the parameter should start with p_
.
3fd152b
to
a6e2d49
Compare
72375e2
to
5350237
Compare
5350237
to
82fa415
Compare
@@ -119,6 +119,8 @@ class TileSetAtlasSourceEditor : public HSplitContainer { | |||
|
|||
bool tile_set_changed_needs_update = false; | |||
|
|||
Vector<Ref<TileSetAtlasSource>> pendingAtlases; |
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.
Please use snake_case for identifiers. You might see from surrounding code that we never use camelCase ;)
@@ -275,7 +279,7 @@ class TileSetAtlasSourceEditor : public HSplitContainer { | |||
|
|||
public: | |||
void edit(Ref<TileSet> p_tile_set, TileSetAtlasSource *p_tile_set_source, int p_source_id); | |||
void init_source(); | |||
void init_sources(Vector<Ref<TileSetAtlasSource>> newSources); |
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.
void init_sources(Vector<Ref<TileSetAtlasSource>> newSources); | |
void init_sources(Vector<Ref<TileSetAtlasSource>> p_new_sources); |
I think the idea is fine. The implementation looks correct enough, but as the popup and automatic creation of tiles would not depends anymore on the currently edited atlas source, the logic to create those tiles should be moved outside of |
Hello @jamesmintram, thanks for making the PR! Would you be up to make the latest requested changes or do you want someone else to take over? Fixes #69273 |
Superseded by #79678. |
Adds support for "batch" creating tiles when dragging multiple atlases into a tileset. See: #69273