Make some debug prints verbose-only, remove others

This commit is contained in:
Rémi Verschelde 2018-08-24 09:35:07 +02:00
parent d442f3d0aa
commit 52466d57e9
139 changed files with 172 additions and 803 deletions

View File

@ -50,7 +50,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
int size = Math::larger_prime(keys.size()); int size = Math::larger_prime(keys.size());
print_line("compressing keys: " + itos(keys.size()));
Vector<Vector<Pair<int, CharString> > > buckets; Vector<Vector<Pair<int, CharString> > > buckets;
Vector<Map<uint32_t, int> > table; Vector<Map<uint32_t, int> > table;
Vector<uint32_t> hfunc_table; Vector<uint32_t> hfunc_table;
@ -107,7 +106,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
} }
int bucket_table_size = 0; 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++) { for (int i = 0; i < size; i++) {
@ -117,8 +115,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
if (b.size() == 0) if (b.size() == 0)
continue; continue;
//print_line("bucket: "+itos(i)+" - elements: "+itos(b.size()));
int d = 1; int d = 1;
int item = 0; int item = 0;
@ -140,9 +136,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
bucket_table_size += 2 + b.size() * 4; 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); hash_table.resize(size);
bucket_table.resize(bucket_table_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); strings.resize(total_compression_size);
PoolVector<uint8_t>::Write cw = strings.write(); 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(); String name = p_name.operator String();
if (name == "hash_table") { if (name == "hash_table") {
hash_table = p_value; hash_table = p_value;
//print_line("translation: loaded hash table of size: "+itos(hash_table.size()));
} else if (name == "bucket_table") { } else if (name == "bucket_table") {
bucket_table = p_value; bucket_table = p_value;
//print_line("translation: loaded bucket table of size: "+itos(bucket_table.size()));
} else if (name == "strings") { } else if (name == "strings") {
strings = p_value; strings = p_value;
//print_line("translation: loaded string table of size: "+itos(strings.size()));
} else if (name == "load_from") { } else if (name == "load_from") {
//print_line("generating");
generate(p_value); generate(p_value);
} else } else
return false; return false;
@ -248,11 +235,7 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const {
uint32_t p = htptr[h % htsize]; uint32_t p = htptr[h % htsize];
//print_line("String: "+p_src_text.operator String());
//print_line("Hash: "+itos(p));
if (p == 0xFFFFFFFF) { if (p == 0xFFFFFFFF) {
//print_line("GETMSG: Nothing!");
return StringName(); //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) { if (idx == -1) {
//print_line("GETMSG: Not in Bucket!");
return StringName(); return StringName();
} }
@ -281,8 +262,6 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const {
String rstr; String rstr;
rstr.parse_utf8(&sptr[bucket.elem[idx].str_offset], bucket.elem[idx].uncomp_size); 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; return rstr;
} else { } 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); smaz_decompress(&sptr[bucket.elem[idx].str_offset], bucket.elem[idx].comp_size, uncomp.ptrw(), bucket.elem[idx].uncomp_size);
String rstr; String rstr;
rstr.parse_utf8(uncomp.get_data()); rstr.parse_utf8(uncomp.get_data());
//print_line("Compressed, size: "+itos(bucket.elem[idx].comp_size));
//print_line("Return: "+rstr);
return rstr; return rstr;
} }
} }

View File

@ -43,7 +43,6 @@
Error FileAccessEncrypted::open_and_parse(FileAccess *p_base, const Vector<uint8_t> &p_key, Mode p_mode) { 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(file != NULL, ERR_ALREADY_IN_USE);
ERR_FAIL_COND_V(p_key.size() != 32, ERR_INVALID_PARAMETER); ERR_FAIL_COND_V(p_key.size() != 32, ERR_INVALID_PARAMETER);

View File

@ -93,8 +93,6 @@ void FileAccessNetworkClient::_thread_func() {
DEBUG_TIME("sem_unlock"); DEBUG_TIME("sem_unlock");
//DEBUG_PRINT("semwait returned "+itos(werr)); //DEBUG_PRINT("semwait returned "+itos(werr));
DEBUG_PRINT("MUTEX LOCK " + itos(lockcount)); DEBUG_PRINT("MUTEX LOCK " + itos(lockcount));
DEBUG_PRINT("POPO");
DEBUG_PRINT("PEPE");
lock_mutex(); lock_mutex();
DEBUG_PRINT("MUTEX PASS"); DEBUG_PRINT("MUTEX PASS");

View File

@ -175,7 +175,6 @@ public:
FileAccess *PackedData::try_open_path(const String &p_path) { FileAccess *PackedData::try_open_path(const String &p_path) {
//print_line("try open path " + p_path);
PathMD5 pmd5(p_path.md5_buffer()); PathMD5 pmd5(p_path.md5_buffer());
Map<PathMD5, PackedFile>::Element *E = files.find(pmd5); Map<PathMD5, PackedFile>::Element *E = files.find(pmd5);
if (!E) if (!E)

View File

@ -81,7 +81,7 @@ PoolByteArray StreamPeerSSL::get_project_cert_array() {
memdelete(f); memdelete(f);
#ifdef DEBUG_ENABLED #ifdef DEBUG_ENABLED
print_line("Loaded certs from '" + certs_path); print_verbose(vformat("Loaded certs from '%s'.", certs_path));
#endif #endif
} }
} }

View File

@ -622,15 +622,12 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
case TEXT_PRINTERR: { case TEXT_PRINTERR: {
String str = *p_inputs[0]; String str = *p_inputs[0];
//str+="\n";
print_error(str); print_error(str);
} break; } break;
case TEXT_PRINTRAW: { case TEXT_PRINTRAW: {
String str = *p_inputs[0];
//str+="\n"; String str = *p_inputs[0];
OS::get_singleton()->print("%s", str.utf8().get_data()); OS::get_singleton()->print("%s", str.utf8().get_data());
} break; } break;

View File

@ -626,7 +626,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
voxelsize.z /= div_z; voxelsize.z /= div_z;
// create and initialize cells to zero // create and initialize cells to zero
//print_line("Wrapper: Initializing Cells");
uint8_t ***cell_status = memnew_arr(uint8_t **, div_x); uint8_t ***cell_status = memnew_arr(uint8_t **, div_x);
for (int i = 0; i < div_x; i++) { 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 // plot faces into cells
//print_line("Wrapper (1/6): Plotting Faces");
for (int i = 0; i < face_count; i++) { 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 // 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 i = 0; i < div_x; i++) {
for (int j = 0; j < div_y; j++) { 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 // build faces for the inside-outside cell divisors
//print_line("Wrapper (3/6): Building Faces");
PoolVector<Face3> wrapped_faces; PoolVector<Face3> wrapped_faces;
for (int i = 0; i < div_x; i++) { 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 // transform face vertices to global coords
int wrapped_faces_count = wrapped_faces.size(); 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 // clean up grid
//print_line("Wrapper (5/6): Grid Cleanup");
for (int i = 0; i < div_x; i++) { 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) if (p_error)
*p_error = voxelsize.length(); *p_error = voxelsize.length();
//print_line("Wrapper (6/6): Finished.");
return wrapped_faces; return wrapped_faces;
} }

View File

@ -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)); Vector3 sp = p_points[i].snapped(Vector3(0.0001, 0.0001, 0.0001));
if (valid_cache.has(sp)) { if (valid_cache.has(sp)) {
valid_points.write[i] = false; valid_points.write[i] = false;
//print_line("INVALIDATED: "+itos(i));
} else { } else {
valid_points.write[i] = true; valid_points.write[i] = true;
valid_cache.insert(sp); valid_cache.insert(sp);
@ -455,7 +454,6 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
//fill mesh //fill mesh
r_mesh.faces.clear(); r_mesh.faces.clear();
r_mesh.faces.resize(ret_faces.size()); r_mesh.faces.resize(ret_faces.size());
//print_line("FACECOUNT: "+itos(r_mesh.faces.size()));
int idx = 0; int idx = 0;
for (List<Geometry::MeshData::Face>::Element *E = ret_faces.front(); E; E = E->next()) { 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.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; return OK;
} }

View File

@ -50,9 +50,9 @@ Error MessageQueue::push_call(ObjectID p_id, const StringName &p_method, const V
String type; String type;
if (ObjectDB::get_instance(p_id)) if (ObjectDB::get_instance(p_id))
type = ObjectDB::get_instance(p_id)->get_class(); 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(); 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); 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; String type;
if (ObjectDB::get_instance(p_id)) if (ObjectDB::get_instance(p_id))
type = ObjectDB::get_instance(p_id)->get_class(); 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(); 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); ERR_FAIL_V(ERR_OUT_OF_MEMORY);
} }
@ -134,9 +134,9 @@ Error MessageQueue::push_notification(ObjectID p_id, int p_notification) {
String type; String type;
if (ObjectDB::get_instance(p_id)) if (ObjectDB::get_instance(p_id))
type = ObjectDB::get_instance(p_id)->get_class(); 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(); 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); ERR_FAIL_V(ERR_OUT_OF_MEMORY);
} }
@ -210,8 +210,7 @@ void MessageQueue::statistics() {
} }
//object was deleted //object was deleted
//WARN_PRINT("Object was deleted while awaiting a callback") print_line("Object was deleted while awaiting a callback");
//should it print a warning?
} else { } else {
null_count++; null_count++;
@ -226,17 +225,14 @@ void MessageQueue::statistics() {
print_line("NULL count: " + itos(null_count)); print_line("NULL count: " + itos(null_count));
for (Map<StringName, int>::Element *E = set_count.front(); E; E = E->next()) { for (Map<StringName, int>::Element *E = set_count.front(); E; E = E->next()) {
print_line("SET " + E->key() + ": " + itos(E->get())); print_line("SET " + E->key() + ": " + itos(E->get()));
} }
for (Map<StringName, int>::Element *E = call_count.front(); E; E = E->next()) { for (Map<StringName, int>::Element *E = call_count.front(); E; E = E->next()) {
print_line("CALL " + E->key() + ": " + itos(E->get())); print_line("CALL " + E->key() + ": " + itos(E->get()));
} }
for (Map<int, int>::Element *E = notify_count.front(); E; E = E->next()) { for (Map<int, int>::Element *E = notify_count.front(); E; E = E->next()) {
print_line("NOTIFY " + itos(E->key()) + ": " + itos(E->get())); print_line("NOTIFY " + itos(E->key()) + ": " + itos(E->get()));
} }
} }
@ -268,7 +264,6 @@ void MessageQueue::flush() {
if (buffer_end > buffer_max_used) { if (buffer_end > buffer_max_used) {
buffer_max_used = buffer_end; buffer_max_used = buffer_end;
//statistics();
} }
uint32_t read_pos = 0; uint32_t read_pos = 0;

View File

@ -98,22 +98,18 @@ static Error _erase_recursive(DirAccess *da) {
err = _erase_recursive(da); err = _erase_recursive(da);
if (err) { if (err) {
print_line("err recurso " + E->get());
da->change_dir(".."); da->change_dir("..");
return err; return err;
} }
err = da->change_dir(".."); err = da->change_dir("..");
if (err) { if (err) {
print_line("no go back " + E->get());
return err; return err;
} }
err = da->remove(da->get_current_dir().plus_file(E->get())); err = da->remove(da->get_current_dir().plus_file(E->get()));
if (err) { if (err) {
print_line("no remove dir" + E->get());
return err; return err;
} }
} else { } else {
print_line("no change to " + E->get());
return err; return err;
} }
} }
@ -122,8 +118,6 @@ static Error _erase_recursive(DirAccess *da) {
Error err = da->remove(da->get_current_dir().plus_file(E->get())); Error err = da->remove(da->get_current_dir().plus_file(E->get()));
if (err) { if (err) {
print_line("no remove file" + E->get());
return err; return err;
} }
} }

View File

@ -191,7 +191,7 @@ bool ProjectSettings::_get(const StringName &p_name, Variant &r_ret) const {
name = feature_overrides[name]; name = feature_overrides[name];
} }
if (!props.has(name)) { if (!props.has(name)) {
print_line("WARNING: not found: " + String(name)); WARN_PRINTS("Property not found: " + String(name));
return false; return false;
} }
r_ret = props[name].variant; r_ret = props[name].variant;

View File

@ -82,17 +82,16 @@ Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_por
const int ms = waits[i]; const int ms = waits[i];
OS::get_singleton()->delay_usec(ms * 1000); 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) { if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) {
print_line("Remote Debugger: Unable to connect"); ERR_PRINTS("Remote Debugger: Unable to connect.");
return FAILED; return FAILED;
}; };
// print_line("Remote Debugger: Connection OK!");
packet_peer_stream->set_stream_peer(tcp_client); packet_peer_stream->set_stream_peer(tcp_client);
return OK; return OK;

View File

@ -1098,7 +1098,6 @@ bool TranslationServer::_load_translations(const String &p_from) {
for (int i = 0; i < tcount; i++) { for (int i = 0; i < tcount; i++) {
//print_line( "Loading translation from " + r[i] );
Ref<Translation> tr = ResourceLoader::load(r[i]); Ref<Translation> tr = ResourceLoader::load(r[i]);
if (tr.is_valid()) if (tr.is_valid())
add_translation(tr); add_translation(tr);

View File

@ -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) { 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; String aux;

View File

@ -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); RasterizerStorageGLES2::Texture *tex = _bind_canvas_texture(np->texture, np->normal_map);
if (!tex) { 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; 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) + 14] = (source.position.x + source.size.x) * texpixel_size.x;
buffer[(3 * 4 * 4) + 15] = (source.position.y + source.size.y) * texpixel_size.y; 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); glBindBuffer(GL_ARRAY_BUFFER, data.ninepatch_vertices);
@ -789,7 +788,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
} break; } break;
default: { default: {
print_line("other"); // FIXME: Proper error handling if relevant
//print_line("other");
} break; } break;
} }
} }

View File

@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/ /*************************************************************************/
#include "rasterizer_storage_gles2.h" #include "rasterizer_storage_gles2.h"
#include "project_settings.h" #include "project_settings.h"
#include "rasterizer_canvas_gles2.h" #include "rasterizer_canvas_gles2.h"
#include "rasterizer_scene_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); 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++) { for (int i = 0; i < texture->mipmaps; i++) {
int ofs = 0; int ofs = 0;

View File

@ -596,6 +596,7 @@ String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, Gener
default: { default: {
SL::DataType type = op_node->arguments[3]->get_datatype(); 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)); print_line(String("uhhhh invalid mix with type: ") + itos(type));
} break; } break;
} }

View File

@ -231,7 +231,6 @@ static String _fix_error_code_line(const String &p_error, int p_code_start, int
continue; continue;
String numstr = error.substr(last_find_pos + 1, (end_pos - last_find_pos) - 1); 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 begin = error.substr(0, last_find_pos + 1);
String end = error.substr(end_pos, error.length()); String end = error.substr(end_pos, error.length());
int num = numstr.to_int() + p_code_start - p_offset; int num = numstr.to_int() + p_code_start - p_offset;

View File

@ -1557,17 +1557,12 @@ void RasterizerCanvasGLES3::canvas_debug_viewport_shadows(Light *p_lights_with_s
int ofs = h; int ofs = h;
glDisable(GL_BLEND); glDisable(GL_BLEND);
//print_line(" debug lights ");
while (light) { while (light) {
//print_line("debug light");
if (light->shadow_buffer.is_valid()) { if (light->shadow_buffer.is_valid()) {
//print_line("sb is valid");
RasterizerStorageGLES3::CanvasLightShadow *sb = storage->canvas_light_shadow_owner.get(light->shadow_buffer); RasterizerStorageGLES3::CanvasLightShadow *sb = storage->canvas_light_shadow_owner.get(light->shadow_buffer);
if (sb) { if (sb) {
glBindTexture(GL_TEXTURE_2D, sb->distance); 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)); draw_generic_textured_rect(Rect2(h, ofs, w - h * 2, h), Rect2(0, 0, 1, 1));
ofs += h * 2; ofs += h * 2;
} }
@ -1677,19 +1672,7 @@ void RasterizerCanvasGLES3::canvas_light_shadow_buffer_update(RID p_buffer, cons
} break; } 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); glBindVertexArray(cc->array_id);
glDrawElements(GL_TRIANGLES, cc->len * 3, GL_UNSIGNED_SHORT, 0); glDrawElements(GL_TRIANGLES, cc->len * 3, GL_UNSIGNED_SHORT, 0);

View File

@ -436,8 +436,6 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
continue; continue;
} }
print_line("u - "+String(E->key())+" offset: "+itos(r_gen_code.uniform_offsets[E->get().order]));
} }
*/ */

View File

@ -240,8 +240,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
CharString code_globals; CharString code_globals;
CharString material_string; CharString material_string;
//print_line("code version? "+itos(conditional_version.code_version));
CustomCode *cc = NULL; CustomCode *cc = NULL;
if (conditional_version.code_version > 0) { 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) { 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)); ERR_FAIL_COND(!custom_code_map.has(p_code_id));
if (conditional_version.code_version == p_code_id) if (conditional_version.code_version == p_code_id)
conditional_version.code_version = 0; //bye conditional_version.code_version = 0; //bye

View File

@ -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); v.resize(vs + p_length);
PoolVector<uint8_t>::Write w = v.write(); PoolVector<uint8_t>::Write w = v.write();
copymem(&w[vs], data, p_length); 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) { static PoolVector<uint8_t> _lossless_pack_png(const Ref<Image> &p_image) {

View File

@ -31,11 +31,13 @@
#ifdef WINDOWS_ENABLED #ifdef WINDOWS_ENABLED
#include "file_access_windows.h" #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 <windows.h>
#include "print_string.h"
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <tchar.h> #include <tchar.h>
@ -133,11 +135,6 @@ void FileAccessWindows::close() {
if (save_path != "") { 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; bool rename_error = true;
int attempts = 4; int attempts = 4;
while (rename_error && attempts) { while (rename_error && attempts) {
@ -305,11 +302,10 @@ uint64_t FileAccessWindows::_get_modified_time(const String &p_file) {
return st.st_mtime; return st.st_mtime;
} else { } 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() { FileAccessWindows::FileAccessWindows() {

View File

@ -51,7 +51,7 @@ class AudioDriverXAudio2 : public AudioDriver {
HANDLE buffer_end_event; HANDLE buffer_end_event;
XAudio2DriverVoiceCallback() : XAudio2DriverVoiceCallback() :
buffer_end_event(CreateEvent(NULL, FALSE, FALSE, NULL)) {} 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); SetEvent(buffer_end_event);
} }

View File

@ -974,8 +974,6 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant
ofs += 0.001; ofs += 0.001;
} }
print_line("inserting");
*get_block_animation_update_ptr() = true; *get_block_animation_update_ptr() = true;
get_undo_redo()->create_action("Add Audio Track Clip"); 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); 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); 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)) { if (anim != "[stop]" && ap->has_animation(anim)) {

View File

@ -717,7 +717,6 @@ void CodeTextEditor::_complete_request() {
if (code_complete_func) { if (code_complete_func) {
code_complete_func(code_complete_ud, ctext, &entries, forced); code_complete_func(code_complete_ud, ctext, &entries, forced);
} }
// print_line("COMPLETE: "+p_request);
if (entries.size() == 0) if (entries.size() == 0)
return; return;
Vector<String> strs; Vector<String> strs;

View File

@ -336,12 +336,9 @@ void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) {
for (int i = 0; i < efsd->get_file_count(); i++) { for (int i = 0; i < efsd->get_file_count(); i++) {
Vector<String> deps = efsd->get_file_deps(i); Vector<String> deps = efsd->get_file_deps(i);
//print_line(":::"+efsd->get_file_path(i));
bool found = false; bool found = false;
for (int j = 0; j < deps.size(); j++) { for (int j = 0; j < deps.size(); j++) {
//print_line("\t"+deps[j]+" vs "+editing);
if (deps[j] == editing) { if (deps[j] == editing) {
//print_line("found");
found = true; found = true;
break; break;
} }
@ -510,7 +507,7 @@ void DependencyRemoveDialog::ok_pressed() {
res->set_path(""); res->set_path("");
} }
String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/"); 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); Error err = OS::get_singleton()->move_to_trash(path);
if (err != OK) { if (err != OK) {
EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + files_to_delete[i] + "\n"); 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) { 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://", "/"); 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); Error err = OS::get_singleton()->move_to_trash(path);
if (err != OK) { if (err != OK) {
EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + dirs_to_delete[i] + "\n"); 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) { if (!p_parent) {
Vector<String> deps = efsd->get_file_deps(i); Vector<String> deps = efsd->get_file_deps(i);
//print_line(":::"+efsd->get_file_path(i));
for (int j = 0; j < deps.size(); j++) { for (int j = 0; j < deps.size(); j++) {
if (!refs.has(deps[j])) { if (!refs.has(deps[j])) {

View File

@ -792,7 +792,6 @@ Error DocData::_load(Ref<XMLParser> parser) {
class_list[name] = ClassDoc(); class_list[name] = ClassDoc();
ClassDoc &c = class_list[name]; ClassDoc &c = class_list[name];
//print_line("class: "+name);
c.name = name; c.name = name;
if (parser->has_attribute("inherits")) if (parser->has_attribute("inherits"))
c.inherits = parser->get_attribute_value("inherits"); c.inherits = parser->get_attribute_value("inherits");

View File

@ -172,7 +172,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
parent = root; parent = root;
} else { } else {
String ppath = path.substr(0, pp); String ppath = path.substr(0, pp);
print_line("PPATH IS: " + ppath);
ERR_CONTINUE(!dir_map.has(ppath)); ERR_CONTINUE(!dir_map.has(ppath));
parent = dir_map[ppath]; parent = dir_map[ppath];
} }

View File

@ -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) { 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); TreeItem *item = effects->get_item_at_position(p_point);
if (!item) { if (!item) {
print_line("no item");
return Variant(); return Variant();
} }

View File

@ -1486,8 +1486,6 @@ void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, con
return; return;
} }
print_line("exporting " + p_path);
bool convert = GLOBAL_GET("editor/convert_text_resources_to_binary_on_export"); bool convert = GLOBAL_GET("editor/convert_text_resources_to_binary_on_export");
if (!convert) if (!convert)
return; return;

View File

@ -1907,8 +1907,6 @@ void EditorHelpBit::_go_to_help(String p_what) {
void EditorHelpBit::_meta_clicked(String p_select) { void EditorHelpBit::_meta_clicked(String p_select) {
print_line("got meta " + p_select);
if (p_select.begins_with("$")) { //enum if (p_select.begins_with("$")) { //enum
String select = p_select.substr(1, p_select.length()); String select = p_select.substr(1, p_select.length());

View File

@ -104,14 +104,12 @@ Vector<Ref<Texture> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>
continue; continue;
} }
AABB aabb = mesh->get_aabb(); AABB aabb = mesh->get_aabb();
print_line("aabb: " + aabb);
Vector3 ofs = aabb.position + aabb.size * 0.5; Vector3 ofs = aabb.position + aabb.size * 0.5;
aabb.position -= ofs; aabb.position -= ofs;
Transform xform; Transform xform;
xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.25); 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; xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.25) * xform.basis;
AABB rot_aabb = xform.xform(aabb); 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; float m = MAX(rot_aabb.size.x, rot_aabb.size.y) * 0.5;
if (m == 0) { if (m == 0) {
textures.push_back(Ref<Texture>()); 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 = 1.0 / m;
m *= 0.5; m *= 0.5;
print_line("scale: " + rtos(m));
xform.basis.scale(Vector3(m, m, m)); xform.basis.scale(Vector3(m, m, m));
xform.origin = -xform.basis.xform(ofs); //-ofs*m; xform.origin = -xform.basis.xform(ofs); //-ofs*m;
xform.origin.z -= rot_aabb.size.z * 2; 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)); Ref<ImageTexture> it(memnew(ImageTexture));
it->create_from_image(img); 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); VS::get_singleton()->free(inst);
textures.push_back(it); textures.push_back(it);

View File

@ -344,7 +344,6 @@ void EditorProfiler::_update_plot() {
} }
time = OS::get_singleton()->get_ticks_usec() - time; time = OS::get_singleton()->get_ticks_usec() - time;
//print_line("Taken: "+rtos(USEC_TO_SEC(time)));
} }
wr = PoolVector<uint8_t>::Write(); wr = PoolVector<uint8_t>::Write();

View File

@ -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(itos(FileAccess::get_modified_time(p_item.path)));
f->store_line(FileAccess::get_md5(p_item.path)); f->store_line(FileAccess::get_md5(p_item.path));
memdelete(f); memdelete(f);
} else {
//print_line("was not generated");
} }
} }

View File

@ -146,7 +146,7 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
const VariantContainer *v = props.getptr(p_name); const VariantContainer *v = props.getptr(p_name);
if (!v) { if (!v) {
print_line("EditorSettings::_get - Warning, not found: " + String(p_name)); WARN_PRINTS("EditorSettings::_get - Property not found: " + String(p_name));
return false; return false;
} }
r_ret = v->variant; r_ret = v->variant;

View File

@ -238,7 +238,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
clock_t end_time = clock(); clock_t end_time = clock();
#else #else
print_line("Sorry no icons for you"); print_line("SVG support disabled, editor icons won't be rendered.");
#endif #endif
} }

View File

@ -34,9 +34,10 @@
#include "io/marshalls.h" #include "io/marshalls.h"
//#define DEBUG_PRINT(m_p) print_line(m_p) //#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) { void EditorFileServer::_close_client(ClientData *cd) {
@ -107,7 +108,6 @@ void EditorFileServer::_subthread_start(void *s) {
//wait for ID //wait for ID
err = cd->connection->get_data(buf4, 4); err = cd->connection->get_data(buf4, 4);
//#define DEBUG_PRINT(m_p) print_line(m_p)
DEBUG_TIME("get_data") DEBUG_TIME("get_data")
if (err != OK) { if (err != OK) {
@ -150,13 +150,13 @@ void EditorFileServer::_subthread_start(void *s) {
s.parse_utf8(fileutf8.ptr()); s.parse_utf8(fileutf8.ptr());
if (cmd == FileAccessNetwork::COMMAND_FILE_EXISTS) { if (cmd == FileAccessNetwork::COMMAND_FILE_EXISTS) {
print_line("FILE EXISTS: " + s); DEBUG_PRINT("FILE EXISTS: " + s);
} }
if (cmd == FileAccessNetwork::COMMAND_GET_MODTIME) { if (cmd == FileAccessNetwork::COMMAND_GET_MODTIME) {
print_line("MOD TIME: " + s); DEBUG_PRINT("MOD TIME: " + s);
} }
if (cmd == FileAccessNetwork::COMMAND_OPEN_FILE) { if (cmd == FileAccessNetwork::COMMAND_OPEN_FILE) {
print_line("OPEN: " + s); DEBUG_PRINT("OPEN: " + s);
} }
if (!s.begins_with("res://")) { 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); int read = cd->files[id]->get_buffer(buf.ptrw(), blocklen);
ERR_CONTINUE(read < 0); 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 //not found, continue
encode_uint32(id, buf4); encode_uint32(id, buf4);
@ -259,7 +259,7 @@ void EditorFileServer::_subthread_start(void *s) {
} break; } break;
case FileAccessNetwork::COMMAND_CLOSE: { case FileAccessNetwork::COMMAND_CLOSE: {
print_line("CLOSED"); DEBUG_PRINT("CLOSED");
ERR_CONTINUE(!cd->files.has(id)); ERR_CONTINUE(!cd->files.has(id));
memdelete(cd->files[id]); memdelete(cd->files[id]);
cd->files.erase(id); cd->files.erase(id);

View File

@ -809,7 +809,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_
} }
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES); 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); Error err = da->rename(old_path, new_path);
if (err == OK) { if (err == OK) {
//Move/Rename any corresponding import settings too //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 //Only treat as a changed dependency if it was successfully moved
for (int i = 0; i < file_changed_paths.size(); ++i) { 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); 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) { 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); 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); 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); Error err = p_item.is_file ? da->copy(old_path, new_path) : da->copy_dir(old_path, new_path);
if (err == OK) { if (err == OK) {
//Move/Rename any corresponding import settings too //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) { 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. //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]; 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); Error err = ResourceLoader::rename_dependencies(file, p_renames);
if (err == OK) { if (err == OK) {
if (ResourceLoader::get_resource_type(file) == "PackedScene") if (ResourceLoader::get_resource_type(file) == "PackedScene")
@ -998,7 +998,7 @@ void FileSystemDock::_make_dir_confirm() {
return; return;
} }
print_line("Making folder " + dir_name + " in " + path); print_verbose("Making folder " + dir_name + " in " + path);
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES); DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
Error err = da->change_dir(path); Error err = da->change_dir(path);
if (err == OK) { if (err == OK) {
@ -1007,7 +1007,7 @@ void FileSystemDock::_make_dir_confirm() {
memdelete(da); memdelete(da);
if (err == OK) { if (err == OK) {
print_line("call rescan!"); print_verbose("FileSystem: calling rescan.");
_rescan(); _rescan();
} else { } else {
EditorNode::get_singleton()->show_warning(TTR("Could not create folder.")); 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); _update_favorite_dirs_list_after_move(folder_renames);
//Rescan everything //Rescan everything
print_line("call rescan!"); print_verbose("FileSystem: calling rescan.");
_rescan(); _rescan();
} }
@ -1089,7 +1089,7 @@ void FileSystemDock::_duplicate_operation_confirm() {
_try_duplicate_item(to_duplicate, new_path); _try_duplicate_item(to_duplicate, new_path);
//Rescan everything //Rescan everything
print_line("call rescan!"); print_verbose("FileSystem: calling rescan.");
_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_project_settings_after_move(file_renames);
_update_favorite_dirs_list_after_move(folder_renames); _update_favorite_dirs_list_after_move(folder_renames);
print_line("call rescan!"); print_verbose("FileSystem: calling rescan.");
_rescan(); _rescan();
} }
} }

View File

@ -123,12 +123,12 @@ void FindInFiles::_notification(int p_notification) {
void FindInFiles::start() { void FindInFiles::start() {
if (_pattern == "") { if (_pattern == "") {
print_line("Nothing to search, pattern is empty"); print_verbose("Nothing to search, pattern is empty");
emit_signal(SIGNAL_FINISHED); emit_signal(SIGNAL_FINISHED);
return; return;
} }
if (_extension_filter.size() == 0) { 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); emit_signal(SIGNAL_FINISHED);
return; return;
} }
@ -207,7 +207,7 @@ void FindInFiles::_iterate() {
_scan_file(fpath); _scan_file(fpath);
} else { } else {
print_line("Search complete"); print_verbose("Search complete");
set_process(false); set_process(false);
_current_dir = ""; _current_dir = "";
_searching = false; _searching = false;
@ -226,7 +226,7 @@ void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) {
DirAccess *dir = DirAccess::open(path); DirAccess *dir = DirAccess::open(path);
if (dir == NULL) { if (dir == NULL) {
print_line("Cannot open directory! " + path); print_verbose("Cannot open directory! " + path);
return; return;
} }
@ -258,7 +258,7 @@ void FindInFiles::_scan_file(String fpath) {
FileAccess *f = FileAccess::open(fpath, FileAccess::READ); FileAccess *f = FileAccess::open(fpath, FileAccess::READ);
if (f == NULL) { if (f == NULL) {
print_line(String("Cannot open file ") + fpath); print_verbose(String("Cannot open file ") + fpath);
return; return;
} }
@ -896,7 +896,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result>
int _; int _;
if (!find_next(line, search_text, repl_begin, _finder->is_match_case(), _finder->is_whole_words(), _, _)) { 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. // 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; continue;
} }

View File

@ -119,7 +119,6 @@ Error ColladaImport::_populate_skeleton(Skeleton *p_skeleton, Collada::Node *p_n
Collada::NodeJoint *joint = static_cast<Collada::NodeJoint *>(p_node); Collada::NodeJoint *joint = static_cast<Collada::NodeJoint *>(p_node);
print_line("populating joint " + joint->name);
p_skeleton->add_bone(p_node->name); p_skeleton->add_bone(p_node->name);
if (p_parent >= 0) if (p_parent >= 0)
p_skeleton->set_bone_parent(r_bone, p_parent); 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])); 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? //should map this bone to something for animation?
} else { } else {
print_line("no rest: " + joint->sid); WARN_PRINT("Collada: Joint has no rest.");
WARN_PRINT("Joint has no rest...");
} }
int id = r_bone++; 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; binormals.write[index_arrayr[idx * 3 + 1]] += binormal;
tangents.write[index_arrayr[idx * 3 + 2]] += tangent; tangents.write[index_arrayr[idx * 3 + 2]] += tangent;
binormals.write[index_arrayr[idx * 3 + 2]] += binormal; 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); 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]; material = material_cache[target];
} else if (p.material != "") { } 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; mesh_cache[meshid] = mesh;
} else { } 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); mi->set_surface_material(i, material);
} else if (matname != "") { } 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++) { for (int i = 0; i < collada.state.animation_tracks.size(); i++) {
const Collada::AnimationTrack &at = collada.state.animation_tracks[i]; const Collada::AnimationTrack &at = collada.state.animation_tracks[i];
//print_line("CHANNEL: "+at.target+" PARAM: "+at.param);
String node; 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]; node = node_name_map[at.target];
} else { } else {
print_line("Couldn't find node: " + at.target); WARN_PRINTS("Collada: Couldn't find node: " + at.target);
continue; continue;
} }
} else { } 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); 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++) for (int i = 0; i < collada.state.animation_clips.size(); i++)
create_animation(i, p_make_tracks_in_all_bones, p_import_value_tracks); 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)); Ref<Animation> animation = Ref<Animation>(memnew(Animation));
if (p_clip == -1) { if (p_clip == -1) {
//print_line("default");
animation->set_name("default"); animation->set_name("default");
} else { } else {
//print_line("clip name: "+collada.state.animation_clips[p_clip].name);
animation->set_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); animation->set_length(anim_length);
bool tracks_found = false; 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) { 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; continue;
} }
@ -1758,14 +1747,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
ERR_CONTINUE(data.size() > 1); ERR_CONTINUE(data.size() > 1);
xf.data.write[cn] = data[0]; xf.data.write[cn] = data[0];
} else if (data.size() == xf.data.size()) { } else if (data.size() == xf.data.size()) {
xf.data = data; xf.data = data;
} else { } else {
ERR_EXPLAIN("Component " + at.component + " has datasize " + itos(data.size()) + ", xfdatasize " + itos(xf.data.size()));
if (data.size() != xf.data.size()) {
print_line("component " + at.component + " datasize " + itos(data.size()) + " xfdatasize " + itos(xf.data.size()));
}
ERR_CONTINUE(data.size() != 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; xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform;
} else { } 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()) if (E->get())
continue; continue;
//print_line("BONE LACKS ANIM: "+E->key());
NodeMap &nm = node_map[E->key()]; NodeMap &nm = node_map[E->key()];
String path = scene->get_path_to(nm.node); String path = scene->get_path_to(nm.node);
ERR_CONTINUE(nm.bone < 0); 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()]; Collada::Node *cn = collada.state.scene_map[E->key()];
if (cn->ignore_anim) { if (cn->ignore_anim) {
print_line("warning, ignoring animation on node: " + path); WARN_PRINTS("Collada: Ignoring animation on node: " + path);
continue; continue;
} }
@ -1889,10 +1871,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
} else if (data.size() == 16) { } else if (data.size() == 16) {
//matrix //matrix
print_line("value keys for matrices not supported"); WARN_PRINT("Collada: Value keys for matrices not supported.");
} else { } else {
WARN_PRINTS("Collada: Unexpected amount of value keys: " + itos(data.size()));
print_line("don't know what to do with this amount of value keys: " + itos(data.size()));
} }
animation->track_insert_key(track, time, value); 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) if (state.animations.size() == 0)
return Ref<Animation>(); return Ref<Animation>();
Ref<Animation> anim = state.animations[0]; Ref<Animation> anim = state.animations[0];
print_line("Anim Load OK");
String base = p_path.get_basename().to_lower(); String base = p_path.get_basename().to_lower();
if (p_flags & IMPORT_ANIMATION_DETECT_LOOP) { if (p_flags & IMPORT_ANIMATION_DETECT_LOOP) {

View File

@ -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; return OK;
} }
@ -359,7 +359,7 @@ Error EditorSceneImporterGLTF::_parse_buffer_views(GLTFState &state) {
state.buffer_views.push_back(buffer_view); 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; return OK;
} }
@ -451,7 +451,7 @@ Error EditorSceneImporterGLTF::_parse_accessors(GLTFState &state) {
state.accessors.push_back(accessor); state.accessors.push_back(accessor);
} }
print_line("total accessors: " + itos(state.accessors.size())); print_verbose("glTF: Total accessors: " + itos(state.accessors.size()));
return OK; return OK;
} }
@ -501,8 +501,8 @@ Error EditorSceneImporterGLTF::_decode_buffer_view(GLTFState &state, int p_buffe
const uint8_t *bufptr = buffer.ptr(); const uint8_t *bufptr = buffer.ptr();
//use to debug //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_verbose("glTF: 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: 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; int buffer_end = (stride * (count - 1)) + element_size;
ERR_FAIL_COND_V(buffer_end > bv.byte_length, ERR_PARSE_ERROR); 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"]; Array meshes = state.json["meshes"];
for (int i = 0; i < meshes.size(); i++) { 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]; Dictionary d = meshes[i];
GLTFMesh mesh; GLTFMesh mesh;
@ -935,7 +935,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
w[j + 3] /= total; 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; array[Mesh::ARRAY_WEIGHTS] = weights;
@ -996,7 +996,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
Array morphs; Array morphs;
//blend shapes //blend shapes
if (p.has("targets")) { if (p.has("targets")) {
print_line("has targets!"); print_verbose("glTF: Mesh has targets");
Array targets = p["targets"]; Array targets = p["targets"];
if (j == 0) { if (j == 0) {
@ -1091,7 +1091,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
state.meshes.push_back(mesh); state.meshes.push_back(mesh);
} }
print_line("total meshes: " + itos(state.meshes.size())); print_verbose("glTF: Total meshes: " + itos(state.meshes.size()));
return OK; return OK;
} }
@ -1183,7 +1183,7 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b
ERR_FAIL_V(ERR_FILE_CORRUPT); ERR_FAIL_V(ERR_FILE_CORRUPT);
} }
print_line("total images: " + itos(state.images.size())); print_verbose("Total images: " + itos(state.images.size()));
return OK; return OK;
} }
@ -1338,7 +1338,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) {
state.materials.push_back(material); state.materials.push_back(material);
} }
print_line("total materials: " + itos(state.materials.size())); print_verbose("Total materials: " + itos(state.materials.size()));
return OK; return OK;
} }
@ -1381,12 +1381,11 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
skin.bones.push_back(bone); 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")) { if (d.has("skeleton")) {
int skeleton = d["skeleton"]; int skeleton = d["skeleton"];
ERR_FAIL_INDEX_V(skeleton, state.nodes.size(), ERR_PARSE_ERROR); ERR_FAIL_INDEX_V(skeleton, state.nodes.size(), ERR_PARSE_ERROR);
//state.nodes[skeleton]->skeleton_skin = state.skins.size(); print_verbose("glTF: Setting skeleton skin to" + itos(skeleton));
print_line("setting skeleton skin to" + itos(skeleton));
skin.skeleton = skeleton; skin.skeleton = skeleton;
if (!state.skeleton_nodes.has(skeleton)) { if (!state.skeleton_nodes.has(skeleton)) {
state.skeleton_nodes[skeleton] = Vector<int>(); state.skeleton_nodes[skeleton] = Vector<int>();
@ -1443,7 +1442,7 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
*/ */
state.skins.push_back(skin); state.skins.push_back(skin);
} }
print_line("total skins: " + itos(state.skins.size())); print_verbose("glTF: Total skins: " + itos(state.skins.size()));
//now //now
@ -1496,7 +1495,7 @@ Error EditorSceneImporterGLTF::_parse_cameras(GLTFState &state) {
state.cameras.push_back(camera); state.cameras.push_back(camera);
} }
print_line("total cameras: " + itos(state.cameras.size())); print_verbose("glTF: Total cameras: " + itos(state.cameras.size()));
return OK; 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); PoolVector<float> times = _decode_accessor_as_floats(state, input, false);
if (path == "translation") { if (path == "translation") {
PoolVector<Vector3> translations = _decode_accessor_as_vec3(state, output, false); 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); state.animations.push_back(animation);
} }
print_line("total animations: " + itos(state.animations.size())); print_verbose("glTF: Total animations: " + itos(state.animations.size()));
return OK; return OK;
} }
@ -1656,7 +1654,7 @@ void EditorSceneImporterGLTF::_generate_node(GLTFState &state, int p_node, Node
if (n->mesh >= 0) { if (n->mesh >= 0) {
ERR_FAIL_INDEX(n->mesh, state.meshes.size()); ERR_FAIL_INDEX(n->mesh, state.meshes.size());
MeshInstance *mi = memnew(MeshInstance); 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]; GLTFMesh &mesh = state.meshes.write[n->mesh];
mi->set_mesh(mesh.mesh); mi->set_mesh(mesh.mesh);
if (mesh.mesh->get_name() == "") { if (mesh.mesh->get_name() == "") {

View File

@ -63,7 +63,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati
material_map[current_name] = current; material_map[current_name] = current;
} else if (l.begins_with("Ka ")) { } else if (l.begins_with("Ka ")) {
//uv //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 ")) { } else if (l.begins_with("Kd ")) {
//normal //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 ")) { } else if (l.begins_with("map_Ka ")) {
//uv //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 ")) { } else if (l.begins_with("map_Kd ")) {
//normal //normal
@ -335,8 +335,8 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p
surf_tool->index(); surf_tool->index();
print_line("current material library " + current_material_library + " has " + itos(material_map.has(current_material_library))); print_verbose("OBJ: 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 " + 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)) { 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]); 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); 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->clear();
surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES); surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES);
} }

View File

@ -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) { 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++) { 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); Node *r = _fix_node(p_node->get_child(i), p_root, collision_map, p_light_bake_mode);
if (!r) { if (!r) {
print_line("was erased...");
i--; //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()); colshape->set_owner(p_node->get_owner());
} else if (p_node->has_meta("empty_draw_type")) { } else if (p_node->has_meta("empty_draw_type")) {
String empty_draw_type = String(p_node->get_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); StaticBody *sb = memnew(StaticBody);
sb->set_name(_fixstr(name, "colonly")); sb->set_name(_fixstr(name, "colonly"));
Object::cast_to<Spatial>(sb)->set_transform(Object::cast_to<Spatial>(p_node)->get_transform()); 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; Ref<Animation> a = anim;
ERR_FAIL_COND(!a.is_valid()); ERR_FAIL_COND(!a.is_valid());
print_line("From Anim " + anim->get_name() + ":");
for (int j = 0; j < a->get_track_count(); j++) { for (int j = 0; j < a->get_track_count(); j++) {
String path = a->track_get_path(j); String path = a->track_get_path(j);
if (!keep.has(path)) { if (!keep.has(path)) {
print_line("Remove: " + path);
a->remove_track(j); a->remove_track(j);
j--; j--;
} }
@ -899,8 +893,6 @@ void ResourceImporterScene::_find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Trans
} }
meshes[mesh] = transform; meshes[mesh] = transform;
print_line("mesh transform: " + meshes[mesh]);
} }
} }
for (int i = 0; i < p_node->get_child_count(); i++) { 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; List<PropertyInfo> pi;
print_line("node: " + String(p_node->get_name()));
if (p_make_animations) { if (p_make_animations) {
if (Object::cast_to<AnimationPlayer>(p_node)) { if (Object::cast_to<AnimationPlayer>(p_node)) {
AnimationPlayer *ap = 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"])) { if (bool(p_options["external_files/store_in_subdir"])) {
String subdir_name = p_source_file.get_file().get_basename(); String subdir_name = p_source_file.get_file().get_basename();
DirAccess *da = DirAccess::open(base_path); DirAccess *da = DirAccess::open(base_path);
print_line("at path " + da->get_current_dir() + " making " + subdir_name);
Error err = da->make_dir(subdir_name); Error err = da->make_dir(subdir_name);
memdelete(da); memdelete(da);
ERR_FAIL_COND_V(err != OK && err != ERR_ALREADY_EXISTS, err); 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); Ref<PackedScene> packer = memnew(PackedScene);
packer->pack(scene); 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 = ResourceSaver::save(p_save_path + ".scn", packer); //do not take over, let the changed files reload themselves
ERR_FAIL_COND_V(err != OK, err); ERR_FAIL_COND_V(err != OK, err);

View File

@ -205,7 +205,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
/*print_line("chunksize: "+itos(chunksize)); /*print_line("chunksize: "+itos(chunksize));
print_line("channels: "+itos(format_channels)); print_line("channels: "+itos(format_channels));
print_line("bits: "+itos(format_bits)); print_line("bits: "+itos(format_bits));
*/ */
int len = frames; int len = frames;
if (format_channels == 2) 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; bool is16 = format_bits != 8;
int rate = format_freq; int rate = format_freq;
/*
print_line("Input Sample: "); print_line("Input Sample: ");
print_line("\tframes: " + itos(frames)); print_line("\tframes: " + itos(frames));
print_line("\tformat_channels: " + itos(format_channels)); 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: " + itos(loop));
print_line("\tloop begin: " + itos(loop_begin)); print_line("\tloop begin: " + itos(loop_begin));
print_line("\tloop end: " + itos(loop_end)); print_line("\tloop end: " + itos(loop_end));
*/
//apply frequency limit //apply frequency limit
bool limit_rate = p_options["force/max_rate"]; bool limit_rate = p_options["force/max_rate"];
int limit_rate_hz = p_options["force/max_rate_hz"]; int limit_rate_hz = p_options["force/max_rate_hz"];
if (limit_rate && rate > limit_rate_hz && rate > 0 && frames > 0) { 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); 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; Vector<float> new_data;
new_data.resize(new_data_frames * format_channels); new_data.resize(new_data_frames * format_channels);
for (int c = 0; c < format_channels; c++) { 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 { } else {
dst_format = is16 ? AudioStreamSample::FORMAT_16_BITS : AudioStreamSample::FORMAT_8_BITS; dst_format = is16 ? AudioStreamSample::FORMAT_16_BITS : AudioStreamSample::FORMAT_8_BITS;

View File

@ -112,7 +112,6 @@ void PluginConfigDialog::_notification(int p_what) {
void PluginConfigDialog::config(const String &p_config_path) { void PluginConfigDialog::config(const String &p_config_path) {
if (p_config_path.length()) { if (p_config_path.length()) {
Ref<ConfigFile> cf = memnew(ConfigFile); Ref<ConfigFile> cf = memnew(ConfigFile);
print_line(p_config_path);
cf->load(p_config_path); cf->load(p_config_path);
name_edit->set_text(cf->get_value("plugin", "name", "")); name_edit->set_text(cf->get_value("plugin", "name", ""));

View File

@ -349,7 +349,6 @@ void AnimationNodeBlendSpace2DEditor::_tool_switch(int p_tool) {
points.push_back(blend_space->get_blend_point_position(i)); points.push_back(blend_space->get_blend_point_position(i));
} }
Vector<Delaunay2D::Triangle> tr = Delaunay2D::triangulate(points); Vector<Delaunay2D::Triangle> tr = Delaunay2D::triangulate(points);
print_line("triangleS: " + itos(tr.size()));
for (int i = 0; i < tr.size(); i++) { for (int i = 0; i < tr.size(); i++) {
blend_space->add_triangle(tr[i].points[0], tr[i].points[1], tr[i].points[2]); blend_space->add_triangle(tr[i].points[0], tr[i].points[1], tr[i].points[2]);
} }

View File

@ -38,7 +38,6 @@ void AnimationNodeBlendTreeEditor::remove_custom_type(const Ref<Script> &p_scrip
void AnimationNodeBlendTreeEditor::_update_options_menu() { void AnimationNodeBlendTreeEditor::_update_options_menu() {
print_line("update options");
add_node->get_popup()->clear(); add_node->get_popup()->clear();
for (int i = 0; i < add_options.size(); i++) { for (int i = 0; i < add_options.size(); i++) {
add_node->get_popup()->add_item(add_options[i].name, i); add_node->get_popup()->add_item(add_options[i].name, i);

View File

@ -97,13 +97,11 @@ void MeshEditor::edit(Ref<Mesh> p_mesh) {
_update_rotation(); _update_rotation();
AABB aabb = mesh->get_aabb(); AABB aabb = mesh->get_aabb();
print_line("aabb: " + aabb);
Vector3 ofs = aabb.position + aabb.size * 0.5; Vector3 ofs = aabb.position + aabb.size * 0.5;
float m = aabb.get_longest_axis_size(); float m = aabb.get_longest_axis_size();
if (m != 0) { if (m != 0) {
m = 1.0 / m; m = 1.0 / m;
m *= 0.5; m *= 0.5;
//print_line("scale: "+rtos(m));
Transform xform; Transform xform;
xform.basis.scale(Vector3(m, m, m)); xform.basis.scale(Vector3(m, m, m));
xform.origin = -xform.basis.xform(ofs); //-ofs*m; xform.origin = -xform.basis.xform(ofs); //-ofs*m;

View File

@ -169,8 +169,6 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
void MeshLibraryEditor::_import_scene_cbk(const String &p_str) { void MeshLibraryEditor::_import_scene_cbk(const String &p_str) {
print_line("Impot Callback!");
Ref<PackedScene> ps = ResourceLoader::load(p_str, "PackedScene"); Ref<PackedScene> ps = ResourceLoader::load(p_str, "PackedScene");
ERR_FAIL_COND(ps.is_null()); ERR_FAIL_COND(ps.is_null());
Node *scene = ps->instance(); Node *scene = ps->instance();

View File

@ -58,8 +58,6 @@ void Particles2DEditorPlugin::make_visible(bool p_visible) {
void Particles2DEditorPlugin::_file_selected(const String &p_file) { void Particles2DEditorPlugin::_file_selected(const String &p_file) {
print_line("file: " + p_file);
source_emission_file = p_file; source_emission_file = p_file;
emission_mask->popup_centered_minsize(); emission_mask->popup_centered_minsize();
} }

View File

@ -36,6 +36,7 @@
#include "os/input.h" #include "os/input.h"
#include "os/keyboard.h" #include "os/keyboard.h"
#include "scene/2d/skeleton_2d.h" #include "scene/2d/skeleton_2d.h"
Node2D *Polygon2DEditor::_get_node() const { Node2D *Polygon2DEditor::_get_node() const {
return node; return node;
@ -82,7 +83,6 @@ void Polygon2DEditor::_notification(int p_what) {
void Polygon2DEditor::_sync_bones() { void Polygon2DEditor::_sync_bones() {
print_line("syncinc");
if (!node->has_node(node->get_skeleton())) { 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->set_text(TTR("The skeleton property of the Polygon2D does not point to a Skeleton2D node"));
error->popup_centered_minsize(); error->popup_centered_minsize();
@ -101,8 +101,6 @@ void Polygon2DEditor::_sync_bones() {
Array prev_bones = node->call("_get_bones"); Array prev_bones = node->call("_get_bones");
node->clear_bones(); node->clear_bones();
print_line("bones in skeleton: " + itos(skeleton->get_bone_count()));
for (int i = 0; i < skeleton->get_bone_count(); i++) { for (int i = 0; i < skeleton->get_bone_count(); i++) {
NodePath path = skeleton->get_path_to(skeleton->get_bone(i)); NodePath path = skeleton->get_path_to(skeleton->get_bone(i));
PoolVector<float> weights; PoolVector<float> weights;

View File

@ -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) { 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) { if (p_path == "root_motion_track" && p_object->is_class("AnimationTree") && p_type == Variant::NODE_PATH) {
print_line("use custom!");
EditorPropertyRootMotion *editor = memnew(EditorPropertyRootMotion); EditorPropertyRootMotion *editor = memnew(EditorPropertyRootMotion);
if (p_hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && p_hint_text != String()) { if (p_hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && p_hint_text != String()) {
editor->setup(p_hint_text); editor->setup(p_hint_text);

View File

@ -60,7 +60,6 @@ void ScriptTextEditor::apply_code() {
if (script.is_null()) if (script.is_null())
return; return;
//print_line("applying code");
script->set_source_code(code_editor->get_text_edit()->get_text()); script->set_source_code(code_editor->get_text_edit()->get_text());
script->update_exports(); script->update_exports();
_update_member_keywords(); _update_member_keywords();

View File

@ -167,7 +167,6 @@ void ShaderTextEditor::_check_shader_mode() {
String type = ShaderLanguage::get_shader_type(get_text_edit()->get_text()); String type = ShaderLanguage::get_shader_type(get_text_edit()->get_text());
print_line("type is: " + type);
Shader::Mode mode; Shader::Mode mode;
if (type == "canvas_item") { if (type == "canvas_item") {

View File

@ -160,7 +160,6 @@ void SpriteEditor::_update_mesh_data() {
Vector<Vector<Vector2> > lines = bm->clip_opaque_to_polygons(rect, epsilon); Vector<Vector<Vector2> > lines = bm->clip_opaque_to_polygons(rect, epsilon);
print_line("lines: " + itos(lines.size()));
uv_lines.clear(); uv_lines.clear();
computed_vertices.clear(); computed_vertices.clear();
@ -190,21 +189,6 @@ void SpriteEditor::_update_mesh_data() {
computed_vertices.push_back(vtx); 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]); 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); 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(); debug_uv->update();

View File

@ -89,7 +89,6 @@ void SpriteFramesEditor::_file_load_request(const PoolVector<String> &p_path, in
} }
if (resources.empty()) { if (resources.empty()) {
//print_line("added frames!");
return; 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->add_undo_method(this, "_update_library");
undo_redo->commit_action(); undo_redo->commit_action();
//print_line("added frames!");
} }
void SpriteFramesEditor::_load_pressed() { void SpriteFramesEditor::_load_pressed() {

View File

@ -1390,7 +1390,7 @@ void ProjectManager::_open_project_confirm() {
return; return;
} }
print_line("OPENING: " + path + " (" + selected + ")"); print_line("Editing project: " + path + " (" + selected + ")");
List<String> args; List<String> args;
@ -1447,7 +1447,7 @@ void ProjectManager::_run_project_confirm() {
return; return;
} }
print_line("OPENING: " + path + " (" + selected + ")"); print_line("Running project: " + path + " (" + selected + ")");
List<String> args; 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) { 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; List<String> projects;
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
da->change_dir(p_base); da->change_dir(p_base);
_scan_dir(da, 0, 1, &projects); _scan_dir(da, 0, 1, &projects);
memdelete(da); 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()) { for (List<String>::Element *E = projects.front(); E; E = E->next()) {
String proj = E->get().replace("/", "::"); String proj = E->get().replace("/", "::");

View File

@ -891,7 +891,6 @@ void ProjectSettingsEditor::_item_del() {
return; return;
} }
print_line("to delete.. " + property);
undo_redo->create_action(TTR("Delete Item")); undo_redo->create_action(TTR("Delete Item"));
Variant value = ProjectSettings::get_singleton()->get(property); Variant value = ProjectSettings::get_singleton()->get(property);

View File

@ -3992,7 +3992,6 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
String prop = d["name"]; String prop = d["name"];
emit_signal("property_keyed", prop, obj->get(prop), false); emit_signal("property_keyed", prop, obj->get(prop), false);
} else if (p_button == 5) { } else if (p_button == 5) {
print_line("PB5");
if (!d.has("name")) if (!d.has("name"))
return; return;
String prop = d["name"]; String prop = d["name"];
@ -4732,7 +4731,7 @@ double PropertyValueEvaluator::eval(const String &p_text) {
script->set_source_code(_build_script(p_new_text)); script->set_source_code(_build_script(p_new_text));
Error err = script->reload(); Error err = script->reload();
if (err) { 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); 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) { if (call_err.error == Variant::CallError::CALL_OK) {
return result; 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); return _default_eval(p_new_text);
} }

View File

@ -237,7 +237,6 @@ void PropertySelector::_update_search() {
Ref<Texture> icon; Ref<Texture> icon;
script_methods = false; script_methods = false;
print_line("name: " + E->get().name);
String rep = E->get().name.replace("*", ""); String rep = E->get().name.replace("*", "");
if (E->get().name == "*Script Methods") { if (E->get().name == "*Script Methods") {
icon = get_icon("Script", "EditorIcons"); icon = get_icon("Script", "EditorIcons");

View File

@ -1512,7 +1512,6 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
} }
editor_data->get_undo_redo().commit_action(); 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->()); editor->push_item(p_script.operator->());
} }

View File

@ -968,7 +968,6 @@ void SceneTreeEditor::_warning_changed(Node *p_for_node) {
//should use a timer //should use a timer
update_timer->start(); update_timer->start();
//print_line("WARNING CHANGED "+String(p_for_node->get_name()));
} }
void SceneTreeEditor::_editor_settings_changed() { void SceneTreeEditor::_editor_settings_changed() {

View File

@ -1133,7 +1133,6 @@ void ScriptEditorDebugger::_notification(int p_what) {
} }
message_type = cmd; message_type = cmd;
//print_line("GOT: "+message_type);
ret = ppeer->get_var(cmd); ret = ppeer->get_var(cmd);
if (ret != OK) { if (ret != OK) {
@ -1285,15 +1284,13 @@ void ScriptEditorDebugger::_profiler_activate(bool p_enable) {
max_funcs = CLAMP(max_funcs, 16, 512); max_funcs = CLAMP(max_funcs, 16, 512);
msg.push_back(max_funcs); msg.push_back(max_funcs);
ppeer->put_var(msg); ppeer->put_var(msg);
print_verbose("Starting profiling.");
print_line("BEGIN PROFILING!");
} else { } else {
Array msg; Array msg;
msg.push_back("stop_profiling"); msg.push_back("stop_profiling");
ppeer->put_var(msg); ppeer->put_var(msg);
print_verbose("Ending profiling.");
print_line("END PROFILING!");
} }
} }
@ -1430,8 +1427,6 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n
return; return;
} }
//print_line("method");
} }
void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) { 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; return;
} }
//print_line("prop");
} }
void ScriptEditorDebugger::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) { void ScriptEditorDebugger::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {

View File

@ -265,9 +265,6 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool
Ref<InputEventKey> k = p_event; Ref<InputEventKey> k = p_event;
if (k.is_valid() && !k->is_echo() && k->get_scancode() != 0) { if (k.is_valid() && !k->is_echo() && k->get_scancode() != 0) {
//print_line(p_event);
if (k->is_pressed()) if (k->is_pressed())
keys_pressed.insert(k->get_scancode()); keys_pressed.insert(k->get_scancode());
else else

View File

@ -1092,7 +1092,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
boot_logo_path = boot_logo_path.strip_edges(); 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); print_line("Boot splash path: " + boot_logo_path);
boot_logo.instance(); boot_logo.instance();
Error err = boot_logo->load(boot_logo_path); 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()) { 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")); Ref<Texture> cursor = ResourceLoader::load(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image"));
if (cursor.is_valid()) { if (cursor.is_valid()) {
//print_line("loaded ok");
Vector2 hotspot = ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image_hotspot"); Vector2 hotspot = ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image_hotspot");
Input::get_singleton()->set_custom_mouse_cursor(cursor, Input::CURSOR_ARROW, hotspot); Input::get_singleton()->set_custom_mouse_cursor(cursor, Input::CURSOR_ARROW, hotspot);
} }

View File

@ -236,7 +236,7 @@ void AreaBullet::set_param(PhysicsServer::AreaParameter p_param, const Variant &
set_spOv_gravityPointAttenuation(p_value); set_spOv_gravityPointAttenuation(p_value);
break; break;
default: 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: case PhysicsServer::AREA_PARAM_GRAVITY_POINT_ATTENUATION:
return spOv_gravityPointAttenuation; return spOv_gravityPointAttenuation;
default: 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(); return Variant();
} }
} }

View File

@ -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) { 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 { 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(); return Variant();
} }

View File

@ -97,7 +97,7 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t
switch (p_param) { switch (p_param) {
case PhysicsServer::HINGE_JOINT_BIAS: case PhysicsServer::HINGE_JOINT_BIAS:
if (0 < p_value) { 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; break;
case PhysicsServer::HINGE_JOINT_LIMIT_UPPER: case PhysicsServer::HINGE_JOINT_LIMIT_UPPER:
@ -122,7 +122,7 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t
hingeConstraint->setMaxMotorImpulse(p_value); hingeConstraint->setMaxMotorImpulse(p_value);
break; break;
default: 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: case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE:
return hingeConstraint->getMaxMotorImpulse(); return hingeConstraint->getMaxMotorImpulse();
default: 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; return 0;
} }
} }

View File

@ -161,8 +161,6 @@ CSGBrush *CSGShape::_get_brush() {
void CSGShape::_update_shape() { void CSGShape::_update_shape() {
//print_line("updating shape for " + String(get_path()));
if (parent) if (parent)
return; return;
@ -372,7 +370,6 @@ void CSGShape::_notification(int p_what) {
if (p_what == NOTIFICATION_LOCAL_TRANSFORM_CHANGED) { if (p_what == NOTIFICATION_LOCAL_TRANSFORM_CHANGED) {
//print_line("local xform changed");
if (parent) { if (parent) {
parent->_make_dirty(); parent->_make_dirty();
} }
@ -641,7 +638,6 @@ CSGBrush *CSGMesh::_build_brush() {
} }
} }
//print_line("total vertices? " + itos(vertices.size()));
if (vertices.size() == 0) if (vertices.size() == 0)
return NULL; return NULL;

View File

@ -217,8 +217,6 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
if (!(flags & DDSD_MIPMAPCOUNT)) if (!(flags & DDSD_MIPMAPCOUNT))
mipmaps = 1; mipmaps = 1;
//print_line("found format: "+String(dds_format_info[dds_format].name));
PoolVector<uint8_t> src_data; PoolVector<uint8_t> src_data;
const DDSFormatInfo &info = dds_format_info[dds_format]; const DDSFormatInfo &info = dds_format_info[dds_format];

View File

@ -199,7 +199,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
int wofs = 0; 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(); uint64_t t = OS::get_singleton()->get_ticks_msec();
for (int i = 0; i < mmc; i++) { for (int i = 0; i < mmc; i++) {
// convert source image to internal etc2comp format (which is equivalent to Image::FORMAT_RGBAF) // 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; 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); p_img->create(imgw, imgh, p_img->has_mipmaps(), etc_format, dst_data);
} }

View File

@ -294,11 +294,6 @@ bool GDScript::get_property_default_value(const StringName &p_property, Variant
#ifdef TOOLS_ENABLED #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); const Map<StringName, Variant>::Element *E = member_default_values_cache.find(p_property);
if (E) { if (E) {
r_value = E->get(); r_value = E->get();
@ -335,17 +330,8 @@ ScriptInstance *GDScript::instance_create(Object *p_this) {
PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) { PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) {
#ifdef TOOLS_ENABLED #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)); PlaceHolderScriptInstance *si = memnew(PlaceHolderScriptInstance(GDScriptLanguage::get_singleton(), Ref<Script>(this), p_this));
placeholders.insert(si); placeholders.insert(si);
//_update_placeholder(si);
_update_exports(); _update_exports();
return si; return si;
#else #else
@ -409,7 +395,6 @@ bool GDScript::_update_exports() {
bool changed = false; bool changed = false;
if (source_changed_cache) { if (source_changed_cache) {
//print_line("updating source for "+get_path());
source_changed_cache = false; source_changed_cache = false;
changed = true; changed = true;
@ -456,11 +441,8 @@ bool GDScript::_update_exports() {
if (bf.is_valid()) { if (bf.is_valid()) {
//print_line("parent is: "+bf->get_path());
base_cache = bf; base_cache = bf;
bf->inheriters_cache.insert(get_instance_id()); bf->inheriters_cache.insert(get_instance_id());
//bf->_update_exports(p_instances,true,false);
} }
} else { } else {
ERR_PRINT(("Path extending itself in " + path).utf8().get_data()); ERR_PRINT(("Path extending itself in " + path).utf8().get_data());
@ -475,7 +457,6 @@ bool GDScript::_update_exports() {
continue; continue;
members_cache.push_back(c->variables[i]._export); 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; member_default_values_cache[c->variables[i].identifier] = c->variables[i].default_value;
} }
@ -490,7 +471,6 @@ bool GDScript::_update_exports() {
} }
} }
} else { } else {
//print_line("unchanged is "+get_path());
} }
if (base_cache.is_valid()) { if (base_cache.is_valid()) {
@ -499,11 +479,9 @@ bool GDScript::_update_exports() {
} }
} }
if (/*changed &&*/ placeholders.size()) { //hm :( if (placeholders.size()) { //hm :(
//print_line("updating placeholders for "+get_path()); // update placeholders if any
//update placeholders if any
Map<StringName, Variant> values; Map<StringName, Variant> values;
List<PropertyInfo> propnames; List<PropertyInfo> propnames;
_update_exports_values(values, propnames); _update_exports_values(values, propnames);
@ -529,7 +507,6 @@ void GDScript::update_exports() {
Set<ObjectID> copy = inheriters_cache; //might get modified 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()) { for (Set<ObjectID>::Element *E = copy.front(); E; E = E->next()) {
Object *id = ObjectDB::get_instance(E->get()); Object *id = ObjectDB::get_instance(E->get());
GDScript *s = Object::cast_to<GDScript>(id); GDScript *s = Object::cast_to<GDScript>(id);
@ -825,7 +802,6 @@ Error GDScript::load_source_code(const String &p_path) {
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
source_changed_cache = true; source_changed_cache = true;
#endif #endif
//print_line("LSC :"+get_path());
path = p_path; path = p_path;
return OK; 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].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].total_time = elem->self()->profile.last_frame_total_time;
p_info_arr[current].signature = elem->self()->profile.signature; 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++; current++;
} }
elem = elem->next(); elem = elem->next();
@ -1546,7 +1521,7 @@ struct GDScriptDepSort {
void GDScriptLanguage::reload_all_scripts() { void GDScriptLanguage::reload_all_scripts() {
#ifdef DEBUG_ENABLED #ifdef DEBUG_ENABLED
print_line("RELOAD ALL SCRIPTS"); print_verbose("GDScript: Reloading all scripts");
if (lock) { if (lock) {
lock->lock(); lock->lock();
} }
@ -1556,7 +1531,7 @@ void GDScriptLanguage::reload_all_scripts() {
SelfList<GDScript> *elem = script_list.first(); SelfList<GDScript> *elem = script_list.first();
while (elem) { while (elem) {
if (elem->self()->get_path().is_resource_file()) { 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 scripts.push_back(Ref<GDScript>(elem->self())); //cast to gdscript to avoid being erased by accident
} }
elem = elem->next(); elem = elem->next();
@ -1572,7 +1547,7 @@ void GDScriptLanguage::reload_all_scripts() {
for (List<Ref<GDScript> >::Element *E = scripts.front(); E; E = E->next()) { 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()->load_source_code(E->get()->get_path());
E->get()->reload(true); E->get()->reload(true);
} }
@ -1703,7 +1678,6 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so
void GDScriptLanguage::frame() { void GDScriptLanguage::frame() {
//print_line("calls: "+itos(calls));
calls = 0; calls = 0;
#ifdef DEBUG_ENABLED #ifdef DEBUG_ENABLED

View File

@ -1009,8 +1009,6 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
return prev_pos; return prev_pos;
int retval = prev_pos; int retval = prev_pos;
//print_line("retval: "+itos(retval));
if (retval & GDScriptFunction::ADDR_TYPE_STACK << GDScriptFunction::ADDR_BITS) { if (retval & GDScriptFunction::ADDR_TYPE_STACK << GDScriptFunction::ADDR_BITS) {
slevel++; slevel++;
codegen.alloc_stack(slevel); codegen.alloc_stack(slevel);
@ -2073,8 +2071,6 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa
//validate instances if keeping state //validate instances if keeping state
if (p_keep_state) { if (p_keep_state) {
print_line("RELOAD KEEP " + p_script->path);
for (Set<Object *>::Element *E = p_script->instances.front(); E;) { for (Set<Object *>::Element *E = p_script->instances.front(); E;) {
Set<Object *>::Element *N = E->next(); Set<Object *>::Element *N = E->next();

View File

@ -192,7 +192,6 @@ int GDScriptLanguage::find_function(const String &p_function, const String &p_co
if (tokenizer.get_token() == GDScriptTokenizer::TK_NEWLINE) { if (tokenizer.get_token() == GDScriptTokenizer::TK_NEWLINE) {
indent = tokenizer.get_token_line_indent(); 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) { if (indent == 0 && tokenizer.get_token() == GDScriptTokenizer::TK_PR_FUNCTION && tokenizer.get_token(1) == GDScriptTokenizer::TK_IDENTIFIER) {
String identifier = tokenizer.get_token_identifier(1); 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(); tokenizer.advance();
//print_line("NEXT: "+String(GDScriptTokenizer::get_token_name(tokenizer.get_token())));
} }
return -1; return -1;
} }
@ -2930,7 +2928,6 @@ void GDScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int p_t
break; break;
} }
//print_line(itos(indent_stack.size())+","+itos(tc)+": "+l);
lines.write[i] = l; lines.write[i] = l;
} }

View File

@ -642,7 +642,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
str += p_args[i]->operator String(); str += p_args[i]->operator String();
} }
//str+="\n";
print_line(str); print_line(str);
r_ret = Variant(); 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 += p_args[i]->operator String();
} }
//str+="\n";
print_line(str); print_line(str);
r_ret = Variant(); 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 += p_args[i]->operator String();
} }
//str+="\n";
print_line(str); print_line(str);
r_ret = Variant(); 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 += p_args[i]->operator String();
} }
//str+="\n";
print_error(str); print_error(str);
r_ret = Variant(); 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 += p_args[i]->operator String();
} }
//str+="\n";
OS::get_singleton()->print("%s", str.utf8().get_data()); OS::get_singleton()->print("%s", str.utf8().get_data());
r_ret = Variant(); 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 += "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); print_line(str);
r_ret = Variant(); r_ret = Variant();
} break; } break;

View File

@ -1074,9 +1074,6 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
} else { } else {
//find list [ or find dictionary { //find list [ or find dictionary {
//print_line("found bug?");
_set_error("Error parsing expression, misplaced: " + String(tokenizer->get_token_name(tokenizer->get_token()))); _set_error("Error parsing expression, misplaced: " + String(tokenizer->get_token_name(tokenizer->get_token())));
return NULL; //nothing return NULL; //nothing
} }

View File

@ -937,7 +937,6 @@ void GDScriptTokenizerText::_advance() {
_make_constant(val); _make_constant(val);
} else if (period_found || exponent_found) { } else if (period_found || exponent_found) {
double val = str.to_double(); double val = str.to_double();
//print_line("*%*%*%*% to convert: "+str+" result: "+rtos(val));
_make_constant(val); _make_constant(val);
} else { } else {
int64_t val = str.to_int64(); int64_t val = str.to_int64();

View File

@ -486,8 +486,6 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
if (!mesh_library.is_valid() || !mesh_library->has_item(c.item)) if (!mesh_library.is_valid() || !mesh_library->has_item(c.item))
continue; continue;
//print_line("OCTANT, CELLS: "+itos(ii.cells.size()));
Vector3 cellpos = Vector3(E->get().x, E->get().y, E->get().z); Vector3 cellpos = Vector3(E->get().x, E->get().y, E->get().z);
Vector3 ofs = _get_offset(); Vector3 ofs = _get_offset();
@ -524,8 +522,6 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
if (g.collision_debug.is_valid()) { if (g.collision_debug.is_valid()) {
shapes.write[i].shape->add_vertices_to_array(col_debug, xform * shapes[i].local_transform); 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 // 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]; 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_state(g.static_body, PhysicsServer::BODY_STATE_TRANSFORM, get_global_transform());
PhysicsServer::get_singleton()->body_set_space(g.static_body, get_world()->get_space()); 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()) { if (g.collision_debug_instance.is_valid()) {
VS::get_singleton()->instance_set_scenario(g.collision_debug_instance, get_world()->get_scenario()); 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()) { 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; Ref<ArrayMesh> mesh;
mesh.instance(); mesh.instance();
for (Map<Ref<Material>, Ref<SurfaceTool> >::Element *F = E->get().front(); F; F = F->next()) { for (Map<Ref<Material>, Ref<SurfaceTool> >::Element *F = E->get().front(); F; F = F->next()) {

View File

@ -93,7 +93,7 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
print_line("bmask: "+itos(bmask)); print_line("bmask: "+itos(bmask));
print_line("amask: "+itos(amask)); print_line("amask: "+itos(amask));
print_line("surfcount: "+itos(surfcount)); print_line("surfcount: "+itos(surfcount));
*/ */
PoolVector<uint8_t> data; PoolVector<uint8_t> data;
data.resize(surfsize); data.resize(surfsize);
@ -159,8 +159,6 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
if (mipmaps) if (mipmaps)
tex_flags |= Texture::FLAG_MIPMAPS; tex_flags |= Texture::FLAG_MIPMAPS;
print_line("flip: " + itos(flags & PVR_VFLIP));
Ref<Image> image = memnew(Image(width, height, mipmaps, format, data)); Ref<Image> image = memnew(Image(width, height, mipmaps, format, data));
ERR_FAIL_COND_V(image->empty(), RES()); 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 _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); 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); 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()); 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(); w = PoolVector<uint8_t>::Write();
r = PoolVector<uint8_t>::Read(); r = PoolVector<uint8_t>::Read();

View File

@ -59,7 +59,7 @@ void image_decompress_squish(Image *p_image) {
} else if (p_image->get_format() == Image::FORMAT_RGTC_RG) { } else if (p_image->get_format() == Image::FORMAT_RGTC_RG) {
squish_flags = squish::kBc5; squish_flags = squish::kBc5;
} else { } 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); ERR_FAIL_COND(true);
return; return;
} }

View File

@ -208,8 +208,6 @@ void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) {
//does this work? (it's less mem..) //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; //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); length = stb_vorbis_stream_length_in_seconds(ogg_stream);
stb_vorbis_close(ogg_stream); stb_vorbis_close(ogg_stream);

View File

@ -387,7 +387,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
thread_sem->post(); thread_sem->post();
#endif #endif
//print_line("play "+rtos(p_delta));
time += p_delta; time += p_delta;
if (videobuf_time > get_time()) { if (videobuf_time > get_time()) {
@ -442,16 +441,8 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
int tr = vorbis_synthesis_read(&vd, ret - to_read); 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; audio_frames_wrote += ret - to_read;
//print_line("AGP: "+itos(vd.granulepos)+" added "+itos(ret-to_read));
} else { } else {
/* no pending audio; is there a pending packet to decode? */ /* 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); vorbis_synthesis_blockin(&vd, &vb);
} }
} else { /* we need more data; break out to suck in another page */ } else { /* we need more data; break out to suck in another page */
//printf("need moar data\n");
break; break;
}; };
} }

View File

@ -1144,15 +1144,12 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
case VisualScriptBuiltinFunc::TEXT_PRINTERR: { case VisualScriptBuiltinFunc::TEXT_PRINTERR: {
String str = *p_inputs[0]; String str = *p_inputs[0];
//str+="\n";
print_error(str); print_error(str);
} break; } break;
case VisualScriptBuiltinFunc::TEXT_PRINTRAW: { 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()); OS::get_singleton()->print("%s", str.utf8().get_data());
} break; } break;

View File

@ -882,7 +882,6 @@ void VisualScriptEditor::_member_selected() {
ERR_FAIL_COND(!ti); ERR_FAIL_COND(!ti);
selected = ti->get_metadata(0); selected = ti->get_metadata(0);
//print_line("selected: "+String(selected));
if (ti->get_parent() == members->get_root()->get_children()) { if (ti->get_parent() == members->get_root()->get_children()) {

View File

@ -394,7 +394,6 @@ void VisualScriptFunctionCall::_update_method_cache() {
} }
} }
//print_line("BASE: "+String(type)+" FUNC: "+String(function));
MethodBind *mb = ClassDB::get_method(type, function); MethodBind *mb = ClassDB::get_method(type, function);
if (mb) { if (mb) {
use_default_args = mb->get_default_argument_count(); use_default_args = mb->get_default_argument_count();

View File

@ -285,7 +285,6 @@ void VisualScriptPropertySelector::_update_search() {
Ref<Texture> icon; Ref<Texture> icon;
script_methods = false; script_methods = false;
print_line("name: " + E->get().name);
String rep = E->get().name.replace("*", ""); String rep = E->get().name.replace("*", "");
if (E->get().name == "*Script Methods") { if (E->get().name == "*Script Methods") {
icon = get_icon("Script", "EditorIcons"); icon = get_icon("Script", "EditorIcons");

View File

@ -257,7 +257,6 @@ class EditorExportAndroid : public EditorExportPlatform {
if (dpos == -1) if (dpos == -1)
continue; continue;
d = d.substr(0, dpos).strip_edges(); d = d.substr(0, dpos).strip_edges();
//print_line("found device: "+d);
ldevices.push_back(d); ldevices.push_back(d);
} }
@ -345,8 +344,6 @@ class EditorExportAndroid : public EditorExportPlatform {
} }
d.name = vendor + " " + device; d.name = vendor + " " + device;
//print_line("name: "+d.name);
//print_line("description: "+d.description);
} }
ndevices.push_back(d); ndevices.push_back(d);
@ -671,19 +668,14 @@ class EditorExportAndroid : public EditorExportPlatform {
ucstring.write[len] = 0; ucstring.write[len] = 0;
string_table.write[i] = ucstring.ptr(); string_table.write[i] = ucstring.ptr();
} }
//print_line("String "+itos(i)+": "+string_table[i]);
} }
for (uint32_t i = string_end; i < (ofs + size); i++) { for (uint32_t i = string_end; i < (ofs + size); i++) {
stable_extra.push_back(p_manifest[i]); stable_extra.push_back(p_manifest[i]);
} }
//printf("stable extra: %i\n",int(stable_extra.size()));
string_table_ends = ofs + size; string_table_ends = ofs + size;
//print_line("STABLE SIZE: "+itos(size)+" ACTUAL: "+itos(string_table_ends));
} break; } break;
case CHUNK_XML_START_TAG: { case CHUNK_XML_START_TAG: {
@ -714,35 +706,25 @@ class EditorExportAndroid : public EditorExportPlatform {
//replace project information //replace project information
if (tname == "manifest" && attrname == "package") { if (tname == "manifest" && attrname == "package") {
print_line("FOUND package");
string_table.write[attr_value] = get_package_name(package_name); string_table.write[attr_value] = get_package_name(package_name);
} }
if (tname == "manifest" && /*nspace=="android" &&*/ attrname == "versionCode") { if (tname == "manifest" && attrname == "versionCode") {
print_line("FOUND versionCode");
encode_uint32(version_code, &p_manifest.write[iofs + 16]); encode_uint32(version_code, &p_manifest.write[iofs + 16]);
} }
if (tname == "manifest" && /*nspace=="android" &&*/ attrname == "versionName") { if (tname == "manifest" && attrname == "versionName") {
print_line("FOUND versionName");
if (attr_value == 0xFFFFFFFF) { if (attr_value == 0xFFFFFFFF) {
WARN_PRINT("Version name in a resource, should be plaintext") WARN_PRINT("Version name in a resource, should be plaintext")
} else } else
string_table.write[attr_value] = version_name; 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]); 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 (tname == "supports-screens") {
if (attrname == "smallScreens") { if (attrname == "smallScreens") {
@ -773,7 +755,6 @@ class EditorExportAndroid : public EditorExportPlatform {
String tname = string_table[name]; String tname = string_table[name];
if (tname == "manifest") { if (tname == "manifest") {
print_line("Found manifest end");
// save manifest ending so we can restore it // save manifest ending so we can restore it
Vector<uint8_t> manifest_end; 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_table.size(), &ret.write[16]); //update new number of strings
encode_uint32(string_data_offset - 8, &ret.write[28]); //update new string data offset encode_uint32(string_data_offset - 8, &ret.write[28]); //update new string data offset
//print_line("file size: "+itos(ret.size()));
p_manifest = ret; p_manifest = ret;
} }
@ -956,7 +935,6 @@ class EditorExportAndroid : public EditorExportPlatform {
void _fix_resources(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_manifest) { void _fix_resources(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_manifest) {
const int UTF8_FLAG = 0x00000100; const int UTF8_FLAG = 0x00000100;
print_line("*******************GORRRGLE***********************");
uint32_t string_block_len = decode_uint32(&p_manifest[16]); uint32_t string_block_len = decode_uint32(&p_manifest[16]);
uint32_t string_count = decode_uint32(&p_manifest[20]); 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); err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
} }
print_line("Installing into device (please wait..): " + devices[p_device].name); print_line("Installing to device (please wait...): " + devices[p_device].name);
ep.step("Installing to Device (please wait..)..", 2); ep.step("Installing to device (please wait...)", 2);
args.clear(); args.clear();
args.push_back("-s"); args.push_back("-s");

View File

@ -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()); jmethodID mid = env->GetMethodID(cls, mname.ascii().get_data(), cs.ascii().get_data());
if (!mid) { 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)); s->add_method(mname, mid, types, get_jni_type(retval));

View File

@ -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); jstring name2 = (jstring)env->CallObjectMethod(obj, Class_getName);
String str_type = env->GetStringUTFChars(name2, NULL); String str_type = env->GetStringUTFChars(name2, NULL);
print_line("name: " + str_type);
env->DeleteLocalRef(name2); env->DeleteLocalRef(name2);
uint32_t t = 0; uint32_t t = 0;
@ -1191,9 +1190,6 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
env->DeleteLocalRef(obj); env->DeleteLocalRef(obj);
env->DeleteLocalRef(param_types); env->DeleteLocalRef(param_types);
env->DeleteLocalRef(return_type); 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); env->DeleteLocalRef(methods);
@ -1210,7 +1206,6 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
jstring name = (jstring)env->CallObjectMethod(obj, Field_getName); jstring name = (jstring)env->CallObjectMethod(obj, Field_getName);
String str_field = env->GetStringUTFChars(name, NULL); String str_field = env->GetStringUTFChars(name, NULL);
env->DeleteLocalRef(name); env->DeleteLocalRef(name);
print_line("FIELD: " + str_field);
int mods = env->CallIntMethod(obj, Field_getModifiers); int mods = env->CallIntMethod(obj, Field_getModifiers);
if ((mods & 0x8) && (mods & 0x10) && (mods & 0x1)) { //static final public! if ((mods & 0x8) && (mods & 0x10) && (mods & 0x1)) { //static final public!

View File

@ -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) { 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) { switch (p_what) {
case 0: { //gesture begin case 0: { //gesture begin

View File

@ -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"; 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; String pkg_name;
if (p_preset->get("application/name") != "") if (p_preset->get("application/name") != "")
pkg_name = p_preset->get("application/name"); // app_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/", ""); file = file.replace_first("iphone/", "");
if (files_to_parse.has(file)) { if (files_to_parse.has(file)) {
print_line(String("parse ") + file);
_fix_config_file(p_preset, data, config_data, p_debug); _fix_config_file(p_preset, data, config_data, p_debug);
} else if (file.begins_with("libgodot.iphone")) { } else if (file.begins_with("libgodot.iphone")) {
if (file != library_to_use) { if (file != library_to_use) {

View File

@ -380,7 +380,6 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
String file = fname; String file = fname;
print_line("READ: " + file);
Vector<uint8_t> data; Vector<uint8_t> data;
data.resize(info.uncompressed_size); 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/", ""); file = file.replace_first("osx_template.app/", "");
if (file == "Contents/Info.plist") { if (file == "Contents/Info.plist") {
print_line("parse plist");
_fix_plist(p_preset, data, pkg_name); _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"); iconpath = p_preset->get("application/icon");
else else
iconpath = ProjectSettings::get_singleton()->get("application/config/icon"); iconpath = ProjectSettings::get_singleton()->get("application/config/icon");
print_line("icon? " + iconpath);
if (iconpath != "") { if (iconpath != "") {
Ref<Image> icon; Ref<Image> icon;
icon.instance(); icon.instance();
icon->load(iconpath); icon->load(iconpath);
if (!icon->empty()) { if (!icon->empty()) {
print_line("loaded?");
_make_icon(icon, data); _make_icon(icon, data);
} }
} }
@ -475,9 +472,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
Z_DEFLATED, Z_DEFLATED,
Z_DEFAULT_COMPRESSION); Z_DEFAULT_COMPRESSION);
print_line("OPEN ERR: " + itos(zerr));
zerr = zipWriteInFileInZip(dst_pkg_zip, data.ptr(), data.size()); zerr = zipWriteInFileInZip(dst_pkg_zip, data.ptr(), data.size());
print_line("WRITE ERR: " + itos(zerr));
zipCloseFileInZip(dst_pkg_zip); zipCloseFileInZip(dst_pkg_zip);
} }
} }

View File

@ -68,20 +68,6 @@ void ContextGL_Win::swap_buffers() {
SwapBuffers(hDC); 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) { void ContextGL_Win::set_use_vsync(bool p_use) {
if (wglSwapIntervalEXT) { if (wglSwapIntervalEXT) {

View File

@ -449,7 +449,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
input->set_mouse_position(c); input->set_mouse_position(c);
mm->set_speed(Vector2(0, 0)); 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)); mm->set_relative(Vector2(raw->data.mouse.lLastX, raw->data.mouse.lLastY));
} else if (raw->data.mouse.usFlags == MOUSE_MOVE_ABSOLUTE) { } 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); int nScreenTop = GetSystemMetrics(SM_YVIRTUALSCREEN);
Vector2 abs_pos( Vector2 abs_pos(
(double(raw->data.mouse.lLastX) - 65536.0 / (nScreenWidth) ) * nScreenWidth / 65536.0 + nScreenLeft, (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.lLastY) - 65536.0 / (nScreenHeight)) * nScreenHeight / 65536.0 + nScreenTop);
);
POINT coords; //client coords POINT coords; //client coords
coords.x = abs_pos.x; coords.x = abs_pos.x;
@ -470,15 +469,13 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
ScreenToClient(hWnd, &coords); 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_x = coords.x;
old_y = coords.y; old_y = coords.y;
/*Input.mi.dx = (int)((((double)(pos.x)-nScreenLeft) * 65536) / nScreenWidth + 65536 / (nScreenWidth)); /*Input.mi.dx = (int)((((double)(pos.x)-nScreenLeft) * 65536) / nScreenWidth + 65536 / (nScreenWidth));
Input.mi.dy = (int)((((double)(pos.y)-nScreenTop) * 65536) / nScreenHeight + 65536 / (nScreenHeight)); Input.mi.dy = (int)((((double)(pos.y)-nScreenTop) * 65536) / nScreenHeight + 65536 / (nScreenHeight));
*/ */
} }
if (window_has_focus && main_loop) 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) if (ke.uMsg == WM_SYSKEYUP)
ke.uMsg = WM_KEYUP; 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.wParam = wParam;
ke.lParam = lParam; ke.lParam = lParam;
key_event_buffer[key_event_pos++] = ke; key_event_buffer[key_event_pos++] = ke;
@ -871,7 +860,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
} break; } break;
case WM_INPUTLANGCHANGEREQUEST: { case WM_INPUTLANGCHANGEREQUEST: {
print_line("input lang change"); // FIXME: Do something?
} break; } break;
case WM_TOUCH: { case WM_TOUCH: {
@ -1126,7 +1115,6 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
WNDCLASSEXW wc; WNDCLASSEXW wc;
if (is_hidpi_allowed()) { if (is_hidpi_allowed()) {
print_line("hidpi aware?");
HMODULE Shcore = LoadLibraryW(L"Shcore.dll"); HMODULE Shcore = LoadLibraryW(L"Shcore.dll");
if (Shcore != NULL) { 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.right = data.size.width;
WindowRect.bottom = data.size.height; WindowRect.bottom = data.size.height;
print_line("wr right " + itos(WindowRect.right) + ", " + itos(WindowRect.bottom));
/* DEVMODE dmScreenSettings; /* DEVMODE dmScreenSettings;
memset(&dmScreenSettings,0,sizeof(dmScreenSettings)); memset(&dmScreenSettings,0,sizeof(dmScreenSettings));
dmScreenSettings.dmSize=sizeof(dmScreenSettings); dmScreenSettings.dmSize=sizeof(dmScreenSettings);
@ -1490,12 +1476,6 @@ void OS_Windows::finalize() {
if (user_proc) { if (user_proc) {
SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)user_proc); SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)user_proc);
}; };
/*
if (debugger_connection_console) {
memdelete(debugger_connection_console);
}
*/
} }
void OS_Windows::finalize_core() { void OS_Windows::finalize_core() {
@ -1759,9 +1739,6 @@ void OS_Windows::set_window_fullscreen(bool p_enabled) {
if (pre_fs_valid) { if (pre_fs_valid) {
GetWindowRect(hWnd, &pre_fs_rect); 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(); int cs = get_current_screen();

View File

@ -65,19 +65,6 @@ void ContextGL_X11::swap_buffers() {
glXSwapBuffers(x11_display, x11_window); 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 bool ctxErrorOccurred = false;
static int ctxErrorHandler(Display *dpy, XErrorEvent *ev) { static int ctxErrorHandler(Display *dpy, XErrorEvent *ev) {
ctxErrorOccurred = true; ctxErrorOccurred = true;

View File

@ -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) // know Mod1 was ALT and Mod4 was META (applekey/winkey)
// just tried Mods until i found them. // 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; Ref<InputEventKey> k;
k.instance(); k.instance();

View File

@ -121,7 +121,6 @@ void Navigation2D::_navpoly_link(int p_id) {
pending.edge = j; pending.edge = j;
p.edges.write[j].P = C->get().pending.push_back(pending); p.edges.write[j].P = C->get().pending.push_back(pending);
continue; continue;
//print_line(String()+_get_vertex(ek.a)+" -> "+_get_vertex(ek.b));
} }
C->get().B = &p; C->get().B = &p;
@ -144,8 +143,6 @@ void Navigation2D::_navpoly_unlink(int p_id) {
NavMesh &nm = navpoly_map[p_id]; NavMesh &nm = navpoly_map[p_id];
ERR_FAIL_COND(!nm.linked); ERR_FAIL_COND(!nm.linked);
//print_line("UNLINK");
for (List<Polygon>::Element *E = nm.polygons.front(); E; E = E->next()) { for (List<Polygon>::Element *E = nm.polygons.front(); E; E = E->next()) {
Polygon &p = E->get(); Polygon &p = E->get();
@ -341,7 +338,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
path.resize(2); path.resize(2);
path.write[0] = begin_point; path.write[0] = begin_point;
path.write[1] = end_point; path.write[1] = end_point;
//print_line("Direct Path");
return path; return path;
} }
@ -379,7 +375,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
while (!found_route) { while (!found_route) {
if (open_list.size() == 0) { if (open_list.size() == 0) {
//print_line("NOU OPEN LIST");
break; break;
} }
//check open list //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) { if (portal_left.distance_squared_to(apex_point) < CMP_EPSILON || CLOCK_TANGENT(apex_point, left, portal_right) > 0) {
left_poly = p; left_poly = p;
portal_left = left; portal_left = left;
//print_line("***ADVANCE LEFT");
} else { } else {
apex_point = portal_right; 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) if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON)
path.push_back(apex_point); path.push_back(apex_point);
skip = true; 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) { if (portal_right.distance_squared_to(apex_point) < CMP_EPSILON || CLOCK_TANGENT(apex_point, right, portal_left) < 0) {
right_poly = p; right_poly = p;
portal_right = right; portal_right = right;
//print_line("***ADVANCE RIGHT");
} else { } else {
apex_point = portal_left; apex_point = portal_left;
@ -557,8 +548,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
portal_left = apex_point; portal_left = apex_point;
if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON) if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON)
path.push_back(apex_point); path.push_back(apex_point);
//print_line("addpoint right");
//print_line("***CLIP RIGHT");
} }
} }

View File

@ -257,7 +257,7 @@ void NavigationPolygon::make_polygons_from_outlines() {
TriangulatorPartition tpart; TriangulatorPartition tpart;
if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed! if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed!
print_line("convex partition failed!"); ERR_PRINTS("NavigationPolygon: Convex partition failed!");
return; return;
} }

View File

@ -365,13 +365,6 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
ERR_FAIL_COND(!contact_monitor); ERR_FAIL_COND(!contact_monitor);
Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid); 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); ERR_FAIL_COND(!body_in && !E);
if (body_in) { if (body_in) {

Some files were not shown because too many files have changed in this diff Show More