summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--editor/editor_node.cpp23
-rw-r--r--editor/editor_node.h3
-rw-r--r--editor/property_editor.cpp8
-rw-r--r--scene/resources/packed_scene.cpp2
5 files changed, 10 insertions, 28 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 21ce52d6e3..23ab874a2e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -90,7 +90,7 @@ The Godot Engine community has [many communication channels](https://godotengine
To communicate with developers (e.g. to discuss a feature you want to implement or a bug you want to fix), the following channels can be used:
- [GitHub issues](https://github.com/godotengine/godot/issues): If there is an existing issue about a topic you want to discuss, just add a comment to it - all developers watch the repository and will get an email notification. You can also create a new issue - please keep in mind to create issues only to discuss quite specific points about the development, and not general user feedback or support requests.
-- [#godotengine-devel IRC channel on Freenode](http://webchat.freenode.net/?channels=godotengine-devel): You will find most core developers there, so it's the go-to channel for direct chat about Godot Engine development. Feel free to start discussing something there to get some early feedback before writing up a detailed proposal in a GitHub issue.
+- [#godotengine-devel IRC channel on Freenode](https://webchat.freenode.net/?channels=godotengine-devel): You will find most core developers there, so it's the go-to channel for direct chat about Godot Engine development. Feel free to start discussing something there to get some early feedback before writing up a detailed proposal in a GitHub issue.
- [devel@godotengine.org mailing list](https://listengine.tuxfamily.org/godotengine.org/devel/): Mailing list for Godot developers, used primarily to announce developer meetings on IRC and other important discussions that need to reach people directly in their mailbox. See the [index page](https://listengine.tuxfamily.org/godotengine.org/devel/) for subscription instructions.
Thanks!
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 1223abd76c..cc7ee44902 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -447,18 +447,6 @@ void EditorNode::_sources_changed(bool p_exist) {
void EditorNode::_vp_resized() {
}
-void EditorNode::_rebuild_import_menu() {
- PopupMenu *p = import_menu->get_popup();
- p->clear();
-//p->add_item(TTR("Node From Scene"), FILE_IMPORT_SUBSCENE);
-//p->add_separator();
-#if 0
- for (int i = 0; i < editor_import_export->get_import_plugin_count(); i++) {
- p->add_item(editor_import_export->get_import_plugin(i)->get_visible_name(), IMPORT_PLUGIN_BASE + i);
- }
-#endif
-}
-
void EditorNode::_node_renamed() {
if (property_editor)
@@ -5257,15 +5245,6 @@ EditorNode::EditorNode() {
menu_panel->add_child( resource_menu );
#endif
- import_menu = memnew(MenuButton);
- import_menu->set_tooltip(TTR("Import assets to the project."));
- import_menu->set_text(TTR("Import"));
- //import_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
- left_menu_hb->add_child(import_menu);
-
- p = import_menu->get_popup();
- p->connect("id_pressed", this, "_menu_option");
-
tool_menu = memnew(MenuButton);
tool_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools."));
tool_menu->set_text(TTR("Tools"));
@@ -5960,8 +5939,6 @@ EditorNode::EditorNode() {
circle_step_frame = Engine::get_singleton()->get_frames_drawn();
circle_step = 0;
- _rebuild_import_menu();
-
editor_plugin_screen = NULL;
editor_plugins_over = memnew(EditorPluginList);
diff --git a/editor/editor_node.h b/editor/editor_node.h
index e7f4085fc5..7de713eae9 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -242,7 +242,6 @@ private:
HBoxContainer *menu_hb;
Control *viewport;
MenuButton *file_menu;
- MenuButton *import_menu;
MenuButton *tool_menu;
ToolButton *export_button;
ToolButton *prev_scene;
@@ -447,8 +446,6 @@ private:
void _show_messages();
void _vp_resized();
- void _rebuild_import_menu();
-
void _save_scene(String p_file, int idx = -1);
void _instance_request(const Vector<String> &p_files);
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 86136fa78b..77de27a651 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -2388,6 +2388,10 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String &p
RES res = obj->get(p_name).operator RefPtr();
if (res->is_class("Texture")) {
int tw = EditorSettings::get_singleton()->get("docks/property_editor/texture_preview_width");
+ Vector2 size(res->call("get_width"), res->call("get_height"));
+ if (size.width < size.height) {
+ tw = MAX((size.width / size.height) * tw, 1);
+ }
p_item->set_icon_max_width(1, tw);
p_item->set_icon(1, res);
p_item->set_text(1, "");
@@ -3618,6 +3622,10 @@ void PropertyEditor::update_tree() {
if (res->is_class("Texture")) {
int tw = EditorSettings::get_singleton()->get("docks/property_editor/texture_preview_width");
+ Vector2 size(res->call("get_width"), res->call("get_height"));
+ if (size.width < size.height) {
+ tw = MAX((size.width / size.height) * tw, 1);
+ }
item->set_icon_max_width(1, tw);
item->set_icon(1, res);
item->set_text(1, "");
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 7738157330..50fbb6a162 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -1775,7 +1775,7 @@ void PackedScene::set_path(const String &p_path, bool p_take_over) {
void PackedScene::_bind_methods() {
ClassDB::bind_method(D_METHOD("pack", "path:Node"), &PackedScene::pack);
- ClassDB::bind_method(D_METHOD("instance:Node", "edit_state"), &PackedScene::instance, DEFVAL(false));
+ ClassDB::bind_method(D_METHOD("instance:Node", "edit_state"), &PackedScene::instance, DEFVAL(GEN_EDIT_STATE_DISABLED));
ClassDB::bind_method(D_METHOD("can_instance"), &PackedScene::can_instance);
ClassDB::bind_method(D_METHOD("_set_bundled_scene"), &PackedScene::_set_bundled_scene);
ClassDB::bind_method(D_METHOD("_get_bundled_scene"), &PackedScene::_get_bundled_scene);