diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-03-16 00:47:37 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-03-16 01:14:59 -0300 |
commit | 53e1694e1e2b76026d862e84c1de88f62601cbc3 (patch) | |
tree | 545ef1e271b6df173d0626db887c87c4f6bdf4ba /tools | |
parent | 5b54361daf933e33d4b1545f14e2cebbd04d93ff (diff) |
New option to send canvas to render buffer
allows to use 3D environment effects for post processing such as Glow,
Bloom, HDR, etc. in 2D.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/editor_node.cpp | 5 | ||||
-rw-r--r-- | tools/editor/property_editor.cpp | 24 |
2 files changed, 29 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 3d42867d9a..5e571373ea 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -218,6 +218,7 @@ void EditorNode::_notification(int p_what) { } if (p_what==NOTIFICATION_ENTER_TREE) { + //MessageQueue::get_singleton()->push_call(this,"_get_scene_metadata"); get_tree()->set_editor_hint(true); get_tree()->get_root()->set_as_audio_listener(false); @@ -231,6 +232,8 @@ void EditorNode::_notification(int p_what) { VisualServer::get_singleton()->viewport_set_hide_scenario(get_scene_root()->get_viewport(),true); VisualServer::get_singleton()->viewport_set_hide_canvas(get_scene_root()->get_viewport(),true); + VisualServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(),true); + _editor_select(1); if (defer_load_scene!="") { @@ -3412,6 +3415,8 @@ EditorNode::EditorNode() { scene_root = memnew( Viewport ); + + //scene_root_base->add_child(scene_root); scene_root->set_meta("_editor_disable_input",true); VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport(),true); diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index f760ab1cb5..078a177ca1 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -651,6 +651,8 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty if (!RES(v).is_null()) { + + menu->add_icon_item(get_icon("EditResource","EditorIcons"),"Edit",OBJ_MENU_EDIT); menu->add_icon_item(get_icon("Del","EditorIcons"),"Clear",OBJ_MENU_CLEAR); menu->add_icon_item(get_icon("Duplicate","EditorIcons"),"Make Unique",OBJ_MENU_MAKE_UNIQUE); @@ -659,6 +661,13 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty menu->add_separator(); menu->add_icon_item(get_icon("Reload","EditorIcons"),"Re-Import",OBJ_MENU_REIMPORT); } + /*if (r.is_valid() && r->get_path().is_resource_file()) { + menu->set_item_tooltip(1,r->get_path()); + } else if (r.is_valid()) { + menu->set_item_tooltip(1,r->get_name()+" ("+r->get_type()+")"); + }*/ + } else { + } @@ -1858,6 +1867,14 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p p_item->set_text(1,"<"+res->get_type()+">"); }; + + if (res.is_valid() && res->get_path().is_resource_file()) { + p_item->set_tooltip(1,res->get_path()); + } else if (res.is_valid()) { + p_item->set_tooltip(1,res->get_name()+" ("+res->get_type()+")"); + } + + if (has_icon(res->get_type(),"EditorIcons")) { p_item->set_icon(0,get_icon(res->get_type(),"EditorIcons")); @@ -2584,6 +2601,13 @@ void PropertyEditor::update_tree() { if (has_icon(res->get_type(),"EditorIcons")) { type=res->get_type(); } + + if (res.is_valid() && res->get_path().is_resource_file()) { + item->set_tooltip(1,res->get_path()); + } else if (res.is_valid()) { + item->set_tooltip(1,res->get_name()+" ("+res->get_type()+")"); + } + } |