diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/editor_file_system.cpp | 4 | ||||
-rw-r--r-- | tools/editor/editor_file_system.h | 2 | ||||
-rw-r--r-- | tools/editor/editor_node.cpp | 12 | ||||
-rw-r--r-- | tools/editor/fileserver/editor_file_server.cpp | 2 | ||||
-rw-r--r-- | tools/editor/filesystem_dock.cpp | 4 | ||||
-rw-r--r-- | tools/editor/io_plugins/editor_font_import_plugin.cpp | 4 | ||||
-rw-r--r-- | tools/editor/plugins/animation_tree_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | tools/editor/plugins/canvas_item_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | tools/editor/plugins/script_text_editor.cpp | 2 | ||||
-rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 17 | ||||
-rw-r--r-- | tools/editor/property_editor.cpp | 2 | ||||
-rw-r--r-- | tools/editor/script_editor_debugger.cpp | 20 |
12 files changed, 39 insertions, 42 deletions
diff --git a/tools/editor/editor_file_system.cpp b/tools/editor/editor_file_system.cpp index 4a79a208e2..1d32415be9 100644 --- a/tools/editor/editor_file_system.cpp +++ b/tools/editor/editor_file_system.cpp @@ -1198,7 +1198,7 @@ EditorFileSystemDirectory* EditorFileSystem::find_file(const String& p_file,int* } -EditorFileSystemDirectory *EditorFileSystem::get_path(const String& p_path) { +EditorFileSystemDirectory *EditorFileSystem::get_filesystem_path(const String& p_path) { if (!filesystem || scanning) return NULL; @@ -1352,7 +1352,7 @@ void EditorFileSystem::_bind_methods() { ClassDB::bind_method(_MD("scan"),&EditorFileSystem::scan); ClassDB::bind_method(_MD("scan_sources"),&EditorFileSystem::scan_sources); ClassDB::bind_method(_MD("update_file","path"),&EditorFileSystem::update_file); - ClassDB::bind_method(_MD("get_path:EditorFileSystemDirectory","path"),&EditorFileSystem::get_path); + ClassDB::bind_method(_MD("get_filesystem_path:EditorFileSystemDirectory","path"),&EditorFileSystem::get_filesystem_path); ClassDB::bind_method(_MD("get_file_type","path"),&EditorFileSystem::get_file_type); ADD_SIGNAL( MethodInfo("filesystem_changed") ); diff --git a/tools/editor/editor_file_system.h b/tools/editor/editor_file_system.h index 97c253c70b..3a26f46aa9 100644 --- a/tools/editor/editor_file_system.h +++ b/tools/editor/editor_file_system.h @@ -233,7 +233,7 @@ public: void get_changed_sources(List<String> *r_changed); void update_file(const String& p_file); String find_resource_from_source(const String& p_path) const; - EditorFileSystemDirectory *get_path(const String& p_path); + EditorFileSystemDirectory *get_filesystem_path(const String& p_path); String get_file_type(const String& p_file) const; EditorFileSystemDirectory* find_file(const String& p_file,int* r_index) const; diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index e3c7cc40dc..bb33f19a2b 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -322,8 +322,8 @@ void EditorNode::_notification(int p_what) { } if (p_what==NOTIFICATION_READY) { - 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_hide_scenario(get_scene_root()->get_viewport_rid(),true); + VisualServer::get_singleton()->viewport_set_hide_canvas(get_scene_root()->get_viewport_rid(),true); VisualServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(),true); _editor_select(EDITOR_3D); @@ -892,10 +892,10 @@ void EditorNode::_save_scene_with_preview(String p_file) { RID viewport; bool is2d; if (c3d<c2d) { - viewport=scene_root->get_viewport(); + viewport=scene_root->get_viewport_rid(); is2d=true; } else { - viewport=SpatialEditor::get_singleton()->get_editor_viewport(0)->get_viewport_node()->get_viewport(); + viewport=SpatialEditor::get_singleton()->get_editor_viewport(0)->get_viewport_node()->get_viewport_rid(); is2d=false; } @@ -4229,7 +4229,7 @@ void EditorNode::progress_end_task_bg(const String& p_task) { Ref<Texture> EditorNode::_file_dialog_get_icon(const String& p_path) { - EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_path(p_path.get_base_dir()); + EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem_path(p_path.get_base_dir()); if (efsd) { String file = p_path.get_file(); @@ -5708,7 +5708,7 @@ EditorNode::EditorNode() { //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); + VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport_rid(),true); scene_root->set_disable_input(true); scene_root->set_as_audio_listener_2d(true); //scene_root->set_size_override(true,Size2(GlobalConfig::get_singleton()->get("display/width"),GlobalConfig::get_singleton()->get("display/height"))); diff --git a/tools/editor/fileserver/editor_file_server.cpp b/tools/editor/fileserver/editor_file_server.cpp index d640b0ad1d..6330b06d3e 100644 --- a/tools/editor/fileserver/editor_file_server.cpp +++ b/tools/editor/fileserver/editor_file_server.cpp @@ -38,7 +38,7 @@ void EditorFileServer::_close_client(ClientData *cd) { - cd->connection->disconnect(); + cd->connection->disconnect_from_host(); cd->efs->wait_mutex->lock(); cd->efs->to_wait.insert(cd->thread); cd->efs->wait_mutex->unlock(); diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp index 2df5a00e9d..792eb54dd4 100644 --- a/tools/editor/filesystem_dock.cpp +++ b/tools/editor/filesystem_dock.cpp @@ -396,7 +396,7 @@ void FileSystemDock::_update_files(bool p_keep_selection) { current_path->set_text(path); - EditorFileSystemDirectory *efd = EditorFileSystem::get_singleton()->get_path(path); + EditorFileSystemDirectory *efd = EditorFileSystem::get_singleton()->get_filesystem_path(path); if (!efd) return; @@ -832,7 +832,7 @@ void FileSystemDock::_move_operation(const String& p_to_path) { return; } - EditorFileSystemDirectory *efsd=EditorFileSystem::get_singleton()->get_path(move_dirs[i]); + EditorFileSystemDirectory *efsd=EditorFileSystem::get_singleton()->get_filesystem_path(move_dirs[i]); if (!efsd) continue; _find_inside_move_files(efsd,inside_files); diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp index c4619458ce..099535b1ef 100644 --- a/tools/editor/io_plugins/editor_font_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp @@ -439,7 +439,7 @@ class EditorFontImportDialog : public ConfirmationDialog { test_label->set_text(""); test_label->set_text(test_string->get_text()); - test_label->add_color_override("font_color",test_color->get_color()); + test_label->add_color_override("font_color",test_color->get_pick_color()); } void _update() { @@ -681,7 +681,7 @@ public: testhb->add_child(test_string); test_color = memnew( ColorPickerButton ); - test_color->set_color(get_color("font_color","Label")); + test_color->set_pick_color(get_color("font_color","Label")); test_color->set_h_size_flags(SIZE_EXPAND_FILL); test_color->set_stretch_ratio(1); test_color->connect("color_changed",this,"_update_text3"); diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp index ea63a0e858..eedebab1c9 100644 --- a/tools/editor/plugins/animation_tree_editor_plugin.cpp +++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp @@ -856,12 +856,12 @@ void AnimationTreeEditor::_gui_input(InputEvent p_event) { if (dst_click_type==CLICK_INPUT_SLOT && click_type==CLICK_OUTPUT_SLOT) { - anim_tree->connect(click_node,id,slot); + anim_tree->connect_nodes(click_node,id,slot); } if (click_type==CLICK_INPUT_SLOT && dst_click_type==CLICK_OUTPUT_SLOT) { - anim_tree->connect(id,click_node,click_slot); + anim_tree->connect_nodes(id,click_node,click_slot); } } break; @@ -1057,7 +1057,7 @@ void AnimationTreeEditor::_node_menu_item(int p_item) { if (rclick_type==CLICK_INPUT_SLOT) { - anim_tree->disconnect(rclick_node,rclick_slot); + anim_tree->disconnect_nodes(rclick_node,rclick_slot); update(); } @@ -1072,7 +1072,7 @@ void AnimationTreeEditor::_node_menu_item(int p_item) { const AnimationTreePlayer::Connection &c=E->get(); if( c.dst_node==rclick_node) { - anim_tree->disconnect(c.dst_node,c.dst_input); + anim_tree->disconnect_nodes(c.dst_node,c.dst_input); } } update(); diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 514e44e809..66dd98590d 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -3619,14 +3619,14 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) { if (p_visible) { canvas_item_editor->show(); canvas_item_editor->set_fixed_process(true); - VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport(),false); + VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(),false); canvas_item_editor->viewport->grab_focus(); } else { canvas_item_editor->hide(); canvas_item_editor->set_fixed_process(false); - VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport(),true); + VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(),true); } } diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp index 3de8812902..95e7afa04c 100644 --- a/tools/editor/plugins/script_text_editor.cpp +++ b/tools/editor/plugins/script_text_editor.cpp @@ -1194,7 +1194,7 @@ void ScriptTextEditor::_text_edit_gui_input(const InputEvent& ev) { Vector<float> color = stripped.split_floats(","); if (color.size() > 2) { float alpha = color.size() > 3 ? color[3] : 1.0f; - color_picker->set_color(Color(color[0], color[1], color[2], alpha)); + color_picker->set_pick_color(Color(color[0], color[1], color[2], alpha)); } color_panel->set_pos(get_global_transform().xform(get_local_mouse_pos())); Size2 ms = Size2(300, color_picker->get_combined_minimum_size().height+10); diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index e159df86ab..0f01f71294 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -2133,7 +2133,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) { previewing->disconnect("tree_exited",this,"_preview_exited_scene"); previewing=NULL; - VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), camera->get_camera() ); //restore + VS::get_singleton()->viewport_attach_camera( viewport->get_viewport_rid(), camera->get_camera() ); //restore if (!preview) preview_camera->hide(); view_menu->show(); @@ -2143,7 +2143,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) { previewing=preview; previewing->connect("tree_exited",this,"_preview_exited_scene"); - VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), preview->get_camera() ); //replace + VS::get_singleton()->viewport_attach_camera( viewport->get_viewport_rid(), preview->get_camera() ); //replace view_menu->hide(); surface->update(); @@ -2248,7 +2248,7 @@ void SpatialEditorViewport::set_state(const Dictionary& p_state) { if (pv && pv->cast_to<Camera>()) { previewing=pv->cast_to<Camera>(); previewing->connect("tree_exited",this,"_preview_exited_scene"); - VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), previewing->get_camera() ); //replace + VS::get_singleton()->viewport_attach_camera( viewport->get_viewport_rid(), previewing->get_camera() ); //replace view_menu->hide(); surface->update(); preview_camera->set_pressed(true); @@ -2607,7 +2607,7 @@ Dictionary SpatialEditor::get_state() const { d["viewports"]=vpdata; d["default_light"]=view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_DEFAULT_LIGHT) );; - d["ambient_light_color"]=settings_ambient_color->get_color(); + d["ambient_light_color"]=settings_ambient_color->get_pick_color(); d["default_srgb"]=view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_DEFAULT_SRGB) );; d["show_grid"]=view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_GRID) );; @@ -2696,7 +2696,7 @@ void SpatialEditor::set_state(const Dictionary& p_state) { } if (d.has("ambient_light_color")) { - settings_ambient_color->set_color(d["ambient_light_color"]); + settings_ambient_color->set_pick_color(d["ambient_light_color"]); //viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,d["ambient_light_color"]); } @@ -3724,7 +3724,7 @@ void SpatialEditor::clear() { settings_default_light_rot_y=Math_PI*0.2; //viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15)); - settings_ambient_color->set_color(Color(0.15,0.15,0.15)); + settings_ambient_color->set_pick_color(Color(0.15,0.15,0.15)); if (!light_instance.is_valid()) _menu_item_pressed(MENU_VIEW_USE_DEFAULT_LIGHT); @@ -4005,10 +4005,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { settings_ambient_color = memnew( ColorPickerButton ); settings_vbc->add_margin_child(TTR("Ambient Light Color:"),settings_ambient_color); settings_ambient_color->connect("color_changed",this,"_update_ambient_light_color"); - - //viewport_environment->set_enable_fx(Environment::FX_AMBIENT_LIGHT,true); - //viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15)); - settings_ambient_color->set_color(Color(0.15,0.15,0.15)); + settings_ambient_color->set_pick_color(Color(0.15,0.15,0.15)); settings_fov = memnew( SpinBox ); diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index f602c3ee72..8f294a5102 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -824,7 +824,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty color_picker->show(); color_picker->set_edit_alpha(hint!=PROPERTY_HINT_COLOR_NO_ALPHA); - color_picker->set_color(v); + color_picker->set_pick_color(v); set_size( Size2(300*EDSCALE, color_picker->get_combined_minimum_size().height+10*EDSCALE)); color_picker->set_focus_on_line_edit(); /* diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp index c8755b0473..e53e69d9e0 100644 --- a/tools/editor/script_editor_debugger.cpp +++ b/tools/editor/script_editor_debugger.cpp @@ -177,7 +177,7 @@ void ScriptEditorDebugger::debug_next() { ERR_FAIL_COND(!breaked); ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected()); + ERR_FAIL_COND(!connection->is_connected_to_host()); Array msg; msg.push_back("next"); ppeer->put_var(msg); @@ -189,7 +189,7 @@ void ScriptEditorDebugger::debug_step() { ERR_FAIL_COND(!breaked); ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected()); + ERR_FAIL_COND(!connection->is_connected_to_host()); Array msg; msg.push_back("step"); @@ -202,7 +202,7 @@ void ScriptEditorDebugger::debug_break() { ERR_FAIL_COND(breaked); ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected()); + ERR_FAIL_COND(!connection->is_connected_to_host()); Array msg; msg.push_back("break"); @@ -214,7 +214,7 @@ void ScriptEditorDebugger::debug_continue() { ERR_FAIL_COND(!breaked); ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected()); + ERR_FAIL_COND(!connection->is_connected_to_host()); OS::get_singleton()->enable_for_stealing_focus(EditorNode::get_singleton()->get_child_process_id()); @@ -294,7 +294,7 @@ void ScriptEditorDebugger::_scene_tree_property_select_object(ObjectID p_object) void ScriptEditorDebugger::_scene_tree_request() { ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected()); + ERR_FAIL_COND(!connection->is_connected_to_host()); Array msg; msg.push_back("request_scene_tree"); @@ -305,7 +305,7 @@ void ScriptEditorDebugger::_scene_tree_request() { void ScriptEditorDebugger::_video_mem_request() { ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected()); + ERR_FAIL_COND(!connection->is_connected_to_host()); Array msg; msg.push_back("request_video_mem"); @@ -993,7 +993,7 @@ void ScriptEditorDebugger::_notification(int p_what) { } }; - if (!connection->is_connected()) { + if (!connection->is_connected_to_host()) { stop(); editor->notify_child_process_exited(); //somehow, exited break; @@ -1183,7 +1183,7 @@ void ScriptEditorDebugger::_profiler_activate(bool p_enable) { void ScriptEditorDebugger::_profiler_seeked() { - if (!connection.is_valid() || !connection->is_connected()) + if (!connection.is_valid() || !connection->is_connected_to_host()) return; if (breaked) @@ -1205,7 +1205,7 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() { emit_signal("goto_script_line",s,int(d["line"])-1); ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected()); + ERR_FAIL_COND(!connection->is_connected_to_host()); /// Array msg; @@ -1620,7 +1620,7 @@ void ScriptEditorDebugger::set_hide_on_stop(bool p_hide) { void ScriptEditorDebugger::_paused() { ERR_FAIL_COND(connection.is_null()); - ERR_FAIL_COND(!connection->is_connected()); + ERR_FAIL_COND(!connection->is_connected_to_host()); if (!breaked && EditorNode::get_singleton()->get_pause_button()->is_pressed()) { debug_break(); |