aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/shader_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-08-27 21:07:15 +0200
committerRémi Verschelde2017-08-27 22:13:45 +0200
commit7ad14e7a3e6f87ddc450f7e34621eb5200808451 (patch)
tree8804d0dd24cc126087462edfbbbf73ed61b56b0e /editor/plugins/shader_editor_plugin.cpp
parent37da8155a4500a9386027b4d791a86186bc7ab4a (diff)
downloadgodot-7ad14e7a3e6f87ddc450f7e34621eb5200808451.tar.gz
godot-7ad14e7a3e6f87ddc450f7e34621eb5200808451.tar.zst
godot-7ad14e7a3e6f87ddc450f7e34621eb5200808451.zip
Diffstat (limited to 'editor/plugins/shader_editor_plugin.cpp')
-rw-r--r--editor/plugins/shader_editor_plugin.cpp101
1 files changed, 0 insertions, 101 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 2cdddd577..069a0c429 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -252,9 +252,6 @@ void ShaderEditor::_menu_option(int p_option) {
current->get_find_replace_bar()->popup_replace();
} break;
- //case SEARCH_LOCATE_SYMBOL: {
-
- //} break;
case SEARCH_GOTO_LINE: {
goto_line_dialog->popup_find_line(current->get_text_edit());
@@ -274,90 +271,6 @@ void ShaderEditor::_notification(int p_what) {
}
}
-Dictionary ShaderEditor::get_state() const {
-#if 0
- apply_shaders();
-
- Dictionary state;
-
- Array paths;
- int open=-1;
-
- for(int i=0;i<tab_container->get_child_count();i++) {
-
- ShaderTextEditor *ste = tab_container->Object::cast_to<ShaderTextEditor>(get_child(i));
- if (!ste)
- continue;
-
-
- Ref<Shader> shader = ste->get_edited_shader();
- if (shader->get_path()!="" && shader->get_path().find("local://")==-1 && shader->get_path().find("::")==-1) {
-
- paths.push_back(shader->get_path());
- } else {
-
-
- const Node *owner = _find_node_with_shader(get_root_node(),shader.get_ref_ptr());
- if (owner)
- paths.push_back(owner->get_path());
-
- }
-
- if (i==tab_container->get_current_tab())
- open=i;
- }
-
- if (paths.size())
- state["sources"]=paths;
- if (open!=-1)
- state["current"]=open;
-
-
- return state;
-#endif
- return Dictionary();
-}
-void ShaderEditor::set_state(const Dictionary &p_state) {
-#if 0
- print_line("setting state..");
- if (!p_state.has("sources"))
- return; //bleh
-
- Array sources = p_state["sources"];
- for(int i=0;i<sources.size();i++) {
-
- Variant source=sources[i];
-
- Ref<Shader> shader;
-
- if (source.get_type()==Variant::NODE_PATH) {
-
- print_line("cain find owner at path "+String(source));
- Node *owner=get_root_node()->get_node(source);
- if (!owner)
- continue;
-
- shader = owner->get_shader();
- } else if (source.get_type()==Variant::STRING) {
-
- print_line("loading at path "+String(source));
- shader = ResourceLoader::load(source,"Shader");
- }
-
- print_line("found shader at "+String(source)+"? - "+itos(shader.is_null()));
- if (shader.is_null()) //ah well..
- continue;
-
- get_scene()->get_root_node()->call("_resource_selected",shader);
- }
-
- if (p_state.has("current"))
- tab_container->set_current_tab(p_state["current"]);
-#endif
-}
-void ShaderEditor::clear() {
-}
-
void ShaderEditor::_params_changed() {
shader_editor->_validate_script();
@@ -519,20 +432,6 @@ void ShaderEditorPlugin::selected_notify() {
shader_editor->ensure_select_current();
}
-Dictionary ShaderEditorPlugin::get_state() const {
-
- return shader_editor->get_state();
-}
-
-void ShaderEditorPlugin::set_state(const Dictionary &p_state) {
-
- shader_editor->set_state(p_state);
-}
-void ShaderEditorPlugin::clear() {
-
- shader_editor->clear();
-}
-
void ShaderEditorPlugin::save_external_data() {
shader_editor->save_external_data();