diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-08-24 15:02:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-24 15:02:10 +0200 |
commit | cad24adb977982a776a3ff3246ed9a47268da38e (patch) | |
tree | 54ff3bb78961ca5d8120cc7e6abe91f5c99d92b7 | |
parent | d442f3d0aa4185f154bee396efaf24ceb73c9d84 (diff) | |
parent | 52466d57e9c2897c40698a09482e5e7de230368f (diff) |
Merge pull request #21354 from akien-mga/clean-print_line
Make some debug prints verbose-only, remove others
139 files changed, 172 insertions, 803 deletions
diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp index 5c1fd26e2a..46df63066b 100644 --- a/core/compressed_translation.cpp +++ b/core/compressed_translation.cpp @@ -50,7 +50,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) { int size = Math::larger_prime(keys.size()); - print_line("compressing keys: " + itos(keys.size())); Vector<Vector<Pair<int, CharString> > > buckets; Vector<Map<uint32_t, int> > table; Vector<uint32_t> hfunc_table; @@ -107,7 +106,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) { } int bucket_table_size = 0; - print_line("total compressed string size: " + itos(total_compression_size) + " (" + itos(total_string_size) + " uncompressed)."); for (int i = 0; i < size; i++) { @@ -117,8 +115,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) { if (b.size() == 0) continue; - //print_line("bucket: "+itos(i)+" - elements: "+itos(b.size())); - int d = 1; int item = 0; @@ -140,9 +136,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) { bucket_table_size += 2 + b.size() * 4; } - print_line("bucket table size: " + itos(bucket_table_size * 4)); - print_line("hash table size: " + itos(size * 4)); - hash_table.resize(size); bucket_table.resize(bucket_table_size); @@ -178,8 +171,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) { } } - print_line("total collisions: " + itos(collisions)); - strings.resize(total_compression_size); PoolVector<uint8_t>::Write cw = strings.write(); @@ -198,15 +189,11 @@ bool PHashTranslation::_set(const StringName &p_name, const Variant &p_value) { String name = p_name.operator String(); if (name == "hash_table") { hash_table = p_value; - //print_line("translation: loaded hash table of size: "+itos(hash_table.size())); } else if (name == "bucket_table") { bucket_table = p_value; - //print_line("translation: loaded bucket table of size: "+itos(bucket_table.size())); } else if (name == "strings") { strings = p_value; - //print_line("translation: loaded string table of size: "+itos(strings.size())); } else if (name == "load_from") { - //print_line("generating"); generate(p_value); } else return false; @@ -248,11 +235,7 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const { uint32_t p = htptr[h % htsize]; - //print_line("String: "+p_src_text.operator String()); - //print_line("Hash: "+itos(p)); - if (p == 0xFFFFFFFF) { - //print_line("GETMSG: Nothing!"); return StringName(); //nothing } @@ -271,9 +254,7 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const { } } - //print_line("bucket pos: "+itos(idx)); if (idx == -1) { - //print_line("GETMSG: Not in Bucket!"); return StringName(); } @@ -281,8 +262,6 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const { String rstr; rstr.parse_utf8(&sptr[bucket.elem[idx].str_offset], bucket.elem[idx].uncomp_size); - //print_line("Uncompressed, size: "+itos(bucket.elem[idx].comp_size)); - //print_line("Return: "+rstr); return rstr; } else { @@ -292,8 +271,6 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const { smaz_decompress(&sptr[bucket.elem[idx].str_offset], bucket.elem[idx].comp_size, uncomp.ptrw(), bucket.elem[idx].uncomp_size); String rstr; rstr.parse_utf8(uncomp.get_data()); - //print_line("Compressed, size: "+itos(bucket.elem[idx].comp_size)); - //print_line("Return: "+rstr); return rstr; } } diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp index bb7a444ccc..812e881114 100644 --- a/core/io/file_access_encrypted.cpp +++ b/core/io/file_access_encrypted.cpp @@ -43,7 +43,6 @@ Error FileAccessEncrypted::open_and_parse(FileAccess *p_base, const Vector<uint8_t> &p_key, Mode p_mode) { - //print_line("open and parse!"); ERR_FAIL_COND_V(file != NULL, ERR_ALREADY_IN_USE); ERR_FAIL_COND_V(p_key.size() != 32, ERR_INVALID_PARAMETER); diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp index e0a2dbf507..d72d3ca9f1 100644 --- a/core/io/file_access_network.cpp +++ b/core/io/file_access_network.cpp @@ -93,8 +93,6 @@ void FileAccessNetworkClient::_thread_func() { DEBUG_TIME("sem_unlock"); //DEBUG_PRINT("semwait returned "+itos(werr)); DEBUG_PRINT("MUTEX LOCK " + itos(lockcount)); - DEBUG_PRINT("POPO"); - DEBUG_PRINT("PEPE"); lock_mutex(); DEBUG_PRINT("MUTEX PASS"); diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index 8a40e6d78c..f29e431d9a 100644 --- a/core/io/file_access_pack.h +++ b/core/io/file_access_pack.h @@ -175,7 +175,6 @@ public: FileAccess *PackedData::try_open_path(const String &p_path) { - //print_line("try open path " + p_path); PathMD5 pmd5(p_path.md5_buffer()); Map<PathMD5, PackedFile>::Element *E = files.find(pmd5); if (!E) diff --git a/core/io/stream_peer_ssl.cpp b/core/io/stream_peer_ssl.cpp index e7e9662d24..25adb6a6ee 100644 --- a/core/io/stream_peer_ssl.cpp +++ b/core/io/stream_peer_ssl.cpp @@ -81,7 +81,7 @@ PoolByteArray StreamPeerSSL::get_project_cert_array() { memdelete(f); #ifdef DEBUG_ENABLED - print_line("Loaded certs from '" + certs_path); + print_verbose(vformat("Loaded certs from '%s'.", certs_path)); #endif } } diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 1a79385a29..ba40cb4586 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -622,15 +622,12 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant case TEXT_PRINTERR: { String str = *p_inputs[0]; - - //str+="\n"; print_error(str); } break; case TEXT_PRINTRAW: { - String str = *p_inputs[0]; - //str+="\n"; + String str = *p_inputs[0]; OS::get_singleton()->print("%s", str.utf8().get_data()); } break; diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp index 7ab28daf20..d8cb657b5e 100644 --- a/core/math/geometry.cpp +++ b/core/math/geometry.cpp @@ -626,7 +626,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e voxelsize.z /= div_z; // create and initialize cells to zero - //print_line("Wrapper: Initializing Cells"); uint8_t ***cell_status = memnew_arr(uint8_t **, div_x); for (int i = 0; i < div_x; i++) { @@ -645,7 +644,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e } // plot faces into cells - //print_line("Wrapper (1/6): Plotting Faces"); for (int i = 0; i < face_count; i++) { @@ -659,8 +657,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e // determine which cells connect to the outside by traversing the outside and recursively flood-fill marking - //print_line("Wrapper (2/6): Flood Filling"); - for (int i = 0; i < div_x; i++) { for (int j = 0; j < div_y; j++) { @@ -690,8 +686,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e // build faces for the inside-outside cell divisors - //print_line("Wrapper (3/6): Building Faces"); - PoolVector<Face3> wrapped_faces; for (int i = 0; i < div_x; i++) { @@ -705,8 +699,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e } } - //print_line("Wrapper (4/6): Transforming Back Vertices"); - // transform face vertices to global coords int wrapped_faces_count = wrapped_faces.size(); @@ -724,7 +716,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e } // clean up grid - //print_line("Wrapper (5/6): Grid Cleanup"); for (int i = 0; i < div_x; i++) { @@ -740,7 +731,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e if (p_error) *p_error = voxelsize.length(); - //print_line("Wrapper (6/6): Finished."); return wrapped_faces; } diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp index 45c106102e..9d4f4f66b7 100644 --- a/core/math/quick_hull.cpp +++ b/core/math/quick_hull.cpp @@ -62,7 +62,6 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me Vector3 sp = p_points[i].snapped(Vector3(0.0001, 0.0001, 0.0001)); if (valid_cache.has(sp)) { valid_points.write[i] = false; - //print_line("INVALIDATED: "+itos(i)); } else { valid_points.write[i] = true; valid_cache.insert(sp); @@ -455,7 +454,6 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me //fill mesh r_mesh.faces.clear(); r_mesh.faces.resize(ret_faces.size()); - //print_line("FACECOUNT: "+itos(r_mesh.faces.size())); int idx = 0; for (List<Geometry::MeshData::Face>::Element *E = ret_faces.front(); E; E = E->next()) { @@ -473,12 +471,5 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me r_mesh.vertices = p_points; - //r_mesh.optimize_vertices(); - /* - print_line("FACES: "+itos(r_mesh.faces.size())); - print_line("EDGES: "+itos(r_mesh.edges.size())); - print_line("VERTICES: "+itos(r_mesh.vertices.size())); -*/ - return OK; } diff --git a/core/message_queue.cpp b/core/message_queue.cpp index 3adaad868a..97ee236a46 100644 --- a/core/message_queue.cpp +++ b/core/message_queue.cpp @@ -50,9 +50,9 @@ Error MessageQueue::push_call(ObjectID p_id, const StringName &p_method, const V String type; if (ObjectDB::get_instance(p_id)) type = ObjectDB::get_instance(p_id)->get_class(); - print_line("failed method: " + type + ":" + p_method + " target ID: " + itos(p_id)); + print_line("Failed method: " + type + ":" + p_method + " target ID: " + itos(p_id)); statistics(); - ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings"); + ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings."); ERR_FAIL_V(ERR_OUT_OF_MEMORY); } @@ -101,9 +101,9 @@ Error MessageQueue::push_set(ObjectID p_id, const StringName &p_prop, const Vari String type; if (ObjectDB::get_instance(p_id)) type = ObjectDB::get_instance(p_id)->get_class(); - print_line("failed set: " + type + ":" + p_prop + " target ID: " + itos(p_id)); + print_line("Failed set: " + type + ":" + p_prop + " target ID: " + itos(p_id)); statistics(); - ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings"); + ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings."); ERR_FAIL_V(ERR_OUT_OF_MEMORY); } @@ -134,9 +134,9 @@ Error MessageQueue::push_notification(ObjectID p_id, int p_notification) { String type; if (ObjectDB::get_instance(p_id)) type = ObjectDB::get_instance(p_id)->get_class(); - print_line("failed notification: " + itos(p_notification) + " target ID: " + itos(p_id)); + print_line("Failed notification: " + itos(p_notification) + " target ID: " + itos(p_id)); statistics(); - ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings"); + ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings."); ERR_FAIL_V(ERR_OUT_OF_MEMORY); } @@ -210,8 +210,7 @@ void MessageQueue::statistics() { } //object was deleted - //WARN_PRINT("Object was deleted while awaiting a callback") - //should it print a warning? + print_line("Object was deleted while awaiting a callback"); } else { null_count++; @@ -226,17 +225,14 @@ void MessageQueue::statistics() { print_line("NULL count: " + itos(null_count)); for (Map<StringName, int>::Element *E = set_count.front(); E; E = E->next()) { - print_line("SET " + E->key() + ": " + itos(E->get())); } for (Map<StringName, int>::Element *E = call_count.front(); E; E = E->next()) { - print_line("CALL " + E->key() + ": " + itos(E->get())); } for (Map<int, int>::Element *E = notify_count.front(); E; E = E->next()) { - print_line("NOTIFY " + itos(E->key()) + ": " + itos(E->get())); } } @@ -268,7 +264,6 @@ void MessageQueue::flush() { if (buffer_end > buffer_max_used) { buffer_max_used = buffer_end; - //statistics(); } uint32_t read_pos = 0; diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 330a9153ef..e631d6e994 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -98,22 +98,18 @@ static Error _erase_recursive(DirAccess *da) { err = _erase_recursive(da); if (err) { - print_line("err recurso " + E->get()); da->change_dir(".."); return err; } err = da->change_dir(".."); if (err) { - print_line("no go back " + E->get()); return err; } err = da->remove(da->get_current_dir().plus_file(E->get())); if (err) { - print_line("no remove dir" + E->get()); return err; } } else { - print_line("no change to " + E->get()); return err; } } @@ -122,8 +118,6 @@ static Error _erase_recursive(DirAccess *da) { Error err = da->remove(da->get_current_dir().plus_file(E->get())); if (err) { - - print_line("no remove file" + E->get()); return err; } } diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 87a5c3e493..890789ec6f 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -191,7 +191,7 @@ bool ProjectSettings::_get(const StringName &p_name, Variant &r_ret) const { name = feature_overrides[name]; } if (!props.has(name)) { - print_line("WARNING: not found: " + String(name)); + WARN_PRINTS("Property not found: " + String(name)); return false; } r_ret = props[name].variant; diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index c5daaeea47..2b9b5d6037 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -82,17 +82,16 @@ Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_por const int ms = waits[i]; OS::get_singleton()->delay_usec(ms * 1000); - print_line("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec."); + ERR_PRINTS("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec."); }; }; if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) { - print_line("Remote Debugger: Unable to connect"); + ERR_PRINTS("Remote Debugger: Unable to connect."); return FAILED; }; - // print_line("Remote Debugger: Connection OK!"); packet_peer_stream->set_stream_peer(tcp_client); return OK; diff --git a/core/translation.cpp b/core/translation.cpp index 78115c3749..82a16d0b17 100644 --- a/core/translation.cpp +++ b/core/translation.cpp @@ -1098,7 +1098,6 @@ bool TranslationServer::_load_translations(const String &p_from) { for (int i = 0; i < tcount; i++) { - //print_line( "Loading translation from " + r[i] ); Ref<Translation> tr = ResourceLoader::load(r[i]); if (tr.is_valid()) add_translation(tr); diff --git a/core/ustring.cpp b/core/ustring.cpp index 35cd27f7f3..96e3a3d784 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -1340,7 +1340,7 @@ String String::utf8(const char *p_utf8, int p_len) { bool String::parse_utf8(const char *p_utf8, int p_len) { -#define _UNICERROR(m_err) print_line("unicode error: " + String(m_err)); +#define _UNICERROR(m_err) print_line("Unicode error: " + String(m_err)); String aux; diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp index 5b04517394..9a9ede761a 100644 --- a/drivers/gles2/rasterizer_canvas_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_gles2.cpp @@ -486,7 +486,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur RasterizerStorageGLES2::Texture *tex = _bind_canvas_texture(np->texture, np->normal_map); if (!tex) { - print_line("TODO: ninepatch without texture"); + // FIXME: Handle textureless ninepatch gracefully + WARN_PRINT("NinePatch without texture not supported yet in GLES2 backend, skipping."); continue; } @@ -612,8 +613,6 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur buffer[(3 * 4 * 4) + 14] = (source.position.x + source.size.x) * texpixel_size.x; buffer[(3 * 4 * 4) + 15] = (source.position.y + source.size.y) * texpixel_size.y; - - // print_line(String::num((source.position.y + source.size.y) * texpixel_size.y)); } glBindBuffer(GL_ARRAY_BUFFER, data.ninepatch_vertices); @@ -789,7 +788,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur } break; default: { - print_line("other"); + // FIXME: Proper error handling if relevant + //print_line("other"); } break; } } diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 262add1cc3..3cee42983d 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -28,6 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "rasterizer_storage_gles2.h" + #include "project_settings.h" #include "rasterizer_canvas_gles2.h" #include "rasterizer_scene_gles2.h" @@ -601,8 +602,6 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer) glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); - //print_line("GET FORMAT: " + Image::get_format_name(texture->format) + " mipmaps: " + itos(texture->mipmaps)); - for (int i = 0; i < texture->mipmaps; i++) { int ofs = 0; diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index 2227c9769a..1c87b3ffb5 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -596,6 +596,7 @@ String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, Gener default: { SL::DataType type = op_node->arguments[3]->get_datatype(); + // FIXME: Proper error print or graceful handling print_line(String("uhhhh invalid mix with type: ") + itos(type)); } break; } diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp index 5cdbdf84e0..3b2a29d3ee 100644 --- a/drivers/gles2/shader_gles2.cpp +++ b/drivers/gles2/shader_gles2.cpp @@ -231,7 +231,6 @@ static String _fix_error_code_line(const String &p_error, int p_code_start, int continue; String numstr = error.substr(last_find_pos + 1, (end_pos - last_find_pos) - 1); - print_line("numstr: " + numstr); String begin = error.substr(0, last_find_pos + 1); String end = error.substr(end_pos, error.length()); int num = numstr.to_int() + p_code_start - p_offset; diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 5e13bed198..dc6d705586 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -1557,17 +1557,12 @@ void RasterizerCanvasGLES3::canvas_debug_viewport_shadows(Light *p_lights_with_s int ofs = h; glDisable(GL_BLEND); - //print_line(" debug lights "); while (light) { - - //print_line("debug light"); if (light->shadow_buffer.is_valid()) { - //print_line("sb is valid"); RasterizerStorageGLES3::CanvasLightShadow *sb = storage->canvas_light_shadow_owner.get(light->shadow_buffer); if (sb) { glBindTexture(GL_TEXTURE_2D, sb->distance); - //glBindTexture(GL_TEXTURE_2D,storage->resources.white_tex); draw_generic_textured_rect(Rect2(h, ofs, w - h * 2, h), Rect2(0, 0, 1, 1)); ofs += h * 2; } @@ -1677,19 +1672,7 @@ void RasterizerCanvasGLES3::canvas_light_shadow_buffer_update(RID p_buffer, cons } break; } } - /* - if (i==0) { - for(int i=0;i<cc->lines.size();i++) { - Vector2 p = instance->xform_cache.xform(cc->lines.get(i)); - Plane pp(Vector3(p.x,p.y,0),1); - pp.normal = light.xform(pp.normal); - pp = projection.xform4(pp); - print_line(itos(i)+": "+pp.normal/pp.d); - //pp=light_mat.xform4(pp); - //print_line(itos(i)+": "+pp.normal/pp.d); - } - } -*/ + glBindVertexArray(cc->array_id); glDrawElements(GL_TRIANGLES, cc->len * 3, GL_UNSIGNED_SHORT, 0); diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index 0c353d42bb..a78a392cbd 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -436,8 +436,6 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener continue; } - print_line("u - "+String(E->key())+" offset: "+itos(r_gen_code.uniform_offsets[E->get().order])); - } */ diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index ca0ce5cd3e..007600bb42 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -240,8 +240,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() { CharString code_globals; CharString material_string; - //print_line("code version? "+itos(conditional_version.code_version)); - CustomCode *cc = NULL; if (conditional_version.code_version > 0) { @@ -743,13 +741,6 @@ void ShaderGLES3::set_custom_shader(uint32_t p_code_id) { void ShaderGLES3::free_custom_shader(uint32_t p_code_id) { - /* if (! custom_code_map.has( p_code_id )) { - print_line("no code id "+itos(p_code_id)); - } else { - print_line("freed code id "+itos(p_code_id)); - - }*/ - ERR_FAIL_COND(!custom_code_map.has(p_code_id)); if (conditional_version.code_version == p_code_id) conditional_version.code_version = 0; //bye diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index 3f512af8d5..b08688892e 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -271,7 +271,6 @@ static void _write_png_data(png_structp png_ptr, png_bytep data, png_size_t p_le v.resize(vs + p_length); PoolVector<uint8_t>::Write w = v.write(); copymem(&w[vs], data, p_length); - //print_line("png write: "+itos(p_length)); } static PoolVector<uint8_t> _lossless_pack_png(const Ref<Image> &p_image) { diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index ea194e5eae..b4492a2022 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -31,11 +31,13 @@ #ifdef WINDOWS_ENABLED #include "file_access_windows.h" -#include "os/os.h" -#include "shlwapi.h" + +#include "core/os/os.h" +#include "core/print_string.h" + +#include <shlwapi.h> #include <windows.h> -#include "print_string.h" #include <sys/stat.h> #include <sys/types.h> #include <tchar.h> @@ -133,11 +135,6 @@ void FileAccessWindows::close() { if (save_path != "") { - //unlink(save_path.utf8().get_data()); - //print_line("renaming..."); - //_wunlink(save_path.c_str()); //unlink if exists - //int rename_error = _wrename((save_path+".tmp").c_str(),save_path.c_str()); - bool rename_error = true; int attempts = 4; while (rename_error && attempts) { @@ -305,11 +302,10 @@ uint64_t FileAccessWindows::_get_modified_time(const String &p_file) { return st.st_mtime; } else { - print_line("no access to " + file); + ERR_EXPLAIN("Failed to get modified time for: " + file); + ERR_FAIL_V(0); } - - ERR_FAIL_V(0); -}; +} FileAccessWindows::FileAccessWindows() { diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h index 42e1adb2b7..0867c56128 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.h +++ b/drivers/xaudio2/audio_driver_xaudio2.h @@ -51,7 +51,7 @@ class AudioDriverXAudio2 : public AudioDriver { HANDLE buffer_end_event; XAudio2DriverVoiceCallback() : buffer_end_event(CreateEvent(NULL, FALSE, FALSE, NULL)) {} - void STDMETHODCALLTYPE OnBufferEnd(void *pBufferContext) { /*print_line("buffer ended");*/ + void STDMETHODCALLTYPE OnBufferEnd(void *pBufferContext) { SetEvent(buffer_end_event); } diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index 6d444c5422..590621816e 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -974,8 +974,6 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant ofs += 0.001; } - print_line("inserting"); - *get_block_animation_update_ptr() = true; get_undo_redo()->create_action("Add Audio Track Clip"); get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_insert_key", get_track(), ofs, stream); @@ -1124,7 +1122,6 @@ Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_ } String anim = get_animation()->animation_track_get_key_animation(get_track(), p_index); - print_line("anim " + anim + " has " + itos(ap->has_animation(anim))); if (anim != "[stop]" && ap->has_animation(anim)) { diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 9d4333bc29..2fecf24d7d 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -717,7 +717,6 @@ void CodeTextEditor::_complete_request() { if (code_complete_func) { code_complete_func(code_complete_ud, ctext, &entries, forced); } - // print_line("COMPLETE: "+p_request); if (entries.size() == 0) return; Vector<String> strs; diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index c4a17d5402..62ae14c988 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -336,12 +336,9 @@ void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) { for (int i = 0; i < efsd->get_file_count(); i++) { Vector<String> deps = efsd->get_file_deps(i); - //print_line(":::"+efsd->get_file_path(i)); bool found = false; for (int j = 0; j < deps.size(); j++) { - //print_line("\t"+deps[j]+" vs "+editing); if (deps[j] == editing) { - //print_line("found"); found = true; break; } @@ -510,7 +507,7 @@ void DependencyRemoveDialog::ok_pressed() { res->set_path(""); } String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/"); - print_line("Moving to trash: " + path); + print_verbose("Moving to trash: " + path); Error err = OS::get_singleton()->move_to_trash(path); if (err != OK) { EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + files_to_delete[i] + "\n"); @@ -525,7 +522,7 @@ void DependencyRemoveDialog::ok_pressed() { for (int i = 0; i < dirs_to_delete.size(); ++i) { String path = OS::get_singleton()->get_resource_dir() + dirs_to_delete[i].replace_first("res://", "/"); - print_line("Moving to trash: " + path); + print_verbose("Moving to trash: " + path); Error err = OS::get_singleton()->move_to_trash(path); if (err != OK) { EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + dirs_to_delete[i] + "\n"); @@ -673,7 +670,6 @@ bool OrphanResourcesDialog::_fill_owners(EditorFileSystemDirectory *efsd, HashMa if (!p_parent) { Vector<String> deps = efsd->get_file_deps(i); - //print_line(":::"+efsd->get_file_path(i)); for (int j = 0; j < deps.size(); j++) { if (!refs.has(deps[j])) { diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 91a29f5717..fe1cf3484e 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -792,7 +792,6 @@ Error DocData::_load(Ref<XMLParser> parser) { class_list[name] = ClassDoc(); ClassDoc &c = class_list[name]; - //print_line("class: "+name); c.name = name; if (parser->has_attribute("inherits")) c.inherits = parser->get_attribute_value("inherits"); diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp index f1c8c08d08..d99908a3c3 100644 --- a/editor/editor_asset_installer.cpp +++ b/editor/editor_asset_installer.cpp @@ -172,7 +172,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { parent = root; } else { String ppath = path.substr(0, pp); - print_line("PPATH IS: " + ppath); ERR_CONTINUE(!dir_map.has(ppath)); parent = dir_map[ppath]; } diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index a084437226..9c775be87e 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -482,10 +482,8 @@ void EditorAudioBus::drop_data(const Point2 &p_point, const Variant &p_data) { Variant EditorAudioBus::get_drag_data_fw(const Point2 &p_point, Control *p_from) { - print_line("drag fw"); TreeItem *item = effects->get_item_at_position(p_point); if (!item) { - print_line("no item"); return Variant(); } diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 721158cebb..e46fe96885 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -1486,8 +1486,6 @@ void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, con return; } - print_line("exporting " + p_path); - bool convert = GLOBAL_GET("editor/convert_text_resources_to_binary_on_export"); if (!convert) return; diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 50b3810e52..5a0a49d577 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -1907,8 +1907,6 @@ void EditorHelpBit::_go_to_help(String p_what) { void EditorHelpBit::_meta_clicked(String p_select) { - print_line("got meta " + p_select); - if (p_select.begins_with("$")) { //enum String select = p_select.substr(1, p_select.length()); diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 6818de8281..1f2e73654c 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -104,14 +104,12 @@ Vector<Ref<Texture> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh> continue; } AABB aabb = mesh->get_aabb(); - print_line("aabb: " + aabb); Vector3 ofs = aabb.position + aabb.size * 0.5; aabb.position -= ofs; Transform xform; xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.25); xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.25) * xform.basis; AABB rot_aabb = xform.xform(aabb); - print_line("rot_aabb: " + rot_aabb); float m = MAX(rot_aabb.size.x, rot_aabb.size.y) * 0.5; if (m == 0) { textures.push_back(Ref<Texture>()); @@ -119,7 +117,6 @@ Vector<Ref<Texture> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh> } m = 1.0 / m; m *= 0.5; - print_line("scale: " + rtos(m)); xform.basis.scale(Vector3(m, m, m)); xform.origin = -xform.basis.xform(ofs); //-ofs*m; xform.origin.z -= rot_aabb.size.z * 2; @@ -133,7 +130,6 @@ Vector<Ref<Texture> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh> Ref<ImageTexture> it(memnew(ImageTexture)); it->create_from_image(img); - //print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height())); VS::get_singleton()->free(inst); textures.push_back(it); diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp index a8d30d9cbe..f57c863bcf 100644 --- a/editor/editor_profiler.cpp +++ b/editor/editor_profiler.cpp @@ -344,7 +344,6 @@ void EditorProfiler::_update_plot() { } time = OS::get_singleton()->get_ticks_usec() - time; - //print_line("Taken: "+rtos(USEC_TO_SEC(time))); } wr = PoolVector<uint8_t>::Write(); diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index a9eaad47b7..bc56a95b47 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -152,8 +152,6 @@ Ref<Texture> EditorResourcePreview::_generate_preview(const QueueItem &p_item, c f->store_line(itos(FileAccess::get_modified_time(p_item.path))); f->store_line(FileAccess::get_md5(p_item.path)); memdelete(f); - } else { - //print_line("was not generated"); } } diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index bbc00dd542..5d3c6dd087 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -146,7 +146,7 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const { const VariantContainer *v = props.getptr(p_name); if (!v) { - print_line("EditorSettings::_get - Warning, not found: " + String(p_name)); + WARN_PRINTS("EditorSettings::_get - Property not found: " + String(p_name)); return false; } r_ret = v->variant; diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 50d71f1c98..7ed7b920d9 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -238,7 +238,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = clock_t end_time = clock(); #else - print_line("Sorry no icons for you"); + print_line("SVG support disabled, editor icons won't be rendered."); #endif } diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp index b9e0c7d0fa..28b1095256 100644 --- a/editor/fileserver/editor_file_server.cpp +++ b/editor/fileserver/editor_file_server.cpp @@ -34,9 +34,10 @@ #include "io/marshalls.h" //#define DEBUG_PRINT(m_p) print_line(m_p) -#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec()); +//#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec()); -//#define DEBUG_TIME(m_what) +#define DEBUG_PRINT(m_what) +#define DEBUG_TIME(m_what) void EditorFileServer::_close_client(ClientData *cd) { @@ -107,7 +108,6 @@ void EditorFileServer::_subthread_start(void *s) { //wait for ID err = cd->connection->get_data(buf4, 4); - //#define DEBUG_PRINT(m_p) print_line(m_p) DEBUG_TIME("get_data") if (err != OK) { @@ -150,13 +150,13 @@ void EditorFileServer::_subthread_start(void *s) { s.parse_utf8(fileutf8.ptr()); if (cmd == FileAccessNetwork::COMMAND_FILE_EXISTS) { - print_line("FILE EXISTS: " + s); + DEBUG_PRINT("FILE EXISTS: " + s); } if (cmd == FileAccessNetwork::COMMAND_GET_MODTIME) { - print_line("MOD TIME: " + s); + DEBUG_PRINT("MOD TIME: " + s); } if (cmd == FileAccessNetwork::COMMAND_OPEN_FILE) { - print_line("OPEN: " + s); + DEBUG_PRINT("OPEN: " + s); } if (!s.begins_with("res://")) { @@ -243,7 +243,7 @@ void EditorFileServer::_subthread_start(void *s) { int read = cd->files[id]->get_buffer(buf.ptrw(), blocklen); ERR_CONTINUE(read < 0); - print_line("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen)); + DEBUG_PRINT("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen)); //not found, continue encode_uint32(id, buf4); @@ -259,7 +259,7 @@ void EditorFileServer::_subthread_start(void *s) { } break; case FileAccessNetwork::COMMAND_CLOSE: { - print_line("CLOSED"); + DEBUG_PRINT("CLOSED"); ERR_CONTINUE(!cd->files.has(id)); memdelete(cd->files[id]); cd->files.erase(id); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index ec1153a015..cb38c2f85e 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -809,7 +809,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_ } DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES); - print_line("Moving " + old_path + " -> " + new_path); + print_verbose("Moving " + old_path + " -> " + new_path); Error err = da->rename(old_path, new_path); if (err == OK) { //Move/Rename any corresponding import settings too @@ -837,7 +837,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_ //Only treat as a changed dependency if it was successfully moved for (int i = 0; i < file_changed_paths.size(); ++i) { p_file_renames[file_changed_paths[i]] = file_changed_paths[i].replace_first(old_path, new_path); - print_line(" Remap: " + file_changed_paths[i] + " -> " + p_file_renames[file_changed_paths[i]]); + print_verbose(" Remap: " + file_changed_paths[i] + " -> " + p_file_renames[file_changed_paths[i]]); } for (int i = 0; i < folder_changed_paths.size(); ++i) { p_folder_renames[folder_changed_paths[i]] = folder_changed_paths[i].replace_first(old_path, new_path); @@ -865,7 +865,7 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin } DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES); - print_line("Duplicating " + old_path + " -> " + new_path); + print_verbose("Duplicating " + old_path + " -> " + new_path); Error err = p_item.is_file ? da->copy(old_path, new_path) : da->copy_dir(old_path, new_path); if (err == OK) { //Move/Rename any corresponding import settings too @@ -942,7 +942,7 @@ void FileSystemDock::_update_dependencies_after_move(const Map<String, String> & for (int i = 0; i < remaps.size(); ++i) { //Because we haven't called a rescan yet the found remap might still be an old path itself. String file = p_renames.has(remaps[i]) ? p_renames[remaps[i]] : remaps[i]; - print_line("Remapping dependencies for: " + file); + print_verbose("Remapping dependencies for: " + file); Error err = ResourceLoader::rename_dependencies(file, p_renames); if (err == OK) { if (ResourceLoader::get_resource_type(file) == "PackedScene") @@ -998,7 +998,7 @@ void FileSystemDock::_make_dir_confirm() { return; } - print_line("Making folder " + dir_name + " in " + path); + print_verbose("Making folder " + dir_name + " in " + path); DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES); Error err = da->change_dir(path); if (err == OK) { @@ -1007,7 +1007,7 @@ void FileSystemDock::_make_dir_confirm() { memdelete(da); if (err == OK) { - print_line("call rescan!"); + print_verbose("FileSystem: calling rescan."); _rescan(); } else { EditorNode::get_singleton()->show_warning(TTR("Could not create folder.")); @@ -1054,7 +1054,7 @@ void FileSystemDock::_rename_operation_confirm() { _update_favorite_dirs_list_after_move(folder_renames); //Rescan everything - print_line("call rescan!"); + print_verbose("FileSystem: calling rescan."); _rescan(); } @@ -1089,7 +1089,7 @@ void FileSystemDock::_duplicate_operation_confirm() { _try_duplicate_item(to_duplicate, new_path); //Rescan everything - print_line("call rescan!"); + print_verbose("FileSystem: calling rescan."); _rescan(); } @@ -1146,7 +1146,7 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool overw _update_project_settings_after_move(file_renames); _update_favorite_dirs_list_after_move(folder_renames); - print_line("call rescan!"); + print_verbose("FileSystem: calling rescan."); _rescan(); } } diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index ef7409fd43..9ede8a05bc 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -123,12 +123,12 @@ void FindInFiles::_notification(int p_notification) { void FindInFiles::start() { if (_pattern == "") { - print_line("Nothing to search, pattern is empty"); + print_verbose("Nothing to search, pattern is empty"); emit_signal(SIGNAL_FINISHED); return; } if (_extension_filter.size() == 0) { - print_line("Nothing to search, filter matches no files"); + print_verbose("Nothing to search, filter matches no files"); emit_signal(SIGNAL_FINISHED); return; } @@ -207,7 +207,7 @@ void FindInFiles::_iterate() { _scan_file(fpath); } else { - print_line("Search complete"); + print_verbose("Search complete"); set_process(false); _current_dir = ""; _searching = false; @@ -226,7 +226,7 @@ void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) { DirAccess *dir = DirAccess::open(path); if (dir == NULL) { - print_line("Cannot open directory! " + path); + print_verbose("Cannot open directory! " + path); return; } @@ -258,7 +258,7 @@ void FindInFiles::_scan_file(String fpath) { FileAccess *f = FileAccess::open(fpath, FileAccess::READ); if (f == NULL) { - print_line(String("Cannot open file ") + fpath); + print_verbose(String("Cannot open file ") + fpath); return; } @@ -896,7 +896,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result> int _; if (!find_next(line, search_text, repl_begin, _finder->is_match_case(), _finder->is_whole_words(), _, _)) { // Make sure the replace is still valid in case the file was tampered with. - print_line(String("Occurrence no longer matches, replace will be ignored in {0}: line {1}, col {2}").format(varray(fpath, repl_line_number, repl_begin))); + print_verbose(String("Occurrence no longer matches, replace will be ignored in {0}: line {1}, col {2}").format(varray(fpath, repl_line_number, repl_begin))); continue; } diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 22ea5883e8..d4bd4f85e6 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -119,7 +119,6 @@ Error ColladaImport::_populate_skeleton(Skeleton *p_skeleton, Collada::Node *p_n Collada::NodeJoint *joint = static_cast<Collada::NodeJoint *>(p_node); - print_line("populating joint " + joint->name); p_skeleton->add_bone(p_node->name); if (p_parent >= 0) p_skeleton->set_bone_parent(r_bone, p_parent); @@ -137,8 +136,7 @@ Error ColladaImport::_populate_skeleton(Skeleton *p_skeleton, Collada::Node *p_n p_skeleton->set_bone_rest(r_bone, collada.fix_transform(collada.state.bone_rest_map[joint->sid])); //should map this bone to something for animation? } else { - print_line("no rest: " + joint->sid); - WARN_PRINT("Joint has no rest..."); + WARN_PRINT("Collada: Joint has no rest."); } int id = r_bone++; @@ -585,9 +583,6 @@ static void _generate_tangents_and_binormals(const PoolVector<int> &p_indices, c binormals.write[index_arrayr[idx * 3 + 1]] += binormal; tangents.write[index_arrayr[idx * 3 + 2]] += tangent; binormals.write[index_arrayr[idx * 3 + 2]] += binormal; - - //print_line(itos(idx)+" tangent: "+tangent); - //print_line(itos(idx)+" binormal: "+binormal); } r_tangents.resize(vlen * 4); @@ -1028,7 +1023,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me material = material_cache[target]; } else if (p.material != "") { - print_line("Warning, unreferenced material in geometry instance: " + p.material); + WARN_PRINTS("Collada: Unreferenced material in geometry instance: " + p.material); } } @@ -1352,7 +1347,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres mesh_cache[meshid] = mesh; } else { - print_line("Warning, will not import geometry: " + meshid); + WARN_PRINTS("Collada: Will not import geometry: " + meshid); } } @@ -1379,7 +1374,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres mi->set_surface_material(i, material); } else if (matname != "") { - print_line("Warning, unreferenced material in geometry instance: " + matname); + WARN_PRINTS("Collada: Unreferenced material in geometry instance: " + matname); } } } @@ -1541,7 +1536,6 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_im for (int i = 0; i < collada.state.animation_tracks.size(); i++) { const Collada::AnimationTrack &at = collada.state.animation_tracks[i]; - //print_line("CHANNEL: "+at.target+" PARAM: "+at.param); String node; @@ -1551,7 +1545,7 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_im node = node_name_map[at.target]; } else { - print_line("Couldn't find node: " + at.target); + WARN_PRINTS("Collada: Couldn't find node: " + at.target); continue; } } else { @@ -1570,7 +1564,6 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_im } create_animation(-1, p_make_tracks_in_all_bones, p_import_value_tracks); - //print_line("clipcount: "+itos(collada.state.animation_clips.size())); for (int i = 0; i < collada.state.animation_clips.size(); i++) create_animation(i, p_make_tracks_in_all_bones, p_import_value_tracks); } @@ -1580,11 +1573,8 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones Ref<Animation> animation = Ref<Animation>(memnew(Animation)); if (p_clip == -1) { - - //print_line("default"); animation->set_name("default"); } else { - //print_line("clip name: "+collada.state.animation_clips[p_clip].name); animation->set_name(collada.state.animation_clips[p_clip].name); } @@ -1658,7 +1648,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones } } - //print_line("anim len: "+rtos(anim_length)); animation->set_length(anim_length); bool tracks_found = false; @@ -1736,7 +1725,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones } if (xform_idx == -1) { - print_line("couldn't find matching node " + at.target + " xform for track " + at.param); + WARN_PRINTS("Collada: Couldn't find matching node " + at.target + " xform for track " + at.param); continue; } @@ -1758,14 +1747,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones ERR_CONTINUE(data.size() > 1); xf.data.write[cn] = data[0]; } else if (data.size() == xf.data.size()) { - xf.data = data; } else { - - if (data.size() != xf.data.size()) { - print_line("component " + at.component + " datasize " + itos(data.size()) + " xfdatasize " + itos(xf.data.size())); - } - + ERR_EXPLAIN("Component " + at.component + " has datasize " + itos(data.size()) + ", xfdatasize " + itos(xf.data.size())); ERR_CONTINUE(data.size() != xf.data.size()); } } @@ -1781,7 +1765,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform; } else { - ERR_PRINT("INVALID SKELETON!!!!"); + ERR_PRINT("Collada: Invalid skeleton"); } } @@ -1812,8 +1796,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones if (E->get()) continue; - //print_line("BONE LACKS ANIM: "+E->key()); - NodeMap &nm = node_map[E->key()]; String path = scene->get_path_to(nm.node); ERR_CONTINUE(nm.bone < 0); @@ -1823,7 +1805,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones Collada::Node *cn = collada.state.scene_map[E->key()]; if (cn->ignore_anim) { - print_line("warning, ignoring animation on node: " + path); + WARN_PRINTS("Collada: Ignoring animation on node: " + path); continue; } @@ -1889,10 +1871,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones } else if (data.size() == 16) { //matrix - print_line("value keys for matrices not supported"); + WARN_PRINT("Collada: Value keys for matrices not supported."); } else { - - print_line("don't know what to do with this amount of value keys: " + itos(data.size())); + WARN_PRINTS("Collada: Unexpected amount of value keys: " + itos(data.size())); } animation->track_insert_key(track, time, value); @@ -1994,7 +1975,6 @@ Ref<Animation> EditorSceneImporterCollada::import_animation(const String &p_path if (state.animations.size() == 0) return Ref<Animation>(); Ref<Animation> anim = state.animations[0]; - print_line("Anim Load OK"); String base = p_path.get_basename().to_lower(); if (p_flags & IMPORT_ANIMATION_DETECT_LOOP) { diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 906d902b4a..4d5c292847 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -323,7 +323,7 @@ Error EditorSceneImporterGLTF::_parse_buffers(GLTFState &state, const String &p_ } } - print_line("total buffers: " + itos(state.buffers.size())); + print_verbose("glTF: Total buffers: " + itos(state.buffers.size())); return OK; } @@ -359,7 +359,7 @@ Error EditorSceneImporterGLTF::_parse_buffer_views(GLTFState &state) { state.buffer_views.push_back(buffer_view); } - print_line("total buffer views: " + itos(state.buffer_views.size())); + print_verbose("glTF: Total buffer views: " + itos(state.buffer_views.size())); return OK; } @@ -451,7 +451,7 @@ Error EditorSceneImporterGLTF::_parse_accessors(GLTFState &state) { state.accessors.push_back(accessor); } - print_line("total accessors: " + itos(state.accessors.size())); + print_verbose("glTF: Total accessors: " + itos(state.accessors.size())); return OK; } @@ -501,8 +501,8 @@ Error EditorSceneImporterGLTF::_decode_buffer_view(GLTFState &state, int p_buffe const uint8_t *bufptr = buffer.ptr(); //use to debug - //print_line("type " + _get_type_name(type) + " component type: " + _get_component_type_name(component_type) + " stride: " + itos(stride) + " amount " + itos(count)); - print_line("accessor offset" + itos(byte_offset) + " view offset: " + itos(bv.byte_offset) + " total buffer len: " + itos(buffer.size()) + " view len " + itos(bv.byte_length)); + print_verbose("glTF: type " + _get_type_name(type) + " component type: " + _get_component_type_name(component_type) + " stride: " + itos(stride) + " amount " + itos(count)); + print_verbose("glTF: accessor offset" + itos(byte_offset) + " view offset: " + itos(bv.byte_offset) + " total buffer len: " + itos(buffer.size()) + " view len " + itos(bv.byte_length)); int buffer_end = (stride * (count - 1)) + element_size; ERR_FAIL_COND_V(buffer_end > bv.byte_length, ERR_PARSE_ERROR); @@ -853,7 +853,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { Array meshes = state.json["meshes"]; for (int i = 0; i < meshes.size(); i++) { - print_line("on mesh: " + itos(i)); + print_verbose("glTF: Parsing mesh: " + itos(i)); Dictionary d = meshes[i]; GLTFMesh mesh; @@ -935,7 +935,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { w[j + 3] /= total; } - //print_line(itos(j / 4) + ": " + itos(r[j + 0]) + ":" + rtos(w[j + 0]) + ", " + itos(r[j + 1]) + ":" + rtos(w[j + 1]) + ", " + itos(r[j + 2]) + ":" + rtos(w[j + 2]) + ", " + itos(r[j + 3]) + ":" + rtos(w[j + 3])); + //print_verbose(itos(j / 4) + ": " + itos(r[j + 0]) + ":" + rtos(w[j + 0]) + ", " + itos(r[j + 1]) + ":" + rtos(w[j + 1]) + ", " + itos(r[j + 2]) + ":" + rtos(w[j + 2]) + ", " + itos(r[j + 3]) + ":" + rtos(w[j + 3])); } } array[Mesh::ARRAY_WEIGHTS] = weights; @@ -996,7 +996,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { Array morphs; //blend shapes if (p.has("targets")) { - print_line("has targets!"); + print_verbose("glTF: Mesh has targets"); Array targets = p["targets"]; if (j == 0) { @@ -1091,7 +1091,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) { state.meshes.push_back(mesh); } - print_line("total meshes: " + itos(state.meshes.size())); + print_verbose("glTF: Total meshes: " + itos(state.meshes.size())); return OK; } @@ -1183,7 +1183,7 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b ERR_FAIL_V(ERR_FILE_CORRUPT); } - print_line("total images: " + itos(state.images.size())); + print_verbose("Total images: " + itos(state.images.size())); return OK; } @@ -1338,7 +1338,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) { state.materials.push_back(material); } - print_line("total materials: " + itos(state.materials.size())); + print_verbose("Total materials: " + itos(state.materials.size())); return OK; } @@ -1381,12 +1381,11 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) { skin.bones.push_back(bone); } - print_line("skin has skeleton? " + itos(d.has("skeleton"))); + print_verbose("glTF: Skin has skeleton? " + itos(d.has("skeleton"))); if (d.has("skeleton")) { int skeleton = d["skeleton"]; ERR_FAIL_INDEX_V(skeleton, state.nodes.size(), ERR_PARSE_ERROR); - //state.nodes[skeleton]->skeleton_skin = state.skins.size(); - print_line("setting skeleton skin to" + itos(skeleton)); + print_verbose("glTF: Setting skeleton skin to" + itos(skeleton)); skin.skeleton = skeleton; if (!state.skeleton_nodes.has(skeleton)) { state.skeleton_nodes[skeleton] = Vector<int>(); @@ -1443,7 +1442,7 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) { */ state.skins.push_back(skin); } - print_line("total skins: " + itos(state.skins.size())); + print_verbose("glTF: Total skins: " + itos(state.skins.size())); //now @@ -1496,7 +1495,7 @@ Error EditorSceneImporterGLTF::_parse_cameras(GLTFState &state) { state.cameras.push_back(camera); } - print_line("total cameras: " + itos(state.cameras.size())); + print_verbose("glTF: Total cameras: " + itos(state.cameras.size())); return OK; } @@ -1574,7 +1573,6 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) { } } - print_line("path: " + path); PoolVector<float> times = _decode_accessor_as_floats(state, input, false); if (path == "translation") { PoolVector<Vector3> translations = _decode_accessor_as_vec3(state, output, false); @@ -1624,7 +1622,7 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) { state.animations.push_back(animation); } - print_line("total animations: " + itos(state.animations.size())); + print_verbose("glTF: Total animations: " + itos(state.animations.size())); return OK; } @@ -1656,7 +1654,7 @@ void EditorSceneImporterGLTF::_generate_node(GLTFState &state, int p_node, Node if (n->mesh >= 0) { ERR_FAIL_INDEX(n->mesh, state.meshes.size()); MeshInstance *mi = memnew(MeshInstance); - print_line("**creating mesh for: " + n->name); + print_verbose("glTF: Creating mesh for: " + n->name); GLTFMesh &mesh = state.meshes.write[n->mesh]; mi->set_mesh(mesh.mesh); if (mesh.mesh->get_name() == "") { diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 5babf6419c..3f101cd04d 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -63,7 +63,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati material_map[current_name] = current; } else if (l.begins_with("Ka ")) { //uv - print_line("Warning: Ambient light for material '" + current_name + "' is ignored in PBR"); + WARN_PRINTS("OBJ: Ambient light for material '" + current_name + "' is ignored in PBR"); } else if (l.begins_with("Kd ")) { //normal @@ -119,7 +119,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati } else if (l.begins_with("map_Ka ")) { //uv - print_line("Warning: Ambient light texture for material '" + current_name + "' is ignored in PBR"); + WARN_PRINTS("OBJ: Ambient light texture for material '" + current_name + "' is ignored in PBR"); } else if (l.begins_with("map_Kd ")) { //normal @@ -335,8 +335,8 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p surf_tool->index(); - print_line("current material library " + current_material_library + " has " + itos(material_map.has(current_material_library))); - print_line("current material " + current_material + " has " + itos(material_map.has(current_material_library) && material_map[current_material_library].has(current_material))); + print_verbose("OBJ: Current material library " + current_material_library + " has " + itos(material_map.has(current_material_library))); + print_verbose("OBJ: Current material " + current_material + " has " + itos(material_map.has(current_material_library) && material_map[current_material_library].has(current_material))); if (material_map.has(current_material_library) && material_map[current_material_library].has(current_material)) { surf_tool->set_material(material_map[current_material_library][current_material]); @@ -350,7 +350,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p mesh->surface_set_name(mesh->get_surface_count() - 1, current_group); } - print_line("Added surface :" + mesh->surface_get_name(mesh->get_surface_count() - 1)); + print_verbose("OBJ: Added surface :" + mesh->surface_get_name(mesh->get_surface_count() - 1)); surf_tool->clear(); surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES); } diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index b5e3466b12..f544811eb0 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -281,12 +281,11 @@ static String _fixstr(const String &p_what, const String &p_str) { Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<ArrayMesh>, Ref<Shape> > &collision_map, LightBakeMode p_light_bake_mode) { - // children first.. + // children first for (int i = 0; i < p_node->get_child_count(); i++) { Node *r = _fix_node(p_node->get_child(i), p_root, collision_map, p_light_bake_mode); if (!r) { - print_line("was erased..."); i--; //was erased } } @@ -391,7 +390,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array colshape->set_owner(p_node->get_owner()); } else if (p_node->has_meta("empty_draw_type")) { String empty_draw_type = String(p_node->get_meta("empty_draw_type")); - print_line(empty_draw_type); StaticBody *sb = memnew(StaticBody); sb->set_name(_fixstr(name, "colonly")); Object::cast_to<Spatial>(sb)->set_transform(Object::cast_to<Spatial>(p_node)->get_transform()); @@ -723,15 +721,11 @@ void ResourceImporterScene::_filter_anim_tracks(Ref<Animation> anim, Set<String> Ref<Animation> a = anim; ERR_FAIL_COND(!a.is_valid()); - print_line("From Anim " + anim->get_name() + ":"); - for (int j = 0; j < a->get_track_count(); j++) { String path = a->track_get_path(j); if (!keep.has(path)) { - - print_line("Remove: " + path); a->remove_track(j); j--; } @@ -899,8 +893,6 @@ void ResourceImporterScene::_find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Trans } meshes[mesh] = transform; - - print_line("mesh transform: " + meshes[mesh]); } } for (int i = 0; i < p_node->get_child_count(); i++) { @@ -913,8 +905,6 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String List<PropertyInfo> pi; - print_line("node: " + String(p_node->get_name())); - if (p_make_animations) { if (Object::cast_to<AnimationPlayer>(p_node)) { AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node); @@ -1316,7 +1306,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p if (bool(p_options["external_files/store_in_subdir"])) { String subdir_name = p_source_file.get_file().get_basename(); DirAccess *da = DirAccess::open(base_path); - print_line("at path " + da->get_current_dir() + " making " + subdir_name); Error err = da->make_dir(subdir_name); memdelete(da); ERR_FAIL_COND_V(err != OK && err != ERR_ALREADY_EXISTS, err); @@ -1421,7 +1410,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p Ref<PackedScene> packer = memnew(PackedScene); packer->pack(scene); - print_line("SAVING TO: " + p_save_path + ".scn"); + print_verbose("Saving scene to: " + p_save_path + ".scn"); err = ResourceSaver::save(p_save_path + ".scn", packer); //do not take over, let the changed files reload themselves ERR_FAIL_COND_V(err != OK, err); diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 9e99dcc5c8..d04f29ea5e 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -205,7 +205,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s /*print_line("chunksize: "+itos(chunksize)); print_line("channels: "+itos(format_channels)); print_line("bits: "+itos(format_bits)); -*/ + */ int len = frames; if (format_channels == 2) @@ -293,6 +293,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s bool is16 = format_bits != 8; int rate = format_freq; + /* print_line("Input Sample: "); print_line("\tframes: " + itos(frames)); print_line("\tformat_channels: " + itos(format_channels)); @@ -301,18 +302,16 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s print_line("\tloop: " + itos(loop)); print_line("\tloop begin: " + itos(loop_begin)); print_line("\tloop end: " + itos(loop_end)); + */ //apply frequency limit bool limit_rate = p_options["force/max_rate"]; int limit_rate_hz = p_options["force/max_rate_hz"]; if (limit_rate && rate > limit_rate_hz && rate > 0 && frames > 0) { - //resampleeee!!! + // resample! int new_data_frames = (int)(frames * (float)limit_rate_hz / (float)rate); - print_line("\tresampling ratio: " + rtos((float)limit_rate_hz / (float)rate)); - print_line("\tnew frames: " + itos(new_data_frames)); - Vector<float> new_data; new_data.resize(new_data_frames * format_channels); for (int c = 0; c < format_channels; c++) { @@ -492,8 +491,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s } } - //print_line("compressing ima-adpcm, resulting buffersize is "+itos(dst_data.size())+" from "+itos(data.size())); - } else { dst_format = is16 ? AudioStreamSample::FORMAT_16_BITS : AudioStreamSample::FORMAT_8_BITS; diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index 418936ac9f..93bed035a5 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -112,7 +112,6 @@ void PluginConfigDialog::_notification(int p_what) { void PluginConfigDialog::config(const String &p_config_path) { if (p_config_path.length()) { Ref<ConfigFile> cf = memnew(ConfigFile); - print_line(p_config_path); cf->load(p_config_path); name_edit->set_text(cf->get_value("plugin", "name", "")); diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp index e5476aaf08..2d240b5a5c 100644 --- a/editor/plugins/animation_blend_space_2d_editor.cpp +++ b/editor/plugins/animation_blend_space_2d_editor.cpp @@ -349,7 +349,6 @@ void AnimationNodeBlendSpace2DEditor::_tool_switch(int p_tool) { points.push_back(blend_space->get_blend_point_position(i)); } Vector<Delaunay2D::Triangle> tr = Delaunay2D::triangulate(points); - print_line("triangleS: " + itos(tr.size())); for (int i = 0; i < tr.size(); i++) { blend_space->add_triangle(tr[i].points[0], tr[i].points[1], tr[i].points[2]); } diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 9530fae8e4..dbb5fa578b 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -38,7 +38,6 @@ void AnimationNodeBlendTreeEditor::remove_custom_type(const Ref<Script> &p_scrip void AnimationNodeBlendTreeEditor::_update_options_menu() { - print_line("update options"); add_node->get_popup()->clear(); for (int i = 0; i < add_options.size(); i++) { add_node->get_popup()->add_item(add_options[i].name, i); diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp index ea8f921034..7b7e23531a 100644 --- a/editor/plugins/mesh_editor_plugin.cpp +++ b/editor/plugins/mesh_editor_plugin.cpp @@ -97,13 +97,11 @@ void MeshEditor::edit(Ref<Mesh> p_mesh) { _update_rotation(); AABB aabb = mesh->get_aabb(); - print_line("aabb: " + aabb); Vector3 ofs = aabb.position + aabb.size * 0.5; float m = aabb.get_longest_axis_size(); if (m != 0) { m = 1.0 / m; m *= 0.5; - //print_line("scale: "+rtos(m)); Transform xform; xform.basis.scale(Vector3(m, m, m)); xform.origin = -xform.basis.xform(ofs); //-ofs*m; diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 99a28be555..c24c96bdc5 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -169,8 +169,6 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, void MeshLibraryEditor::_import_scene_cbk(const String &p_str) { - print_line("Impot Callback!"); - Ref<PackedScene> ps = ResourceLoader::load(p_str, "PackedScene"); ERR_FAIL_COND(ps.is_null()); Node *scene = ps->instance(); diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp index b50e0dfe88..75c0127406 100644 --- a/editor/plugins/particles_2d_editor_plugin.cpp +++ b/editor/plugins/particles_2d_editor_plugin.cpp @@ -58,8 +58,6 @@ void Particles2DEditorPlugin::make_visible(bool p_visible) { void Particles2DEditorPlugin::_file_selected(const String &p_file) { - print_line("file: " + p_file); - source_emission_file = p_file; emission_mask->popup_centered_minsize(); } diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 4840b1899d..a437cd5362 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -36,6 +36,7 @@ #include "os/input.h" #include "os/keyboard.h" #include "scene/2d/skeleton_2d.h" + Node2D *Polygon2DEditor::_get_node() const { return node; @@ -82,7 +83,6 @@ void Polygon2DEditor::_notification(int p_what) { void Polygon2DEditor::_sync_bones() { - print_line("syncinc"); if (!node->has_node(node->get_skeleton())) { error->set_text(TTR("The skeleton property of the Polygon2D does not point to a Skeleton2D node")); error->popup_centered_minsize(); @@ -101,8 +101,6 @@ void Polygon2DEditor::_sync_bones() { Array prev_bones = node->call("_get_bones"); node->clear_bones(); - print_line("bones in skeleton: " + itos(skeleton->get_bone_count())); - for (int i = 0; i < skeleton->get_bone_count(); i++) { NodePath path = skeleton->get_path_to(skeleton->get_bone(i)); PoolVector<float> weights; diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp index 89c1b3a978..af3c09afc5 100644 --- a/editor/plugins/root_motion_editor_plugin.cpp +++ b/editor/plugins/root_motion_editor_plugin.cpp @@ -276,7 +276,6 @@ void EditorInspectorRootMotionPlugin::parse_begin(Object *p_object) { bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage) { if (p_path == "root_motion_track" && p_object->is_class("AnimationTree") && p_type == Variant::NODE_PATH) { - print_line("use custom!"); EditorPropertyRootMotion *editor = memnew(EditorPropertyRootMotion); if (p_hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && p_hint_text != String()) { editor->setup(p_hint_text); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 522ce52234..4e7047ee38 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -60,7 +60,6 @@ void ScriptTextEditor::apply_code() { if (script.is_null()) return; - //print_line("applying code"); script->set_source_code(code_editor->get_text_edit()->get_text()); script->update_exports(); _update_member_keywords(); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index ea1876c27a..7d6fa38a89 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -167,7 +167,6 @@ void ShaderTextEditor::_check_shader_mode() { String type = ShaderLanguage::get_shader_type(get_text_edit()->get_text()); - print_line("type is: " + type); Shader::Mode mode; if (type == "canvas_item") { diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp index 9bf1178b58..58a1835e68 100644 --- a/editor/plugins/sprite_editor_plugin.cpp +++ b/editor/plugins/sprite_editor_plugin.cpp @@ -160,7 +160,6 @@ void SpriteEditor::_update_mesh_data() { Vector<Vector<Vector2> > lines = bm->clip_opaque_to_polygons(rect, epsilon); - print_line("lines: " + itos(lines.size())); uv_lines.clear(); computed_vertices.clear(); @@ -190,21 +189,6 @@ void SpriteEditor::_update_mesh_data() { computed_vertices.push_back(vtx); } -#if 0 - Vector<Vector<Vector2> > polys = Geometry::decompose_polygon(lines[j]); - print_line("polygon: " + itos(polys.size())); - - for (int i = 0; i < polys.size(); i++) { - for (int k = 0; k < polys[i].size(); k++) { - - int idxn = (k + 1) % polys[i].size(); - uv_lines.push_back(polys[i][k]); - uv_lines.push_back(polys[i][idxn]); - } - } -#endif - -#if 1 Vector<int> poly = Geometry::triangulate_polygon(lines[j]); @@ -218,14 +202,6 @@ void SpriteEditor::_update_mesh_data() { computed_indices.push_back(poly[idx] + index_ofs); } } -#endif - -#if 0 - for (int i = 0; i < lines[j].size() - 1; i++) { - uv_lines.push_back(lines[j][i]); - uv_lines.push_back(lines[j][i + 1]); - } -#endif } debug_uv->update(); diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index a9afc7a670..fcbbee2b9c 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -89,7 +89,6 @@ void SpriteFramesEditor::_file_load_request(const PoolVector<String> &p_path, in } if (resources.empty()) { - //print_line("added frames!"); return; } @@ -108,7 +107,6 @@ void SpriteFramesEditor::_file_load_request(const PoolVector<String> &p_path, in undo_redo->add_undo_method(this, "_update_library"); undo_redo->commit_action(); - //print_line("added frames!"); } void SpriteFramesEditor::_load_pressed() { diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index aad9258ed9..3a6a73d3cc 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1390,7 +1390,7 @@ void ProjectManager::_open_project_confirm() { return; } - print_line("OPENING: " + path + " (" + selected + ")"); + print_line("Editing project: " + path + " (" + selected + ")"); List<String> args; @@ -1447,7 +1447,7 @@ void ProjectManager::_run_project_confirm() { return; } - print_line("OPENING: " + path + " (" + selected + ")"); + print_line("Running project: " + path + " (" + selected + ")"); List<String> args; @@ -1513,13 +1513,13 @@ void ProjectManager::_scan_dir(DirAccess *da, float pos, float total, List<Strin void ProjectManager::_scan_begin(const String &p_base) { - print_line("SCAN PROJECTS AT: " + p_base); + print_line("Scanning projects at: " + p_base); List<String> projects; DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); da->change_dir(p_base); _scan_dir(da, 0, 1, &projects); memdelete(da); - print_line("found: " + itos(projects.size()) + " projects."); + print_line("Found " + itos(projects.size()) + " projects."); for (List<String>::Element *E = projects.front(); E; E = E->next()) { String proj = E->get().replace("/", "::"); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 65b2e2301b..a7c336eb16 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -891,7 +891,6 @@ void ProjectSettingsEditor::_item_del() { return; } - print_line("to delete.. " + property); undo_redo->create_action(TTR("Delete Item")); Variant value = ProjectSettings::get_singleton()->get(property); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 408e67149a..d9812f7425 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -3992,7 +3992,6 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) { String prop = d["name"]; emit_signal("property_keyed", prop, obj->get(prop), false); } else if (p_button == 5) { - print_line("PB5"); if (!d.has("name")) return; String prop = d["name"]; @@ -4732,7 +4731,7 @@ double PropertyValueEvaluator::eval(const String &p_text) { script->set_source_code(_build_script(p_new_text)); Error err = script->reload(); if (err) { - print_line("[PropertyValueEvaluator] Error loading script for expression: " + p_new_text); + ERR_PRINTS("PropertyValueEvaluator: Error loading script for expression: " + p_new_text); return _default_eval(p_new_text); } @@ -4748,7 +4747,7 @@ double PropertyValueEvaluator::eval(const String &p_text) { if (call_err.error == Variant::CallError::CALL_OK) { return result; } - print_line("[PropertyValueEvaluator]: Error eval! Error code: " + itos(call_err.error)); + ERR_PRINTS("PropertyValueEvaluator: Eval failed, error code: " + itos(call_err.error)); return _default_eval(p_new_text); } diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index d927e07976..dae1bdeeb0 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -237,7 +237,6 @@ void PropertySelector::_update_search() { Ref<Texture> icon; script_methods = false; - print_line("name: " + E->get().name); String rep = E->get().name.replace("*", ""); if (E->get().name == "*Script Methods") { icon = get_icon("Script", "EditorIcons"); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 607d974025..39250ab391 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1512,7 +1512,6 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) { } editor_data->get_undo_redo().commit_action(); - print_line("test: " + String(Variant(selected.front()->get()->get_meta("_editor_icon")))); editor->push_item(p_script.operator->()); } diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 47db656017..a916ae23f6 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -968,7 +968,6 @@ void SceneTreeEditor::_warning_changed(Node *p_for_node) { //should use a timer update_timer->start(); - //print_line("WARNING CHANGED "+String(p_for_node->get_name())); } void SceneTreeEditor::_editor_settings_changed() { diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 746e1cd28f..9db53fe5f5 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -1133,7 +1133,6 @@ void ScriptEditorDebugger::_notification(int p_what) { } message_type = cmd; - //print_line("GOT: "+message_type); ret = ppeer->get_var(cmd); if (ret != OK) { @@ -1285,15 +1284,13 @@ void ScriptEditorDebugger::_profiler_activate(bool p_enable) { max_funcs = CLAMP(max_funcs, 16, 512); msg.push_back(max_funcs); ppeer->put_var(msg); - - print_line("BEGIN PROFILING!"); + print_verbose("Starting profiling."); } else { Array msg; msg.push_back("stop_profiling"); ppeer->put_var(msg); - - print_line("END PROFILING!"); + print_verbose("Ending profiling."); } } @@ -1430,8 +1427,6 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n return; } - - //print_line("method"); } void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) { @@ -1500,8 +1495,6 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p return; } - - //print_line("prop"); } void ScriptEditorDebugger::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) { diff --git a/main/input_default.cpp b/main/input_default.cpp index 4363fc1c88..d074e05f43 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -265,9 +265,6 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool Ref<InputEventKey> k = p_event; if (k.is_valid() && !k->is_echo() && k->get_scancode() != 0) { - - //print_line(p_event); - if (k->is_pressed()) keys_pressed.insert(k->get_scancode()); else diff --git a/main/main.cpp b/main/main.cpp index ff153d7c63..21851337b7 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1092,7 +1092,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { boot_logo_path = boot_logo_path.strip_edges(); - if (boot_logo_path != String() /*&& FileAccess::exists(boot_logo_path)*/) { + if (boot_logo_path != String()) { print_line("Boot splash path: " + boot_logo_path); boot_logo.instance(); Error err = boot_logo->load(boot_logo_path); @@ -1164,10 +1164,8 @@ Error Main::setup2(Thread::ID p_main_tid_override) { if (String(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image")) != String()) { - //print_line("use custom cursor"); Ref<Texture> cursor = ResourceLoader::load(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image")); if (cursor.is_valid()) { - //print_line("loaded ok"); Vector2 hotspot = ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image_hotspot"); Input::get_singleton()->set_custom_mouse_cursor(cursor, Input::CURSOR_ARROW, hotspot); } diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp index b004641838..3668088590 100644 --- a/modules/bullet/area_bullet.cpp +++ b/modules/bullet/area_bullet.cpp @@ -236,7 +236,7 @@ void AreaBullet::set_param(PhysicsServer::AreaParameter p_param, const Variant & set_spOv_gravityPointAttenuation(p_value); break; default: - print_line("The Bullet areas doesn't suppot this param: " + itos(p_param)); + WARN_PRINTS("Area doesn't support this parameter in the Bullet backend: " + itos(p_param)); } } @@ -259,7 +259,7 @@ Variant AreaBullet::get_param(PhysicsServer::AreaParameter p_param) const { case PhysicsServer::AREA_PARAM_GRAVITY_POINT_ATTENUATION: return spOv_gravityPointAttenuation; default: - print_line("The Bullet areas doesn't suppot this param: " + itos(p_param)); + WARN_PRINTS("Area doesn't support this parameter in the Bullet backend: " + itos(p_param)); return Variant(); } } diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 70f70e7e5f..3a2cd3b2f1 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -1001,11 +1001,13 @@ void BulletPhysicsServer::soft_body_get_collision_exceptions(RID p_body, List<RI } void BulletPhysicsServer::soft_body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) { - print_line("TODO MUST BE IMPLEMENTED"); + // FIXME: Must be implemented. + WARN_PRINT("soft_body_state is not implemented yet in Bullet backend."); } Variant BulletPhysicsServer::soft_body_get_state(RID p_body, BodyState p_state) const { - print_line("TODO MUST BE IMPLEMENTED"); + // FIXME: Must be implemented. + WARN_PRINT("soft_body_state is not implemented yet in Bullet backend."); return Variant(); } diff --git a/modules/bullet/hinge_joint_bullet.cpp b/modules/bullet/hinge_joint_bullet.cpp index 97ea7ca3df..07fde6efb9 100644 --- a/modules/bullet/hinge_joint_bullet.cpp +++ b/modules/bullet/hinge_joint_bullet.cpp @@ -97,7 +97,7 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t switch (p_param) { case PhysicsServer::HINGE_JOINT_BIAS: if (0 < p_value) { - print_line("The Bullet Hinge Joint doesn't support bias, So it's always 0"); + WARN_PRINTS("HingeJoint doesn't support bias in the Bullet backend, so it's always 0."); } break; case PhysicsServer::HINGE_JOINT_LIMIT_UPPER: @@ -122,7 +122,7 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t hingeConstraint->setMaxMotorImpulse(p_value); break; default: - WARN_PRINTS("The Bullet Hinge Joint doesn't support this parameter: " + itos(p_param) + ", value: " + itos(p_value)); + WARN_PRINTS("HingeJoint doesn't support this parameter in the Bullet backend: " + itos(p_param) + ", value: " + itos(p_value)); } } @@ -146,7 +146,7 @@ real_t HingeJointBullet::get_param(PhysicsServer::HingeJointParam p_param) const case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE: return hingeConstraint->getMaxMotorImpulse(); default: - WARN_PRINTS("The Bullet Hinge Joint doesn't support this parameter: " + itos(p_param)); + WARN_PRINTS("HingeJoint doesn't support this parameter in the Bullet backend: " + itos(p_param)); return 0; } } diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 9f2171a82a..258c628d93 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -161,8 +161,6 @@ CSGBrush *CSGShape::_get_brush() { void CSGShape::_update_shape() { - //print_line("updating shape for " + String(get_path())); - if (parent) return; @@ -372,7 +370,6 @@ void CSGShape::_notification(int p_what) { if (p_what == NOTIFICATION_LOCAL_TRANSFORM_CHANGED) { - //print_line("local xform changed"); if (parent) { parent->_make_dirty(); } @@ -641,7 +638,6 @@ CSGBrush *CSGMesh::_build_brush() { } } - //print_line("total vertices? " + itos(vertices.size())); if (vertices.size() == 0) return NULL; diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index 9424080b6d..3cb24d0407 100644 --- a/modules/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp @@ -217,8 +217,6 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, if (!(flags & DDSD_MIPMAPCOUNT)) mipmaps = 1; - //print_line("found format: "+String(dds_format_info[dds_format].name)); - PoolVector<uint8_t> src_data; const DDSFormatInfo &info = dds_format_info[dds_format]; diff --git a/modules/etc/image_etc.cpp b/modules/etc/image_etc.cpp index ddfa7af771..f5c817c816 100644 --- a/modules/etc/image_etc.cpp +++ b/modules/etc/image_etc.cpp @@ -199,7 +199,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f int wofs = 0; - print_line("begin encoding, format: " + Image::get_format_name(etc_format)); + print_verbose("ETC: Begin encoding, format: " + Image::get_format_name(etc_format)); uint64_t t = OS::get_singleton()->get_ticks_msec(); for (int i = 0; i < mmc; i++) { // convert source image to internal etc2comp format (which is equivalent to Image::FORMAT_RGBAF) @@ -227,7 +227,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f delete[] src_rgba_f; } - print_line("time encoding: " + rtos(OS::get_singleton()->get_ticks_msec() - t)); + print_verbose("ETC: Time encoding: " + rtos(OS::get_singleton()->get_ticks_msec() - t)); p_img->create(imgw, imgh, p_img->has_mipmaps(), etc_format, dst_data); } diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 5125b58b41..e05bc7d591 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -294,11 +294,6 @@ bool GDScript::get_property_default_value(const StringName &p_property, Variant #ifdef TOOLS_ENABLED - /* - for (const Map<StringName,Variant>::Element *I=member_default_values.front();I;I=I->next()) { - print_line("\t"+String(String(I->key())+":"+String(I->get()))); - } - */ const Map<StringName, Variant>::Element *E = member_default_values_cache.find(p_property); if (E) { r_value = E->get(); @@ -335,17 +330,8 @@ ScriptInstance *GDScript::instance_create(Object *p_this) { PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) { #ifdef TOOLS_ENABLED - - //instance a fake script for editing the values - //plist.invert(); - - /*print_line("CREATING PLACEHOLDER"); - for(List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) { - print_line(E->get().name); - }*/ PlaceHolderScriptInstance *si = memnew(PlaceHolderScriptInstance(GDScriptLanguage::get_singleton(), Ref<Script>(this), p_this)); placeholders.insert(si); - //_update_placeholder(si); _update_exports(); return si; #else @@ -409,7 +395,6 @@ bool GDScript::_update_exports() { bool changed = false; if (source_changed_cache) { - //print_line("updating source for "+get_path()); source_changed_cache = false; changed = true; @@ -456,11 +441,8 @@ bool GDScript::_update_exports() { if (bf.is_valid()) { - //print_line("parent is: "+bf->get_path()); base_cache = bf; bf->inheriters_cache.insert(get_instance_id()); - - //bf->_update_exports(p_instances,true,false); } } else { ERR_PRINT(("Path extending itself in " + path).utf8().get_data()); @@ -475,7 +457,6 @@ bool GDScript::_update_exports() { continue; members_cache.push_back(c->variables[i]._export); - //print_line("found "+c->variables[i]._export.name); member_default_values_cache[c->variables[i].identifier] = c->variables[i].default_value; } @@ -490,7 +471,6 @@ bool GDScript::_update_exports() { } } } else { - //print_line("unchanged is "+get_path()); } if (base_cache.is_valid()) { @@ -499,11 +479,9 @@ bool GDScript::_update_exports() { } } - if (/*changed &&*/ placeholders.size()) { //hm :( - - //print_line("updating placeholders for "+get_path()); + if (placeholders.size()) { //hm :( - //update placeholders if any + // update placeholders if any Map<StringName, Variant> values; List<PropertyInfo> propnames; _update_exports_values(values, propnames); @@ -529,7 +507,6 @@ void GDScript::update_exports() { Set<ObjectID> copy = inheriters_cache; //might get modified - //print_line("update exports for "+get_path()+" ic: "+itos(copy.size())); for (Set<ObjectID>::Element *E = copy.front(); E; E = E->next()) { Object *id = ObjectDB::get_instance(E->get()); GDScript *s = Object::cast_to<GDScript>(id); @@ -825,7 +802,6 @@ Error GDScript::load_source_code(const String &p_path) { #ifdef TOOLS_ENABLED source_changed_cache = true; #endif - //print_line("LSC :"+get_path()); path = p_path; return OK; } @@ -1507,7 +1483,6 @@ int GDScriptLanguage::profiling_get_frame_data(ProfilingInfo *p_info_arr, int p_ p_info_arr[current].self_time = elem->self()->profile.last_frame_self_time; p_info_arr[current].total_time = elem->self()->profile.last_frame_total_time; p_info_arr[current].signature = elem->self()->profile.signature; - //print_line(String(elem->self()->profile.signature)+": "+itos(elem->self()->profile.last_frame_call_count)); current++; } elem = elem->next(); @@ -1546,7 +1521,7 @@ struct GDScriptDepSort { void GDScriptLanguage::reload_all_scripts() { #ifdef DEBUG_ENABLED - print_line("RELOAD ALL SCRIPTS"); + print_verbose("GDScript: Reloading all scripts"); if (lock) { lock->lock(); } @@ -1556,7 +1531,7 @@ void GDScriptLanguage::reload_all_scripts() { SelfList<GDScript> *elem = script_list.first(); while (elem) { if (elem->self()->get_path().is_resource_file()) { - print_line("FOUND: " + elem->self()->get_path()); + print_verbose("GDScript: Found: " + elem->self()->get_path()); scripts.push_back(Ref<GDScript>(elem->self())); //cast to gdscript to avoid being erased by accident } elem = elem->next(); @@ -1572,7 +1547,7 @@ void GDScriptLanguage::reload_all_scripts() { for (List<Ref<GDScript> >::Element *E = scripts.front(); E; E = E->next()) { - print_line("RELOADING: " + E->get()->get_path()); + print_verbose("GDScript: Reloading: " + E->get()->get_path()); E->get()->load_source_code(E->get()->get_path()); E->get()->reload(true); } @@ -1703,7 +1678,6 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so void GDScriptLanguage::frame() { - //print_line("calls: "+itos(calls)); calls = 0; #ifdef DEBUG_ENABLED diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 368601127d..1403184557 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -1009,8 +1009,6 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser:: return prev_pos; int retval = prev_pos; - //print_line("retval: "+itos(retval)); - if (retval & GDScriptFunction::ADDR_TYPE_STACK << GDScriptFunction::ADDR_BITS) { slevel++; codegen.alloc_stack(slevel); @@ -2073,8 +2071,6 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa //validate instances if keeping state if (p_keep_state) { - - print_line("RELOAD KEEP " + p_script->path); for (Set<Object *>::Element *E = p_script->instances.front(); E;) { Set<Object *>::Element *N = E->next(); diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 934c93059a..30400f01e9 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -192,7 +192,6 @@ int GDScriptLanguage::find_function(const String &p_function, const String &p_co if (tokenizer.get_token() == GDScriptTokenizer::TK_NEWLINE) { indent = tokenizer.get_token_line_indent(); } - //print_line("TOKEN: "+String(GDScriptTokenizer::get_token_name(tokenizer.get_token()))); if (indent == 0 && tokenizer.get_token() == GDScriptTokenizer::TK_PR_FUNCTION && tokenizer.get_token(1) == GDScriptTokenizer::TK_IDENTIFIER) { String identifier = tokenizer.get_token_identifier(1); @@ -201,7 +200,6 @@ int GDScriptLanguage::find_function(const String &p_function, const String &p_co } } tokenizer.advance(); - //print_line("NEXT: "+String(GDScriptTokenizer::get_token_name(tokenizer.get_token()))); } return -1; } @@ -2930,7 +2928,6 @@ void GDScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int p_t break; } - //print_line(itos(indent_stack.size())+","+itos(tc)+": "+l); lines.write[i] = l; } diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp index f2e52d48dd..d9c20868bd 100644 --- a/modules/gdscript/gdscript_functions.cpp +++ b/modules/gdscript/gdscript_functions.cpp @@ -642,7 +642,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; print_line(str); r_ret = Variant(); @@ -657,7 +656,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; print_line(str); r_ret = Variant(); @@ -672,7 +670,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; print_line(str); r_ret = Variant(); @@ -686,7 +683,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; print_error(str); r_ret = Variant(); @@ -698,7 +694,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += p_args[i]->operator String(); } - //str+="\n"; OS::get_singleton()->print("%s", str.utf8().get_data()); r_ret = Variant(); @@ -716,7 +711,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_ str += "At: " + script->debug_get_stack_level_source(0) + ":" + itos(script->debug_get_stack_level_line(0)); // + " in function '" + script->debug_get_stack_level_function(0) + "'"; } - //str+="\n"; print_line(str); r_ret = Variant(); } break; diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 2c0d541d8f..a3f5e1819e 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -1074,9 +1074,6 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s } else { //find list [ or find dictionary { - - //print_line("found bug?"); - _set_error("Error parsing expression, misplaced: " + String(tokenizer->get_token_name(tokenizer->get_token()))); return NULL; //nothing } diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index 537a0c5eaf..6e7842f190 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -937,7 +937,6 @@ void GDScriptTokenizerText::_advance() { _make_constant(val); } else if (period_found || exponent_found) { double val = str.to_double(); - //print_line("*%*%*%*% to convert: "+str+" result: "+rtos(val)); _make_constant(val); } else { int64_t val = str.to_int64(); diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 8b63987cde..776c18da64 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -486,8 +486,6 @@ bool GridMap::_octant_update(const OctantKey &p_key) { if (!mesh_library.is_valid() || !mesh_library->has_item(c.item)) continue; - //print_line("OCTANT, CELLS: "+itos(ii.cells.size())); - Vector3 cellpos = Vector3(E->get().x, E->get().y, E->get().z); Vector3 ofs = _get_offset(); @@ -524,8 +522,6 @@ bool GridMap::_octant_update(const OctantKey &p_key) { if (g.collision_debug.is_valid()) { shapes.write[i].shape->add_vertices_to_array(col_debug, xform * shapes[i].local_transform); } - - //print_line("PHIS x: "+xform); } // add the item's navmesh at given xform to GridMap's Navigation ancestor @@ -614,7 +610,6 @@ void GridMap::_octant_enter_world(const OctantKey &p_key) { Octant &g = *octant_map[p_key]; PhysicsServer::get_singleton()->body_set_state(g.static_body, PhysicsServer::BODY_STATE_TRANSFORM, get_global_transform()); PhysicsServer::get_singleton()->body_set_space(g.static_body, get_world()->get_space()); - //print_line("BODYPOS: "+get_global_transform()); if (g.collision_debug_instance.is_valid()) { VS::get_singleton()->instance_set_scenario(g.collision_debug_instance, get_world()->get_scenario()); @@ -1086,7 +1081,6 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe for (Map<OctantKey, Map<Ref<Material>, Ref<SurfaceTool> > >::Element *E = surface_map.front(); E; E = E->next()) { - print_line("generating mesh " + itos(ofs++) + "/" + itos(surface_map.size())); Ref<ArrayMesh> mesh; mesh.instance(); for (Map<Ref<Material>, Ref<SurfaceTool> >::Element *F = E->get().front(); F; F = F->next()) { diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp index f5d35714e1..6ec44023c1 100644 --- a/modules/pvr/texture_loader_pvr.cpp +++ b/modules/pvr/texture_loader_pvr.cpp @@ -93,7 +93,7 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, print_line("bmask: "+itos(bmask)); print_line("amask: "+itos(amask)); print_line("surfcount: "+itos(surfcount)); -*/ + */ PoolVector<uint8_t> data; data.resize(surfsize); @@ -159,8 +159,6 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path, if (mipmaps) tex_flags |= Texture::FLAG_MIPMAPS; - print_line("flip: " + itos(flags & PVR_VFLIP)); - Ref<Image> image = memnew(Image(width, height, mipmaps, format, data)); ERR_FAIL_COND_V(image->empty(), RES()); @@ -646,12 +644,6 @@ static void decompress_pvrtc(PVRTCBlock *p_comp_img, const int p_2bit, const int static void _pvrtc_decompress(Image *p_img) { - /* - static void decompress_pvrtc(const void *p_comp_img, const int p_2bit, const int p_width, const int p_height, unsigned char* p_dst) { - decompress_pvrtc((PVRTCBlock*)p_comp_img,p_2bit,p_width,p_height,1,p_dst); - } - */ - ERR_FAIL_COND(p_img->get_format() != Image::FORMAT_PVRTC2 && p_img->get_format() != Image::FORMAT_PVRTC2A && p_img->get_format() != Image::FORMAT_PVRTC4 && p_img->get_format() != Image::FORMAT_PVRTC4A); bool _2bit = (p_img->get_format() == Image::FORMAT_PVRTC2 || p_img->get_format() == Image::FORMAT_PVRTC2A); @@ -665,12 +657,6 @@ static void _pvrtc_decompress(Image *p_img) { decompress_pvrtc((PVRTCBlock *)r.ptr(), _2bit, p_img->get_width(), p_img->get_height(), 0, (unsigned char *)w.ptr()); - /* - for(int i=0;i<newdata.size();i++) { - print_line(itos(w[i])); - } - */ - w = PoolVector<uint8_t>::Write(); r = PoolVector<uint8_t>::Read(); diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp index 25fc897146..653dd82351 100644 --- a/modules/squish/image_compress_squish.cpp +++ b/modules/squish/image_compress_squish.cpp @@ -59,7 +59,7 @@ void image_decompress_squish(Image *p_image) { } else if (p_image->get_format() == Image::FORMAT_RGTC_RG) { squish_flags = squish::kBc5; } else { - print_line("Can't decompress unknown format: " + itos(p_image->get_format())); + ERR_EXPLAIN("Squish: Can't decompress unknown format: " + itos(p_image->get_format())); ERR_FAIL_COND(true); return; } diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp index c95a8ac2dd..0e533d3978 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp @@ -208,8 +208,6 @@ void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) { //does this work? (it's less mem..) //decode_mem_size = ogg_alloc.alloc_buffer_length_in_bytes + info.setup_memory_required + info.temp_memory_required + info.max_frame_size; - //print_line("succeeded "+itos(ogg_alloc.alloc_buffer_length_in_bytes)+" setup "+itos(info.setup_memory_required)+" setup temp "+itos(info.setup_temp_memory_required)+" temp "+itos(info.temp_memory_required)+" maxframe"+itos(info.max_frame_size)); - length = stb_vorbis_stream_length_in_seconds(ogg_stream); stb_vorbis_close(ogg_stream); diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 881808873b..68087ac01f 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -387,7 +387,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) { thread_sem->post(); #endif - //print_line("play "+rtos(p_delta)); time += p_delta; if (videobuf_time > get_time()) { @@ -442,16 +441,8 @@ void VideoStreamPlaybackTheora::update(float p_delta) { int tr = vorbis_synthesis_read(&vd, ret - to_read); - if (vd.granulepos >= 0) { - //print_line("wrote: "+itos(audio_frames_wrote)+" gpos: "+itos(vd.granulepos)); - } - - //print_line("mix audio!"); - audio_frames_wrote += ret - to_read; - //print_line("AGP: "+itos(vd.granulepos)+" added "+itos(ret-to_read)); - } else { /* no pending audio; is there a pending packet to decode? */ @@ -460,7 +451,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) { vorbis_synthesis_blockin(&vd, &vb); } } else { /* we need more data; break out to suck in another page */ - //printf("need moar data\n"); break; }; } diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp index 73b6d702c1..8e98b08b22 100644 --- a/modules/visual_script/visual_script_builtin_funcs.cpp +++ b/modules/visual_script/visual_script_builtin_funcs.cpp @@ -1144,15 +1144,12 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in case VisualScriptBuiltinFunc::TEXT_PRINTERR: { String str = *p_inputs[0]; - - //str+="\n"; print_error(str); } break; case VisualScriptBuiltinFunc::TEXT_PRINTRAW: { - String str = *p_inputs[0]; - //str+="\n"; + String str = *p_inputs[0]; OS::get_singleton()->print("%s", str.utf8().get_data()); } break; diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 45a27d1e79..4471fbd0c4 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -882,7 +882,6 @@ void VisualScriptEditor::_member_selected() { ERR_FAIL_COND(!ti); selected = ti->get_metadata(0); - //print_line("selected: "+String(selected)); if (ti->get_parent() == members->get_root()->get_children()) { diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index ad886bc758..f926d4e2eb 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -394,7 +394,6 @@ void VisualScriptFunctionCall::_update_method_cache() { } } - //print_line("BASE: "+String(type)+" FUNC: "+String(function)); MethodBind *mb = ClassDB::get_method(type, function); if (mb) { use_default_args = mb->get_default_argument_count(); diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index e4dfc5fe45..f79c81ad88 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -285,7 +285,6 @@ void VisualScriptPropertySelector::_update_search() { Ref<Texture> icon; script_methods = false; - print_line("name: " + E->get().name); String rep = E->get().name.replace("*", ""); if (E->get().name == "*Script Methods") { icon = get_icon("Script", "EditorIcons"); diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 4f72b359e9..b76b0d5dbe 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -257,7 +257,6 @@ class EditorExportAndroid : public EditorExportPlatform { if (dpos == -1) continue; d = d.substr(0, dpos).strip_edges(); - //print_line("found device: "+d); ldevices.push_back(d); } @@ -345,8 +344,6 @@ class EditorExportAndroid : public EditorExportPlatform { } d.name = vendor + " " + device; - //print_line("name: "+d.name); - //print_line("description: "+d.description); } ndevices.push_back(d); @@ -671,19 +668,14 @@ class EditorExportAndroid : public EditorExportPlatform { ucstring.write[len] = 0; string_table.write[i] = ucstring.ptr(); } - - //print_line("String "+itos(i)+": "+string_table[i]); } for (uint32_t i = string_end; i < (ofs + size); i++) { stable_extra.push_back(p_manifest[i]); } - //printf("stable extra: %i\n",int(stable_extra.size())); string_table_ends = ofs + size; - //print_line("STABLE SIZE: "+itos(size)+" ACTUAL: "+itos(string_table_ends)); - } break; case CHUNK_XML_START_TAG: { @@ -714,35 +706,25 @@ class EditorExportAndroid : public EditorExportPlatform { //replace project information if (tname == "manifest" && attrname == "package") { - - print_line("FOUND package"); string_table.write[attr_value] = get_package_name(package_name); } - if (tname == "manifest" && /*nspace=="android" &&*/ attrname == "versionCode") { - - print_line("FOUND versionCode"); + if (tname == "manifest" && attrname == "versionCode") { encode_uint32(version_code, &p_manifest.write[iofs + 16]); } - if (tname == "manifest" && /*nspace=="android" &&*/ attrname == "versionName") { - - print_line("FOUND versionName"); + if (tname == "manifest" && attrname == "versionName") { if (attr_value == 0xFFFFFFFF) { WARN_PRINT("Version name in a resource, should be plaintext") } else string_table.write[attr_value] = version_name; } - if (tname == "activity" && /*nspace=="android" &&*/ attrname == "screenOrientation") { + if (tname == "activity" && attrname == "screenOrientation") { encode_uint32(orientation == 0 ? 0 : 1, &p_manifest.write[iofs + 16]); } - if (tname == "uses-feature" && /*nspace=="android" &&*/ attrname == "glEsVersion") { - print_line("version number: " + itos(decode_uint32(&p_manifest[iofs + 16]))); - } - if (tname == "supports-screens") { if (attrname == "smallScreens") { @@ -773,7 +755,6 @@ class EditorExportAndroid : public EditorExportPlatform { String tname = string_table[name]; if (tname == "manifest") { - print_line("Found manifest end"); // save manifest ending so we can restore it Vector<uint8_t> manifest_end; @@ -913,8 +894,6 @@ class EditorExportAndroid : public EditorExportPlatform { encode_uint32(string_table.size(), &ret.write[16]); //update new number of strings encode_uint32(string_data_offset - 8, &ret.write[28]); //update new string data offset - //print_line("file size: "+itos(ret.size())); - p_manifest = ret; } @@ -956,7 +935,6 @@ class EditorExportAndroid : public EditorExportPlatform { void _fix_resources(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_manifest) { const int UTF8_FLAG = 0x00000100; - print_line("*******************GORRRGLE***********************"); uint32_t string_block_len = decode_uint32(&p_manifest[16]); uint32_t string_count = decode_uint32(&p_manifest[20]); @@ -1234,8 +1212,8 @@ public: err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv); } - print_line("Installing into device (please wait..): " + devices[p_device].name); - ep.step("Installing to Device (please wait..)..", 2); + print_line("Installing to device (please wait...): " + devices[p_device].name); + ep.step("Installing to device (please wait...)", 2); args.clear(); args.push_back("-s"); diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp index 0e5f4fb93a..061e05f5ee 100644 --- a/platform/android/godot_android.cpp +++ b/platform/android/godot_android.cpp @@ -928,7 +928,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_Godot_registerMethod(JNIEnv *e jmethodID mid = env->GetMethodID(cls, mname.ascii().get_data(), cs.ascii().get_data()); if (!mid) { - print_line("FAILED GETTING METHOD ID " + mname); + print_line("RegisterMethod: Failed getting method ID: " + mname); } s->add_method(mname, mid, types, get_jni_type(retval)); diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp index 446a5911e5..022ccb7d89 100644 --- a/platform/android/java_class_wrapper.cpp +++ b/platform/android/java_class_wrapper.cpp @@ -554,7 +554,6 @@ bool JavaClassWrapper::_get_type_sig(JNIEnv *env, jobject obj, uint32_t &sig, St jstring name2 = (jstring)env->CallObjectMethod(obj, Class_getName); String str_type = env->GetStringUTFChars(name2, NULL); - print_line("name: " + str_type); env->DeleteLocalRef(name2); uint32_t t = 0; @@ -1191,9 +1190,6 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) { env->DeleteLocalRef(obj); env->DeleteLocalRef(param_types); env->DeleteLocalRef(return_type); - - //args[i] = _jobject_to_variant(env, obj); - //print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); }; env->DeleteLocalRef(methods); @@ -1210,7 +1206,6 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) { jstring name = (jstring)env->CallObjectMethod(obj, Field_getName); String str_field = env->GetStringUTFChars(name, NULL); env->DeleteLocalRef(name); - print_line("FIELD: " + str_field); int mods = env->CallIntMethod(obj, Field_getModifiers); if ((mods & 0x8) && (mods & 0x10) && (mods & 0x1)) { //static final public! diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index f9eda9dff1..c8bdf98923 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -337,8 +337,6 @@ void OS_Android::process_event(Ref<InputEvent> p_event) { void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos> &p_points) { - //print_line("ev: "+itos(p_what)+" pnt: "+itos(p_pointer)+" pointc: "+itos(p_points.size())); - switch (p_what) { case 0: { //gesture begin diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 9754807f38..008e213e5e 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -739,7 +739,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p String library_to_use = "libgodot.iphone." + String(p_debug ? "debug" : "release") + ".fat.a"; - print_line("static library: " + library_to_use); + print_line("Static library: " + library_to_use); String pkg_name; if (p_preset->get("application/name") != "") pkg_name = p_preset->get("application/name"); // app_name @@ -809,7 +809,6 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p file = file.replace_first("iphone/", ""); if (files_to_parse.has(file)) { - print_line(String("parse ") + file); _fix_config_file(p_preset, data, config_data, p_debug); } else if (file.begins_with("libgodot.iphone")) { if (file != library_to_use) { diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 57ca29bdd5..880705b507 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -380,7 +380,6 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p String file = fname; - print_line("READ: " + file); Vector<uint8_t> data; data.resize(info.uncompressed_size); @@ -394,7 +393,6 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p file = file.replace_first("osx_template.app/", ""); if (file == "Contents/Info.plist") { - print_line("parse plist"); _fix_plist(p_preset, data, pkg_name); } @@ -415,13 +413,12 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p iconpath = p_preset->get("application/icon"); else iconpath = ProjectSettings::get_singleton()->get("application/config/icon"); - print_line("icon? " + iconpath); + if (iconpath != "") { Ref<Image> icon; icon.instance(); icon->load(iconpath); if (!icon->empty()) { - print_line("loaded?"); _make_icon(icon, data); } } @@ -475,9 +472,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p Z_DEFLATED, Z_DEFAULT_COMPRESSION); - print_line("OPEN ERR: " + itos(zerr)); zerr = zipWriteInFileInZip(dst_pkg_zip, data.ptr(), data.size()); - print_line("WRITE ERR: " + itos(zerr)); zipCloseFileInZip(dst_pkg_zip); } } diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp index a158237418..59435b04ea 100644 --- a/platform/windows/context_gl_win.cpp +++ b/platform/windows/context_gl_win.cpp @@ -68,20 +68,6 @@ void ContextGL_Win::swap_buffers() { SwapBuffers(hDC); } -/* -static GLWrapperFuncPtr wrapper_get_proc_address(const char* p_function) { - - print_line(String()+"getting proc of: "+p_function); - GLWrapperFuncPtr func=(GLWrapperFuncPtr)get_gl_proc_address(p_function); - if (!func) { - print_line("Couldn't find function: "+String(p_function)); - print_line("error: "+itos(GetLastError())); - } - return func; - -} -*/ - void ContextGL_Win::set_use_vsync(bool p_use) { if (wglSwapIntervalEXT) { diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 56ac467dc6..b7b207dde1 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -449,7 +449,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) input->set_mouse_position(c); mm->set_speed(Vector2(0, 0)); - if (raw->data.mouse.usFlags ==MOUSE_MOVE_RELATIVE) { + if (raw->data.mouse.usFlags == MOUSE_MOVE_RELATIVE) { mm->set_relative(Vector2(raw->data.mouse.lLastX, raw->data.mouse.lLastY)); } else if (raw->data.mouse.usFlags == MOUSE_MOVE_ABSOLUTE) { @@ -460,9 +460,8 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) int nScreenTop = GetSystemMetrics(SM_YVIRTUALSCREEN); Vector2 abs_pos( - (double(raw->data.mouse.lLastX) - 65536.0 / (nScreenWidth) ) * nScreenWidth / 65536.0 + nScreenLeft, - (double(raw->data.mouse.lLastY) - 65536.0 / (nScreenHeight) ) * nScreenHeight / 65536.0 + nScreenTop - ); + (double(raw->data.mouse.lLastX) - 65536.0 / (nScreenWidth)) * nScreenWidth / 65536.0 + nScreenLeft, + (double(raw->data.mouse.lLastY) - 65536.0 / (nScreenHeight)) * nScreenHeight / 65536.0 + nScreenTop); POINT coords; //client coords coords.x = abs_pos.x; @@ -470,15 +469,13 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ScreenToClient(hWnd, &coords); - - mm->set_relative(Vector2(coords.x - old_x, coords.y - old_y )); + mm->set_relative(Vector2(coords.x - old_x, coords.y - old_y)); old_x = coords.x; old_y = coords.y; /*Input.mi.dx = (int)((((double)(pos.x)-nScreenLeft) * 65536) / nScreenWidth + 65536 / (nScreenWidth)); Input.mi.dy = (int)((((double)(pos.y)-nScreenTop) * 65536) / nScreenHeight + 65536 / (nScreenHeight)); */ - } if (window_has_focus && main_loop) @@ -856,14 +853,6 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) if (ke.uMsg == WM_SYSKEYUP) ke.uMsg = WM_KEYUP; - /*if (ke.uMsg==WM_KEYDOWN && alt_mem && uMsg!=WM_SYSKEYDOWN) { - //altgr hack for intl keyboards, not sure how good it is - //windows is weeeeird - ke.mod_state.alt=false; - ke.mod_state.control=false; - print_line("") - }*/ - ke.wParam = wParam; ke.lParam = lParam; key_event_buffer[key_event_pos++] = ke; @@ -871,7 +860,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } break; case WM_INPUTLANGCHANGEREQUEST: { - print_line("input lang change"); + // FIXME: Do something? } break; case WM_TOUCH: { @@ -1126,7 +1115,6 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int WNDCLASSEXW wc; if (is_hidpi_allowed()) { - print_line("hidpi aware?"); HMODULE Shcore = LoadLibraryW(L"Shcore.dll"); if (Shcore != NULL) { @@ -1201,8 +1189,6 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int WindowRect.right = data.size.width; WindowRect.bottom = data.size.height; - print_line("wr right " + itos(WindowRect.right) + ", " + itos(WindowRect.bottom)); - /* DEVMODE dmScreenSettings; memset(&dmScreenSettings,0,sizeof(dmScreenSettings)); dmScreenSettings.dmSize=sizeof(dmScreenSettings); @@ -1490,12 +1476,6 @@ void OS_Windows::finalize() { if (user_proc) { SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)user_proc); }; - - /* - if (debugger_connection_console) { - memdelete(debugger_connection_console); - } - */ } void OS_Windows::finalize_core() { @@ -1759,9 +1739,6 @@ void OS_Windows::set_window_fullscreen(bool p_enabled) { if (pre_fs_valid) { GetWindowRect(hWnd, &pre_fs_rect); - //print_line("A: "+itos(pre_fs_rect.left)+","+itos(pre_fs_rect.top)+","+itos(pre_fs_rect.right-pre_fs_rect.left)+","+itos(pre_fs_rect.bottom-pre_fs_rect.top)); - //MapWindowPoints(hWnd, GetParent(hWnd), (LPPOINT) &pre_fs_rect, 2); - //print_line("B: "+itos(pre_fs_rect.left)+","+itos(pre_fs_rect.top)+","+itos(pre_fs_rect.right-pre_fs_rect.left)+","+itos(pre_fs_rect.bottom-pre_fs_rect.top)); } int cs = get_current_screen(); diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp index cd76667c64..5a239e326b 100644 --- a/platform/x11/context_gl_x11.cpp +++ b/platform/x11/context_gl_x11.cpp @@ -65,19 +65,6 @@ void ContextGL_X11::swap_buffers() { glXSwapBuffers(x11_display, x11_window); } -/* -static GLWrapperFuncPtr wrapper_get_proc_address(const char* p_function) { - - //print_line(String()+"getting proc of: "+p_function); - GLWrapperFuncPtr func=(GLWrapperFuncPtr)glXGetProcAddress( (const GLubyte*) p_function); - if (!func) { - print_line("Couldn't find function: "+String(p_function)); - } - - return func; - -}*/ - static bool ctxErrorOccurred = false; static int ctxErrorHandler(Display *dpy, XErrorEvent *ev) { ctxErrorOccurred = true; diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index ec4253b2ab..043902f48c 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1532,7 +1532,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) { // know Mod1 was ALT and Mod4 was META (applekey/winkey) // just tried Mods until i found them. - //print_line("mod1: "+itos(xkeyevent->state&Mod1Mask)+" mod 5: "+itos(xkeyevent->state&Mod5Mask)); + //print_verbose("mod1: "+itos(xkeyevent->state&Mod1Mask)+" mod 5: "+itos(xkeyevent->state&Mod5Mask)); Ref<InputEventKey> k; k.instance(); diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp index e3b048fd74..9eec8e6cc3 100644 --- a/scene/2d/navigation2d.cpp +++ b/scene/2d/navigation2d.cpp @@ -121,7 +121,6 @@ void Navigation2D::_navpoly_link(int p_id) { pending.edge = j; p.edges.write[j].P = C->get().pending.push_back(pending); continue; - //print_line(String()+_get_vertex(ek.a)+" -> "+_get_vertex(ek.b)); } C->get().B = &p; @@ -144,8 +143,6 @@ void Navigation2D::_navpoly_unlink(int p_id) { NavMesh &nm = navpoly_map[p_id]; ERR_FAIL_COND(!nm.linked); - //print_line("UNLINK"); - for (List<Polygon>::Element *E = nm.polygons.front(); E; E = E->next()) { Polygon &p = E->get(); @@ -341,7 +338,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect path.resize(2); path.write[0] = begin_point; path.write[1] = end_point; - //print_line("Direct Path"); return path; } @@ -379,7 +375,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect while (!found_route) { if (open_list.size() == 0) { - //print_line("NOU OPEN LIST"); break; } //check open list @@ -526,7 +521,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect if (portal_left.distance_squared_to(apex_point) < CMP_EPSILON || CLOCK_TANGENT(apex_point, left, portal_right) > 0) { left_poly = p; portal_left = left; - //print_line("***ADVANCE LEFT"); } else { apex_point = portal_right; @@ -537,8 +531,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON) path.push_back(apex_point); skip = true; - //print_line("addpoint left"); - //print_line("***CLIP LEFT"); } } @@ -547,7 +539,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect if (portal_right.distance_squared_to(apex_point) < CMP_EPSILON || CLOCK_TANGENT(apex_point, right, portal_left) < 0) { right_poly = p; portal_right = right; - //print_line("***ADVANCE RIGHT"); } else { apex_point = portal_left; @@ -557,8 +548,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect portal_left = apex_point; if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON) path.push_back(apex_point); - //print_line("addpoint right"); - //print_line("***CLIP RIGHT"); } } diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index 2d6679272a..84b12b0bfe 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -257,7 +257,7 @@ void NavigationPolygon::make_polygons_from_outlines() { TriangulatorPartition tpart; if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed! - print_line("convex partition failed!"); + ERR_PRINTS("NavigationPolygon: Convex partition failed!"); return; } diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 02213e07d0..8e31688d90 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -365,13 +365,6 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap ERR_FAIL_COND(!contact_monitor); Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid); - /*if (obj) { - if (body_in) - print_line("in: "+String(obj->call("get_name"))); - else - print_line("out: "+String(obj->call("get_name"))); - }*/ - ERR_FAIL_COND(!body_in && !E); if (body_in) { diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index 34f4ccc03e..fc0741cc5c 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -253,7 +253,6 @@ void Polygon2D::_notification(int p_what) { //normalize for (int j = 0; j < 4; j++) { weightsw[i * 4 + j] /= tw; - // print_line("point " + itos(i) + " idx " + itos(j) + " index: " + itos(bonesw[i * 4 + j]) + " weight: " + rtos(weightsw[i * 4 + j])); } } } @@ -345,8 +344,6 @@ void Polygon2D::_notification(int p_what) { } } - //print_line("loops: " + itos(loops.size()) + " indices: " + itos(indices.size())); - VS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, bones, weights, texture.is_valid() ? texture->get_rid() : RID()); } diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 26fd5ed658..2cb59c871c 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -374,9 +374,6 @@ BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, bool p_create_vi capture_subdiv--; css *= 2.0; } - - print_line("bake subdiv: " + itos(bake_subdiv)); - print_line("capture subdiv: " + itos(capture_subdiv)); } baker.begin_bake(bake_subdiv, bake_bounds); diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp index 8b2000d2e9..af8bfcbe9b 100644 --- a/scene/3d/cpu_particles.cpp +++ b/scene/3d/cpu_particles.cpp @@ -921,8 +921,6 @@ void CPUParticles::_update_particle_data_buffer() { t = un_transform * t; } - // print_line(" particle " + itos(i) + ": " + String(r[idx].active ? "[x]" : "[ ]") + "\n\txform " + r[idx].transform + "\n\t" + r[idx].velocity + "\n\tcolor: " + r[idx].color); - if (r[idx].active) { ptr[0] = t.basis.elements[0][0]; ptr[1] = t.basis.elements[0][1]; diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index f5b77d361c..8d84d2408c 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -120,9 +120,7 @@ void Navigation::_navmesh_link(int p_id) { pending.edge = j; p.edges.write[j].P = C->get().pending.push_back(pending); continue; - //print_line(String()+_get_vertex(ek.a)+" -> "+_get_vertex(ek.b)); } - //ERR_CONTINUE(C->get().B!=NULL); //wut C->get().B = &p; C->get().B_edge = j; @@ -312,7 +310,6 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector if (!begin_poly || !end_poly) { - //print_line("No Path Path"); return Vector<Vector3>(); //no path } @@ -322,7 +319,6 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector path.resize(2); path.write[0] = begin_point; path.write[1] = end_point; - //print_line("Direct Path"); return path; } @@ -347,7 +343,6 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector while (!found_route) { if (open_list.size() == 0) { - //print_line("NOU OPEN LIST"); break; } //check open list @@ -581,10 +576,6 @@ Vector3 Navigation::get_closest_point_to_segment(const Vector3 &p_from, const Ve } } - if (closest_navmesh && closest_navmesh->owner) { - //print_line("navmesh is: "+Object::cast_to<Node>(closest_navmesh->owner)->get_name()); - } - return closest_point; } diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 26958930e4..f9d096633c 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -366,22 +366,14 @@ void VehicleBody::_update_wheel(int p_idx, PhysicsDirectBodyState *s) { const Vector3 &right = wheel.m_raycastInfo.m_wheelAxleWS; Vector3 fwd = up.cross(right); fwd = fwd.normalized(); - //up = right.cross(fwd); - //up.normalize(); //rotate around steering over de wheelAxleWS real_t steering = wheel.steers ? m_steeringValue : 0.0; - //print_line(itos(p_idx)+": "+rtos(steering)); Basis steeringMat(up, steering); Basis rotatingMat(right, wheel.m_rotation); - /* - if (p_idx==1) - print_line("steeringMat " +steeringMat); - */ - Basis basis2( right[0], up[0], fwd[0], right[1], up[1], fwd[1], @@ -420,8 +412,6 @@ real_t VehicleBody::_ray_cast(int p_idx, PhysicsDirectBodyState *s) { wheel.m_raycastInfo.m_groundObject = 0; if (col) { - //print_line("WHEEL "+itos(p_idx)+" FROM "+source+" TO: "+target); - //print_line("WHEEL "+itos(p_idx)+" COLLIDE? "+itos(col)); param = source.distance_to(rr.position) / source.distance_to(target); depth = raylen * param; wheel.m_raycastInfo.m_contactNormalWS = rr.normal; diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index f3abdc6bbe..e846e1763d 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -491,8 +491,6 @@ Vector<Color> VoxelLightBaker::_get_bake_texture(Ref<Image> p_image, const Color p_image = p_image->duplicate(); if (p_image->is_compressed()) { - print_line("DECOMPRESSING!!!!"); - p_image->decompress(); } p_image->convert(Image::FORMAT_RGBA8); @@ -859,7 +857,6 @@ void VoxelLightBaker::plot_light_directional(const Vector3 &p_direction, const C int idx = first_leaf; while (idx >= 0) { - //print_line("plot idx " + itos(idx)); Light *light = &light_data[idx]; Vector3 to(light->x + 0.5, light->y + 0.5, light->z + 0.5); @@ -949,7 +946,6 @@ void VoxelLightBaker::plot_light_omni(const Vector3 &p_pos, const Color &p_color int idx = first_leaf; while (idx >= 0) { - //print_line("plot idx " + itos(idx)); Light *light = &light_data[idx]; Vector3 to(light->x + 0.5, light->y + 0.5, light->z + 0.5); @@ -1079,7 +1075,6 @@ void VoxelLightBaker::plot_light_spot(const Vector3 &p_pos, const Vector3 &p_axi int idx = first_leaf; while (idx >= 0) { - //print_line("plot idx " + itos(idx)); Light *light = &light_data[idx]; Vector3 to(light->x + 0.5, light->y + 0.5, light->z + 0.5); @@ -1498,12 +1493,8 @@ void VoxelLightBaker::_sample_baked_octree_filtered_and_anisotropic(const Vector for (int i = 0; i < 6; i++) { //anisotropic read light float amount = p_direction.dot(aniso_normal[i]); - //if (c == 0) { - // print_line("\t" + itos(n) + " aniso " + itos(i) + " " + rtos(light[cell].accum[i][0]) + " VEC: " + aniso_normal[i]); - //} if (amount < 0) amount = 0; - //amount = 1; color[c][n].x += light[cell].accum[i][0] * amount; color[c][n].y += light[cell].accum[i][1] * amount; color[c][n].z += light[cell].accum[i][2] * amount; @@ -1513,8 +1504,6 @@ void VoxelLightBaker::_sample_baked_octree_filtered_and_anisotropic(const Vector color[c][n].y += cells[cell].emission[1]; color[c][n].z += cells[cell].emission[2]; } - - //print_line("\tlev " + itos(c) + " - " + itos(n) + " alpha: " + rtos(cells[test_cell].alpha) + " col: " + color[c][n]); } } @@ -1559,8 +1548,6 @@ void VoxelLightBaker::_sample_baked_octree_filtered_and_anisotropic(const Vector r_color = color_interp[0].linear_interpolate(color_interp[1], level_filter); r_alpha = Math::lerp(alpha_interp[0], alpha_interp[1], level_filter); - - // print_line("pos: " + p_posf + " level " + rtos(p_level) + " down to " + itos(target_level) + "." + rtos(level_filter) + " color " + r_color + " alpha " + rtos(r_alpha)); } Vector3 VoxelLightBaker::_voxel_cone_trace(const Vector3 &p_pos, const Vector3 &p_normal, float p_aperture) { @@ -1577,8 +1564,6 @@ Vector3 VoxelLightBaker::_voxel_cone_trace(const Vector3 &p_pos, const Vector3 & while (dist < max_distance && alpha < 0.95) { float diameter = MAX(1.0, 2.0 * p_aperture * dist); - //print_line("VCT: pos " + (p_pos + dist * p_normal) + " dist " + rtos(dist) + " mipmap " + rtos(log2(diameter)) + " alpha " + rtos(alpha)); - //Plane scolor = textureLod(probe, (pos + dist * direction) * cell_size, log2(diameter) ); _sample_baked_octree_filtered_and_anisotropic(p_pos + dist * p_normal, p_normal, log2(diameter), scolor, salpha); float a = (1.0 - alpha); color += scolor * a; @@ -1601,7 +1586,6 @@ Vector3 VoxelLightBaker::_compute_pixel_light_at_pos(const Vector3 &p_pos, const Vector3 bitangent = tangent.cross(p_normal).normalized(); Basis normal_xform = Basis(tangent, bitangent, p_normal).transposed(); - // print_line("normal xform: " + normal_xform); const Vector3 *cone_dirs; const float *cone_weights; int cone_dir_count; @@ -1667,10 +1651,7 @@ Vector3 VoxelLightBaker::_compute_pixel_light_at_pos(const Vector3 &p_pos, const Vector3 accum; for (int i = 0; i < cone_dir_count; i++) { - // if (i > 0) - // continue; Vector3 dir = normal_xform.xform(cone_dirs[i]).normalized(); //normal may not completely correct when transformed to cell - //print_line("direction: " + dir); accum += _voxel_cone_trace(p_pos, dir, cone_aperture) * cone_weights[i]; } @@ -1802,7 +1783,6 @@ void VoxelLightBaker::_lightmap_bake_point(uint32_t p_x, LightMap *p_line) { LightMap *pixel = &p_line[p_x]; if (pixel->pos == Vector3()) return; - //print_line("pos: " + pixel->pos + " normal " + pixel->normal); switch (bake_mode) { case BAKE_MODE_CONE_TRACE: { pixel->light = _compute_pixel_light_at_pos(pixel->pos, pixel->normal) * energy; @@ -1810,8 +1790,6 @@ void VoxelLightBaker::_lightmap_bake_point(uint32_t p_x, LightMap *p_line) { case BAKE_MODE_RAY_TRACE: { pixel->light = _compute_ray_trace_at_pos(pixel->pos, pixel->normal) * energy; } break; - // pixel->light = Vector3(1, 1, 1); - //} } } @@ -1895,7 +1873,6 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh if (bake_mode == BAKE_MODE_RAY_TRACE) { //blur - print_line("bluring, use pos for separatable copy"); //gauss kernel, 7 step sigma 2 static const float gauss_kernel[4] = { 0.214607, 0.189879, 0.131514, 0.071303 }; //horizontal pass @@ -1960,8 +1937,6 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh #pragma omp parallel #endif for (int i = 0; i < height; i++) { - - //print_line("bake line " + itos(i) + " / " + itos(height)); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, 1) #endif @@ -2304,7 +2279,6 @@ Ref<MultiMesh> VoxelLightBaker::create_debug_multimesh(DebugMode p_mode) { mm->set_transform_format(MultiMesh::TRANSFORM_3D); mm->set_color_format(MultiMesh::COLOR_8BIT); - print_line("leaf voxels: " + itos(leaf_voxel_count)); mm->set_instance_count(leaf_voxel_count); Ref<ArrayMesh> mesh; diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index a660665d3f..d8db1973d2 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -960,8 +960,6 @@ Error AnimationPlayer::add_animation(const StringName &p_name, const Ref<Animati ERR_FAIL_COND_V(p_animation.is_null(), ERR_INVALID_PARAMETER); - //print_line("Add anim: "+String(p_name)+" name: "+p_animation->get_name()); - if (animation_set.has(p_name)) { _unref_anim(animation_set[p_name].animation); diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index acdbd9de08..d17ae1d84c 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -31,7 +31,6 @@ #include "base_button.h" #include "os/keyboard.h" -#include "print_string.h" #include "scene/main/viewport.h" #include "scene/scene_string_names.h" @@ -361,7 +360,6 @@ BaseButton::DrawMode BaseButton::get_draw_mode() const { return DRAW_DISABLED; }; - //print_line("press attempt: "+itos(status.press_attempt)+" hover: "+itos(status.hovering)+" pressed: "+itos(status.pressed)); if (status.press_attempt == false && status.hovering && !status.pressed) { return DRAW_HOVER; diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 03b25a138f..a34f2f1ad5 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -29,7 +29,6 @@ /*************************************************************************/ #include "button.h" -#include "print_string.h" #include "servers/visual_server.h" #include "translation.h" @@ -76,8 +75,6 @@ void Button::_notification(int p_what) { Color color; Color color_icon(1, 1, 1, 1); - //print_line(get_text()+": "+itos(is_flat())+" hover "+itos(get_draw_mode())); - Ref<StyleBox> style = get_stylebox("normal"); switch (get_draw_mode()) { diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index d862e8669c..8560efdde5 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -68,8 +68,6 @@ void LinkButton::_notification(int p_what) { Color color; bool do_underline = false; - //print_line(get_text()+": "+itos(is_flat())+" hover "+itos(get_draw_mode())); - switch (get_draw_mode()) { case DRAW_NORMAL: { diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index a3748bf14c..a5f9bea1b1 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2034,7 +2034,6 @@ void RichTextLabel::selection_copy() { if (text != "") { OS::get_singleton()->set_clipboard(text); - //print_line("COPY: "+text); } } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 9a8dc62e4e..9616caa811 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -5692,15 +5692,12 @@ void TextEdit::_update_completion_candidates() { bool pre_keyword = false; bool cancel = false; - //print_line("inquote: "+itos(inquote)+"first quote "+itos(first_quote)+" cofs-1 "+itos(cofs-1)); if (!inquote && first_quote == cofs - 1) { //no completion here - //print_line("cancel!"); cancel = true; } else if (inquote && first_quote != -1) { s = l.substr(first_quote, cofs - first_quote); - //print_line("s: 1"+s); } else if (cofs > 0 && l[cofs - 1] == ' ') { int kofs = cofs - 1; String kw; @@ -5713,7 +5710,6 @@ void TextEdit::_update_completion_candidates() { } pre_keyword = keywords.has(kw); - //print_line("KW "+kw+"? "+itos(pre_keyword)); } else { diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f6905e7c2e..e30f58e012 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2082,9 +2082,7 @@ void Node::_duplicate_and_reown(Node *p_new_parent, const Map<Node *, Node *> &p } else { Object *obj = ClassDB::instance(get_class()); - if (!obj) { - print_line("could not duplicate: " + String(get_class())); - } + ERR_EXPLAIN("Node: Could not duplicate: " + String(get_class())); ERR_FAIL_COND(!obj); node = Object::cast_to<Node>(obj); if (!node) @@ -2179,9 +2177,7 @@ Node *Node::duplicate_and_reown(const Map<Node *, Node *> &p_reown_map) const { Node *node = NULL; Object *obj = ClassDB::instance(get_class()); - if (!obj) { - print_line("could not duplicate: " + String(get_class())); - } + ERR_EXPLAIN("Node: Could not duplicate: " + String(get_class())); ERR_FAIL_COND_V(!obj, NULL); node = Object::cast_to<Node>(obj); if (!node) @@ -2472,7 +2468,7 @@ static void _Node_debug_sn(Object *p_obj) { path = n->get_name(); else path = String(p->get_name()) + "/" + p->get_path_to(n); - print_line(itos(p_obj->get_instance_id()) + "- Stray Node: " + path + " (Type: " + n->get_class() + ")"); + print_line(itos(p_obj->get_instance_id()) + " - Stray Node: " + path + " (Type: " + n->get_class() + ")"); } void Node::_print_stray_nodes() { diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index e99f785848..1d23650a1e 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1195,8 +1195,6 @@ void SceneTree::_update_root_rect() { VisualServer::get_singleton()->black_bars_set_margins(0, 0, 0, 0); } - //print_line("VP SIZE: "+viewport_size+" OFFSET: "+offset+" = "+(offset*2+viewport_size)); - //print_line("SS: "+video_mode); switch (stretch_mode) { case STRETCH_MODE_2D: { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index f92b6e7583..b6d0a0caa8 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1506,12 +1506,6 @@ Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_ if (Object::cast_to<Viewport>(p_node)) return NULL; - Control *c = Object::cast_to<Control>(p_node); - - if (c) { - //print_line("at "+String(c->get_path())+" POS "+c->get_position()+" bt "+p_xform); - } - //subwindows first!! if (!p_node->is_visible()) { @@ -1524,6 +1518,8 @@ Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_ if (matrix.basis_determinant() == 0.0f) return NULL; + Control *c = Object::cast_to<Control>(p_node); + if (!c || !c->clips_input() || c->has_point(matrix.affine_inverse().xform(p_global))) { for (int i = p_node->get_child_count() - 1; i >= 0; i--) { @@ -1654,7 +1650,6 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { */ gui.mouse_focus = _gui_find_control(pos); - //print_line("has mf "+itos(gui.mouse_focus!=NULL)); gui.mouse_focus_button = mb->get_button_index(); if (!gui.mouse_focus) { @@ -1683,11 +1678,6 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { arr.push_back(gui.mouse_focus->get_class()); ScriptDebugger::get_singleton()->send_message("click_ctrl", arr); } - -/*if (bool(GLOBAL_DEF("debug/print_clicked_control",false))) { - - print_line(String(gui.mouse_focus->get_path())+" - "+pos); - }*/ #endif if (mb->get_button_index() == BUTTON_LEFT) { //assign focus diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 7041b62487..58e6db3f5e 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -2906,8 +2906,6 @@ bool Animation::_transform_track_optimize_key(const TKey<TransformKey> &t0, cons //able to optimize more erase = false; } else { - - //print_line(itos(i)+"because of interp"); } } } diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp index 39206ed043..5694099754 100644 --- a/scene/resources/bit_mask.cpp +++ b/scene/resources/bit_mask.cpp @@ -492,18 +492,14 @@ static void fill_bits(const BitMap *p_src, Ref<BitMap> &p_map, const Point2i &p_ } } while (reenter || popped); -#ifdef DEBUG_ENABLED - print_line("max stack size: " + itos(stack.size())); -#endif + print_verbose("BitMap: Max stack size: " + itos(stack.size())); } Vector<Vector<Vector2> > BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, float p_epsilon) const { Rect2i r = Rect2i(0, 0, width, height).clip(p_rect); + print_verbose("BitMap: Rect: " + r); -#ifdef DEBUG_ENABLED - print_line("Rect: " + r); -#endif Point2i from; Ref<BitMap> fill; fill.instance(); @@ -515,13 +511,9 @@ Vector<Vector<Vector2> > BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, fl if (!fill->get_bit(Point2(j, i)) && get_bit(Point2(j, i))) { Vector<Vector2> polygon = _march_square(r, Point2i(j, i)); -#ifdef DEBUG_ENABLED - print_line("pre reduce: " + itos(polygon.size())); -#endif + print_verbose("BitMap: Pre reduce: " + itos(polygon.size())); polygon = reduce(polygon, r, p_epsilon); -#ifdef DEBUG_ENABLED - print_line("post reduce: " + itos(polygon.size())); -#endif + print_verbose("BitMap: Post reduce: " + itos(polygon.size())); polygons.push_back(polygon); fill_bits(this, fill, Point2i(j, i), r); } diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 2f2abd4e08..c536f9c1d2 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -435,8 +435,6 @@ DynamicFontAtSize::TexturePosition DynamicFontAtSize::_find_texture_pos_for_glyp break; } - //print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" X: "+itos(tex_x)+" Y: "+itos(tex_y)); - if (ret.index == -1) { //could not find texture to fit, create one ret.x = 0; diff --git a/scene/resources/dynamic_font_stb.cpp b/scene/resources/dynamic_font_stb.cpp index 29f1106d16..be394e19c4 100644 --- a/scene/resources/dynamic_font_stb.cpp +++ b/scene/resources/dynamic_font_stb.cpp @@ -214,7 +214,6 @@ void DynamicFontAtSize::_update_char(CharType p_char) { int advance; stbtt_GetCodepointHMetrics(&font->info, p_char, &advance, 0); - //print_line("char has no bitmap: "+itos(p_char)+" but advance is "+itos(advance*scale)); Character ch; ch.texture_idx = -1; ch.advance = advance * scale; @@ -279,8 +278,6 @@ void DynamicFontAtSize::_update_char(CharType p_char) { break; } - //print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" X: "+itos(tex_x)+" Y: "+itos(tex_y)); - if (tex_index == -1) { //could not find texture to fit, create one tex_x = 0; @@ -364,8 +361,6 @@ void DynamicFontAtSize::_update_char(CharType p_char) { chr.rect = Rect2(tex_x + rect_margin, tex_y + rect_margin, w, h); - //print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" RECT: "+chr.rect+" X OFS: "+itos(xofs)+" Y OFS: "+itos(yofs)); - char_map[p_char] = chr; stbtt_FreeBitmap(cpbitmap, NULL); diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index dcd87a2a61..042cf28fec 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -1241,7 +1241,7 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe surfaces_tools.push_back(st); //stay there } - print_line("gen indices: " + itos(gen_index_count)); + print_verbose("Mesh: Gen indices: " + itos(gen_index_count)); //go through all indices for (int i = 0; i < gen_index_count; i += 3) { diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 07783d5f4a..f034e07ff9 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -106,7 +106,6 @@ Node *SceneState::instance(GenEditState p_edit_state) const { if (i == 0 && base_scene_idx >= 0) { //scene inheritance on root node - //print_line("scene inherit"); Ref<PackedScene> sdata = props[base_scene_idx]; ERR_FAIL_COND_V(!sdata.is_valid(), NULL); node = sdata->instance(p_edit_state == GEN_EDIT_STATE_DISABLED ? PackedScene::GEN_EDIT_STATE_DISABLED : PackedScene::GEN_EDIT_STATE_INSTANCE); //only main gets main edit state @@ -117,7 +116,6 @@ Node *SceneState::instance(GenEditState p_edit_state) const { } else if (n.instance >= 0) { //instance a scene into this node - //print_line("instance"); if (n.instance & FLAG_INSTANCE_IS_PLACEHOLDER) { String path = props[n.instance & FLAG_MASK]; @@ -141,7 +139,6 @@ Node *SceneState::instance(GenEditState p_edit_state) const { } } else if (n.type == TYPE_INSTANCED) { - //print_line("instanced"); //get the node from somewhere, it likely already exists from another instance if (parent) { node = parent->_get_child_by_name(snames[n.name]); @@ -152,7 +149,6 @@ Node *SceneState::instance(GenEditState p_edit_state) const { #endif } } else if (ClassDB::is_class_enabled(snames[n.type])) { - //print_line("created"); //node belongs to this scene and must be created Object *obj = ClassDB::instance(snames[n.type]); if (!Object::cast_to<Node>(obj)) { @@ -491,15 +487,6 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map if (E->get().usage & PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE) { isdefault = true; //is script default value } - /* - if (nd.instance<0 && ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO) && value.is_zero()) || ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONONE) && value.is_one())) { - continue; - } - */ - - //print_line("PASSED!"); - //print_line("at: "+String(p_node->get_name())+"::"+name+": - nz: "+itos(E->get().usage&PROPERTY_USAGE_STORE_IF_NONZERO)+" no: "+itos(E->get().usage&PROPERTY_USAGE_STORE_IF_NONONE)); - //print_line("value: "+String(value)+" is zero: "+itos(value.is_zero())+" is one" +itos(value.is_one())); if (pack_state_stack.size()) { // we are on part of an instanced subscene diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index ec489e5c5b..81fabf40fe 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -755,15 +755,11 @@ void SurfaceTool::append_from(const Ref<Mesh> &p_existing, int p_surface, const for (List<int>::Element *E = nindices.front(); E; E = E->next()) { int dst_index = E->get() + vfrom; - /* - if (dst_index <0 || dst_index>=vertex_array.size()) { - print_line("invalid index!"); - } - */ index_array.push_back(dst_index); } - if (index_array.size() % 3) - print_line("IA not div of 3?"); + if (index_array.size() % 3) { + WARN_PRINT("SurfaceTool: Index array not a multiple of 3."); + } } //mikktspace callbacks diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index c763c9bc79..ea3273713e 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -480,7 +480,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla flags = f->get_32(); //texture flags! uint32_t df = f->get_32(); //data format -/* + /* print_line("width: " + itos(tw)); print_line("height: " + itos(th)); print_line("flags: " + itos(flags)); diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index d8fc3677fb..dac12205b6 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -431,7 +431,6 @@ String VisualShader::generate_preview_shader(Type p_type, int p_node, int p_port global_code += "\n\n"; String final_code = global_code; final_code += code; - //print_line(final_code); return final_code; } @@ -914,7 +913,6 @@ void VisualShader::_update_shader() const { String final_code = global_code; final_code += code; const_cast<VisualShader *>(this)->set_code(final_code); - //print_line(final_code); for (int i = 0; i < default_tex_params.size(); i++) { const_cast<VisualShader *>(this)->set_default_texture_param(default_tex_params[i].name, default_tex_params[i].param); } diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp index 0d1aad0dff..2040377dd4 100644 --- a/servers/arvr_server.cpp +++ b/servers/arvr_server.cpp @@ -178,7 +178,7 @@ void ARVRServer::remove_interface(const Ref<ARVRInterface> &p_interface) { ERR_FAIL_COND(idx == -1); - print_line("Removed interface" + p_interface->get_name()); + print_verbose("ARVR: Removed interface" + p_interface->get_name()); emit_signal("interface_removed", p_interface->get_name()); interfaces.remove(idx); @@ -320,12 +320,12 @@ Ref<ARVRInterface> ARVRServer::get_primary_interface() const { void ARVRServer::set_primary_interface(const Ref<ARVRInterface> &p_primary_interface) { primary_interface = p_primary_interface; - print_line("Primary interface set to: " + primary_interface->get_name()); + print_verbose("ARVR: Primary interface set to: " + primary_interface->get_name()); }; void ARVRServer::clear_primary_interface_if(const Ref<ARVRInterface> &p_primary_interface) { if (primary_interface == p_primary_interface) { - print_line("Clearing primary interface"); + print_verbose("ARVR: Clearing primary interface"); primary_interface.unref(); }; }; diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp index b059c20c95..294b1df241 100644 --- a/servers/physics/collision_solver_sat.cpp +++ b/servers/physics/collision_solver_sat.cpp @@ -44,12 +44,6 @@ struct _CollectorCallback { _FORCE_INLINE_ void call(const Vector3 &p_point_A, const Vector3 &p_point_B) { - /* - if (normal.dot(p_point_A) >= normal.dot(p_point_B)) - return; - print_line("** A: "+p_point_A+" B: "+p_point_B+" D: "+rtos(p_point_A.distance_to(p_point_B))); - */ - if (swap) callback(p_point_B, p_point_A, userdata); else @@ -410,26 +404,13 @@ public: supports_B[i] += best_axis * margin_B; } } - /* - print_line("best depth: "+rtos(best_depth)); - print_line("best axis: "+(best_axis)); - for(int i=0;i<support_count_A;i++) { - print_line("A-"+itos(i)+": "+supports_A[i]); - } - for(int i=0;i<support_count_B;i++) { - - print_line("B-"+itos(i)+": "+supports_B[i]); - } -*/ callback->normal = best_axis; if (callback->prev_axis) *callback->prev_axis = best_axis; _generate_contacts_from_supports(supports_A, support_count_A, supports_B, support_count_B, callback); callback->collided = true; - //CollisionSolverSW::CallbackResult cbk=NULL; - //cbk(Vector3(),Vector3(),NULL); } _FORCE_INLINE_ SeparatorAxisTest(const ShapeA *p_shape_A, const Transform &p_transform_A, const ShapeB *p_shape_B, const Transform &p_transform_B, _CollectorCallback *p_callback, real_t p_margin_A = 0, real_t p_margin_B = 0) { @@ -445,9 +426,6 @@ public: }; /****** SAT TESTS *******/ -/****** SAT TESTS *******/ -/****** SAT TESTS *******/ -/****** SAT TESTS *******/ typedef void (*CollisionFunc)(const ShapeSW *, const Transform &, const ShapeSW *, const Transform &, _CollectorCallback *p_callback, real_t, real_t); diff --git a/servers/physics/collision_solver_sw.cpp b/servers/physics/collision_solver_sw.cpp index 0037b9a862..2f2f6d2908 100644 --- a/servers/physics/collision_solver_sw.cpp +++ b/servers/physics/collision_solver_sw.cpp @@ -176,7 +176,6 @@ bool CollisionSolverSW::solve_concave(const ShapeSW *p_shape_A, const Transform } concave_B->cull(local_aabb, concave_callback, &cinfo); - //print_line("COL AABB TESTS: "+itos(cinfo.aabb_tests)); return cinfo.collided; } @@ -364,13 +363,10 @@ bool CollisionSolverSW::solve_distance(const ShapeSW *p_shape_A, const Transform concave_B->cull(local_aabb, concave_distance_callback, &cinfo); if (!cinfo.collided) { - //print_line(itos(cinfo.tested)); r_point_A = cinfo.close_A; r_point_B = cinfo.close_B; } - //print_line("DIST AABB TESTS: "+itos(cinfo.aabb_tests)); - return !cinfo.collided; } else { diff --git a/servers/physics/joints/hinge_joint_sw.cpp b/servers/physics/joints/hinge_joint_sw.cpp index d660eba879..368a349632 100644 --- a/servers/physics/joints/hinge_joint_sw.cpp +++ b/servers/physics/joints/hinge_joint_sw.cpp @@ -224,18 +224,12 @@ bool HingeJointSW::setup(real_t p_step) { // Compute limit information real_t hingeAngle = get_hinge_angle(); - //print_line("angle: "+rtos(hingeAngle)); //set bias, sign, clear accumulator m_correction = real_t(0.); m_limitSign = real_t(0.); m_solveLimit = false; m_accLimitImpulse = real_t(0.); - /*if (m_useLimit) { - print_line("low: "+rtos(m_lowerLimit)); - print_line("hi: "+rtos(m_upperLimit)); - }*/ - //if (m_lowerLimit < m_upperLimit) if (m_useLimit && m_lowerLimit <= m_upperLimit) { //if (hingeAngle <= m_lowerLimit*m_limitSoftness) diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp index cae2e6fb00..b2ab7bec16 100644 --- a/servers/physics/space_sw.cpp +++ b/servers/physics/space_sw.cpp @@ -231,11 +231,6 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transform aabb = aabb.merge(AABB(aabb.position + p_motion, aabb.size)); //motion aabb = aabb.grow(p_margin); - /* - if (p_motion!=Vector3()) - print_line(p_motion); - */ - int amount = space->broadphase->cull_aabb(aabb, space->intersection_query_results, SpaceSW::INTERSECTION_QUERY_MAX, space->intersection_query_subindex_results); real_t best_safe = 1; @@ -267,7 +262,6 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transform Transform col_obj_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); //test initial overlap, does it collide if going all the way? if (CollisionSolverSW::solve_distance(&mshape, p_xform, col_obj->get_shape(shape_idx), col_obj_xform, point_A, point_B, aabb, &sep_axis)) { - //print_line("failed motion cast (no collision)"); continue; } @@ -275,7 +269,6 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transform sep_axis = p_motion.normalized(); if (!CollisionSolverSW::solve_distance(shape, p_xform, col_obj->get_shape(shape_idx), col_obj_xform, point_A, point_B, aabb, &sep_axis)) { - //print_line("failed motion cast (no collision)"); return false; } @@ -298,7 +291,6 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transform if (collided) { - //print_line(itos(i)+": "+rtos(ofs)); hi = ofs; } else { @@ -376,9 +368,6 @@ bool PhysicsDirectSpaceStateSW::collide_shape(RID p_shape, const Transform &p_sh continue; } - //print_line("AGAINST: "+itos(col_obj->get_self().get_id())+":"+itos(shape_idx)); - //print_line("THE ABBB: "+(col_obj->get_transform() * col_obj->get_shape_transform(shape_idx)).xform(col_obj->get_shape(shape_idx)->get_aabb())); - if (CollisionSolverSW::solve_static(shape, p_shape_xform, col_obj->get_shape(shape_idx), col_obj->get_transform() * col_obj->get_shape_transform(shape_idx), cbkres, cbkptr, NULL, p_margin)) { collided = true; } @@ -832,13 +821,11 @@ bool SpaceSW::test_body_motion(BodySW *p_body, const Transform &p_from, const Ve Transform col_obj_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); //test initial overlap, does it collide if going all the way? if (CollisionSolverSW::solve_distance(&mshape, body_shape_xform, col_obj->get_shape(shape_idx), col_obj_xform, point_A, point_B, motion_aabb, &sep_axis)) { - //print_line("failed motion cast (no collision)"); continue; } sep_axis = p_motion.normalized(); if (!CollisionSolverSW::solve_distance(body_shape, body_shape_xform, col_obj->get_shape(shape_idx), col_obj_xform, point_A, point_B, motion_aabb, &sep_axis)) { - //print_line("failed motion cast (no collision)"); stuck = true; break; } @@ -862,7 +849,6 @@ bool SpaceSW::test_body_motion(BodySW *p_body, const Transform &p_from, const Ve if (collided) { - //print_line(itos(i)+": "+rtos(ofs)); hi = ofs; } else { diff --git a/servers/physics/step_sw.cpp b/servers/physics/step_sw.cpp index ad08cb6353..4128e1ec1a 100644 --- a/servers/physics/step_sw.cpp +++ b/servers/physics/step_sw.cpp @@ -228,7 +228,6 @@ void StepSW::step(SpaceSW *p_space, real_t p_delta, int p_iterations) { profile_begtime = profile_endtime; } - //print_line("island count: "+itos(island_count)+" active count: "+itos(active_count)); /* SETUP CONSTRAINT ISLANDS */ { diff --git a/servers/physics_2d/collision_solver_2d_sat.cpp b/servers/physics_2d/collision_solver_2d_sat.cpp index 0d1ffca50d..98fe4adb80 100644 --- a/servers/physics_2d/collision_solver_2d_sat.cpp +++ b/servers/physics_2d/collision_solver_2d_sat.cpp @@ -300,7 +300,6 @@ public: } } -//print_line("test axis: "+p_axis+" depth: "+rtos(best_depth)); #ifdef DEBUG_ENABLED best_axis_count++; #endif diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp index 6ce019f36e..b03a193d97 100644 --- a/servers/physics_2d/collision_solver_2d_sw.cpp +++ b/servers/physics_2d/collision_solver_2d_sw.cpp @@ -114,35 +114,6 @@ bool CollisionSolver2DSW::solve_raycast(const Shape2DSW *p_shape_A, const Vector return true; } -/* -bool CollisionSolver2DSW::solve_ray(const Shape2DSW *p_shape_A,const Matrix32& p_transform_A,const Shape2DSW *p_shape_B,const Matrix32& p_transform_B,const Matrix32& p_inverse_B,CallbackResult p_result_callback,void *p_userdata,bool p_swap_result) { - - - const RayShape2DSW *ray = static_cast<const RayShape2DSW*>(p_shape_A); - - Vector2 from = p_transform_A.origin; - Vector2 to = from+p_transform_A.basis.get_axis(2)*ray->get_length(); - Vector2 support_A=to; - - from = p_inverse_B.xform(from); - to = p_inverse_B.xform(to); - - Vector2 p,n; - if (!p_shape_B->intersect_segment(from,to,&p,&n)) - return false; - - Vector2 support_B=p_transform_B.xform(p); - - if (p_result_callback) { - if (p_swap_result) - p_result_callback(support_B,support_A,p_userdata); - else - p_result_callback(support_A,support_B,p_userdata); - } - return true; -} -*/ - struct _ConcaveCollisionInfo2D { const Transform2D *transform_A; @@ -219,7 +190,6 @@ bool CollisionSolver2DSW::solve_concave(const Shape2DSW *p_shape_A, const Transf concave_B->cull(local_aabb, concave_callback, &cinfo); - //print_line("Rect2 TESTS: "+itos(cinfo.aabb_tests)); return cinfo.collided; } @@ -245,10 +215,6 @@ bool CollisionSolver2DSW::solve(const Shape2DSW *p_shape_A, const Transform2D &p if (type_B == Physics2DServer::SHAPE_LINE || type_B == Physics2DServer::SHAPE_RAY) { return false; } - /* - if (type_B==Physics2DServer::SHAPE_RAY) { - return false; - */ if (swap) { return solve_static_line(p_shape_B, p_transform_B, p_shape_A, p_transform_A, p_result_callback, p_userdata, true); @@ -256,17 +222,6 @@ bool CollisionSolver2DSW::solve(const Shape2DSW *p_shape_A, const Transform2D &p return solve_static_line(p_shape_A, p_transform_A, p_shape_B, p_transform_B, p_result_callback, p_userdata, false); } - /*} else if (type_A==Physics2DServer::SHAPE_RAY) { - - if (type_B==Physics2DServer::SHAPE_RAY) - return false; - - if (swap) { - return solve_ray(p_shape_B,p_transform_B,p_shape_A,p_transform_A,p_inverse_A,p_result_callback,p_userdata,true); - } else { - return solve_ray(p_shape_A,p_transform_A,p_shape_B,p_transform_B,p_inverse_B,p_result_callback,p_userdata,false); - } -*/ } else if (type_A == Physics2DServer::SHAPE_RAY) { if (type_B == Physics2DServer::SHAPE_RAY) { diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index 15e80bcd5e..721f21fc40 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -171,13 +171,14 @@ void Physics2DServerSW::_shape_col_cbk(const Vector2 &p_point_A, const Vector2 & } if (cbk->valid_dir.dot((p_point_A - p_point_B).normalized()) < 0.7071) { cbk->invalid_by_dir++; - ; - /* print_line("A: "+p_point_A); + + /* + print_line("A: "+p_point_A); print_line("B: "+p_point_B); print_line("discard too angled "+rtos(cbk->valid_dir.dot((p_point_A-p_point_B)))); print_line("resnorm: "+(p_point_A-p_point_B).normalized()); print_line("distance: "+rtos(p_point_A.distance_to(p_point_B))); -*/ + */ return; } } diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index ecebd09436..746aa2d49b 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -234,11 +234,6 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transfor aabb = aabb.merge(Rect2(aabb.position + p_motion, aabb.size)); //motion aabb = aabb.grow(p_margin); - /* - if (p_motion!=Vector2()) - print_line(p_motion); - */ - int amount = space->broadphase->cull_aabb(aabb, space->intersection_query_results, Space2DSW::INTERSECTION_QUERY_MAX, space->intersection_query_subindex_results); real_t best_safe = 1; @@ -255,15 +250,6 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transfor const CollisionObject2DSW *col_obj = space->intersection_query_results[i]; int shape_idx = space->intersection_query_subindex_results[i]; - /*if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { - - const Body2DSW *body=static_cast<const Body2DSW*>(col_obj); - if (body->get_one_way_collision_direction()!=Vector2() && p_motion.dot(body->get_one_way_collision_direction())<=CMP_EPSILON) { - print_line("failed in motion dir"); - continue; - } - }*/ - Transform2D col_obj_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); //test initial overlap, does it collide if going all the way? if (!CollisionSolver2DSW::solve(shape, p_xform, p_motion, col_obj->get_shape(shape_idx), col_obj_xform, Vector2(), NULL, NULL, NULL, p_margin)) { diff --git a/servers/physics_2d/step_2d_sw.cpp b/servers/physics_2d/step_2d_sw.cpp index 6108b885f0..d1078f1506 100644 --- a/servers/physics_2d/step_2d_sw.cpp +++ b/servers/physics_2d/step_2d_sw.cpp @@ -209,8 +209,6 @@ void Step2DSW::step(Space2DSW *p_space, real_t p_delta, int p_iterations) { p_space->area_remove_from_moved_list((SelfList<Area2DSW> *)aml.first()); //faster to remove here } - //print_line("island count: "+itos(island_count)+" active count: "+itos(active_count)); - { //profile profile_endtime = OS::get_singleton()->get_ticks_usec(); p_space->set_elapsed_time(Space2DSW::ELAPSED_TIME_GENERATE_ISLANDS, profile_endtime - profile_begtime); diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 8705033326..ffb130048f 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -2533,7 +2533,6 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons expr = constant; } else if (tk.type == TK_TRUE) { - //print_line("found true"); //handle true constant ConstantNode *constant = alloc_node<ConstantNode>(); diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 213b3ad8f6..1e255591f0 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -1180,7 +1180,7 @@ _FORCE_INLINE_ static void _light_capture_sample_octree(const RasterizerStorage: r_color = color_interp[0].linear_interpolate(color_interp[1], level_filter); r_alpha = Math::lerp(alpha_interp[0], alpha_interp[1], level_filter); - // print_line("pos: " + p_posf + " level " + rtos(p_level) + " down to " + itos(target_level) + "." + rtos(level_filter) + " color " + r_color + " alpha " + rtos(r_alpha)); + //print_line("pos: " + p_posf + " level " + rtos(p_level) + " down to " + itos(target_level) + "." + rtos(level_filter) + " color " + r_color + " alpha " + rtos(r_alpha)); } _FORCE_INLINE_ static Color _light_capture_voxel_cone_trace(const RasterizerStorage::LightmapCaptureOctree *p_octree, const Vector3 &p_pos, const Vector3 &p_dir, float p_aperture, int p_cell_subdiv) { @@ -1799,11 +1799,12 @@ void VisualServerScene::_prepare_scene(const Transform p_cam_transform, const Ca //light_samplers_culled=0; - /* print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0)); + /* + print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0)); print_line("OTO: "+itos(p_scenario->octree.get_octant_count())); - //print_line("OTE: "+itos(p_scenario->octree.get_elem_count())); + print_line("OTE: "+itos(p_scenario->octree.get_elem_count())); print_line("OTP: "+itos(p_scenario->octree.get_pair_count())); -*/ + */ /* STEP 3 - PROCESS PORTALS, VALIDATE ROOMS */ //removed, will replace with culling @@ -2302,7 +2303,6 @@ void VisualServerScene::_setup_gi_probe(Instance *p_instance) { int size_divisor = 1; if (probe->dynamic.compression == RasterizerStorage::GI_PROBE_S3TC) { - print_line("S3TC"); size_limit = 4; size_divisor = 4; } @@ -2391,7 +2391,7 @@ void VisualServerScene::_setup_gi_probe(Instance *p_instance) { probe->dynamic.mipmaps_s3tc.resize(mipmap_count); for (int i = 0; i < mipmap_count; i++) { - print_line("S3TC level: " + itos(i) + " blocks: " + itos(comp_blocks[i].size())); + //print_line("S3TC level: " + itos(i) + " blocks: " + itos(comp_blocks[i].size())); probe->dynamic.mipmaps_s3tc.write[i].resize(comp_blocks[i].size()); PoolVector<InstanceGIProbeData::CompBlockS3TC>::Write w = probe->dynamic.mipmaps_s3tc.write[i].write(); int block_idx = 0; @@ -2759,7 +2759,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co light->energy[2] += int32_t(light_b * att * ((cell->albedo) & 0xFF) / 255.0); } } - // print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0)); + //print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0)); } break; } } @@ -3180,7 +3180,7 @@ void VisualServerScene::render_probes() { } break; case GI_UPDATE_STAGE_UPLOADING: { - // uint64_t us = OS::get_singleton()->get_ticks_usec(); + //uint64_t us = OS::get_singleton()->get_ticks_usec(); for (int i = 0; i < (int)probe->dynamic.mipmaps_3d.size(); i++) { @@ -3190,7 +3190,7 @@ void VisualServerScene::render_probes() { probe->dynamic.updating_stage = GI_UPDATE_STAGE_CHECK; - // print_line("UPLOAD TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0)); + //print_line("UPLOAD TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0)); } break; } } diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp index a700fcf11b..90acba306a 100644 --- a/servers/visual/visual_server_viewport.cpp +++ b/servers/visual/visual_server_viewport.cpp @@ -137,7 +137,6 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E } } - //print_line("lights: "+itos(light_count)); canvas_map[Viewport::CanvasKey(E->key(), E->get().layer)] = &E->get(); } @@ -194,8 +193,6 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E VisualServerCanvas::Canvas *canvas = static_cast<VisualServerCanvas::Canvas *>(E->get()->canvas); - //print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size())); - //print_line("GT "+p_viewport->global_transform+". CT: "+E->get()->transform); Transform2D xform = p_viewport->global_transform * E->get()->transform; RasterizerCanvas::Light *canvas_lights = NULL; diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp index 93f3792bdc..1cafc47685 100644 --- a/servers/visual/visual_server_wrap_mt.cpp +++ b/servers/visual/visual_server_wrap_mt.cpp @@ -107,16 +107,16 @@ void VisualServerWrapMT::init() { if (create_thread) { - print_line("CREATING RENDER THREAD"); + print_verbose("VisualServerWrapMT: Creating render thread"); OS::get_singleton()->release_rendering_thread(); if (create_thread) { thread = Thread::create(_thread_callback, this); - print_line("STARTING RENDER THREAD"); + print_verbose("VisualServerWrapMT: Starting render thread"); } while (!draw_thread_up) { OS::get_singleton()->delay_usec(1000); } - print_line("DONE RENDER THREAD"); + print_verbose("VisualServerWrapMT: Finished render thread"); } else { visual_server->init(); |