aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/tile_set_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/plugins/tile_set_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/editor/plugins/tile_set_editor_plugin.cpp b/tools/editor/plugins/tile_set_editor_plugin.cpp
index 6026cda4d..a51caf7d5 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_set_editor_plugin.cpp
@@ -44,6 +44,7 @@ void TileSetEditor::_import_scene(Node *scene, Ref<TileSet> p_library, bool p_me
Node *child = scene->get_child(i);
+
if (!child->cast_to<Sprite>()) {
if (child->get_child_count()>0) {
child=child->get_child(0);
@@ -72,7 +73,7 @@ void TileSetEditor::_import_scene(Node *scene, Ref<TileSet> p_library, bool p_me
p_library->tile_set_texture(id,texture);
- Vector2 phys_offset = mi->get_offset();
+ Vector2 phys_offset;
if (mi->is_centered()) {
Size2 s;
@@ -112,7 +113,7 @@ void TileSetEditor::_import_scene(Node *scene, Ref<TileSet> p_library, bool p_me
}
- p_library->tile_set_texture_offset(id,Vector2());
+ p_library->tile_set_texture_offset(id,mi->get_offset());
}
}