-Merged the file server with the live editing and remote debug

-It is now really easy to deploy an android build with debug, and debug it
This commit is contained in:
Juan Linietsky 2015-08-06 02:37:40 -03:00
parent 8280bb0de0
commit 9d185ccc30
17 changed files with 182 additions and 81 deletions

View file

@ -34,7 +34,11 @@
Error ScriptDebuggerRemote::connect_to_host(const String& p_host,uint16_t p_port) {
IP_Address ip = IP::get_singleton()->resolve_hostname(p_host);
IP_Address ip;
if (p_host.is_valid_ip_address())
ip=p_host;
else
ip = IP::get_singleton()->resolve_hostname(p_host);
int port = p_port;

View file

@ -228,7 +228,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
String get_package_name();
String get_project_name() const;
void _fix_manifest(Vector<uint8_t>& p_manifest);
void _fix_manifest(Vector<uint8_t>& p_manifest, bool p_give_internet);
void _fix_resources(Vector<uint8_t>& p_manifest);
static Error save_apk_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total);
@ -249,11 +249,11 @@ public:
virtual int get_device_count() const;
virtual String get_device_name(int p_device) const;
virtual String get_device_info(int p_device) const;
virtual Error run(int p_device,bool p_dumb=false);
virtual Error run(int p_device,bool p_dumb=false,bool p_remote_debug=false);
virtual bool requieres_password(bool p_debug) const { return !p_debug; }
virtual String get_binary_extension() const { return "apk"; }
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false);
virtual Error export_project(const String& p_path, bool p_debug, bool p_dumb=false, bool p_remote_debug=false);
virtual bool can_export(String *r_error=NULL) const;
@ -608,7 +608,7 @@ String EditorExportPlatformAndroid::get_project_name() const {
}
void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest) {
void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool p_give_internet) {
const int CHUNK_AXML_FILE = 0x00080003;
@ -838,7 +838,10 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest) {
} else if (value.begins_with("godot.")) {
String perm = value.get_slice(".",1);
if (perms.has(perm)) {
print_line("PERM: "+perm+" HAS: "+itos(perms.has(perm)));
if (perms.has(perm) || (p_give_internet && perm=="INTERNET")) {
string_table[attr_value]="android.permission."+perm;
}
@ -1011,7 +1014,7 @@ Error EditorExportPlatformAndroid::save_apk_file(void *p_userdata,const String&
Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_debug, bool p_dumb) {
Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_debug, bool p_dumb,bool p_remote_debug) {
String src_apk;
@ -1075,7 +1078,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
if (file=="AndroidManifest.xml") {
_fix_manifest(data);
_fix_manifest(data,p_dumb || p_remote_debug);
}
if (file=="resources.arsc") {
@ -1153,9 +1156,11 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
}
}
gen_export_flags(cl,p_dumb,p_remote_debug);
if (p_dumb) {
String host = EditorSettings::get_singleton()->get("file_server/host");
/*String host = EditorSettings::get_singleton()->get("file_server/host");
int port = EditorSettings::get_singleton()->get("file_server/post");
String passwd = EditorSettings::get_singleton()->get("file_server/password");
cl.push_back("-rfs");
@ -1163,7 +1168,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
if (passwd!="") {
cl.push_back("-rfs_pass");
cl.push_back(passwd);
}
}*/
} else {
@ -1480,7 +1485,7 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) {
}
Error EditorExportPlatformAndroid::run(int p_device, bool p_dumb) {
Error EditorExportPlatformAndroid::run(int p_device, bool p_dumb, bool p_remote_debug) {
ERR_FAIL_INDEX_V(p_device,devices.size(),ERR_INVALID_PARAMETER);
device_lock->lock();
@ -1499,7 +1504,7 @@ Error EditorExportPlatformAndroid::run(int p_device, bool p_dumb) {
ep.step("Exporting APK",0);
String export_to=EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpexport.apk";
Error err = export_project(export_to,true,p_dumb);
Error err = export_project(export_to,true,p_dumb,p_remote_debug);
if (err) {
device_lock->unlock();
return err;

View file

@ -67,11 +67,11 @@ public:
virtual int get_device_count() const;
virtual String get_device_name(int p_device) const;
virtual String get_device_info(int p_device) const;
virtual Error run(int p_device,bool p_dumb=false);
virtual Error run(int p_device,bool p_dumb=false,bool p_remote_debug=false);
virtual bool requieres_password(bool p_debug) const { return !p_debug; }
virtual String get_binary_extension() const { return "bar"; }
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false);
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false,bool p_remote_debug=false);
virtual bool can_export(String *r_error=NULL) const;
@ -270,7 +270,7 @@ void EditorExportPlatformBB10::_fix_descriptor(Vector<uint8_t>& p_descriptor) {
Error EditorExportPlatformBB10::export_project(const String& p_path, bool p_debug, bool p_dumb) {
Error EditorExportPlatformBB10::export_project(const String& p_path, bool p_debug, bool p_dumb, bool p_remote_debug) {
EditorProgress ep("export","Exporting for BlackBerry 10",104);
@ -619,7 +619,7 @@ void EditorExportPlatformBB10::_device_poll_thread(void *ud) {
}
Error EditorExportPlatformBB10::run(int p_device, bool p_dumb) {
Error EditorExportPlatformBB10::run(int p_device, bool p_dumb, bool p_remote_debug) {
ERR_FAIL_INDEX_V(p_device,devices.size(),ERR_INVALID_PARAMETER);

View file

@ -77,11 +77,11 @@ public:
virtual int get_device_count() const { return show_run?1:0; };
virtual String get_device_name(int p_device) const { return "Run in Browser"; }
virtual String get_device_info(int p_device) const { return "Run exported HTML in the system's default browser."; }
virtual Error run(int p_device,bool p_dumb=false);
virtual Error run(int p_device,bool p_dumb=false,bool p_remote_debug=false);
virtual bool requieres_password(bool p_debug) const { return false; }
virtual String get_binary_extension() const { return "html"; }
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false);
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false,bool p_remote_debug=false);
virtual bool can_export(String *r_error=NULL) const;
@ -194,7 +194,7 @@ struct JSExportData {
Error EditorExportPlatformJavaScript::export_project(const String& p_path, bool p_debug, bool p_dumb) {
Error EditorExportPlatformJavaScript::export_project(const String& p_path, bool p_debug, bool p_dumb, bool p_remote_debug) {
String src_template;
@ -299,7 +299,7 @@ Error EditorExportPlatformJavaScript::export_project(const String& p_path, bool
}
Error EditorExportPlatformJavaScript::run(int p_device, bool p_dumb) {
Error EditorExportPlatformJavaScript::run(int p_device, bool p_dumb, bool p_remote_debug) {
String path = EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmp_export.html";
Error err = export_project(path,true,"");

View file

@ -57,11 +57,11 @@ public:
virtual int get_device_count() const { return 0; };
virtual String get_device_name(int p_device) const { return String(); }
virtual String get_device_info(int p_device) const { return String(); }
virtual Error run(int p_device,bool p_dumb=false);
virtual Error run(int p_device,bool p_dumb=false,bool p_remote_debug=false);
virtual bool requieres_password(bool p_debug) const { return false; }
virtual String get_binary_extension() const { return "zip"; }
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false);
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false,bool p_remote_debug=false);
virtual bool can_export(String *r_error=NULL) const;
@ -245,7 +245,7 @@ void EditorExportPlatformOSX::_fix_plist(Vector<uint8_t>& plist,const String& p_
}
}
Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug, bool p_dumb) {
Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug, bool p_dumb, bool p_remote_debug) {
String src_pkg;
@ -437,7 +437,7 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug
}
Error EditorExportPlatformOSX::run(int p_device, bool p_dumb) {
Error EditorExportPlatformOSX::run(int p_device, bool p_dumb, bool p_remote_debug) {
return OK;
}

View file

@ -40,6 +40,7 @@
#include "io/resource_saver.h"
#include "io/md5.h"
#include "io_plugins/editor_texture_import_plugin.h"
#include "tools/editor/plugins/script_editor_plugin.h"
String EditorImportPlugin::validate_source_path(const String& p_path) {
@ -916,6 +917,48 @@ static int _get_pad(int p_alignment, int p_n) {
return pad;
};
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, bool p_dumb, bool p_remote_debug) {
String host = EditorSettings::get_singleton()->get("network/debug_host");
if (p_dumb) {
int port = EditorSettings::get_singleton()->get("file_server/port");
String passwd = EditorSettings::get_singleton()->get("file_server/password");
r_flags.push_back("-rfs");
r_flags.push_back(host+":"+itos(port));
if (passwd!="") {
r_flags.push_back("-rfs_pass");
r_flags.push_back(passwd);
}
}
if (p_remote_debug) {
r_flags.push_back("-rdebug");
r_flags.push_back(host+":"+String::num(GLOBAL_DEF("debug/debug_port", 6007)));
List<String> breakpoints;
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
if (breakpoints.size()) {
r_flags.push_back("-bp");
String bpoints;
for(const List<String>::Element *E=breakpoints.front();E;E=E->next()) {
bpoints+=E->get().replace(" ","%20");
if (E->next())
bpoints+=",";
}
r_flags.push_back(bpoints);
}
}
}
Error EditorExportPlatform::save_pack_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total) {
@ -1029,7 +1072,7 @@ Error EditorExportPlatform::save_pack(FileAccess *dst,bool p_make_bundles, int p
return OK;
}
Error EditorExportPlatformPC::export_project(const String& p_path, bool p_debug, bool p_dumb) {
Error EditorExportPlatformPC::export_project(const String& p_path, bool p_debug, bool p_dumb,bool p_remote_debug) {

View file

@ -104,6 +104,7 @@ protected:
};
void gen_export_flags(Vector<String> &r_flags,bool p_dumb,bool p_remote_debug);
static Error save_pack_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total);
public:
@ -131,14 +132,14 @@ public:
virtual int get_device_count() const { return 0; }
virtual String get_device_name(int p_device) const { return ""; }
virtual String get_device_info(int p_device) const { return ""; }
virtual Error run(int p_device,bool p_dumb=false) { return OK; }
virtual Error run(int p_device,bool p_dumb=false,bool p_remote_debug=false) { return OK; }
virtual bool can_export(String *r_error=NULL) const=0;
virtual bool requieres_password(bool p_debug) const { return false; }
virtual String get_binary_extension() const=0;
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false)=0;
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false,bool p_remote_debug=false)=0;
EditorExportPlatform() {};
};
@ -188,7 +189,7 @@ public:
virtual ImageCompression get_image_compression() const { return IMAGE_COMPRESSION_BC; }
virtual String get_binary_extension() const { return binary_extension; }
virtual Error export_project(const String& p_path,bool p_debug,bool p_dumb=false);
virtual Error export_project(const String& p_path, bool p_debug, bool p_dumb=false, bool p_remote_debug=false);
virtual void set_release_binary32(const String& p_binary) { release_binary32=p_binary; }
virtual void set_debug_binary32(const String& p_binary) { debug_binary32=p_binary; }
virtual void set_release_binary64(const String& p_binary) { release_binary64=p_binary; }

View file

@ -2365,6 +2365,13 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
_run(true);
} break;
case RUN_PLAY_NATIVE: {
emit_signal("play_pressed");
editor_run.run_native_notify();
} break;
case RUN_SCENE_SETTINGS: {
@ -2397,32 +2404,42 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
case RUN_FILE_SERVER: {
//file_server
bool ischecked = fileserver_menu->get_popup()->is_item_checked( fileserver_menu->get_popup()->get_item_index(RUN_FILE_SERVER));
bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER));
if (ischecked) {
file_server->stop();
fileserver_menu->set_icon(gui_base->get_icon("FileServer","EditorIcons"));
fileserver_menu->get_popup()->set_item_text( fileserver_menu->get_popup()->get_item_index(RUN_FILE_SERVER),"Enable File Server");
//debug_button->set_icon(gui_base->get_icon("FileServer","EditorIcons"));
//debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Enable File Server");
} else {
file_server->start();
fileserver_menu->set_icon(gui_base->get_icon("FileServerActive","EditorIcons"));
fileserver_menu->get_popup()->set_item_text( fileserver_menu->get_popup()->get_item_index(RUN_FILE_SERVER),"Disable File Server");
//debug_button->set_icon(gui_base->get_icon("FileServerActive","EditorIcons"));
//debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Disable File Server");
}
fileserver_menu->get_popup()->set_item_checked( fileserver_menu->get_popup()->get_item_index(RUN_FILE_SERVER),!ischecked);
debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),!ischecked);
} break;
case RUN_LIVE_DEBUG: {
ScriptEditor::get_singleton()->get_debugger()->set_live_debugging(live_debug_button->is_pressed());
bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_LIVE_DEBUG));
debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_LIVE_DEBUG),!ischecked);
ScriptEditor::get_singleton()->get_debugger()->set_live_debugging(!ischecked);
} break;
case RUN_DEPLOY_DUMB_CLIENTS: {
bool ischecked = fileserver_menu->get_popup()->is_item_checked( fileserver_menu->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS));
fileserver_menu->get_popup()->set_item_checked( fileserver_menu->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS),!ischecked);
bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS));
debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS),!ischecked);
run_native->set_deploy_dumb(!ischecked);
} break;
case RUN_DEPLOY_REMOTE_DEBUG: {
bool ischecked = debug_button->get_popup()->is_item_checked( debug_button->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG));
debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG),!ischecked);
run_native->set_deploy_debug_remote(!ischecked);
} break;
case SETTINGS_UPDATE_ALWAYS: {
@ -4604,6 +4621,7 @@ EditorNode::EditorNode() {
menu_hb->add_child(native_play_button);
native_play_button->hide();
native_play_button->get_popup()->connect("item_pressed",this,"_run_in_device");
run_native->connect("native_run",this,"_menu_option",varray(RUN_PLAY_NATIVE));
// VSeparator *s1 = memnew( VSeparator );
// play_hb->add_child(s1);
@ -4624,29 +4642,21 @@ EditorNode::EditorNode() {
play_custom_scene_button->connect("pressed", this,"_menu_option",make_binds(RUN_PLAY_CUSTOM_SCENE));
play_custom_scene_button->set_tooltip("Play custom scene ("+keycode_get_string(KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_F5)+").");
live_debug_button = memnew( ToolButton );
play_hb->add_child(live_debug_button);
live_debug_button->set_toggle_mode(true);
live_debug_button->set_focus_mode(Control::FOCUS_NONE);
live_debug_button->set_icon(gui_base->get_icon("LiveDebug","EditorIcons"));
live_debug_button->connect("pressed", this,"_menu_option",make_binds(RUN_LIVE_DEBUG));
live_debug_button->set_tooltip("Toggle Live Debugging On/Off");
debug_button = memnew( MenuButton );
debug_button->set_flat(true);
play_hb->add_child(debug_button);
//debug_button->set_toggle_mode(true);
debug_button->set_focus_mode(Control::FOCUS_NONE);
debug_button->set_icon(gui_base->get_icon("Remote","EditorIcons"));
//debug_button->connect("pressed", this,"_menu_option",make_binds(RUN_LIVE_DEBUG));
debug_button->set_tooltip("Debug Options");
fileserver_menu = memnew( MenuButton );
play_hb->add_child(fileserver_menu);
fileserver_menu->set_flat(true);
fileserver_menu->set_focus_mode(Control::FOCUS_NONE);
fileserver_menu->set_icon(gui_base->get_icon("FileServer","EditorIcons"));
//fileserver_menu->connect("pressed", this,"_menu_option",make_binds(RUN_PLAY_CUSTOM_SCENE));
fileserver_menu->set_tooltip("Serve the project filesystem to remote clients.");
p=fileserver_menu->get_popup();
p->add_check_item("Enable File Server",RUN_FILE_SERVER);
p->set_item_tooltip(p->get_item_index(RUN_FILE_SERVER),"Enable/Disable the File Server.");
p=debug_button->get_popup();
p->add_check_item("Live Editing",RUN_LIVE_DEBUG);
p->add_check_item("File Server",RUN_FILE_SERVER);
p->add_separator();
p->add_check_item("Deploy Dumb Clients",RUN_DEPLOY_DUMB_CLIENTS);
//p->set_item_checked( p->get_item_index(RUN_DEPLOY_DUMB_CLIENTS),true );
p->set_item_tooltip(p->get_item_index(RUN_DEPLOY_DUMB_CLIENTS),"Deploy dumb clients when the File Server is active.");
p->add_check_item("Deploy Remote Debug",RUN_DEPLOY_REMOTE_DEBUG);
p->add_check_item("Deploy File Server Clients",RUN_DEPLOY_DUMB_CLIENTS);
p->connect("item_pressed",this,"_menu_option");
/*

View file

@ -146,6 +146,7 @@ class EditorNode : public Node {
RUN_PAUSE,
RUN_STOP,
RUN_PLAY_SCENE,
RUN_PLAY_NATIVE,
RUN_PLAY_CUSTOM_SCENE,
RUN_SCENE_SETTINGS,
RUN_SETTINGS,
@ -153,6 +154,7 @@ class EditorNode : public Node {
RUN_FILE_SERVER,
RUN_DEPLOY_DUMB_CLIENTS,
RUN_LIVE_DEBUG,
RUN_DEPLOY_REMOTE_DEBUG,
SETTINGS_UPDATE_ALWAYS,
SETTINGS_UPDATE_CHANGES,
SETTINGS_IMPORT,
@ -240,9 +242,9 @@ class EditorNode : public Node {
ToolButton *animation_menu;
ToolButton *play_scene_button;
ToolButton *play_custom_scene_button;
ToolButton *live_debug_button;
MenuButton *debug_button;
TextureProgress *audio_vu;
MenuButton *fileserver_menu;
//MenuButton *fileserver_menu;
TextEdit *load_errors;
AcceptDialog *load_error_dialog;

View file

@ -48,6 +48,7 @@ public:
Status get_status() const;
Error run(const String& p_scene,const String p_custom_args,const List<String>& p_breakpoints,const String& p_edited_scene);
void run_native_notify() { status=STATUS_PLAY; }
void stop();
EditorRun();
};

View file

@ -101,12 +101,18 @@ void EditorRunNative::_run_native(int p_idx,const String& p_platform) {
Ref<EditorExportPlatform> eep = EditorImportExport::get_singleton()->get_export_platform(p_platform);
ERR_FAIL_COND(eep.is_null());
eep->run(p_idx,deploy_dumb);
if (deploy_debug_remote) {
emit_signal("native_run");
}
eep->run(p_idx,deploy_dumb,deploy_debug_remote);
}
void EditorRunNative::_bind_methods() {
ObjectTypeDB::bind_method("_run_native",&EditorRunNative::_run_native);
ADD_SIGNAL(MethodInfo("native_run"));
}
void EditorRunNative::set_deploy_dumb(bool p_enabled) {
@ -119,10 +125,21 @@ bool EditorRunNative::is_deploy_dumb_enabled() const{
return deploy_dumb;
}
void EditorRunNative::set_deploy_debug_remote(bool p_enabled) {
deploy_debug_remote=p_enabled;
}
bool EditorRunNative::is_deploy_debug_remote_enabled() const{
return deploy_debug_remote;
}
EditorRunNative::EditorRunNative()
{
set_process(true);
first=true;
deploy_dumb=false;
deploy_debug_remote=false;
}

View file

@ -39,6 +39,7 @@ class EditorRunNative : public HBoxContainer {
Map<StringName,MenuButton*> menus;
bool first;
bool deploy_dumb;
bool deploy_debug_remote;
void _run_native(int p_idx,const String& p_platform);
@ -50,6 +51,10 @@ public:
void set_deploy_dumb(bool p_enabled);
bool is_deploy_dumb_enabled() const;
void set_deploy_debug_remote(bool p_enabled);
bool is_deploy_debug_remote_enabled() const;
EditorRunNative();
};

View file

@ -274,6 +274,7 @@ void EditorSettings::create() {
print_line("EditorSettings: Load OK!");
}
singleton->setup_network();
singleton->load_favorites();
singleton->scan_plugins();
@ -289,6 +290,7 @@ void EditorSettings::create() {
singleton->config_file_path=config_file_path;
singleton->settings_path=config_path+"/"+config_dir;
singleton->_load_defaults();
singleton->setup_network();
singleton->scan_plugins();
@ -330,6 +332,35 @@ Error EditorSettings::_load_plugin(const String& p_path, Plugin &plugin) {
return OK;
}
void EditorSettings::setup_network() {
List<IP_Address> local_ip;
IP::get_singleton()->get_local_addresses(&local_ip);
String lip;
String hint;
String current=get("network/debug_host");
for(List<IP_Address>::Element *E=local_ip.front();E;E=E->next()) {
String ip = E->get();
if (ip=="127.0.0.1")
continue;
if (lip!="")
lip=ip;
if (ip==current)
lip=current; //so it saves
if (hint!="")
hint+=",";
hint+=ip;
}
set("network/debug_host",lip);
add_property_hint(PropertyInfo(Variant::STRING,"network/debug_host",PROPERTY_HINT_ENUM,hint));
}
void EditorSettings::scan_plugins() {
Map<String,Plugin> new_plugins;
@ -465,6 +496,7 @@ void EditorSettings::_load_defaults() {
set("2d_editor/bone_selected_color",Color(0.9,0.45,0.45,0.9));
set("2d_editor/bone_ik_color",Color(0.9,0.9,0.45,0.9));
set("on_save/compress_binary_resources",true);
set("on_save/save_modified_external_resources",true);
set("on_save/save_paths_as_relative",false);

View file

@ -113,6 +113,7 @@ public:
void scan_plugins();
void enable_plugins();
void setup_network();
void raise_order(const String& p_name);
static void create();

View file

@ -318,27 +318,7 @@ EditorFileServer::EditorFileServer() {
cmd=CMD_NONE;
thread=Thread::create(_thread_start,this);
List<IP_Address> local_ip;
IP::get_singleton()->get_local_addresses(&local_ip);
EDITOR_DEF("file_server/port",6010);
String lip;
String hint;
for(List<IP_Address>::Element *E=local_ip.front();E;E=E->next()) {
String ip = E->get();
if (ip=="127.0.0.1")
continue;
if (lip!="")
lip=ip;
if (hint!="")
hint+=",";
hint+=ip;
}
EDITOR_DEF("file_server/host",lip);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"file_server/host",PROPERTY_HINT_ENUM,hint));
EDITOR_DEF("file_server/password","");
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B