diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2021-03-14 13:43:43 +0000 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2021-03-14 17:31:49 +0000 |
commit | 3dcdb84660a22d19118d61e39f0267c5148027a1 (patch) | |
tree | bdae648e6489d1da60b7cbc3bff18dbf7edc8d23 /editor/plugins | |
parent | 6edb0a75ab561ac703377aa4bc66ef84279df56c (diff) |
Rename Sprite.region_enabled getter and setter to match properties
Also renames Sprite2D.region_filter_clip property and its setter to
region_filter_clip_enabled and set_region_filter_clip_enabled.
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/sprite_2d_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/texture_region_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp index 4949d2b9b7..4acacf3058 100644 --- a/editor/plugins/sprite_2d_editor_plugin.cpp +++ b/editor/plugins/sprite_2d_editor_plugin.cpp @@ -179,7 +179,7 @@ void Sprite2DEditor::_update_mesh_data() { } Rect2 rect; - if (node->is_region()) { + if (node->is_region_enabled()) { rect = node->get_region_rect(); } else { rect.size = Size2(image->get_width(), image->get_height()); diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 63255e6547..4cbfe18594 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -897,7 +897,7 @@ void TextureRegionEditor::edit(Object *p_obj) { atlas_tex = Ref<AtlasTexture>(nullptr); } edit_draw->update(); - if ((node_sprite && !node_sprite->is_region()) || (node_sprite_3d && !node_sprite_3d->is_region())) { + if ((node_sprite && !node_sprite->is_region_enabled()) || (node_sprite_3d && !node_sprite_3d->is_region_enabled())) { set_process(true); } if (!p_obj) { @@ -1115,7 +1115,7 @@ void TextureRegionEditorPlugin::_editor_visiblity_changed() { void TextureRegionEditorPlugin::make_visible(bool p_visible) { if (p_visible) { texture_region_button->show(); - bool is_node_configured = region_editor->is_stylebox() || region_editor->is_atlas_texture() || region_editor->is_ninepatch() || (region_editor->get_sprite() && region_editor->get_sprite()->is_region()) || (region_editor->get_sprite_3d() && region_editor->get_sprite_3d()->is_region()); + bool is_node_configured = region_editor->is_stylebox() || region_editor->is_atlas_texture() || region_editor->is_ninepatch() || (region_editor->get_sprite() && region_editor->get_sprite()->is_region_enabled()) || (region_editor->get_sprite_3d() && region_editor->get_sprite_3d()->is_region_enabled()); if ((is_node_configured && !manually_hidden) || texture_region_button->is_pressed()) { editor->make_bottom_panel_item_visible(region_editor); } diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index c628fe8367..b97ee10743 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -80,7 +80,7 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) { Vector2 phys_offset; Size2 s; - if (mi->is_region()) { + if (mi->is_region_enabled()) { s = mi->get_region_rect().size; p_library->tile_set_region(id, mi->get_region_rect()); } else { |