summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 0b088f7171..14b25681b7 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -105,13 +105,16 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
if (!child2->cast_to<StaticBody2D>())
continue;
StaticBody2D *sb = child2->cast_to<StaticBody2D>();
- int shape_count = sb->get_shape_count();
- if (shape_count == 0)
- continue;
- for (int shape_index = 0; shape_index < shape_count; ++shape_index) {
- Ref<Shape2D> collision = sb->get_shape(shape_index);
- if (collision.is_valid()) {
- collisions.push_back(collision);
+
+ List<uint32_t> shapes;
+ sb->get_shape_owners(&shapes);
+
+ for (List<uint32_t>::Element *E = shapes.front(); E; E = E->next()) {
+
+ for (int k = 0; k < sb->shape_owner_get_shape_count(E->get()); k++) {
+
+ Ref<Shape> shape = sb->shape_owner_get_shape(E->get(), k);
+ collisions.push_back(shape); //uh what about transform?
}
}
}