diff options
38 files changed, 74 insertions, 209 deletions
diff --git a/core/image.cpp b/core/image.cpp index 943cbaf51d..42684e7ea7 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -1061,7 +1061,6 @@ Error Image::generate_mipmaps() { int size = _get_dst_image_size(width, height, format, mmcount); data.resize(size); - print_line("to gen mipmaps w " + itos(width) + " h " + itos(height) + " format " + get_format_name(format) + " mipmaps " + itos(mmcount) + " new size is: " + itos(size)); PoolVector<uint8_t>::Write wp = data.write(); diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 900db7c2dc..03c3c5f615 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -282,7 +282,6 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { property = _get_string(); NodePath np = NodePath(names, subnames, absolute, property); - //print_line("got path: "+String(np)); r_v = np; @@ -640,7 +639,6 @@ Error ResourceInteractiveLoaderBinary::poll() { String path = external_resources[s].path; - print_line("load external res: " + path); if (remaps.has(path)) { path = remaps[path]; } @@ -706,8 +704,6 @@ Error ResourceInteractiveLoaderBinary::poll() { String t = get_unicode_string(); - // print_line("loading resource of type "+t+" path is "+path); - Object *obj = ClassDB::instance(t); if (!obj) { error = ERR_FILE_CORRUPT; @@ -907,20 +903,6 @@ void ResourceInteractiveLoaderBinary::open(FileAccess *p_f) { external_resources.push_back(er); } - //see if the exporter has different set of external resources for more efficient loading - /* - String preload_depts = "deps/"+res_path.md5_text(); - if (Globals::get_singleton()->has(preload_depts)) { - external_resources.clear(); - //ignore external resources and use these - NodePath depts=Globals::get_singleton()->get(preload_depts); - external_resources.resize(depts.get_name_count()); - for(int i=0;i<depts.get_name_count();i++) { - external_resources[i].path=depts.get_name(i); - } - print_line(res_path+" - EXTERNAL RESOURCES: "+itos(external_resources.size())); - }*/ - print_bl("ext resources: " + itos(ext_resources_size)); uint32_t int_resources_size = f->get_32(); diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index f4a7d37fb0..0b5b9d1d24 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -169,7 +169,7 @@ void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color, float roughness, ino float dotNL = max(dot(N,L), 0.0 ); diffuse += dotNL * light_color / M_PI; - if (roughness > 0.0) { + if (roughness < 1.0) { vec3 H = normalize(V + L); float dotNH = max(dot(N,H), 0.0 ); @@ -940,7 +940,7 @@ vec3 metallic_to_specular_color(float metallic, float specular, vec3 albedo) { return mix(vec3(dielectric), albedo, metallic); // TODO: reference? } -void light_compute(vec3 N, vec3 L, vec3 V, vec3 B, vec3 T, vec3 light_color, vec3 attenuation, vec3 diffuse_color, vec3 transmission, float specular_blob_intensity, float roughness, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, inout vec3 diffuse_light, inout vec3 specular_light) { +void light_compute(vec3 N, vec3 L, vec3 V, vec3 B, vec3 T, vec3 light_color, vec3 attenuation, vec3 diffuse_color, vec3 transmission, float specular_blob_intensity, float roughness, float metallic, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, inout vec3 diffuse_light, inout vec3 specular_light) { #if defined(USE_LIGHT_SHADER_CODE) //light is written by the light shader @@ -1198,7 +1198,7 @@ vec3 light_transmittance(float translucency,vec3 light_vec, vec3 normal, vec3 po } #endif -void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal,vec3 binormal, vec3 tangent, vec3 albedo, vec3 transmission, float roughness, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light) { +void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal,vec3 binormal, vec3 tangent, vec3 albedo, vec3 transmission, float roughness, float metallic, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light) { vec3 light_rel_vec = omni_lights[idx].light_pos_inv_radius.xyz-vertex; float light_length = length( light_rel_vec ); @@ -1252,11 +1252,11 @@ void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal,vec3 bino light_attenuation*=mix(omni_lights[idx].shadow_color_contact.rgb,vec3(1.0),shadow); } - light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,omni_lights[idx].light_color_energy.rgb,light_attenuation,albedo,transmission,omni_lights[idx].light_params.z*p_blob_intensity,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light); + light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,omni_lights[idx].light_color_energy.rgb,light_attenuation,albedo,transmission,omni_lights[idx].light_params.z*p_blob_intensity,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light); } -void light_process_spot(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 binormal, vec3 tangent,vec3 albedo, vec3 transmission,float roughness, float rim,float rim_tint, float clearcoat, float clearcoat_gloss,float anisotropy,float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light) { +void light_process_spot(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 binormal, vec3 tangent,vec3 albedo, vec3 transmission,float roughness, float metallic, float rim, float rim_tint, float clearcoat, float clearcoat_gloss,float anisotropy,float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light) { vec3 light_rel_vec = spot_lights[idx].light_pos_inv_radius.xyz-vertex; float light_length = length( light_rel_vec ); @@ -1286,7 +1286,7 @@ void light_process_spot(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 bi light_attenuation*=mix(spot_lights[idx].shadow_color_contact.rgb,vec3(1.0),shadow); } - light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,spot_lights[idx].light_color_energy.rgb,light_attenuation,albedo,transmission,spot_lights[idx].light_params.z*p_blob_intensity,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light); + light_compute(normal,normalize(light_rel_vec),eye_vec,binormal,tangent,spot_lights[idx].light_color_energy.rgb,light_attenuation,albedo,transmission,spot_lights[idx].light_params.z*p_blob_intensity,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light); } @@ -1919,7 +1919,7 @@ FRAGMENT_SHADER_CODE specular_light*=mix(vec3(1.0),light_attenuation,specular_light_interp.a); #else - light_compute(normal,-light_direction_attenuation.xyz,eye_vec,binormal,tangent,light_color_energy.rgb,light_attenuation,albedo,transmission,light_params.z*specular_blob_intensity,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light); + light_compute(normal,-light_direction_attenuation.xyz,eye_vec,binormal,tangent,light_color_energy.rgb,light_attenuation,albedo,transmission,light_params.z*specular_blob_intensity,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,diffuse_light,specular_light); #endif @@ -1957,11 +1957,11 @@ FRAGMENT_SHADER_CODE #else for(int i=0;i<omni_light_count;i++) { - light_process_omni(omni_light_indices[i],vertex,eye_vec,normal,binormal,tangent,albedo,transmission,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,specular_blob_intensity,diffuse_light,specular_light); + light_process_omni(omni_light_indices[i],vertex,eye_vec,normal,binormal,tangent,albedo,transmission,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,specular_blob_intensity,diffuse_light,specular_light); } for(int i=0;i<spot_light_count;i++) { - light_process_spot(spot_light_indices[i],vertex,eye_vec,normal,binormal,tangent,albedo,transmission,roughness,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,specular_blob_intensity,diffuse_light,specular_light); + light_process_spot(spot_light_indices[i],vertex,eye_vec,normal,binormal,tangent,albedo,transmission,roughness,metallic,rim,rim_tint,clearcoat,clearcoat_gloss,anisotropy,specular_blob_intensity,diffuse_light,specular_light); } #endif //USE_VERTEX_LIGHTING diff --git a/editor/SCsub b/editor/SCsub index 772feca5f8..2b6494608b 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -415,12 +415,11 @@ if env['tools']: f.close() # API documentation - docs=[] - print("cdir is: "+env.Dir('#').abspath) - for f in os.listdir(os.path.join(env.Dir('#').abspath,"doc/classes")): - docs.append("#doc/classes/"+f) + docs = [] + for f in os.listdir(os.path.join(env.Dir('#').abspath, "doc/classes")): + docs.append("#doc/classes/" + f) - _make_doc_data_class_path(os.path.join(env.Dir('#').abspath,"editor/doc")) + _make_doc_data_class_path(os.path.join(env.Dir('#').abspath, "editor/doc")) env.Depends("#editor/doc_data_compressed.gen.h", docs) env.Command("#editor/doc_data_compressed.gen.h", docs, make_doc_header) diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp index 2d49840683..6dbfd84c86 100644 --- a/editor/collada/collada.cpp +++ b/editor/collada/collada.cpp @@ -422,11 +422,6 @@ Vector<String> Collada::_read_string_array(XMLParser &parser) { // parse String data String str = parser.get_node_data(); array = str.split_spaces(); - /* - for(int i=0;i<array.size();i++) { - print_line(itos(i)+": "+array[i]); - } - */ } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END) break; // end parsing text } @@ -1320,11 +1315,8 @@ void Collada::_parse_morph_controller(XMLParser &parser, String p_id) { state.morph_controller_data_map[p_id] = MorphControllerData(); MorphControllerData &morphdata = state.morph_controller_data_map[p_id]; - print_line("morph source: " + parser.get_attribute_value("source") + " id: " + p_id); morphdata.mesh = _uri_to_id(parser.get_attribute_value("source")); - print_line("morph source2: " + morphdata.mesh); morphdata.mode = parser.get_attribute_value("method"); - printf("JJmorph: %p\n", &morphdata); String current_source; while (parser.read() == OK) { @@ -1690,7 +1682,6 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) { } else if (section != "node") { //usually what defines the type of node - //print_line(" don't know what to do with "+section); if (section.begins_with("instance_")) { if (!node) { @@ -1863,9 +1854,6 @@ void Collada::_parse_animation(XMLParser &parser) { String source = _uri_to_id(channel_sources[i]); String target = channel_targets[i]; - if (!samplers.has(source)) { - print_line("channel lacks source: " + source); - } ERR_CONTINUE(!samplers.has(source)); Map<String, String> &sampler = samplers[source]; @@ -1970,8 +1958,6 @@ void Collada::_parse_animation(XMLParser &parser) { track.target = target; } - print_line("TARGET: " + track.target); - state.animation_tracks.push_back(track); if (!state.referenced_tracks.has(target)) @@ -2027,8 +2013,8 @@ void Collada::_parse_animation_clip(XMLParser &parser) { } state.animation_clips.push_back(clip); - print_line("found anim clip: " + clip.name); } + void Collada::_parse_scene(XMLParser &parser) { if (parser.is_empty()) { @@ -2044,7 +2030,6 @@ void Collada::_parse_scene(XMLParser &parser) { if (name == "instance_visual_scene") { state.root_visual_scene = _uri_to_id(parser.get_attribute_value("url")); - print_line("***ROOT VISUAL SCENE: " + state.root_visual_scene); } else if (name == "instance_physics_scene") { state.root_physics_scene = _uri_to_id(parser.get_attribute_value("url")); @@ -2213,9 +2198,6 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) { NodeJoint *nj = SAFE_CAST<NodeJoint *>(state.scene_map[nodeid]); ERR_CONTINUE(!nj); //broken collada - if (!nj->owner) { - print_line("no owner for: " + String(nodeid)); - } ERR_CONTINUE(!nj->owner); //weird, node should have a skeleton owner skeletons.insert(nj->owner); @@ -2268,10 +2250,6 @@ void Collada::_merge_skeletons2(VisualScene *p_vscene) { name = state.sid_to_node_map[F->key()]; - if (!state.scene_map.has(name)) { - print_line("no foundie node for: " + name); - } - ERR_CONTINUE(!state.scene_map.has(name)); Node *node = state.scene_map[name]; @@ -2299,9 +2277,6 @@ void Collada::_merge_skeletons2(VisualScene *p_vscene) { if (skeleton != sk) { //whoa.. wtf, merge. - print_line("MERGED BONES!!"); - - //NodeSkeleton *merged = E->get(); _remove_node(p_vscene, sk); for (int i = 0; i < sk->children.size(); i++) { @@ -2399,9 +2374,6 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L ERR_FAIL_COND_V(!state.scene_map.has(nodeid), false); //weird, it should have it... NodeJoint *nj = SAFE_CAST<NodeJoint *>(state.scene_map[nodeid]); ERR_FAIL_COND_V(!nj, false); - if (!nj->owner) { - print_line("Has no owner: " + nj->name); - } ERR_FAIL_COND_V(!nj->owner, false); //weird, node should have a skeleton owner NodeSkeleton *sk = nj->owner; diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index bc20a99809..efe32b99ab 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -342,12 +342,10 @@ String EditorExportPlatform::find_export_template(String template_file_name, Str bool has_system_path = (system_file != ""); system_file = system_file.plus_file(base_name); - print_line("test user file: " + user_file); // Prefer user file if (FileAccess::exists(user_file)) { return user_file; } - print_line("test system file: " + system_file); // Now check system file if (has_system_path) { @@ -927,13 +925,10 @@ void EditorExport::_save() { } config->save("res://export_presets.cfg"); - - print_line("saved ok"); } void EditorExport::save_presets() { - print_line("save presets"); if (block_save) return; save_timer->start(); diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 4ae786391b..a6fc8dcddf 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -240,17 +240,12 @@ void EditorFileSystem::_scan_filesystem() { String update_cache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_update3"); - print_line("try to see fs update2"); if (FileAccess::exists(update_cache)) { - - print_line("it exists"); - { FileAccessRef f = FileAccess::open(update_cache, FileAccess::READ); String l = f->get_line().strip_edges(); while (l != String()) { - print_line("erased cache for: " + l + " " + itos(file_cache.has(l))); file_cache.erase(l); //erase cache for this, so it gets updated l = f->get_line().strip_edges(); } @@ -278,9 +273,6 @@ void EditorFileSystem::_scan_filesystem() { memdelete(d); - //save back the findings - //String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("file_cache"); - f = FileAccess::open(fscache, FileAccess::WRITE); _save_filesystem_cache(new_filesystem, f); f->close(); @@ -322,7 +314,6 @@ bool EditorFileSystem::_update_scan_actions() { } break; case ItemAction::ACTION_DIR_ADD: { - //print_line("*ACTION ADD DIR: "+ia.new_dir->get_name()); int idx = 0; for (int i = 0; i < ia.dir->subdirs.size(); i++) { @@ -341,7 +332,6 @@ bool EditorFileSystem::_update_scan_actions() { case ItemAction::ACTION_DIR_REMOVE: { ERR_CONTINUE(!ia.dir->parent); - //print_line("*ACTION REMOVE DIR: "+ia.dir->get_name()); ia.dir->parent->subdirs.erase(ia.dir); memdelete(ia.dir); fs_changed = true; @@ -362,7 +352,6 @@ bool EditorFileSystem::_update_scan_actions() { } fs_changed = true; - //print_line("*ACTION ADD FILE: "+ia.new_file->file); } break; case ItemAction::ACTION_FILE_REMOVE: { @@ -374,7 +363,6 @@ bool EditorFileSystem::_update_scan_actions() { ia.dir->files.remove(idx); fs_changed = true; - //print_line("*ACTION REMOVE FILE: "+ia.file); } break; case ItemAction::ACTION_FILE_REIMPORT: { @@ -512,7 +500,6 @@ bool EditorFileSystem::_check_missing_imported_files(const String &p_path) { for (List<String>::Element *E = to_check.front(); E; E = E->next()) { if (!FileAccess::exists(E->get())) { - print_line("missing " + E->get() + ", reimport"); return false; } } @@ -639,22 +626,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess } else { - if (!fc) { - print_line("REIMPORT BECAUSE: not previously found"); - } else if (fc->modification_time != mt) { - print_line("REIMPORT BECAUSE: modified resource time " + itos(fc->modification_time) + " vs " + itos(mt)); - - } else if (fc->import_modification_time != import_mt) { - print_line("REIMPORT BECAUSE: modified .import time" + itos(fc->import_modification_time) + " vs " + itos(import_mt)); - - } else { - - print_line("REIMPORT BECAUSE: missing imported files"); - } - fi->type = ResourceFormatImporter::get_singleton()->get_resource_type(path); - //fi->deps = ResourceLoader::get_dependencies(path); pointless because it will be reimported, but.. - print_line("import extension tried resource type for " + path + " and its " + fi->type); fi->modified_time = 0; fi->import_modified_time = 0; fi->import_valid = ResourceLoader::is_import_valid(path); @@ -678,7 +650,6 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess //new or modified time fi->type = ResourceLoader::get_resource_type(path); fi->deps = _get_dependencies(path); - print_line("regular import tried resource type for " + path + " and its " + fi->type); fi->modified_time = mt; fi->import_modified_time = 0; fi->import_valid = true; @@ -697,8 +668,6 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const bool updated_dir = false; String cd = p_dir->get_path(); - //print_line("dir: "+p_dir->get_path()+" MODTIME: "+itos(p_dir->modified_time)+" CTIME: "+itos(current_mtime)); - if (current_mtime != p_dir->modified_time) { updated_dir = true; @@ -791,11 +760,6 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const if (import_extensions.has(ext)) { //if it can be imported, and it was added, it needs to be reimported - print_line("REIMPORT: file was not found before, reimport"); - print_line("at dir: " + p_dir->get_path() + " file: " + f); - for (int i = 0; i < p_dir->files.size(); i++) { - print_line(itos(i) + ": " + p_dir->files[i]->file); - } ItemAction ia; ia.action = ItemAction::ACTION_FILE_REIMPORT; ia.dir = p_dir; @@ -835,20 +799,15 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const bool reimport = false; if (mt != p_dir->files[i]->modified_time) { - print_line("REIMPORT: modified time changed, reimport"); reimport = true; //it was modified, must be reimported. } else if (!FileAccess::exists(path + ".import")) { - print_line("REIMPORT: no .import exists, reimport"); reimport = true; //no .import file, obviously reimport } else { uint64_t import_mt = FileAccess::get_modified_time(path + ".import"); - //print_line(itos(import_mt) + " vs " + itos(p_dir->files[i]->import_modified_time)); if (import_mt != p_dir->files[i]->import_modified_time) { - print_line("REIMPORT: import modified changed, reimport"); reimport = true; } else if (!_check_missing_imported_files(path)) { - print_line("REIMPORT: imported files removed"); reimport = true; } } @@ -947,9 +906,6 @@ void EditorFileSystem::scan_changes() { Thread::Settings s; s.priority = Thread::PRIORITY_LOW; thread_sources = Thread::create(_thread_func_sources, this, s); - //tree->hide(); - //print_line("SCAN BEGIN!"); - //progress->show(); } } @@ -1000,7 +956,6 @@ void EditorFileSystem::_notification(int p_what) { thread_sources = NULL; if (_update_scan_actions()) emit_signal("filesystem_changed"); - //print_line("sources changed: "+itos(sources_changed.size())); emit_signal("sources_changed", sources_changed.size() > 0); } } else if (!scanning) { @@ -1017,10 +972,6 @@ void EditorFileSystem::_notification(int p_what) { _update_scan_actions(); emit_signal("filesystem_changed"); emit_signal("sources_changed", sources_changed.size() > 0); - //print_line("initial sources changed: "+itos(sources_changed.size())); - - } else { - //progress->set_text("Scanning...\n"+itos(total*100)+"%"); } } } break; @@ -1239,7 +1190,6 @@ void EditorFileSystem::_save_late_updated_files() { void EditorFileSystem::_resource_saved(const String &p_path) { - //print_line("resource saved: "+p_path); EditorFileSystem::get_singleton()->update_file(p_path); } @@ -1311,14 +1261,10 @@ void EditorFileSystem::update_file(const String &p_file) { _save_late_updated_files(); //files need to be updated in the re-scan } - //print_line("UPDATING: "+p_file); fs->files[cpos]->type = type; fs->files[cpos]->modified_time = FileAccess::get_modified_time(p_file); fs->files[cpos]->deps = _get_dependencies(p_file); fs->files[cpos]->import_valid = ResourceLoader::is_import_valid(p_file); - //if (FileAccess::exists(p_file+".import")) { - // fs->files[cpos]->import_modified_time=FileAccess::get_modified_time(p_file+".import"); - //} EditorResourcePreview::get_singleton()->call_deferred("check_for_invalidation", p_file); call_deferred("emit_signal", "filesystem_changed"); //update later @@ -1326,8 +1272,6 @@ void EditorFileSystem::update_file(const String &p_file) { void EditorFileSystem::_reimport_file(const String &p_file) { - print_line("REIMPORTING: " + p_file); - EditorFileSystemDirectory *fs = NULL; int cpos = -1; bool found = _find_file(p_file, &fs, cpos); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index f109cdddc3..b77525c0ba 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -308,6 +308,8 @@ void EditorNode::_notification(int p_what) { } _update_scene_tabs(); + recent_scenes->set_as_minsize(); + // debugger area if (ScriptEditor::get_singleton()->get_debugger()->is_visible()) bottom_panel->add_style_override("panel", gui_base->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")); @@ -406,7 +408,6 @@ void EditorNode::_fs_changed() { uint64_t mt = FileAccess::get_modified_time(E->get()->get_import_path()); if (mt != E->get()->get_import_last_modified_time()) { - print_line("success"); changed.push_back(E->get()); } #endif @@ -431,7 +432,7 @@ void EditorNode::_fs_changed() { } void EditorNode::_resources_reimported(const Vector<String> &p_resources) { - print_line("reimporting"); + List<String> scenes; //will load later for (int i = 0; i < p_resources.size(); i++) { @@ -463,7 +464,6 @@ void EditorNode::_sources_changed(bool p_exist) { if (defer_load_scene != "") { - print_line("loading scene DEFERRED"); load_scene(defer_load_scene); defer_load_scene = ""; } @@ -781,7 +781,6 @@ bool EditorNode::_find_and_save_resource(RES p_res, Map<RES, bool> &processed, i if (p_res->get_path().is_resource_file()) { if (changed || subchanged) { //save - print_line("Also saving modified external resource: " + p_res->get_path()); ResourceSaver::save(p_res->get_path(), p_res, flags); } processed[p_res] = false; //because it's a file @@ -1991,7 +1990,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { case EDIT_UNDO: { if (Input::get_singleton()->get_mouse_button_mask() & 0x7) { - print_line("no because state"); break; // can't undo while mouse buttons are pressed } @@ -2960,7 +2958,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b dependency_errors.clear(); - print_line("actually loading it"); Error err; Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", true, &err); if (!sdata.is_valid()) { @@ -4297,15 +4294,11 @@ void EditorNode::reload_scene(const String &p_path) { //first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk - print_line("reloading: " + p_path); List<Ref<Resource> > cached; ResourceCache::get_cached_resources(&cached); List<Ref<Resource> > to_clear; //clear internal resources from previous scene from being used for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) { - if (E->get()->get_path().find("::") != -1) { - print_line(E->get()->get_path()); - } if (E->get()->get_path().begins_with(p_path + "::")) { //subresources of existing scene to_clear.push_back(E->get()); } @@ -4313,7 +4306,6 @@ void EditorNode::reload_scene(const String &p_path) { //so reload reloads everything, clear subresources of previous scene while (to_clear.front()) { - print_line("bye bye: " + to_clear.front()->get()->get_path()); to_clear.front()->get()->set_path(""); to_clear.pop_front(); } diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 229d6adfef..c8abc1f9db 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -632,6 +632,7 @@ void EditorPlugin::_bind_methods() { BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_BOTTOM); BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_MENU); BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE); + BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_BOTTOM); BIND_ENUM_CONSTANT(CONTAINER_PROPERTY_EDITOR_BOTTOM); BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_UL); diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 437ad5ac3f..f92962a4cb 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -185,7 +185,6 @@ void EditorResourcePreview::_thread() { path += ":" + itos(cache[item.path].last_hash); //keep last hash (see description of what this is in condition below) } - print_line("cached: " + item.path); _preview_ready(path, cache[item.path].preview, item.id, item.function, item.userdata); preview_mutex->unlock(); @@ -201,16 +200,12 @@ void EditorResourcePreview::_thread() { if (item.resource.is_valid()) { - print_line("generated: " + item.path); - texture = _generate_preview(item, String()); //adding hash to the end of path (should be ID:<objid>:<hash>) because of 5 argument limit to call_deferred _preview_ready(item.path + ":" + itos(item.resource->hash_edited_version()), texture, item.id, item.function, item.userdata); } else { - print_line("from file: " + item.path); - String temp_path = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp"); String cache_base = ProjectSettings::get_singleton()->globalize_path(item.path).md5_text(); cache_base = temp_path.plus_file("resthumb-" + cache_base); @@ -218,12 +213,9 @@ void EditorResourcePreview::_thread() { //does not have it, try to load a cached thumbnail String file = cache_base + ".txt"; - //print_line("cachetxt at "+file); FileAccess *f = FileAccess::open(file, FileAccess::READ); if (!f) { - //print_line("generate because not cached"); - //generate texture = _generate_preview(item, cache_base); } else { @@ -283,7 +275,6 @@ void EditorResourcePreview::_thread() { } } - //print_line("notify of preview ready"); _preview_ready(item.path, texture, item.id, item.function, item.userdata); } } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 992322978e..29859a1a56 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -233,7 +233,6 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = clock_t end_time = clock(); double time_d = (double)(end_time - begin_time) / CLOCKS_PER_SEC; - print_line("SVG_GENERATION TIME: " + rtos(time_d)); #else print_line("Sorry no icons for you"); #endif diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 6ef1758363..4d658438cd 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -1106,7 +1106,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me for (int mi = 0; mi < p_morph_meshes.size(); mi++) { - //print_line("want surface "+itos(mi)+" has "+itos(p_morph_meshes[mi]->get_surface_count())); Array a = p_morph_meshes[mi]->surface_get_arrays(surface); //add valid weight and bone arrays if they exist, TODO check if they are unique to shape (generally not) @@ -1187,9 +1186,6 @@ Error ColladaImport::_create_resources(Collada::Node *p_node) { if (cd.control_vertices.has("TILT") && cd.sources.has(cd.control_vertices["TILT"])) tilts = &cd.sources[cd.control_vertices["TILT"]]; - if (tilts) { - print_line("FOUND TILTS!!!"); - } int pc = vertices.array.size() / 3; for (int i = 0; i < pc; i++) { @@ -1237,12 +1233,8 @@ Error ColladaImport::_create_resources(Collada::Node *p_node) { Vector<int> bone_remap; Vector<Ref<ArrayMesh> > morphs; - print_line("mesh: " + String(mi->get_name())); - if (ng->controller) { - print_line("has controller"); - String ngsource = ng->source; if (collada.state.skin_controller_data_map.has(ngsource)) { @@ -1255,9 +1247,6 @@ Error ColladaImport::_create_resources(Collada::Node *p_node) { ERR_FAIL_COND_V(skeletons.empty(), ERR_INVALID_DATA); String skname = skeletons[0]; - if (!node_map.has(skname)) { - print_line("no node for skeleton " + skname); - } ERR_FAIL_COND_V(!node_map.has(skname), ERR_INVALID_DATA); NodeMap nmsk = node_map[skname]; Skeleton *sk = Object::cast_to<Skeleton>(nmsk.node); @@ -1295,22 +1284,16 @@ Error ColladaImport::_create_resources(Collada::Node *p_node) { for (int i = 0; i < bone_remap.size(); i++) { String str = joint_src->sarray[i]; - if (!bone_remap_map.has(str)) { - print_line("bone not found for remap: " + str); - print_line("in skeleton: " + skname); - } ERR_FAIL_COND_V(!bone_remap_map.has(str), ERR_INVALID_DATA); bone_remap[i] = bone_remap_map[str]; } } if (collada.state.morph_controller_data_map.has(ngsource)) { - print_line("is morph " + ngsource); + //it's a morph!! morph = &collada.state.morph_controller_data_map[ngsource]; meshid = morph->mesh; - printf("KKmorph: %p\n", morph); - print_line("morph mshid: " + meshid); Vector<String> targets; diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 84808cb876..ffda34653d 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1169,6 +1169,8 @@ void ScriptEditor::_notification(int p_what) { script_forward->set_icon(get_icon("Forward", "EditorIcons")); script_back->set_icon(get_icon("Back", "EditorIcons")); + + recent_scripts->set_as_minsize(); } break; default: diff --git a/main/performance.cpp b/main/performance.cpp index 0f3383c4a8..c4b62559c7 100644 --- a/main/performance.cpp +++ b/main/performance.cpp @@ -57,10 +57,10 @@ void Performance::_bind_methods() { BIND_ENUM_CONSTANT(RENDER_SHADER_CHANGES_IN_FRAME); BIND_ENUM_CONSTANT(RENDER_SURFACE_CHANGES_IN_FRAME); BIND_ENUM_CONSTANT(RENDER_DRAW_CALLS_IN_FRAME); - BIND_ENUM_CONSTANT(RENDER_USAGE_VIDEO_MEM_TOTAL); BIND_ENUM_CONSTANT(RENDER_VIDEO_MEM_USED); BIND_ENUM_CONSTANT(RENDER_TEXTURE_MEM_USED); BIND_ENUM_CONSTANT(RENDER_VERTEX_MEM_USED); + BIND_ENUM_CONSTANT(RENDER_USAGE_VIDEO_MEM_TOTAL); BIND_ENUM_CONSTANT(PHYSICS_2D_ACTIVE_OBJECTS); BIND_ENUM_CONSTANT(PHYSICS_2D_COLLISION_PAIRS); BIND_ENUM_CONSTANT(PHYSICS_2D_ISLAND_COUNT); diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp index d2a3e29849..87f9cddaa2 100644 --- a/modules/gdnative/register_types.cpp +++ b/modules/gdnative/register_types.cpp @@ -163,7 +163,10 @@ void register_gdnative_types() { // run singletons - Array singletons = ProjectSettings::get_singleton()->get("gdnative/singletons"); + Array singletons = Array(); + if (ProjectSettings::get_singleton()->has_setting("gdnative/singletons")) { + singletons = ProjectSettings::get_singleton()->get("gdnative/singletons"); + } singleton_gdnatives.resize(singletons.size()); diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp index 92d88207b3..08ac624504 100644 --- a/modules/hdr/image_loader_hdr.cpp +++ b/modules/hdr/image_loader_hdr.cpp @@ -38,7 +38,6 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force String header = f->get_token(); - print_line("HEADER: " + header); ERR_FAIL_COND_V(header != "#?RADIANCE" && header != "#?RGBE", ERR_FILE_UNRECOGNIZED); while (true) { @@ -64,8 +63,6 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force int width = f->get_line().to_int(); - print_line("HDR w: " + itos(width) + " h:" + itos(height)); - PoolVector<uint8_t> imgdata; imgdata.resize(height * width * sizeof(uint32_t)); @@ -102,7 +99,6 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force len <<= 8; len |= f->get_8(); - print_line("line: " + itos(len)); if (len != width) { ERR_EXPLAIN("invalid decoded scanline length, corrupt HDR"); ERR_FAIL_V(ERR_FILE_CORRUPT); diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp index 98b57adc50..d7aedbbcf0 100644 --- a/modules/mono/mono_gd/gd_mono.cpp +++ b/modules/mono/mono_gd/gd_mono.cpp @@ -132,7 +132,7 @@ void GDMono::initialize() { ERR_FAIL_NULL(Engine::get_singleton()); - OS::get_singleton()->print("Initializing mono...\n"); + OS::get_singleton()->print("Mono: Initializing module...\n"); #ifdef DEBUG_METHODS_ENABLED _initialize_and_check_api_hashes(); @@ -214,7 +214,7 @@ void GDMono::initialize() { // The following assemblies are not required at initialization _load_all_script_assemblies(); - OS::get_singleton()->print("Mono: EVERYTHING OK\n"); + OS::get_singleton()->print("Mono: ALL IS GOOD\n"); } #ifndef MONO_GLUE_DISABLED diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 9fe1f291d6..79be1501a7 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -267,7 +267,6 @@ class EditorExportAndroid : public EditorExportPlatform { if (different) { - print_line("DIFFERENT!"); Vector<Device> ndevices; for (int i = 0; i < ldevices.size(); i++) { diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 031b397988..cd4230acd4 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -44,7 +44,6 @@ def can_build(): if (os.system(mingw64 + test) == 0 or os.system(mingw32 + test) == 0): return True - print("Could not detect MinGW. Ensure its binaries are in your PATH or that MINGW32_PREFIX or MINGW64_PREFIX are properly defined.") return False diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 4fcd6893b8..d65a3bfe80 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -735,8 +735,8 @@ void Camera2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_draw_limits"), "set_limit_drawing_enabled", "is_limit_drawing_enabled"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_draw_drag_margin"), "set_margin_drawing_enabled", "is_margin_drawing_enabled"); - BIND_ENUM_CONSTANT(ANCHOR_MODE_DRAG_CENTER); BIND_ENUM_CONSTANT(ANCHOR_MODE_FIXED_TOP_LEFT); + BIND_ENUM_CONSTANT(ANCHOR_MODE_DRAG_CENTER); } Camera2D::Camera2D() { diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index d9bb6576d9..b41ba7f590 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1045,11 +1045,11 @@ void CanvasItem::_bind_methods() { BIND_ENUM_CONSTANT(BLEND_MODE_MUL); BIND_ENUM_CONSTANT(BLEND_MODE_PREMULT_ALPHA); + BIND_CONSTANT(NOTIFICATION_TRANSFORM_CHANGED); BIND_CONSTANT(NOTIFICATION_DRAW); BIND_CONSTANT(NOTIFICATION_VISIBILITY_CHANGED); BIND_CONSTANT(NOTIFICATION_ENTER_CANVAS); BIND_CONSTANT(NOTIFICATION_EXIT_CANVAS); - BIND_CONSTANT(NOTIFICATION_TRANSFORM_CHANGED); } Transform2D CanvasItem::get_canvas_transform() const { diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index d3b37ae903..f0ee64a53f 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -910,10 +910,10 @@ void RigidBody2D::_bind_methods() { ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body"))); ADD_SIGNAL(MethodInfo("sleeping_state_changed")); - BIND_ENUM_CONSTANT(MODE_STATIC); - BIND_ENUM_CONSTANT(MODE_KINEMATIC); BIND_ENUM_CONSTANT(MODE_RIGID); + BIND_ENUM_CONSTANT(MODE_STATIC); BIND_ENUM_CONSTANT(MODE_CHARACTER); + BIND_ENUM_CONSTANT(MODE_KINEMATIC); BIND_ENUM_CONSTANT(CCD_MODE_DISABLED); BIND_ENUM_CONSTANT(CCD_MODE_CAST_RAY); diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index ca7b6aa0e4..b0fd57baf5 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -341,12 +341,12 @@ void VisibilityEnabler2D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PROCESS); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "physics_process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PHYSICS_PROCESS); - BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS); + BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); BIND_ENUM_CONSTANT(ENABLER_PAUSE_PARTICLES); - BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES); BIND_ENUM_CONSTANT(ENABLER_PARENT_PROCESS); BIND_ENUM_CONSTANT(ENABLER_PARENT_PHYSICS_PROCESS); + BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES); BIND_ENUM_CONSTANT(ENABLER_MAX); } diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 9d55a82824..d5a030b35c 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -1478,6 +1478,7 @@ void GIProbe::_bind_methods() { BIND_ENUM_CONSTANT(SUBDIV_64); BIND_ENUM_CONSTANT(SUBDIV_128); BIND_ENUM_CONSTANT(SUBDIV_256); + BIND_ENUM_CONSTANT(SUBDIV_512); BIND_ENUM_CONSTANT(SUBDIV_MAX); } diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index b7cd9bd2dc..e994f4c79e 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -248,7 +248,7 @@ void Light::_bind_methods() { BIND_ENUM_CONSTANT(PARAM_SHADOW_SPLIT_3_OFFSET); BIND_ENUM_CONSTANT(PARAM_SHADOW_NORMAL_BIAS); BIND_ENUM_CONSTANT(PARAM_SHADOW_BIAS); - + BIND_ENUM_CONSTANT(PARAM_SHADOW_BIAS_SPLIT_SCALE); BIND_ENUM_CONSTANT(PARAM_MAX); } diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index d7fdf94d40..4c661e6a88 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -870,10 +870,10 @@ void RigidBody::_bind_methods() { ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body"))); ADD_SIGNAL(MethodInfo("sleeping_state_changed")); - BIND_ENUM_CONSTANT(MODE_STATIC); - BIND_ENUM_CONSTANT(MODE_KINEMATIC); BIND_ENUM_CONSTANT(MODE_RIGID); + BIND_ENUM_CONSTANT(MODE_STATIC); BIND_ENUM_CONSTANT(MODE_CHARACTER); + BIND_ENUM_CONSTANT(MODE_KINEMATIC); BIND_ENUM_CONSTANT(AXIS_LOCK_DISABLED); BIND_ENUM_CONSTANT(AXIS_LOCK_X); diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp index d3203bacec..e60b32a92a 100644 --- a/scene/3d/visibility_notifier.cpp +++ b/scene/3d/visibility_notifier.cpp @@ -252,8 +252,8 @@ void VisibilityEnabler::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "pause_animations"), "set_enabler", "is_enabler_enabled", ENABLER_PAUSE_ANIMATIONS); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "freeze_bodies"), "set_enabler", "is_enabler_enabled", ENABLER_FREEZE_BODIES); - BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS); + BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); BIND_ENUM_CONSTANT(ENABLER_MAX); } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 91c5263bf5..54a58159ac 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2811,12 +2811,12 @@ void Control::_bind_methods() { BIND_ENUM_CONSTANT(PRESET_WIDE); BIND_ENUM_CONSTANT(PRESET_MODE_MINSIZE); - BIND_ENUM_CONSTANT(PRESET_MODE_KEEP_HEIGHT); BIND_ENUM_CONSTANT(PRESET_MODE_KEEP_WIDTH); + BIND_ENUM_CONSTANT(PRESET_MODE_KEEP_HEIGHT); BIND_ENUM_CONSTANT(PRESET_MODE_KEEP_SIZE); - BIND_ENUM_CONSTANT(SIZE_EXPAND); BIND_ENUM_CONSTANT(SIZE_FILL); + BIND_ENUM_CONSTANT(SIZE_EXPAND); BIND_ENUM_CONSTANT(SIZE_EXPAND_FILL); BIND_ENUM_CONSTANT(SIZE_SHRINK_CENTER); BIND_ENUM_CONSTANT(SIZE_SHRINK_END); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 07b49538d9..ad519d8d0c 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1984,6 +1984,7 @@ void RichTextLabel::_bind_methods() { BIND_ENUM_CONSTANT(ITEM_ALIGN); BIND_ENUM_CONSTANT(ITEM_INDENT); BIND_ENUM_CONSTANT(ITEM_LIST); + BIND_ENUM_CONSTANT(ITEM_TABLE); BIND_ENUM_CONSTANT(ITEM_META); } diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 085f6de6b8..49823e18fc 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -820,9 +820,9 @@ void Tabs::_bind_methods() { BIND_ENUM_CONSTANT(ALIGN_RIGHT); BIND_ENUM_CONSTANT(ALIGN_MAX); + BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_NEVER); BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_ACTIVE_ONLY); BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_ALWAYS); - BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_NEVER); BIND_ENUM_CONSTANT(CLOSE_BUTTON_MAX); } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index de69406b37..977ba2da7c 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -732,6 +732,19 @@ void TextEdit::_notification(int p_what) { VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg, ofs_y, xmargin_end - xmargin_beg, get_row_height()), cache.mark_color); } + if (str.length() == 0) { + // draw line background if empty as we won't loop at at all + if (line == cursor.line) { + VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(0, ofs_y, xmargin_end, get_row_height()), cache.current_line_color); + } + + // give visual indication of empty selected line + if (selection.active && line >= selection.from_line && line <= selection.to_line) { + int char_w = cache.font->get_char_size(' ').width; + VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg, ofs_y, char_w, get_row_height()), cache.selection_color); + } + } + if (text.is_breakpoint(line) && !draw_breakpoint_gutter) { #ifdef TOOLS_ENABLED VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg, ofs_y + get_row_height() - EDSCALE, xmargin_end - xmargin_beg, EDSCALE), cache.breakpoint_color); @@ -953,15 +966,18 @@ void TextEdit::_notification(int p_what) { bool in_selection = (selection.active && line >= selection.from_line && line <= selection.to_line && (line > selection.from_line || j >= selection.from_column) && (line < selection.to_line || j < selection.to_column)); if (line == cursor.line) { - if (j == 0) - //first char + // if its the first char draw behind line numbers + if (j == 0) { VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(0, ofs_y, (char_ofs + char_margin), get_row_height()), cache.current_line_color); - else if (j == str.length() - 1) - //last char + } + // if its the last char draw to end of the line + if (j == str.length() - 1) { VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(char_ofs + char_margin + char_w, ofs_y, xmargin_end - (char_ofs + char_margin + char_w), get_row_height()), cache.current_line_color); - - if (!in_selection) + } + // actual text + if (!in_selection) { VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2i(char_ofs + char_margin, ofs_y), Size2i(char_w, get_row_height())), cache.current_line_color); + } } if (in_selection) { diff --git a/scene/main/node.cpp b/scene/main/node.cpp index cee25b53a1..e6e11de177 100755 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2803,12 +2803,12 @@ void Node::_bind_methods() { BIND_CONSTANT(NOTIFICATION_EXIT_TREE); BIND_CONSTANT(NOTIFICATION_MOVED_IN_PARENT); BIND_CONSTANT(NOTIFICATION_READY); + BIND_CONSTANT(NOTIFICATION_PAUSED); + BIND_CONSTANT(NOTIFICATION_UNPAUSED); BIND_CONSTANT(NOTIFICATION_PHYSICS_PROCESS); BIND_CONSTANT(NOTIFICATION_PROCESS); BIND_CONSTANT(NOTIFICATION_PARENTED); BIND_CONSTANT(NOTIFICATION_UNPARENTED); - BIND_CONSTANT(NOTIFICATION_PAUSED); - BIND_CONSTANT(NOTIFICATION_UNPAUSED); BIND_CONSTANT(NOTIFICATION_INSTANCED); BIND_CONSTANT(NOTIFICATION_DRAG_BEGIN); BIND_CONSTANT(NOTIFICATION_DRAG_END); diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 3a0fdb1ab8..4b78950e9f 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -78,11 +78,11 @@ void Texture::_bind_methods() { BIND_ENUM_CONSTANT(FLAG_MIPMAPS); BIND_ENUM_CONSTANT(FLAG_REPEAT); BIND_ENUM_CONSTANT(FLAG_FILTER); - BIND_ENUM_CONSTANT(FLAG_VIDEO_SURFACE); BIND_ENUM_CONSTANT(FLAGS_DEFAULT); BIND_ENUM_CONSTANT(FLAG_ANISOTROPIC_FILTER); BIND_ENUM_CONSTANT(FLAG_CONVERT_TO_LINEAR); BIND_ENUM_CONSTANT(FLAG_MIRRORED_REPEAT); + BIND_ENUM_CONSTANT(FLAG_VIDEO_SURFACE); } Texture::Texture() { diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp index 4dfc40e9e4..ede080b424 100644 --- a/servers/arvr_server.cpp +++ b/servers/arvr_server.cpp @@ -61,8 +61,8 @@ void ARVRServer::_bind_methods() { BIND_ENUM_CONSTANT(TRACKER_CONTROLLER); BIND_ENUM_CONSTANT(TRACKER_BASESTATION); BIND_ENUM_CONSTANT(TRACKER_ANCHOR); - BIND_ENUM_CONSTANT(TRACKER_UNKNOWN); BIND_ENUM_CONSTANT(TRACKER_ANY_KNOWN); + BIND_ENUM_CONSTANT(TRACKER_UNKNOWN); BIND_ENUM_CONSTANT(TRACKER_ANY); ADD_SIGNAL(MethodInfo("interface_added", PropertyInfo(Variant::STRING, "name"))); @@ -138,7 +138,7 @@ void ARVRServer::add_interface(const Ref<ARVRInterface> &p_interface) { }; }; - print_line("Registered interface " + p_interface->get_name()); + print_line("ARVR: Registered interface: " + p_interface->get_name()); interfaces.push_back(p_interface); emit_signal("interface_added", p_interface->get_name()); diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp index 671c31e6a3..b2e1d541ab 100644 --- a/servers/physics_2d_server.cpp +++ b/servers/physics_2d_server.cpp @@ -358,8 +358,8 @@ void Physics2DDirectSpaceState::_bind_methods() { BIND_ENUM_CONSTANT(TYPE_MASK_KINEMATIC_BODY); BIND_ENUM_CONSTANT(TYPE_MASK_RIGID_BODY); BIND_ENUM_CONSTANT(TYPE_MASK_CHARACTER_BODY); - BIND_ENUM_CONSTANT(TYPE_MASK_AREA); BIND_ENUM_CONSTANT(TYPE_MASK_COLLISION); + BIND_ENUM_CONSTANT(TYPE_MASK_AREA); } int Physics2DShapeQueryResult::get_result_count() const { @@ -615,6 +615,7 @@ void Physics2DServer::_bind_methods() { BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS); BIND_ENUM_CONSTANT(SHAPE_LINE); + BIND_ENUM_CONSTANT(SHAPE_RAY); BIND_ENUM_CONSTANT(SHAPE_SEGMENT); BIND_ENUM_CONSTANT(SHAPE_CIRCLE); BIND_ENUM_CONSTANT(SHAPE_RECTANGLE); diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index 6d192886a5..360808ce8c 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -353,8 +353,8 @@ void PhysicsDirectSpaceState::_bind_methods() { BIND_ENUM_CONSTANT(TYPE_MASK_KINEMATIC_BODY); BIND_ENUM_CONSTANT(TYPE_MASK_RIGID_BODY); BIND_ENUM_CONSTANT(TYPE_MASK_CHARACTER_BODY); - BIND_ENUM_CONSTANT(TYPE_MASK_AREA); BIND_ENUM_CONSTANT(TYPE_MASK_COLLISION); + BIND_ENUM_CONSTANT(TYPE_MASK_AREA); } int PhysicsShapeQueryResult::get_result_count() const { @@ -679,8 +679,8 @@ void PhysicsServer::_bind_methods() { BIND_ENUM_CONSTANT(BODY_PARAM_FRICTION); BIND_ENUM_CONSTANT(BODY_PARAM_MASS); BIND_ENUM_CONSTANT(BODY_PARAM_GRAVITY_SCALE); - BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_DAMP); BIND_ENUM_CONSTANT(BODY_PARAM_LINEAR_DAMP); + BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_DAMP); BIND_ENUM_CONSTANT(BODY_PARAM_MAX); BIND_ENUM_CONSTANT(BODY_STATE_TRANSFORM); diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 68ca586caf..c644fd2d55 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -90,17 +90,10 @@ void VisualServerRaster::request_frame_drawn_callback(Object *p_where, const Str fdc.param = p_userdata; frame_drawn_callbacks.push_back(fdc); - - print_line("added callback to draw"); } void VisualServerRaster::draw() { - /* - if (changes) - print_line("changes: "+itos(changes)); - */ - changes = 0; VSG::rasterizer->begin_frame(); @@ -109,9 +102,7 @@ void VisualServerRaster::draw() { VSG::viewport->draw_viewports(); VSG::scene->render_probes(); - //_draw_cursors_and_margins(); VSG::rasterizer->end_frame(); - //draw_extra_frame=VS:rasterizer->needs_to_draw_next_frame(); while (frame_drawn_callbacks.front()) { diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 64bc978037..2234ddda0d 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1729,7 +1729,6 @@ void VisualServer::_bind_methods() { BIND_ENUM_CONSTANT(ARRAY_FORMAT_BONES); BIND_ENUM_CONSTANT(ARRAY_FORMAT_WEIGHTS); BIND_ENUM_CONSTANT(ARRAY_FORMAT_INDEX); - BIND_ENUM_CONSTANT(ARRAY_COMPRESS_BASE); BIND_ENUM_CONSTANT(ARRAY_COMPRESS_VERTEX); BIND_ENUM_CONSTANT(ARRAY_COMPRESS_NORMAL); BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TANGENT); |