Make some debug prints verbose-only, remove others
This commit is contained in:
parent
d442f3d0aa
commit
52466d57e9
|
@ -50,7 +50,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
|||
|
||||
int size = Math::larger_prime(keys.size());
|
||||
|
||||
print_line("compressing keys: " + itos(keys.size()));
|
||||
Vector<Vector<Pair<int, CharString> > > buckets;
|
||||
Vector<Map<uint32_t, int> > table;
|
||||
Vector<uint32_t> hfunc_table;
|
||||
|
@ -107,7 +106,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
|||
}
|
||||
|
||||
int bucket_table_size = 0;
|
||||
print_line("total compressed string size: " + itos(total_compression_size) + " (" + itos(total_string_size) + " uncompressed).");
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
|
||||
|
@ -117,8 +115,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
|||
if (b.size() == 0)
|
||||
continue;
|
||||
|
||||
//print_line("bucket: "+itos(i)+" - elements: "+itos(b.size()));
|
||||
|
||||
int d = 1;
|
||||
int item = 0;
|
||||
|
||||
|
@ -140,9 +136,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
|||
bucket_table_size += 2 + b.size() * 4;
|
||||
}
|
||||
|
||||
print_line("bucket table size: " + itos(bucket_table_size * 4));
|
||||
print_line("hash table size: " + itos(size * 4));
|
||||
|
||||
hash_table.resize(size);
|
||||
bucket_table.resize(bucket_table_size);
|
||||
|
||||
|
@ -178,8 +171,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
|||
}
|
||||
}
|
||||
|
||||
print_line("total collisions: " + itos(collisions));
|
||||
|
||||
strings.resize(total_compression_size);
|
||||
PoolVector<uint8_t>::Write cw = strings.write();
|
||||
|
||||
|
@ -198,15 +189,11 @@ bool PHashTranslation::_set(const StringName &p_name, const Variant &p_value) {
|
|||
String name = p_name.operator String();
|
||||
if (name == "hash_table") {
|
||||
hash_table = p_value;
|
||||
//print_line("translation: loaded hash table of size: "+itos(hash_table.size()));
|
||||
} else if (name == "bucket_table") {
|
||||
bucket_table = p_value;
|
||||
//print_line("translation: loaded bucket table of size: "+itos(bucket_table.size()));
|
||||
} else if (name == "strings") {
|
||||
strings = p_value;
|
||||
//print_line("translation: loaded string table of size: "+itos(strings.size()));
|
||||
} else if (name == "load_from") {
|
||||
//print_line("generating");
|
||||
generate(p_value);
|
||||
} else
|
||||
return false;
|
||||
|
@ -248,11 +235,7 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const {
|
|||
|
||||
uint32_t p = htptr[h % htsize];
|
||||
|
||||
//print_line("String: "+p_src_text.operator String());
|
||||
//print_line("Hash: "+itos(p));
|
||||
|
||||
if (p == 0xFFFFFFFF) {
|
||||
//print_line("GETMSG: Nothing!");
|
||||
return StringName(); //nothing
|
||||
}
|
||||
|
||||
|
@ -271,9 +254,7 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const {
|
|||
}
|
||||
}
|
||||
|
||||
//print_line("bucket pos: "+itos(idx));
|
||||
if (idx == -1) {
|
||||
//print_line("GETMSG: Not in Bucket!");
|
||||
return StringName();
|
||||
}
|
||||
|
||||
|
@ -281,8 +262,6 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const {
|
|||
|
||||
String rstr;
|
||||
rstr.parse_utf8(&sptr[bucket.elem[idx].str_offset], bucket.elem[idx].uncomp_size);
|
||||
//print_line("Uncompressed, size: "+itos(bucket.elem[idx].comp_size));
|
||||
//print_line("Return: "+rstr);
|
||||
|
||||
return rstr;
|
||||
} else {
|
||||
|
@ -292,8 +271,6 @@ StringName PHashTranslation::get_message(const StringName &p_src_text) const {
|
|||
smaz_decompress(&sptr[bucket.elem[idx].str_offset], bucket.elem[idx].comp_size, uncomp.ptrw(), bucket.elem[idx].uncomp_size);
|
||||
String rstr;
|
||||
rstr.parse_utf8(uncomp.get_data());
|
||||
//print_line("Compressed, size: "+itos(bucket.elem[idx].comp_size));
|
||||
//print_line("Return: "+rstr);
|
||||
return rstr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
|
||||
Error FileAccessEncrypted::open_and_parse(FileAccess *p_base, const Vector<uint8_t> &p_key, Mode p_mode) {
|
||||
|
||||
//print_line("open and parse!");
|
||||
ERR_FAIL_COND_V(file != NULL, ERR_ALREADY_IN_USE);
|
||||
ERR_FAIL_COND_V(p_key.size() != 32, ERR_INVALID_PARAMETER);
|
||||
|
||||
|
|
|
@ -93,8 +93,6 @@ void FileAccessNetworkClient::_thread_func() {
|
|||
DEBUG_TIME("sem_unlock");
|
||||
//DEBUG_PRINT("semwait returned "+itos(werr));
|
||||
DEBUG_PRINT("MUTEX LOCK " + itos(lockcount));
|
||||
DEBUG_PRINT("POPO");
|
||||
DEBUG_PRINT("PEPE");
|
||||
lock_mutex();
|
||||
DEBUG_PRINT("MUTEX PASS");
|
||||
|
||||
|
|
|
@ -175,7 +175,6 @@ public:
|
|||
|
||||
FileAccess *PackedData::try_open_path(const String &p_path) {
|
||||
|
||||
//print_line("try open path " + p_path);
|
||||
PathMD5 pmd5(p_path.md5_buffer());
|
||||
Map<PathMD5, PackedFile>::Element *E = files.find(pmd5);
|
||||
if (!E)
|
||||
|
|
|
@ -81,7 +81,7 @@ PoolByteArray StreamPeerSSL::get_project_cert_array() {
|
|||
memdelete(f);
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
print_line("Loaded certs from '" + certs_path);
|
||||
print_verbose(vformat("Loaded certs from '%s'.", certs_path));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -622,15 +622,12 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
|
|||
case TEXT_PRINTERR: {
|
||||
|
||||
String str = *p_inputs[0];
|
||||
|
||||
//str+="\n";
|
||||
print_error(str);
|
||||
|
||||
} break;
|
||||
case TEXT_PRINTRAW: {
|
||||
String str = *p_inputs[0];
|
||||
|
||||
//str+="\n";
|
||||
String str = *p_inputs[0];
|
||||
OS::get_singleton()->print("%s", str.utf8().get_data());
|
||||
|
||||
} break;
|
||||
|
|
|
@ -626,7 +626,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
|
|||
voxelsize.z /= div_z;
|
||||
|
||||
// create and initialize cells to zero
|
||||
//print_line("Wrapper: Initializing Cells");
|
||||
|
||||
uint8_t ***cell_status = memnew_arr(uint8_t **, div_x);
|
||||
for (int i = 0; i < div_x; i++) {
|
||||
|
@ -645,7 +644,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
|
|||
}
|
||||
|
||||
// plot faces into cells
|
||||
//print_line("Wrapper (1/6): Plotting Faces");
|
||||
|
||||
for (int i = 0; i < face_count; i++) {
|
||||
|
||||
|
@ -659,8 +657,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
|
|||
|
||||
// determine which cells connect to the outside by traversing the outside and recursively flood-fill marking
|
||||
|
||||
//print_line("Wrapper (2/6): Flood Filling");
|
||||
|
||||
for (int i = 0; i < div_x; i++) {
|
||||
|
||||
for (int j = 0; j < div_y; j++) {
|
||||
|
@ -690,8 +686,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
|
|||
|
||||
// build faces for the inside-outside cell divisors
|
||||
|
||||
//print_line("Wrapper (3/6): Building Faces");
|
||||
|
||||
PoolVector<Face3> wrapped_faces;
|
||||
|
||||
for (int i = 0; i < div_x; i++) {
|
||||
|
@ -705,8 +699,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
|
|||
}
|
||||
}
|
||||
|
||||
//print_line("Wrapper (4/6): Transforming Back Vertices");
|
||||
|
||||
// transform face vertices to global coords
|
||||
|
||||
int wrapped_faces_count = wrapped_faces.size();
|
||||
|
@ -724,7 +716,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
|
|||
}
|
||||
|
||||
// clean up grid
|
||||
//print_line("Wrapper (5/6): Grid Cleanup");
|
||||
|
||||
for (int i = 0; i < div_x; i++) {
|
||||
|
||||
|
@ -740,7 +731,6 @@ PoolVector<Face3> Geometry::wrap_geometry(PoolVector<Face3> p_array, real_t *p_e
|
|||
if (p_error)
|
||||
*p_error = voxelsize.length();
|
||||
|
||||
//print_line("Wrapper (6/6): Finished.");
|
||||
return wrapped_faces;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
|
|||
Vector3 sp = p_points[i].snapped(Vector3(0.0001, 0.0001, 0.0001));
|
||||
if (valid_cache.has(sp)) {
|
||||
valid_points.write[i] = false;
|
||||
//print_line("INVALIDATED: "+itos(i));
|
||||
} else {
|
||||
valid_points.write[i] = true;
|
||||
valid_cache.insert(sp);
|
||||
|
@ -455,7 +454,6 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
|
|||
//fill mesh
|
||||
r_mesh.faces.clear();
|
||||
r_mesh.faces.resize(ret_faces.size());
|
||||
//print_line("FACECOUNT: "+itos(r_mesh.faces.size()));
|
||||
|
||||
int idx = 0;
|
||||
for (List<Geometry::MeshData::Face>::Element *E = ret_faces.front(); E; E = E->next()) {
|
||||
|
@ -473,12 +471,5 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
|
|||
|
||||
r_mesh.vertices = p_points;
|
||||
|
||||
//r_mesh.optimize_vertices();
|
||||
/*
|
||||
print_line("FACES: "+itos(r_mesh.faces.size()));
|
||||
print_line("EDGES: "+itos(r_mesh.edges.size()));
|
||||
print_line("VERTICES: "+itos(r_mesh.vertices.size()));
|
||||
*/
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
@ -50,9 +50,9 @@ Error MessageQueue::push_call(ObjectID p_id, const StringName &p_method, const V
|
|||
String type;
|
||||
if (ObjectDB::get_instance(p_id))
|
||||
type = ObjectDB::get_instance(p_id)->get_class();
|
||||
print_line("failed method: " + type + ":" + p_method + " target ID: " + itos(p_id));
|
||||
print_line("Failed method: " + type + ":" + p_method + " target ID: " + itos(p_id));
|
||||
statistics();
|
||||
ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings");
|
||||
ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings.");
|
||||
ERR_FAIL_V(ERR_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
|
@ -101,9 +101,9 @@ Error MessageQueue::push_set(ObjectID p_id, const StringName &p_prop, const Vari
|
|||
String type;
|
||||
if (ObjectDB::get_instance(p_id))
|
||||
type = ObjectDB::get_instance(p_id)->get_class();
|
||||
print_line("failed set: " + type + ":" + p_prop + " target ID: " + itos(p_id));
|
||||
print_line("Failed set: " + type + ":" + p_prop + " target ID: " + itos(p_id));
|
||||
statistics();
|
||||
ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings");
|
||||
ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings.");
|
||||
ERR_FAIL_V(ERR_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
|
@ -134,9 +134,9 @@ Error MessageQueue::push_notification(ObjectID p_id, int p_notification) {
|
|||
String type;
|
||||
if (ObjectDB::get_instance(p_id))
|
||||
type = ObjectDB::get_instance(p_id)->get_class();
|
||||
print_line("failed notification: " + itos(p_notification) + " target ID: " + itos(p_id));
|
||||
print_line("Failed notification: " + itos(p_notification) + " target ID: " + itos(p_id));
|
||||
statistics();
|
||||
ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings");
|
||||
ERR_EXPLAIN("Message queue out of memory. Try increasing 'message_queue_size_kb' in project settings.");
|
||||
ERR_FAIL_V(ERR_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
|
@ -210,8 +210,7 @@ void MessageQueue::statistics() {
|
|||
}
|
||||
|
||||
//object was deleted
|
||||
//WARN_PRINT("Object was deleted while awaiting a callback")
|
||||
//should it print a warning?
|
||||
print_line("Object was deleted while awaiting a callback");
|
||||
} else {
|
||||
|
||||
null_count++;
|
||||
|
@ -226,17 +225,14 @@ void MessageQueue::statistics() {
|
|||
print_line("NULL count: " + itos(null_count));
|
||||
|
||||
for (Map<StringName, int>::Element *E = set_count.front(); E; E = E->next()) {
|
||||
|
||||
print_line("SET " + E->key() + ": " + itos(E->get()));
|
||||
}
|
||||
|
||||
for (Map<StringName, int>::Element *E = call_count.front(); E; E = E->next()) {
|
||||
|
||||
print_line("CALL " + E->key() + ": " + itos(E->get()));
|
||||
}
|
||||
|
||||
for (Map<int, int>::Element *E = notify_count.front(); E; E = E->next()) {
|
||||
|
||||
print_line("NOTIFY " + itos(E->key()) + ": " + itos(E->get()));
|
||||
}
|
||||
}
|
||||
|
@ -268,7 +264,6 @@ void MessageQueue::flush() {
|
|||
|
||||
if (buffer_end > buffer_max_used) {
|
||||
buffer_max_used = buffer_end;
|
||||
//statistics();
|
||||
}
|
||||
|
||||
uint32_t read_pos = 0;
|
||||
|
|
|
@ -98,22 +98,18 @@ static Error _erase_recursive(DirAccess *da) {
|
|||
|
||||
err = _erase_recursive(da);
|
||||
if (err) {
|
||||
print_line("err recurso " + E->get());
|
||||
da->change_dir("..");
|
||||
return err;
|
||||
}
|
||||
err = da->change_dir("..");
|
||||
if (err) {
|
||||
print_line("no go back " + E->get());
|
||||
return err;
|
||||
}
|
||||
err = da->remove(da->get_current_dir().plus_file(E->get()));
|
||||
if (err) {
|
||||
print_line("no remove dir" + E->get());
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
print_line("no change to " + E->get());
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
@ -122,8 +118,6 @@ static Error _erase_recursive(DirAccess *da) {
|
|||
|
||||
Error err = da->remove(da->get_current_dir().plus_file(E->get()));
|
||||
if (err) {
|
||||
|
||||
print_line("no remove file" + E->get());
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ bool ProjectSettings::_get(const StringName &p_name, Variant &r_ret) const {
|
|||
name = feature_overrides[name];
|
||||
}
|
||||
if (!props.has(name)) {
|
||||
print_line("WARNING: not found: " + String(name));
|
||||
WARN_PRINTS("Property not found: " + String(name));
|
||||
return false;
|
||||
}
|
||||
r_ret = props[name].variant;
|
||||
|
|
|
@ -82,17 +82,16 @@ Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_por
|
|||
|
||||
const int ms = waits[i];
|
||||
OS::get_singleton()->delay_usec(ms * 1000);
|
||||
print_line("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec.");
|
||||
ERR_PRINTS("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec.");
|
||||
};
|
||||
};
|
||||
|
||||
if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) {
|
||||
|
||||
print_line("Remote Debugger: Unable to connect");
|
||||
ERR_PRINTS("Remote Debugger: Unable to connect.");
|
||||
return FAILED;
|
||||
};
|
||||
|
||||
// print_line("Remote Debugger: Connection OK!");
|
||||
packet_peer_stream->set_stream_peer(tcp_client);
|
||||
|
||||
return OK;
|
||||
|
|
|
@ -1098,7 +1098,6 @@ bool TranslationServer::_load_translations(const String &p_from) {
|
|||
|
||||
for (int i = 0; i < tcount; i++) {
|
||||
|
||||
//print_line( "Loading translation from " + r[i] );
|
||||
Ref<Translation> tr = ResourceLoader::load(r[i]);
|
||||
if (tr.is_valid())
|
||||
add_translation(tr);
|
||||
|
|
|
@ -1340,7 +1340,7 @@ String String::utf8(const char *p_utf8, int p_len) {
|
|||
|
||||
bool String::parse_utf8(const char *p_utf8, int p_len) {
|
||||
|
||||
#define _UNICERROR(m_err) print_line("unicode error: " + String(m_err));
|
||||
#define _UNICERROR(m_err) print_line("Unicode error: " + String(m_err));
|
||||
|
||||
String aux;
|
||||
|
||||
|
|
|
@ -486,7 +486,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
|
|||
RasterizerStorageGLES2::Texture *tex = _bind_canvas_texture(np->texture, np->normal_map);
|
||||
|
||||
if (!tex) {
|
||||
print_line("TODO: ninepatch without texture");
|
||||
// FIXME: Handle textureless ninepatch gracefully
|
||||
WARN_PRINT("NinePatch without texture not supported yet in GLES2 backend, skipping.");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -612,8 +613,6 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
|
|||
|
||||
buffer[(3 * 4 * 4) + 14] = (source.position.x + source.size.x) * texpixel_size.x;
|
||||
buffer[(3 * 4 * 4) + 15] = (source.position.y + source.size.y) * texpixel_size.y;
|
||||
|
||||
// print_line(String::num((source.position.y + source.size.y) * texpixel_size.y));
|
||||
}
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, data.ninepatch_vertices);
|
||||
|
@ -789,7 +788,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
|
|||
} break;
|
||||
|
||||
default: {
|
||||
print_line("other");
|
||||
// FIXME: Proper error handling if relevant
|
||||
//print_line("other");
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/*************************************************************************/
|
||||
#include "rasterizer_storage_gles2.h"
|
||||
|
||||
#include "project_settings.h"
|
||||
#include "rasterizer_canvas_gles2.h"
|
||||
#include "rasterizer_scene_gles2.h"
|
||||
|
@ -601,8 +602,6 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer)
|
|||
|
||||
glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
|
||||
|
||||
//print_line("GET FORMAT: " + Image::get_format_name(texture->format) + " mipmaps: " + itos(texture->mipmaps));
|
||||
|
||||
for (int i = 0; i < texture->mipmaps; i++) {
|
||||
|
||||
int ofs = 0;
|
||||
|
|
|
@ -596,6 +596,7 @@ String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, Gener
|
|||
|
||||
default: {
|
||||
SL::DataType type = op_node->arguments[3]->get_datatype();
|
||||
// FIXME: Proper error print or graceful handling
|
||||
print_line(String("uhhhh invalid mix with type: ") + itos(type));
|
||||
} break;
|
||||
}
|
||||
|
|
|
@ -231,7 +231,6 @@ static String _fix_error_code_line(const String &p_error, int p_code_start, int
|
|||
continue;
|
||||
|
||||
String numstr = error.substr(last_find_pos + 1, (end_pos - last_find_pos) - 1);
|
||||
print_line("numstr: " + numstr);
|
||||
String begin = error.substr(0, last_find_pos + 1);
|
||||
String end = error.substr(end_pos, error.length());
|
||||
int num = numstr.to_int() + p_code_start - p_offset;
|
||||
|
|
|
@ -1557,17 +1557,12 @@ void RasterizerCanvasGLES3::canvas_debug_viewport_shadows(Light *p_lights_with_s
|
|||
int ofs = h;
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
//print_line(" debug lights ");
|
||||
while (light) {
|
||||
|
||||
//print_line("debug light");
|
||||
if (light->shadow_buffer.is_valid()) {
|
||||
|
||||
//print_line("sb is valid");
|
||||
RasterizerStorageGLES3::CanvasLightShadow *sb = storage->canvas_light_shadow_owner.get(light->shadow_buffer);
|
||||
if (sb) {
|
||||
glBindTexture(GL_TEXTURE_2D, sb->distance);
|
||||
//glBindTexture(GL_TEXTURE_2D,storage->resources.white_tex);
|
||||
draw_generic_textured_rect(Rect2(h, ofs, w - h * 2, h), Rect2(0, 0, 1, 1));
|
||||
ofs += h * 2;
|
||||
}
|
||||
|
@ -1677,19 +1672,7 @@ void RasterizerCanvasGLES3::canvas_light_shadow_buffer_update(RID p_buffer, cons
|
|||
} break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (i==0) {
|
||||
for(int i=0;i<cc->lines.size();i++) {
|
||||
Vector2 p = instance->xform_cache.xform(cc->lines.get(i));
|
||||
Plane pp(Vector3(p.x,p.y,0),1);
|
||||
pp.normal = light.xform(pp.normal);
|
||||
pp = projection.xform4(pp);
|
||||
print_line(itos(i)+": "+pp.normal/pp.d);
|
||||
//pp=light_mat.xform4(pp);
|
||||
//print_line(itos(i)+": "+pp.normal/pp.d);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
glBindVertexArray(cc->array_id);
|
||||
glDrawElements(GL_TRIANGLES, cc->len * 3, GL_UNSIGNED_SHORT, 0);
|
||||
|
||||
|
|
|
@ -436,8 +436,6 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
|
|||
continue;
|
||||
}
|
||||
|
||||
print_line("u - "+String(E->key())+" offset: "+itos(r_gen_code.uniform_offsets[E->get().order]));
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
|
|
@ -240,8 +240,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
|
|||
CharString code_globals;
|
||||
CharString material_string;
|
||||
|
||||
//print_line("code version? "+itos(conditional_version.code_version));
|
||||
|
||||
CustomCode *cc = NULL;
|
||||
|
||||
if (conditional_version.code_version > 0) {
|
||||
|
@ -743,13 +741,6 @@ void ShaderGLES3::set_custom_shader(uint32_t p_code_id) {
|
|||
|
||||
void ShaderGLES3::free_custom_shader(uint32_t p_code_id) {
|
||||
|
||||
/* if (! custom_code_map.has( p_code_id )) {
|
||||
print_line("no code id "+itos(p_code_id));
|
||||
} else {
|
||||
print_line("freed code id "+itos(p_code_id));
|
||||
|
||||
}*/
|
||||
|
||||
ERR_FAIL_COND(!custom_code_map.has(p_code_id));
|
||||
if (conditional_version.code_version == p_code_id)
|
||||
conditional_version.code_version = 0; //bye
|
||||
|
|
|
@ -271,7 +271,6 @@ static void _write_png_data(png_structp png_ptr, png_bytep data, png_size_t p_le
|
|||
v.resize(vs + p_length);
|
||||
PoolVector<uint8_t>::Write w = v.write();
|
||||
copymem(&w[vs], data, p_length);
|
||||
//print_line("png write: "+itos(p_length));
|
||||
}
|
||||
|
||||
static PoolVector<uint8_t> _lossless_pack_png(const Ref<Image> &p_image) {
|
||||
|
|
|
@ -31,11 +31,13 @@
|
|||
#ifdef WINDOWS_ENABLED
|
||||
|
||||
#include "file_access_windows.h"
|
||||
#include "os/os.h"
|
||||
#include "shlwapi.h"
|
||||
|
||||
#include "core/os/os.h"
|
||||
#include "core/print_string.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "print_string.h"
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <tchar.h>
|
||||
|
@ -133,11 +135,6 @@ void FileAccessWindows::close() {
|
|||
|
||||
if (save_path != "") {
|
||||
|
||||
//unlink(save_path.utf8().get_data());
|
||||
//print_line("renaming...");
|
||||
//_wunlink(save_path.c_str()); //unlink if exists
|
||||
//int rename_error = _wrename((save_path+".tmp").c_str(),save_path.c_str());
|
||||
|
||||
bool rename_error = true;
|
||||
int attempts = 4;
|
||||
while (rename_error && attempts) {
|
||||
|
@ -305,11 +302,10 @@ uint64_t FileAccessWindows::_get_modified_time(const String &p_file) {
|
|||
|
||||
return st.st_mtime;
|
||||
} else {
|
||||
print_line("no access to " + file);
|
||||
ERR_EXPLAIN("Failed to get modified time for: " + file);
|
||||
ERR_FAIL_V(0);
|
||||
}
|
||||
|
||||
ERR_FAIL_V(0);
|
||||
};
|
||||
}
|
||||
|
||||
FileAccessWindows::FileAccessWindows() {
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class AudioDriverXAudio2 : public AudioDriver {
|
|||
HANDLE buffer_end_event;
|
||||
XAudio2DriverVoiceCallback() :
|
||||
buffer_end_event(CreateEvent(NULL, FALSE, FALSE, NULL)) {}
|
||||
void STDMETHODCALLTYPE OnBufferEnd(void *pBufferContext) { /*print_line("buffer ended");*/
|
||||
void STDMETHODCALLTYPE OnBufferEnd(void *pBufferContext) {
|
||||
SetEvent(buffer_end_event);
|
||||
}
|
||||
|
||||
|
|
|
@ -974,8 +974,6 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant
|
|||
ofs += 0.001;
|
||||
}
|
||||
|
||||
print_line("inserting");
|
||||
|
||||
*get_block_animation_update_ptr() = true;
|
||||
get_undo_redo()->create_action("Add Audio Track Clip");
|
||||
get_undo_redo()->add_do_method(get_animation().ptr(), "audio_track_insert_key", get_track(), ofs, stream);
|
||||
|
@ -1124,7 +1122,6 @@ Rect2 AnimationTrackEditTypeAnimation::get_key_rect(int p_index, float p_pixels_
|
|||
}
|
||||
|
||||
String anim = get_animation()->animation_track_get_key_animation(get_track(), p_index);
|
||||
print_line("anim " + anim + " has " + itos(ap->has_animation(anim)));
|
||||
|
||||
if (anim != "[stop]" && ap->has_animation(anim)) {
|
||||
|
||||
|
|
|
@ -717,7 +717,6 @@ void CodeTextEditor::_complete_request() {
|
|||
if (code_complete_func) {
|
||||
code_complete_func(code_complete_ud, ctext, &entries, forced);
|
||||
}
|
||||
// print_line("COMPLETE: "+p_request);
|
||||
if (entries.size() == 0)
|
||||
return;
|
||||
Vector<String> strs;
|
||||
|
|
|
@ -336,12 +336,9 @@ void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) {
|
|||
for (int i = 0; i < efsd->get_file_count(); i++) {
|
||||
|
||||
Vector<String> deps = efsd->get_file_deps(i);
|
||||
//print_line(":::"+efsd->get_file_path(i));
|
||||
bool found = false;
|
||||
for (int j = 0; j < deps.size(); j++) {
|
||||
//print_line("\t"+deps[j]+" vs "+editing);
|
||||
if (deps[j] == editing) {
|
||||
//print_line("found");
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
@ -510,7 +507,7 @@ void DependencyRemoveDialog::ok_pressed() {
|
|||
res->set_path("");
|
||||
}
|
||||
String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/");
|
||||
print_line("Moving to trash: " + path);
|
||||
print_verbose("Moving to trash: " + path);
|
||||
Error err = OS::get_singleton()->move_to_trash(path);
|
||||
if (err != OK) {
|
||||
EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + files_to_delete[i] + "\n");
|
||||
|
@ -525,7 +522,7 @@ void DependencyRemoveDialog::ok_pressed() {
|
|||
|
||||
for (int i = 0; i < dirs_to_delete.size(); ++i) {
|
||||
String path = OS::get_singleton()->get_resource_dir() + dirs_to_delete[i].replace_first("res://", "/");
|
||||
print_line("Moving to trash: " + path);
|
||||
print_verbose("Moving to trash: " + path);
|
||||
Error err = OS::get_singleton()->move_to_trash(path);
|
||||
if (err != OK) {
|
||||
EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + dirs_to_delete[i] + "\n");
|
||||
|
@ -673,7 +670,6 @@ bool OrphanResourcesDialog::_fill_owners(EditorFileSystemDirectory *efsd, HashMa
|
|||
|
||||
if (!p_parent) {
|
||||
Vector<String> deps = efsd->get_file_deps(i);
|
||||
//print_line(":::"+efsd->get_file_path(i));
|
||||
for (int j = 0; j < deps.size(); j++) {
|
||||
|
||||
if (!refs.has(deps[j])) {
|
||||
|
|
|
@ -792,7 +792,6 @@ Error DocData::_load(Ref<XMLParser> parser) {
|
|||
class_list[name] = ClassDoc();
|
||||
ClassDoc &c = class_list[name];
|
||||
|
||||
//print_line("class: "+name);
|
||||
c.name = name;
|
||||
if (parser->has_attribute("inherits"))
|
||||
c.inherits = parser->get_attribute_value("inherits");
|
||||
|
|
|
@ -172,7 +172,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
|
|||
parent = root;
|
||||
} else {
|
||||
String ppath = path.substr(0, pp);
|
||||
print_line("PPATH IS: " + ppath);
|
||||
ERR_CONTINUE(!dir_map.has(ppath));
|
||||
parent = dir_map[ppath];
|
||||
}
|
||||
|
|
|
@ -482,10 +482,8 @@ void EditorAudioBus::drop_data(const Point2 &p_point, const Variant &p_data) {
|
|||
|
||||
Variant EditorAudioBus::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
|
||||
|
||||
print_line("drag fw");
|
||||
TreeItem *item = effects->get_item_at_position(p_point);
|
||||
if (!item) {
|
||||
print_line("no item");
|
||||
return Variant();
|
||||
}
|
||||
|
||||
|
|
|
@ -1486,8 +1486,6 @@ void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, con
|
|||
return;
|
||||
}
|
||||
|
||||
print_line("exporting " + p_path);
|
||||
|
||||
bool convert = GLOBAL_GET("editor/convert_text_resources_to_binary_on_export");
|
||||
if (!convert)
|
||||
return;
|
||||
|
|
|
@ -1907,8 +1907,6 @@ void EditorHelpBit::_go_to_help(String p_what) {
|
|||
|
||||
void EditorHelpBit::_meta_clicked(String p_select) {
|
||||
|
||||
print_line("got meta " + p_select);
|
||||
|
||||
if (p_select.begins_with("$")) { //enum
|
||||
|
||||
String select = p_select.substr(1, p_select.length());
|
||||
|
|
|
@ -104,14 +104,12 @@ Vector<Ref<Texture> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>
|
|||
continue;
|
||||
}
|
||||
AABB aabb = mesh->get_aabb();
|
||||
print_line("aabb: " + aabb);
|
||||
Vector3 ofs = aabb.position + aabb.size * 0.5;
|
||||
aabb.position -= ofs;
|
||||
Transform xform;
|
||||
xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.25);
|
||||
xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.25) * xform.basis;
|
||||
AABB rot_aabb = xform.xform(aabb);
|
||||
print_line("rot_aabb: " + rot_aabb);
|
||||
float m = MAX(rot_aabb.size.x, rot_aabb.size.y) * 0.5;
|
||||
if (m == 0) {
|
||||
textures.push_back(Ref<Texture>());
|
||||
|
@ -119,7 +117,6 @@ Vector<Ref<Texture> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>
|
|||
}
|
||||
m = 1.0 / m;
|
||||
m *= 0.5;
|
||||
print_line("scale: " + rtos(m));
|
||||
xform.basis.scale(Vector3(m, m, m));
|
||||
xform.origin = -xform.basis.xform(ofs); //-ofs*m;
|
||||
xform.origin.z -= rot_aabb.size.z * 2;
|
||||
|
@ -133,7 +130,6 @@ Vector<Ref<Texture> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>
|
|||
Ref<ImageTexture> it(memnew(ImageTexture));
|
||||
it->create_from_image(img);
|
||||
|
||||
//print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height()));
|
||||
VS::get_singleton()->free(inst);
|
||||
|
||||
textures.push_back(it);
|
||||
|
|
|
@ -344,7 +344,6 @@ void EditorProfiler::_update_plot() {
|
|||
}
|
||||
|
||||
time = OS::get_singleton()->get_ticks_usec() - time;
|
||||
//print_line("Taken: "+rtos(USEC_TO_SEC(time)));
|
||||
}
|
||||
|
||||
wr = PoolVector<uint8_t>::Write();
|
||||
|
|
|
@ -152,8 +152,6 @@ Ref<Texture> EditorResourcePreview::_generate_preview(const QueueItem &p_item, c
|
|||
f->store_line(itos(FileAccess::get_modified_time(p_item.path)));
|
||||
f->store_line(FileAccess::get_md5(p_item.path));
|
||||
memdelete(f);
|
||||
} else {
|
||||
//print_line("was not generated");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
|
|||
|
||||
const VariantContainer *v = props.getptr(p_name);
|
||||
if (!v) {
|
||||
print_line("EditorSettings::_get - Warning, not found: " + String(p_name));
|
||||
WARN_PRINTS("EditorSettings::_get - Property not found: " + String(p_name));
|
||||
return false;
|
||||
}
|
||||
r_ret = v->variant;
|
||||
|
|
|
@ -238,7 +238,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
|
|||
|
||||
clock_t end_time = clock();
|
||||
#else
|
||||
print_line("Sorry no icons for you");
|
||||
print_line("SVG support disabled, editor icons won't be rendered.");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -34,9 +34,10 @@
|
|||
#include "io/marshalls.h"
|
||||
|
||||
//#define DEBUG_PRINT(m_p) print_line(m_p)
|
||||
#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec());
|
||||
//#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec());
|
||||
|
||||
//#define DEBUG_TIME(m_what)
|
||||
#define DEBUG_PRINT(m_what)
|
||||
#define DEBUG_TIME(m_what)
|
||||
|
||||
void EditorFileServer::_close_client(ClientData *cd) {
|
||||
|
||||
|
@ -107,7 +108,6 @@ void EditorFileServer::_subthread_start(void *s) {
|
|||
|
||||
//wait for ID
|
||||
err = cd->connection->get_data(buf4, 4);
|
||||
//#define DEBUG_PRINT(m_p) print_line(m_p)
|
||||
DEBUG_TIME("get_data")
|
||||
|
||||
if (err != OK) {
|
||||
|
@ -150,13 +150,13 @@ void EditorFileServer::_subthread_start(void *s) {
|
|||
s.parse_utf8(fileutf8.ptr());
|
||||
|
||||
if (cmd == FileAccessNetwork::COMMAND_FILE_EXISTS) {
|
||||
print_line("FILE EXISTS: " + s);
|
||||
DEBUG_PRINT("FILE EXISTS: " + s);
|
||||
}
|
||||
if (cmd == FileAccessNetwork::COMMAND_GET_MODTIME) {
|
||||
print_line("MOD TIME: " + s);
|
||||
DEBUG_PRINT("MOD TIME: " + s);
|
||||
}
|
||||
if (cmd == FileAccessNetwork::COMMAND_OPEN_FILE) {
|
||||
print_line("OPEN: " + s);
|
||||
DEBUG_PRINT("OPEN: " + s);
|
||||
}
|
||||
|
||||
if (!s.begins_with("res://")) {
|
||||
|
@ -243,7 +243,7 @@ void EditorFileServer::_subthread_start(void *s) {
|
|||
int read = cd->files[id]->get_buffer(buf.ptrw(), blocklen);
|
||||
ERR_CONTINUE(read < 0);
|
||||
|
||||
print_line("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen));
|
||||
DEBUG_PRINT("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen));
|
||||
|
||||
//not found, continue
|
||||
encode_uint32(id, buf4);
|
||||
|
@ -259,7 +259,7 @@ void EditorFileServer::_subthread_start(void *s) {
|
|||
} break;
|
||||
case FileAccessNetwork::COMMAND_CLOSE: {
|
||||
|
||||
print_line("CLOSED");
|
||||
DEBUG_PRINT("CLOSED");
|
||||
ERR_CONTINUE(!cd->files.has(id));
|
||||
memdelete(cd->files[id]);
|
||||
cd->files.erase(id);
|
||||
|
|
|
@ -809,7 +809,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_
|
|||
}
|
||||
|
||||
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
print_line("Moving " + old_path + " -> " + new_path);
|
||||
print_verbose("Moving " + old_path + " -> " + new_path);
|
||||
Error err = da->rename(old_path, new_path);
|
||||
if (err == OK) {
|
||||
//Move/Rename any corresponding import settings too
|
||||
|
@ -837,7 +837,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_
|
|||
//Only treat as a changed dependency if it was successfully moved
|
||||
for (int i = 0; i < file_changed_paths.size(); ++i) {
|
||||
p_file_renames[file_changed_paths[i]] = file_changed_paths[i].replace_first(old_path, new_path);
|
||||
print_line(" Remap: " + file_changed_paths[i] + " -> " + p_file_renames[file_changed_paths[i]]);
|
||||
print_verbose(" Remap: " + file_changed_paths[i] + " -> " + p_file_renames[file_changed_paths[i]]);
|
||||
}
|
||||
for (int i = 0; i < folder_changed_paths.size(); ++i) {
|
||||
p_folder_renames[folder_changed_paths[i]] = folder_changed_paths[i].replace_first(old_path, new_path);
|
||||
|
@ -865,7 +865,7 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin
|
|||
}
|
||||
|
||||
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
print_line("Duplicating " + old_path + " -> " + new_path);
|
||||
print_verbose("Duplicating " + old_path + " -> " + new_path);
|
||||
Error err = p_item.is_file ? da->copy(old_path, new_path) : da->copy_dir(old_path, new_path);
|
||||
if (err == OK) {
|
||||
//Move/Rename any corresponding import settings too
|
||||
|
@ -942,7 +942,7 @@ void FileSystemDock::_update_dependencies_after_move(const Map<String, String> &
|
|||
for (int i = 0; i < remaps.size(); ++i) {
|
||||
//Because we haven't called a rescan yet the found remap might still be an old path itself.
|
||||
String file = p_renames.has(remaps[i]) ? p_renames[remaps[i]] : remaps[i];
|
||||
print_line("Remapping dependencies for: " + file);
|
||||
print_verbose("Remapping dependencies for: " + file);
|
||||
Error err = ResourceLoader::rename_dependencies(file, p_renames);
|
||||
if (err == OK) {
|
||||
if (ResourceLoader::get_resource_type(file) == "PackedScene")
|
||||
|
@ -998,7 +998,7 @@ void FileSystemDock::_make_dir_confirm() {
|
|||
return;
|
||||
}
|
||||
|
||||
print_line("Making folder " + dir_name + " in " + path);
|
||||
print_verbose("Making folder " + dir_name + " in " + path);
|
||||
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
Error err = da->change_dir(path);
|
||||
if (err == OK) {
|
||||
|
@ -1007,7 +1007,7 @@ void FileSystemDock::_make_dir_confirm() {
|
|||
memdelete(da);
|
||||
|
||||
if (err == OK) {
|
||||
print_line("call rescan!");
|
||||
print_verbose("FileSystem: calling rescan.");
|
||||
_rescan();
|
||||
} else {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Could not create folder."));
|
||||
|
@ -1054,7 +1054,7 @@ void FileSystemDock::_rename_operation_confirm() {
|
|||
_update_favorite_dirs_list_after_move(folder_renames);
|
||||
|
||||
//Rescan everything
|
||||
print_line("call rescan!");
|
||||
print_verbose("FileSystem: calling rescan.");
|
||||
_rescan();
|
||||
}
|
||||
|
||||
|
@ -1089,7 +1089,7 @@ void FileSystemDock::_duplicate_operation_confirm() {
|
|||
_try_duplicate_item(to_duplicate, new_path);
|
||||
|
||||
//Rescan everything
|
||||
print_line("call rescan!");
|
||||
print_verbose("FileSystem: calling rescan.");
|
||||
_rescan();
|
||||
}
|
||||
|
||||
|
@ -1146,7 +1146,7 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool overw
|
|||
_update_project_settings_after_move(file_renames);
|
||||
_update_favorite_dirs_list_after_move(folder_renames);
|
||||
|
||||
print_line("call rescan!");
|
||||
print_verbose("FileSystem: calling rescan.");
|
||||
_rescan();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,12 +123,12 @@ void FindInFiles::_notification(int p_notification) {
|
|||
|
||||
void FindInFiles::start() {
|
||||
if (_pattern == "") {
|
||||
print_line("Nothing to search, pattern is empty");
|
||||
print_verbose("Nothing to search, pattern is empty");
|
||||
emit_signal(SIGNAL_FINISHED);
|
||||
return;
|
||||
}
|
||||
if (_extension_filter.size() == 0) {
|
||||
print_line("Nothing to search, filter matches no files");
|
||||
print_verbose("Nothing to search, filter matches no files");
|
||||
emit_signal(SIGNAL_FINISHED);
|
||||
return;
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ void FindInFiles::_iterate() {
|
|||
_scan_file(fpath);
|
||||
|
||||
} else {
|
||||
print_line("Search complete");
|
||||
print_verbose("Search complete");
|
||||
set_process(false);
|
||||
_current_dir = "";
|
||||
_searching = false;
|
||||
|
@ -226,7 +226,7 @@ void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) {
|
|||
|
||||
DirAccess *dir = DirAccess::open(path);
|
||||
if (dir == NULL) {
|
||||
print_line("Cannot open directory! " + path);
|
||||
print_verbose("Cannot open directory! " + path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ void FindInFiles::_scan_file(String fpath) {
|
|||
|
||||
FileAccess *f = FileAccess::open(fpath, FileAccess::READ);
|
||||
if (f == NULL) {
|
||||
print_line(String("Cannot open file ") + fpath);
|
||||
print_verbose(String("Cannot open file ") + fpath);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -896,7 +896,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result>
|
|||
int _;
|
||||
if (!find_next(line, search_text, repl_begin, _finder->is_match_case(), _finder->is_whole_words(), _, _)) {
|
||||
// Make sure the replace is still valid in case the file was tampered with.
|
||||
print_line(String("Occurrence no longer matches, replace will be ignored in {0}: line {1}, col {2}").format(varray(fpath, repl_line_number, repl_begin)));
|
||||
print_verbose(String("Occurrence no longer matches, replace will be ignored in {0}: line {1}, col {2}").format(varray(fpath, repl_line_number, repl_begin)));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,6 @@ Error ColladaImport::_populate_skeleton(Skeleton *p_skeleton, Collada::Node *p_n
|
|||
|
||||
Collada::NodeJoint *joint = static_cast<Collada::NodeJoint *>(p_node);
|
||||
|
||||
print_line("populating joint " + joint->name);
|
||||
p_skeleton->add_bone(p_node->name);
|
||||
if (p_parent >= 0)
|
||||
p_skeleton->set_bone_parent(r_bone, p_parent);
|
||||
|
@ -137,8 +136,7 @@ Error ColladaImport::_populate_skeleton(Skeleton *p_skeleton, Collada::Node *p_n
|
|||
p_skeleton->set_bone_rest(r_bone, collada.fix_transform(collada.state.bone_rest_map[joint->sid]));
|
||||
//should map this bone to something for animation?
|
||||
} else {
|
||||
print_line("no rest: " + joint->sid);
|
||||
WARN_PRINT("Joint has no rest...");
|
||||
WARN_PRINT("Collada: Joint has no rest.");
|
||||
}
|
||||
|
||||
int id = r_bone++;
|
||||
|
@ -585,9 +583,6 @@ static void _generate_tangents_and_binormals(const PoolVector<int> &p_indices, c
|
|||
binormals.write[index_arrayr[idx * 3 + 1]] += binormal;
|
||||
tangents.write[index_arrayr[idx * 3 + 2]] += tangent;
|
||||
binormals.write[index_arrayr[idx * 3 + 2]] += binormal;
|
||||
|
||||
//print_line(itos(idx)+" tangent: "+tangent);
|
||||
//print_line(itos(idx)+" binormal: "+binormal);
|
||||
}
|
||||
|
||||
r_tangents.resize(vlen * 4);
|
||||
|
@ -1028,7 +1023,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
|
|||
material = material_cache[target];
|
||||
|
||||
} else if (p.material != "") {
|
||||
print_line("Warning, unreferenced material in geometry instance: " + p.material);
|
||||
WARN_PRINTS("Collada: Unreferenced material in geometry instance: " + p.material);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1352,7 +1347,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
|
|||
mesh_cache[meshid] = mesh;
|
||||
} else {
|
||||
|
||||
print_line("Warning, will not import geometry: " + meshid);
|
||||
WARN_PRINTS("Collada: Will not import geometry: " + meshid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1379,7 +1374,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
|
|||
|
||||
mi->set_surface_material(i, material);
|
||||
} else if (matname != "") {
|
||||
print_line("Warning, unreferenced material in geometry instance: " + matname);
|
||||
WARN_PRINTS("Collada: Unreferenced material in geometry instance: " + matname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1541,7 +1536,6 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_im
|
|||
for (int i = 0; i < collada.state.animation_tracks.size(); i++) {
|
||||
|
||||
const Collada::AnimationTrack &at = collada.state.animation_tracks[i];
|
||||
//print_line("CHANNEL: "+at.target+" PARAM: "+at.param);
|
||||
|
||||
String node;
|
||||
|
||||
|
@ -1551,7 +1545,7 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_im
|
|||
|
||||
node = node_name_map[at.target];
|
||||
} else {
|
||||
print_line("Couldn't find node: " + at.target);
|
||||
WARN_PRINTS("Collada: Couldn't find node: " + at.target);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
|
@ -1570,7 +1564,6 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_im
|
|||
}
|
||||
|
||||
create_animation(-1, p_make_tracks_in_all_bones, p_import_value_tracks);
|
||||
//print_line("clipcount: "+itos(collada.state.animation_clips.size()));
|
||||
for (int i = 0; i < collada.state.animation_clips.size(); i++)
|
||||
create_animation(i, p_make_tracks_in_all_bones, p_import_value_tracks);
|
||||
}
|
||||
|
@ -1580,11 +1573,8 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
|
|||
Ref<Animation> animation = Ref<Animation>(memnew(Animation));
|
||||
|
||||
if (p_clip == -1) {
|
||||
|
||||
//print_line("default");
|
||||
animation->set_name("default");
|
||||
} else {
|
||||
//print_line("clip name: "+collada.state.animation_clips[p_clip].name);
|
||||
animation->set_name(collada.state.animation_clips[p_clip].name);
|
||||
}
|
||||
|
||||
|
@ -1658,7 +1648,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
|
|||
}
|
||||
}
|
||||
|
||||
//print_line("anim len: "+rtos(anim_length));
|
||||
animation->set_length(anim_length);
|
||||
|
||||
bool tracks_found = false;
|
||||
|
@ -1736,7 +1725,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
|
|||
}
|
||||
|
||||
if (xform_idx == -1) {
|
||||
print_line("couldn't find matching node " + at.target + " xform for track " + at.param);
|
||||
WARN_PRINTS("Collada: Couldn't find matching node " + at.target + " xform for track " + at.param);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1758,14 +1747,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
|
|||
ERR_CONTINUE(data.size() > 1);
|
||||
xf.data.write[cn] = data[0];
|
||||
} else if (data.size() == xf.data.size()) {
|
||||
|
||||
xf.data = data;
|
||||
} else {
|
||||
|
||||
if (data.size() != xf.data.size()) {
|
||||
print_line("component " + at.component + " datasize " + itos(data.size()) + " xfdatasize " + itos(xf.data.size()));
|
||||
}
|
||||
|
||||
ERR_EXPLAIN("Component " + at.component + " has datasize " + itos(data.size()) + ", xfdatasize " + itos(xf.data.size()));
|
||||
ERR_CONTINUE(data.size() != xf.data.size());
|
||||
}
|
||||
}
|
||||
|
@ -1781,7 +1765,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
|
|||
xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform;
|
||||
} else {
|
||||
|
||||
ERR_PRINT("INVALID SKELETON!!!!");
|
||||
ERR_PRINT("Collada: Invalid skeleton");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1812,8 +1796,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
|
|||
if (E->get())
|
||||
continue;
|
||||
|
||||
//print_line("BONE LACKS ANIM: "+E->key());
|
||||
|
||||
NodeMap &nm = node_map[E->key()];
|
||||
String path = scene->get_path_to(nm.node);
|
||||
ERR_CONTINUE(nm.bone < 0);
|
||||
|
@ -1823,7 +1805,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
|
|||
|
||||
Collada::Node *cn = collada.state.scene_map[E->key()];
|
||||
if (cn->ignore_anim) {
|
||||
print_line("warning, ignoring animation on node: " + path);
|
||||
WARN_PRINTS("Collada: Ignoring animation on node: " + path);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1889,10 +1871,9 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
|
|||
|
||||
} else if (data.size() == 16) {
|
||||
//matrix
|
||||
print_line("value keys for matrices not supported");
|
||||
WARN_PRINT("Collada: Value keys for matrices not supported.");
|
||||
} else {
|
||||
|
||||
print_line("don't know what to do with this amount of value keys: " + itos(data.size()));
|
||||
WARN_PRINTS("Collada: Unexpected amount of value keys: " + itos(data.size()));
|
||||
}
|
||||
|
||||
animation->track_insert_key(track, time, value);
|
||||
|
@ -1994,7 +1975,6 @@ Ref<Animation> EditorSceneImporterCollada::import_animation(const String &p_path
|
|||
if (state.animations.size() == 0)
|
||||
return Ref<Animation>();
|
||||
Ref<Animation> anim = state.animations[0];
|
||||
print_line("Anim Load OK");
|
||||
String base = p_path.get_basename().to_lower();
|
||||
if (p_flags & IMPORT_ANIMATION_DETECT_LOOP) {
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ Error EditorSceneImporterGLTF::_parse_buffers(GLTFState &state, const String &p_
|
|||
}
|
||||
}
|
||||
|
||||
print_line("total buffers: " + itos(state.buffers.size()));
|
||||
print_verbose("glTF: Total buffers: " + itos(state.buffers.size()));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ Error EditorSceneImporterGLTF::_parse_buffer_views(GLTFState &state) {
|
|||
state.buffer_views.push_back(buffer_view);
|
||||
}
|
||||
|
||||
print_line("total buffer views: " + itos(state.buffer_views.size()));
|
||||
print_verbose("glTF: Total buffer views: " + itos(state.buffer_views.size()));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ Error EditorSceneImporterGLTF::_parse_accessors(GLTFState &state) {
|
|||
state.accessors.push_back(accessor);
|
||||
}
|
||||
|
||||
print_line("total accessors: " + itos(state.accessors.size()));
|
||||
print_verbose("glTF: Total accessors: " + itos(state.accessors.size()));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -501,8 +501,8 @@ Error EditorSceneImporterGLTF::_decode_buffer_view(GLTFState &state, int p_buffe
|
|||
const uint8_t *bufptr = buffer.ptr();
|
||||
|
||||
//use to debug
|
||||
//print_line("type " + _get_type_name(type) + " component type: " + _get_component_type_name(component_type) + " stride: " + itos(stride) + " amount " + itos(count));
|
||||
print_line("accessor offset" + itos(byte_offset) + " view offset: " + itos(bv.byte_offset) + " total buffer len: " + itos(buffer.size()) + " view len " + itos(bv.byte_length));
|
||||
print_verbose("glTF: type " + _get_type_name(type) + " component type: " + _get_component_type_name(component_type) + " stride: " + itos(stride) + " amount " + itos(count));
|
||||
print_verbose("glTF: accessor offset" + itos(byte_offset) + " view offset: " + itos(bv.byte_offset) + " total buffer len: " + itos(buffer.size()) + " view len " + itos(bv.byte_length));
|
||||
|
||||
int buffer_end = (stride * (count - 1)) + element_size;
|
||||
ERR_FAIL_COND_V(buffer_end > bv.byte_length, ERR_PARSE_ERROR);
|
||||
|
@ -853,7 +853,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
|
|||
Array meshes = state.json["meshes"];
|
||||
for (int i = 0; i < meshes.size(); i++) {
|
||||
|
||||
print_line("on mesh: " + itos(i));
|
||||
print_verbose("glTF: Parsing mesh: " + itos(i));
|
||||
Dictionary d = meshes[i];
|
||||
|
||||
GLTFMesh mesh;
|
||||
|
@ -935,7 +935,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
|
|||
w[j + 3] /= total;
|
||||
}
|
||||
|
||||
//print_line(itos(j / 4) + ": " + itos(r[j + 0]) + ":" + rtos(w[j + 0]) + ", " + itos(r[j + 1]) + ":" + rtos(w[j + 1]) + ", " + itos(r[j + 2]) + ":" + rtos(w[j + 2]) + ", " + itos(r[j + 3]) + ":" + rtos(w[j + 3]));
|
||||
//print_verbose(itos(j / 4) + ": " + itos(r[j + 0]) + ":" + rtos(w[j + 0]) + ", " + itos(r[j + 1]) + ":" + rtos(w[j + 1]) + ", " + itos(r[j + 2]) + ":" + rtos(w[j + 2]) + ", " + itos(r[j + 3]) + ":" + rtos(w[j + 3]));
|
||||
}
|
||||
}
|
||||
array[Mesh::ARRAY_WEIGHTS] = weights;
|
||||
|
@ -996,7 +996,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
|
|||
Array morphs;
|
||||
//blend shapes
|
||||
if (p.has("targets")) {
|
||||
print_line("has targets!");
|
||||
print_verbose("glTF: Mesh has targets");
|
||||
Array targets = p["targets"];
|
||||
|
||||
if (j == 0) {
|
||||
|
@ -1091,7 +1091,7 @@ Error EditorSceneImporterGLTF::_parse_meshes(GLTFState &state) {
|
|||
state.meshes.push_back(mesh);
|
||||
}
|
||||
|
||||
print_line("total meshes: " + itos(state.meshes.size()));
|
||||
print_verbose("glTF: Total meshes: " + itos(state.meshes.size()));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -1183,7 +1183,7 @@ Error EditorSceneImporterGLTF::_parse_images(GLTFState &state, const String &p_b
|
|||
ERR_FAIL_V(ERR_FILE_CORRUPT);
|
||||
}
|
||||
|
||||
print_line("total images: " + itos(state.images.size()));
|
||||
print_verbose("Total images: " + itos(state.images.size()));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -1338,7 +1338,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) {
|
|||
state.materials.push_back(material);
|
||||
}
|
||||
|
||||
print_line("total materials: " + itos(state.materials.size()));
|
||||
print_verbose("Total materials: " + itos(state.materials.size()));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -1381,12 +1381,11 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
|
|||
skin.bones.push_back(bone);
|
||||
}
|
||||
|
||||
print_line("skin has skeleton? " + itos(d.has("skeleton")));
|
||||
print_verbose("glTF: Skin has skeleton? " + itos(d.has("skeleton")));
|
||||
if (d.has("skeleton")) {
|
||||
int skeleton = d["skeleton"];
|
||||
ERR_FAIL_INDEX_V(skeleton, state.nodes.size(), ERR_PARSE_ERROR);
|
||||
//state.nodes[skeleton]->skeleton_skin = state.skins.size();
|
||||
print_line("setting skeleton skin to" + itos(skeleton));
|
||||
print_verbose("glTF: Setting skeleton skin to" + itos(skeleton));
|
||||
skin.skeleton = skeleton;
|
||||
if (!state.skeleton_nodes.has(skeleton)) {
|
||||
state.skeleton_nodes[skeleton] = Vector<int>();
|
||||
|
@ -1443,7 +1442,7 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
|
|||
*/
|
||||
state.skins.push_back(skin);
|
||||
}
|
||||
print_line("total skins: " + itos(state.skins.size()));
|
||||
print_verbose("glTF: Total skins: " + itos(state.skins.size()));
|
||||
|
||||
//now
|
||||
|
||||
|
@ -1496,7 +1495,7 @@ Error EditorSceneImporterGLTF::_parse_cameras(GLTFState &state) {
|
|||
state.cameras.push_back(camera);
|
||||
}
|
||||
|
||||
print_line("total cameras: " + itos(state.cameras.size()));
|
||||
print_verbose("glTF: Total cameras: " + itos(state.cameras.size()));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -1574,7 +1573,6 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
|
|||
}
|
||||
}
|
||||
|
||||
print_line("path: " + path);
|
||||
PoolVector<float> times = _decode_accessor_as_floats(state, input, false);
|
||||
if (path == "translation") {
|
||||
PoolVector<Vector3> translations = _decode_accessor_as_vec3(state, output, false);
|
||||
|
@ -1624,7 +1622,7 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
|
|||
state.animations.push_back(animation);
|
||||
}
|
||||
|
||||
print_line("total animations: " + itos(state.animations.size()));
|
||||
print_verbose("glTF: Total animations: " + itos(state.animations.size()));
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -1656,7 +1654,7 @@ void EditorSceneImporterGLTF::_generate_node(GLTFState &state, int p_node, Node
|
|||
if (n->mesh >= 0) {
|
||||
ERR_FAIL_INDEX(n->mesh, state.meshes.size());
|
||||
MeshInstance *mi = memnew(MeshInstance);
|
||||
print_line("**creating mesh for: " + n->name);
|
||||
print_verbose("glTF: Creating mesh for: " + n->name);
|
||||
GLTFMesh &mesh = state.meshes.write[n->mesh];
|
||||
mi->set_mesh(mesh.mesh);
|
||||
if (mesh.mesh->get_name() == "") {
|
||||
|
|
|
@ -63,7 +63,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati
|
|||
material_map[current_name] = current;
|
||||
} else if (l.begins_with("Ka ")) {
|
||||
//uv
|
||||
print_line("Warning: Ambient light for material '" + current_name + "' is ignored in PBR");
|
||||
WARN_PRINTS("OBJ: Ambient light for material '" + current_name + "' is ignored in PBR");
|
||||
|
||||
} else if (l.begins_with("Kd ")) {
|
||||
//normal
|
||||
|
@ -119,7 +119,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Spati
|
|||
|
||||
} else if (l.begins_with("map_Ka ")) {
|
||||
//uv
|
||||
print_line("Warning: Ambient light texture for material '" + current_name + "' is ignored in PBR");
|
||||
WARN_PRINTS("OBJ: Ambient light texture for material '" + current_name + "' is ignored in PBR");
|
||||
|
||||
} else if (l.begins_with("map_Kd ")) {
|
||||
//normal
|
||||
|
@ -335,8 +335,8 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p
|
|||
|
||||
surf_tool->index();
|
||||
|
||||
print_line("current material library " + current_material_library + " has " + itos(material_map.has(current_material_library)));
|
||||
print_line("current material " + current_material + " has " + itos(material_map.has(current_material_library) && material_map[current_material_library].has(current_material)));
|
||||
print_verbose("OBJ: Current material library " + current_material_library + " has " + itos(material_map.has(current_material_library)));
|
||||
print_verbose("OBJ: Current material " + current_material + " has " + itos(material_map.has(current_material_library) && material_map[current_material_library].has(current_material)));
|
||||
|
||||
if (material_map.has(current_material_library) && material_map[current_material_library].has(current_material)) {
|
||||
surf_tool->set_material(material_map[current_material_library][current_material]);
|
||||
|
@ -350,7 +350,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p
|
|||
mesh->surface_set_name(mesh->get_surface_count() - 1, current_group);
|
||||
}
|
||||
|
||||
print_line("Added surface :" + mesh->surface_get_name(mesh->get_surface_count() - 1));
|
||||
print_verbose("OBJ: Added surface :" + mesh->surface_get_name(mesh->get_surface_count() - 1));
|
||||
surf_tool->clear();
|
||||
surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES);
|
||||
}
|
||||
|
|
|
@ -281,12 +281,11 @@ static String _fixstr(const String &p_what, const String &p_str) {
|
|||
|
||||
Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<ArrayMesh>, Ref<Shape> > &collision_map, LightBakeMode p_light_bake_mode) {
|
||||
|
||||
// children first..
|
||||
// children first
|
||||
for (int i = 0; i < p_node->get_child_count(); i++) {
|
||||
|
||||
Node *r = _fix_node(p_node->get_child(i), p_root, collision_map, p_light_bake_mode);
|
||||
if (!r) {
|
||||
print_line("was erased...");
|
||||
i--; //was erased
|
||||
}
|
||||
}
|
||||
|
@ -391,7 +390,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
|
|||
colshape->set_owner(p_node->get_owner());
|
||||
} else if (p_node->has_meta("empty_draw_type")) {
|
||||
String empty_draw_type = String(p_node->get_meta("empty_draw_type"));
|
||||
print_line(empty_draw_type);
|
||||
StaticBody *sb = memnew(StaticBody);
|
||||
sb->set_name(_fixstr(name, "colonly"));
|
||||
Object::cast_to<Spatial>(sb)->set_transform(Object::cast_to<Spatial>(p_node)->get_transform());
|
||||
|
@ -723,15 +721,11 @@ void ResourceImporterScene::_filter_anim_tracks(Ref<Animation> anim, Set<String>
|
|||
Ref<Animation> a = anim;
|
||||
ERR_FAIL_COND(!a.is_valid());
|
||||
|
||||
print_line("From Anim " + anim->get_name() + ":");
|
||||
|
||||
for (int j = 0; j < a->get_track_count(); j++) {
|
||||
|
||||
String path = a->track_get_path(j);
|
||||
|
||||
if (!keep.has(path)) {
|
||||
|
||||
print_line("Remove: " + path);
|
||||
a->remove_track(j);
|
||||
j--;
|
||||
}
|
||||
|
@ -899,8 +893,6 @@ void ResourceImporterScene::_find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Trans
|
|||
}
|
||||
|
||||
meshes[mesh] = transform;
|
||||
|
||||
print_line("mesh transform: " + meshes[mesh]);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < p_node->get_child_count(); i++) {
|
||||
|
@ -913,8 +905,6 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String
|
|||
|
||||
List<PropertyInfo> pi;
|
||||
|
||||
print_line("node: " + String(p_node->get_name()));
|
||||
|
||||
if (p_make_animations) {
|
||||
if (Object::cast_to<AnimationPlayer>(p_node)) {
|
||||
AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
|
||||
|
@ -1316,7 +1306,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
|
|||
if (bool(p_options["external_files/store_in_subdir"])) {
|
||||
String subdir_name = p_source_file.get_file().get_basename();
|
||||
DirAccess *da = DirAccess::open(base_path);
|
||||
print_line("at path " + da->get_current_dir() + " making " + subdir_name);
|
||||
Error err = da->make_dir(subdir_name);
|
||||
memdelete(da);
|
||||
ERR_FAIL_COND_V(err != OK && err != ERR_ALREADY_EXISTS, err);
|
||||
|
@ -1421,7 +1410,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
|
|||
|
||||
Ref<PackedScene> packer = memnew(PackedScene);
|
||||
packer->pack(scene);
|
||||
print_line("SAVING TO: " + p_save_path + ".scn");
|
||||
print_verbose("Saving scene to: " + p_save_path + ".scn");
|
||||
err = ResourceSaver::save(p_save_path + ".scn", packer); //do not take over, let the changed files reload themselves
|
||||
ERR_FAIL_COND_V(err != OK, err);
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
|
|||
/*print_line("chunksize: "+itos(chunksize));
|
||||
print_line("channels: "+itos(format_channels));
|
||||
print_line("bits: "+itos(format_bits));
|
||||
*/
|
||||
*/
|
||||
|
||||
int len = frames;
|
||||
if (format_channels == 2)
|
||||
|
@ -293,6 +293,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
|
|||
bool is16 = format_bits != 8;
|
||||
int rate = format_freq;
|
||||
|
||||
/*
|
||||
print_line("Input Sample: ");
|
||||
print_line("\tframes: " + itos(frames));
|
||||
print_line("\tformat_channels: " + itos(format_channels));
|
||||
|
@ -301,18 +302,16 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
|
|||
print_line("\tloop: " + itos(loop));
|
||||
print_line("\tloop begin: " + itos(loop_begin));
|
||||
print_line("\tloop end: " + itos(loop_end));
|
||||
*/
|
||||
|
||||
//apply frequency limit
|
||||
|
||||
bool limit_rate = p_options["force/max_rate"];
|
||||
int limit_rate_hz = p_options["force/max_rate_hz"];
|
||||
if (limit_rate && rate > limit_rate_hz && rate > 0 && frames > 0) {
|
||||
//resampleeee!!!
|
||||
// resample!
|
||||
int new_data_frames = (int)(frames * (float)limit_rate_hz / (float)rate);
|
||||
|
||||
print_line("\tresampling ratio: " + rtos((float)limit_rate_hz / (float)rate));
|
||||
print_line("\tnew frames: " + itos(new_data_frames));
|
||||
|
||||
Vector<float> new_data;
|
||||
new_data.resize(new_data_frames * format_channels);
|
||||
for (int c = 0; c < format_channels; c++) {
|
||||
|
@ -492,8 +491,6 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
|
|||
}
|
||||
}
|
||||
|
||||
//print_line("compressing ima-adpcm, resulting buffersize is "+itos(dst_data.size())+" from "+itos(data.size()));
|
||||
|
||||
} else {
|
||||
|
||||
dst_format = is16 ? AudioStreamSample::FORMAT_16_BITS : AudioStreamSample::FORMAT_8_BITS;
|
||||
|
|
|
@ -112,7 +112,6 @@ void PluginConfigDialog::_notification(int p_what) {
|
|||
void PluginConfigDialog::config(const String &p_config_path) {
|
||||
if (p_config_path.length()) {
|
||||
Ref<ConfigFile> cf = memnew(ConfigFile);
|
||||
print_line(p_config_path);
|
||||
cf->load(p_config_path);
|
||||
|
||||
name_edit->set_text(cf->get_value("plugin", "name", ""));
|
||||
|
|
|
@ -349,7 +349,6 @@ void AnimationNodeBlendSpace2DEditor::_tool_switch(int p_tool) {
|
|||
points.push_back(blend_space->get_blend_point_position(i));
|
||||
}
|
||||
Vector<Delaunay2D::Triangle> tr = Delaunay2D::triangulate(points);
|
||||
print_line("triangleS: " + itos(tr.size()));
|
||||
for (int i = 0; i < tr.size(); i++) {
|
||||
blend_space->add_triangle(tr[i].points[0], tr[i].points[1], tr[i].points[2]);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ void AnimationNodeBlendTreeEditor::remove_custom_type(const Ref<Script> &p_scrip
|
|||
|
||||
void AnimationNodeBlendTreeEditor::_update_options_menu() {
|
||||
|
||||
print_line("update options");
|
||||
add_node->get_popup()->clear();
|
||||
for (int i = 0; i < add_options.size(); i++) {
|
||||
add_node->get_popup()->add_item(add_options[i].name, i);
|
||||
|
|
|
@ -97,13 +97,11 @@ void MeshEditor::edit(Ref<Mesh> p_mesh) {
|
|||
_update_rotation();
|
||||
|
||||
AABB aabb = mesh->get_aabb();
|
||||
print_line("aabb: " + aabb);
|
||||
Vector3 ofs = aabb.position + aabb.size * 0.5;
|
||||
float m = aabb.get_longest_axis_size();
|
||||
if (m != 0) {
|
||||
m = 1.0 / m;
|
||||
m *= 0.5;
|
||||
//print_line("scale: "+rtos(m));
|
||||
Transform xform;
|
||||
xform.basis.scale(Vector3(m, m, m));
|
||||
xform.origin = -xform.basis.xform(ofs); //-ofs*m;
|
||||
|
|
|
@ -169,8 +169,6 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
|
|||
|
||||
void MeshLibraryEditor::_import_scene_cbk(const String &p_str) {
|
||||
|
||||
print_line("Impot Callback!");
|
||||
|
||||
Ref<PackedScene> ps = ResourceLoader::load(p_str, "PackedScene");
|
||||
ERR_FAIL_COND(ps.is_null());
|
||||
Node *scene = ps->instance();
|
||||
|
|
|
@ -58,8 +58,6 @@ void Particles2DEditorPlugin::make_visible(bool p_visible) {
|
|||
|
||||
void Particles2DEditorPlugin::_file_selected(const String &p_file) {
|
||||
|
||||
print_line("file: " + p_file);
|
||||
|
||||
source_emission_file = p_file;
|
||||
emission_mask->popup_centered_minsize();
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "os/input.h"
|
||||
#include "os/keyboard.h"
|
||||
#include "scene/2d/skeleton_2d.h"
|
||||
|
||||
Node2D *Polygon2DEditor::_get_node() const {
|
||||
|
||||
return node;
|
||||
|
@ -82,7 +83,6 @@ void Polygon2DEditor::_notification(int p_what) {
|
|||
|
||||
void Polygon2DEditor::_sync_bones() {
|
||||
|
||||
print_line("syncinc");
|
||||
if (!node->has_node(node->get_skeleton())) {
|
||||
error->set_text(TTR("The skeleton property of the Polygon2D does not point to a Skeleton2D node"));
|
||||
error->popup_centered_minsize();
|
||||
|
@ -101,8 +101,6 @@ void Polygon2DEditor::_sync_bones() {
|
|||
Array prev_bones = node->call("_get_bones");
|
||||
node->clear_bones();
|
||||
|
||||
print_line("bones in skeleton: " + itos(skeleton->get_bone_count()));
|
||||
|
||||
for (int i = 0; i < skeleton->get_bone_count(); i++) {
|
||||
NodePath path = skeleton->get_path_to(skeleton->get_bone(i));
|
||||
PoolVector<float> weights;
|
||||
|
|
|
@ -276,7 +276,6 @@ void EditorInspectorRootMotionPlugin::parse_begin(Object *p_object) {
|
|||
bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage) {
|
||||
|
||||
if (p_path == "root_motion_track" && p_object->is_class("AnimationTree") && p_type == Variant::NODE_PATH) {
|
||||
print_line("use custom!");
|
||||
EditorPropertyRootMotion *editor = memnew(EditorPropertyRootMotion);
|
||||
if (p_hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && p_hint_text != String()) {
|
||||
editor->setup(p_hint_text);
|
||||
|
|
|
@ -60,7 +60,6 @@ void ScriptTextEditor::apply_code() {
|
|||
|
||||
if (script.is_null())
|
||||
return;
|
||||
//print_line("applying code");
|
||||
script->set_source_code(code_editor->get_text_edit()->get_text());
|
||||
script->update_exports();
|
||||
_update_member_keywords();
|
||||
|
|
|
@ -167,7 +167,6 @@ void ShaderTextEditor::_check_shader_mode() {
|
|||
|
||||
String type = ShaderLanguage::get_shader_type(get_text_edit()->get_text());
|
||||
|
||||
print_line("type is: " + type);
|
||||
Shader::Mode mode;
|
||||
|
||||
if (type == "canvas_item") {
|
||||
|
|
|
@ -160,7 +160,6 @@ void SpriteEditor::_update_mesh_data() {
|
|||
|
||||
Vector<Vector<Vector2> > lines = bm->clip_opaque_to_polygons(rect, epsilon);
|
||||
|
||||
print_line("lines: " + itos(lines.size()));
|
||||
uv_lines.clear();
|
||||
|
||||
computed_vertices.clear();
|
||||
|
@ -190,21 +189,6 @@ void SpriteEditor::_update_mesh_data() {
|
|||
|
||||
computed_vertices.push_back(vtx);
|
||||
}
|
||||
#if 0
|
||||
Vector<Vector<Vector2> > polys = Geometry::decompose_polygon(lines[j]);
|
||||
print_line("polygon: " + itos(polys.size()));
|
||||
|
||||
for (int i = 0; i < polys.size(); i++) {
|
||||
for (int k = 0; k < polys[i].size(); k++) {
|
||||
|
||||
int idxn = (k + 1) % polys[i].size();
|
||||
uv_lines.push_back(polys[i][k]);
|
||||
uv_lines.push_back(polys[i][idxn]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
|
||||
Vector<int> poly = Geometry::triangulate_polygon(lines[j]);
|
||||
|
||||
|
@ -218,14 +202,6 @@ void SpriteEditor::_update_mesh_data() {
|
|||
computed_indices.push_back(poly[idx] + index_ofs);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
for (int i = 0; i < lines[j].size() - 1; i++) {
|
||||
uv_lines.push_back(lines[j][i]);
|
||||
uv_lines.push_back(lines[j][i + 1]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
debug_uv->update();
|
||||
|
|
|
@ -89,7 +89,6 @@ void SpriteFramesEditor::_file_load_request(const PoolVector<String> &p_path, in
|
|||
}
|
||||
|
||||
if (resources.empty()) {
|
||||
//print_line("added frames!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -108,7 +107,6 @@ void SpriteFramesEditor::_file_load_request(const PoolVector<String> &p_path, in
|
|||
undo_redo->add_undo_method(this, "_update_library");
|
||||
|
||||
undo_redo->commit_action();
|
||||
//print_line("added frames!");
|
||||
}
|
||||
|
||||
void SpriteFramesEditor::_load_pressed() {
|
||||
|
|
|
@ -1390,7 +1390,7 @@ void ProjectManager::_open_project_confirm() {
|
|||
return;
|
||||
}
|
||||
|
||||
print_line("OPENING: " + path + " (" + selected + ")");
|
||||
print_line("Editing project: " + path + " (" + selected + ")");
|
||||
|
||||
List<String> args;
|
||||
|
||||
|
@ -1447,7 +1447,7 @@ void ProjectManager::_run_project_confirm() {
|
|||
return;
|
||||
}
|
||||
|
||||
print_line("OPENING: " + path + " (" + selected + ")");
|
||||
print_line("Running project: " + path + " (" + selected + ")");
|
||||
|
||||
List<String> args;
|
||||
|
||||
|
@ -1513,13 +1513,13 @@ void ProjectManager::_scan_dir(DirAccess *da, float pos, float total, List<Strin
|
|||
|
||||
void ProjectManager::_scan_begin(const String &p_base) {
|
||||
|
||||
print_line("SCAN PROJECTS AT: " + p_base);
|
||||
print_line("Scanning projects at: " + p_base);
|
||||
List<String> projects;
|
||||
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||
da->change_dir(p_base);
|
||||
_scan_dir(da, 0, 1, &projects);
|
||||
memdelete(da);
|
||||
print_line("found: " + itos(projects.size()) + " projects.");
|
||||
print_line("Found " + itos(projects.size()) + " projects.");
|
||||
|
||||
for (List<String>::Element *E = projects.front(); E; E = E->next()) {
|
||||
String proj = E->get().replace("/", "::");
|
||||
|
|
|
@ -891,7 +891,6 @@ void ProjectSettingsEditor::_item_del() {
|
|||
return;
|
||||
}
|
||||
|
||||
print_line("to delete.. " + property);
|
||||
undo_redo->create_action(TTR("Delete Item"));
|
||||
|
||||
Variant value = ProjectSettings::get_singleton()->get(property);
|
||||
|
|
|
@ -3992,7 +3992,6 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
|
|||
String prop = d["name"];
|
||||
emit_signal("property_keyed", prop, obj->get(prop), false);
|
||||
} else if (p_button == 5) {
|
||||
print_line("PB5");
|
||||
if (!d.has("name"))
|
||||
return;
|
||||
String prop = d["name"];
|
||||
|
@ -4732,7 +4731,7 @@ double PropertyValueEvaluator::eval(const String &p_text) {
|
|||
script->set_source_code(_build_script(p_new_text));
|
||||
Error err = script->reload();
|
||||
if (err) {
|
||||
print_line("[PropertyValueEvaluator] Error loading script for expression: " + p_new_text);
|
||||
ERR_PRINTS("PropertyValueEvaluator: Error loading script for expression: " + p_new_text);
|
||||
return _default_eval(p_new_text);
|
||||
}
|
||||
|
||||
|
@ -4748,7 +4747,7 @@ double PropertyValueEvaluator::eval(const String &p_text) {
|
|||
if (call_err.error == Variant::CallError::CALL_OK) {
|
||||
return result;
|
||||
}
|
||||
print_line("[PropertyValueEvaluator]: Error eval! Error code: " + itos(call_err.error));
|
||||
ERR_PRINTS("PropertyValueEvaluator: Eval failed, error code: " + itos(call_err.error));
|
||||
|
||||
return _default_eval(p_new_text);
|
||||
}
|
||||
|
|
|
@ -237,7 +237,6 @@ void PropertySelector::_update_search() {
|
|||
|
||||
Ref<Texture> icon;
|
||||
script_methods = false;
|
||||
print_line("name: " + E->get().name);
|
||||
String rep = E->get().name.replace("*", "");
|
||||
if (E->get().name == "*Script Methods") {
|
||||
icon = get_icon("Script", "EditorIcons");
|
||||
|
|
|
@ -1512,7 +1512,6 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
|
|||
}
|
||||
|
||||
editor_data->get_undo_redo().commit_action();
|
||||
print_line("test: " + String(Variant(selected.front()->get()->get_meta("_editor_icon"))));
|
||||
|
||||
editor->push_item(p_script.operator->());
|
||||
}
|
||||
|
|
|
@ -968,7 +968,6 @@ void SceneTreeEditor::_warning_changed(Node *p_for_node) {
|
|||
|
||||
//should use a timer
|
||||
update_timer->start();
|
||||
//print_line("WARNING CHANGED "+String(p_for_node->get_name()));
|
||||
}
|
||||
|
||||
void SceneTreeEditor::_editor_settings_changed() {
|
||||
|
|
|
@ -1133,7 +1133,6 @@ void ScriptEditorDebugger::_notification(int p_what) {
|
|||
}
|
||||
|
||||
message_type = cmd;
|
||||
//print_line("GOT: "+message_type);
|
||||
|
||||
ret = ppeer->get_var(cmd);
|
||||
if (ret != OK) {
|
||||
|
@ -1285,15 +1284,13 @@ void ScriptEditorDebugger::_profiler_activate(bool p_enable) {
|
|||
max_funcs = CLAMP(max_funcs, 16, 512);
|
||||
msg.push_back(max_funcs);
|
||||
ppeer->put_var(msg);
|
||||
|
||||
print_line("BEGIN PROFILING!");
|
||||
print_verbose("Starting profiling.");
|
||||
|
||||
} else {
|
||||
Array msg;
|
||||
msg.push_back("stop_profiling");
|
||||
ppeer->put_var(msg);
|
||||
|
||||
print_line("END PROFILING!");
|
||||
print_verbose("Ending profiling.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1430,8 +1427,6 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
//print_line("method");
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) {
|
||||
|
@ -1500,8 +1495,6 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
//print_line("prop");
|
||||
}
|
||||
|
||||
void ScriptEditorDebugger::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
|
||||
|
|
|
@ -265,9 +265,6 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool
|
|||
|
||||
Ref<InputEventKey> k = p_event;
|
||||
if (k.is_valid() && !k->is_echo() && k->get_scancode() != 0) {
|
||||
|
||||
//print_line(p_event);
|
||||
|
||||
if (k->is_pressed())
|
||||
keys_pressed.insert(k->get_scancode());
|
||||
else
|
||||
|
|
|
@ -1092,7 +1092,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
|
||||
boot_logo_path = boot_logo_path.strip_edges();
|
||||
|
||||
if (boot_logo_path != String() /*&& FileAccess::exists(boot_logo_path)*/) {
|
||||
if (boot_logo_path != String()) {
|
||||
print_line("Boot splash path: " + boot_logo_path);
|
||||
boot_logo.instance();
|
||||
Error err = boot_logo->load(boot_logo_path);
|
||||
|
@ -1164,10 +1164,8 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
|
||||
if (String(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image")) != String()) {
|
||||
|
||||
//print_line("use custom cursor");
|
||||
Ref<Texture> cursor = ResourceLoader::load(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image"));
|
||||
if (cursor.is_valid()) {
|
||||
//print_line("loaded ok");
|
||||
Vector2 hotspot = ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image_hotspot");
|
||||
Input::get_singleton()->set_custom_mouse_cursor(cursor, Input::CURSOR_ARROW, hotspot);
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ void AreaBullet::set_param(PhysicsServer::AreaParameter p_param, const Variant &
|
|||
set_spOv_gravityPointAttenuation(p_value);
|
||||
break;
|
||||
default:
|
||||
print_line("The Bullet areas doesn't suppot this param: " + itos(p_param));
|
||||
WARN_PRINTS("Area doesn't support this parameter in the Bullet backend: " + itos(p_param));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ Variant AreaBullet::get_param(PhysicsServer::AreaParameter p_param) const {
|
|||
case PhysicsServer::AREA_PARAM_GRAVITY_POINT_ATTENUATION:
|
||||
return spOv_gravityPointAttenuation;
|
||||
default:
|
||||
print_line("The Bullet areas doesn't suppot this param: " + itos(p_param));
|
||||
WARN_PRINTS("Area doesn't support this parameter in the Bullet backend: " + itos(p_param));
|
||||
return Variant();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1001,11 +1001,13 @@ void BulletPhysicsServer::soft_body_get_collision_exceptions(RID p_body, List<RI
|
|||
}
|
||||
|
||||
void BulletPhysicsServer::soft_body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) {
|
||||
print_line("TODO MUST BE IMPLEMENTED");
|
||||
// FIXME: Must be implemented.
|
||||
WARN_PRINT("soft_body_state is not implemented yet in Bullet backend.");
|
||||
}
|
||||
|
||||
Variant BulletPhysicsServer::soft_body_get_state(RID p_body, BodyState p_state) const {
|
||||
print_line("TODO MUST BE IMPLEMENTED");
|
||||
// FIXME: Must be implemented.
|
||||
WARN_PRINT("soft_body_state is not implemented yet in Bullet backend.");
|
||||
return Variant();
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t
|
|||
switch (p_param) {
|
||||
case PhysicsServer::HINGE_JOINT_BIAS:
|
||||
if (0 < p_value) {
|
||||
print_line("The Bullet Hinge Joint doesn't support bias, So it's always 0");
|
||||
WARN_PRINTS("HingeJoint doesn't support bias in the Bullet backend, so it's always 0.");
|
||||
}
|
||||
break;
|
||||
case PhysicsServer::HINGE_JOINT_LIMIT_UPPER:
|
||||
|
@ -122,7 +122,7 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t
|
|||
hingeConstraint->setMaxMotorImpulse(p_value);
|
||||
break;
|
||||
default:
|
||||
WARN_PRINTS("The Bullet Hinge Joint doesn't support this parameter: " + itos(p_param) + ", value: " + itos(p_value));
|
||||
WARN_PRINTS("HingeJoint doesn't support this parameter in the Bullet backend: " + itos(p_param) + ", value: " + itos(p_value));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ real_t HingeJointBullet::get_param(PhysicsServer::HingeJointParam p_param) const
|
|||
case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE:
|
||||
return hingeConstraint->getMaxMotorImpulse();
|
||||
default:
|
||||
WARN_PRINTS("The Bullet Hinge Joint doesn't support this parameter: " + itos(p_param));
|
||||
WARN_PRINTS("HingeJoint doesn't support this parameter in the Bullet backend: " + itos(p_param));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,8 +161,6 @@ CSGBrush *CSGShape::_get_brush() {
|
|||
|
||||
void CSGShape::_update_shape() {
|
||||
|
||||
//print_line("updating shape for " + String(get_path()));
|
||||
|
||||
if (parent)
|
||||
return;
|
||||
|
||||
|
@ -372,7 +370,6 @@ void CSGShape::_notification(int p_what) {
|
|||
|
||||
if (p_what == NOTIFICATION_LOCAL_TRANSFORM_CHANGED) {
|
||||
|
||||
//print_line("local xform changed");
|
||||
if (parent) {
|
||||
parent->_make_dirty();
|
||||
}
|
||||
|
@ -641,7 +638,6 @@ CSGBrush *CSGMesh::_build_brush() {
|
|||
}
|
||||
}
|
||||
|
||||
//print_line("total vertices? " + itos(vertices.size()));
|
||||
if (vertices.size() == 0)
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -217,8 +217,6 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
|
|||
if (!(flags & DDSD_MIPMAPCOUNT))
|
||||
mipmaps = 1;
|
||||
|
||||
//print_line("found format: "+String(dds_format_info[dds_format].name));
|
||||
|
||||
PoolVector<uint8_t> src_data;
|
||||
|
||||
const DDSFormatInfo &info = dds_format_info[dds_format];
|
||||
|
|
|
@ -199,7 +199,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
|
|||
|
||||
int wofs = 0;
|
||||
|
||||
print_line("begin encoding, format: " + Image::get_format_name(etc_format));
|
||||
print_verbose("ETC: Begin encoding, format: " + Image::get_format_name(etc_format));
|
||||
uint64_t t = OS::get_singleton()->get_ticks_msec();
|
||||
for (int i = 0; i < mmc; i++) {
|
||||
// convert source image to internal etc2comp format (which is equivalent to Image::FORMAT_RGBAF)
|
||||
|
@ -227,7 +227,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
|
|||
delete[] src_rgba_f;
|
||||
}
|
||||
|
||||
print_line("time encoding: " + rtos(OS::get_singleton()->get_ticks_msec() - t));
|
||||
print_verbose("ETC: Time encoding: " + rtos(OS::get_singleton()->get_ticks_msec() - t));
|
||||
|
||||
p_img->create(imgw, imgh, p_img->has_mipmaps(), etc_format, dst_data);
|
||||
}
|
||||
|
|
|
@ -294,11 +294,6 @@ bool GDScript::get_property_default_value(const StringName &p_property, Variant
|
|||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
/*
|
||||
for (const Map<StringName,Variant>::Element *I=member_default_values.front();I;I=I->next()) {
|
||||
print_line("\t"+String(String(I->key())+":"+String(I->get())));
|
||||
}
|
||||
*/
|
||||
const Map<StringName, Variant>::Element *E = member_default_values_cache.find(p_property);
|
||||
if (E) {
|
||||
r_value = E->get();
|
||||
|
@ -335,17 +330,8 @@ ScriptInstance *GDScript::instance_create(Object *p_this) {
|
|||
|
||||
PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
//instance a fake script for editing the values
|
||||
//plist.invert();
|
||||
|
||||
/*print_line("CREATING PLACEHOLDER");
|
||||
for(List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) {
|
||||
print_line(E->get().name);
|
||||
}*/
|
||||
PlaceHolderScriptInstance *si = memnew(PlaceHolderScriptInstance(GDScriptLanguage::get_singleton(), Ref<Script>(this), p_this));
|
||||
placeholders.insert(si);
|
||||
//_update_placeholder(si);
|
||||
_update_exports();
|
||||
return si;
|
||||
#else
|
||||
|
@ -409,7 +395,6 @@ bool GDScript::_update_exports() {
|
|||
bool changed = false;
|
||||
|
||||
if (source_changed_cache) {
|
||||
//print_line("updating source for "+get_path());
|
||||
source_changed_cache = false;
|
||||
changed = true;
|
||||
|
||||
|
@ -456,11 +441,8 @@ bool GDScript::_update_exports() {
|
|||
|
||||
if (bf.is_valid()) {
|
||||
|
||||
//print_line("parent is: "+bf->get_path());
|
||||
base_cache = bf;
|
||||
bf->inheriters_cache.insert(get_instance_id());
|
||||
|
||||
//bf->_update_exports(p_instances,true,false);
|
||||
}
|
||||
} else {
|
||||
ERR_PRINT(("Path extending itself in " + path).utf8().get_data());
|
||||
|
@ -475,7 +457,6 @@ bool GDScript::_update_exports() {
|
|||
continue;
|
||||
|
||||
members_cache.push_back(c->variables[i]._export);
|
||||
//print_line("found "+c->variables[i]._export.name);
|
||||
member_default_values_cache[c->variables[i].identifier] = c->variables[i].default_value;
|
||||
}
|
||||
|
||||
|
@ -490,7 +471,6 @@ bool GDScript::_update_exports() {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
//print_line("unchanged is "+get_path());
|
||||
}
|
||||
|
||||
if (base_cache.is_valid()) {
|
||||
|
@ -499,11 +479,9 @@ bool GDScript::_update_exports() {
|
|||
}
|
||||
}
|
||||
|
||||
if (/*changed &&*/ placeholders.size()) { //hm :(
|
||||
if (placeholders.size()) { //hm :(
|
||||
|
||||
//print_line("updating placeholders for "+get_path());
|
||||
|
||||
//update placeholders if any
|
||||
// update placeholders if any
|
||||
Map<StringName, Variant> values;
|
||||
List<PropertyInfo> propnames;
|
||||
_update_exports_values(values, propnames);
|
||||
|
@ -529,7 +507,6 @@ void GDScript::update_exports() {
|
|||
|
||||
Set<ObjectID> copy = inheriters_cache; //might get modified
|
||||
|
||||
//print_line("update exports for "+get_path()+" ic: "+itos(copy.size()));
|
||||
for (Set<ObjectID>::Element *E = copy.front(); E; E = E->next()) {
|
||||
Object *id = ObjectDB::get_instance(E->get());
|
||||
GDScript *s = Object::cast_to<GDScript>(id);
|
||||
|
@ -825,7 +802,6 @@ Error GDScript::load_source_code(const String &p_path) {
|
|||
#ifdef TOOLS_ENABLED
|
||||
source_changed_cache = true;
|
||||
#endif
|
||||
//print_line("LSC :"+get_path());
|
||||
path = p_path;
|
||||
return OK;
|
||||
}
|
||||
|
@ -1507,7 +1483,6 @@ int GDScriptLanguage::profiling_get_frame_data(ProfilingInfo *p_info_arr, int p_
|
|||
p_info_arr[current].self_time = elem->self()->profile.last_frame_self_time;
|
||||
p_info_arr[current].total_time = elem->self()->profile.last_frame_total_time;
|
||||
p_info_arr[current].signature = elem->self()->profile.signature;
|
||||
//print_line(String(elem->self()->profile.signature)+": "+itos(elem->self()->profile.last_frame_call_count));
|
||||
current++;
|
||||
}
|
||||
elem = elem->next();
|
||||
|
@ -1546,7 +1521,7 @@ struct GDScriptDepSort {
|
|||
void GDScriptLanguage::reload_all_scripts() {
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
print_line("RELOAD ALL SCRIPTS");
|
||||
print_verbose("GDScript: Reloading all scripts");
|
||||
if (lock) {
|
||||
lock->lock();
|
||||
}
|
||||
|
@ -1556,7 +1531,7 @@ void GDScriptLanguage::reload_all_scripts() {
|
|||
SelfList<GDScript> *elem = script_list.first();
|
||||
while (elem) {
|
||||
if (elem->self()->get_path().is_resource_file()) {
|
||||
print_line("FOUND: " + elem->self()->get_path());
|
||||
print_verbose("GDScript: Found: " + elem->self()->get_path());
|
||||
scripts.push_back(Ref<GDScript>(elem->self())); //cast to gdscript to avoid being erased by accident
|
||||
}
|
||||
elem = elem->next();
|
||||
|
@ -1572,7 +1547,7 @@ void GDScriptLanguage::reload_all_scripts() {
|
|||
|
||||
for (List<Ref<GDScript> >::Element *E = scripts.front(); E; E = E->next()) {
|
||||
|
||||
print_line("RELOADING: " + E->get()->get_path());
|
||||
print_verbose("GDScript: Reloading: " + E->get()->get_path());
|
||||
E->get()->load_source_code(E->get()->get_path());
|
||||
E->get()->reload(true);
|
||||
}
|
||||
|
@ -1703,7 +1678,6 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so
|
|||
|
||||
void GDScriptLanguage::frame() {
|
||||
|
||||
//print_line("calls: "+itos(calls));
|
||||
calls = 0;
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
|
|
|
@ -1009,8 +1009,6 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
|
|||
return prev_pos;
|
||||
int retval = prev_pos;
|
||||
|
||||
//print_line("retval: "+itos(retval));
|
||||
|
||||
if (retval & GDScriptFunction::ADDR_TYPE_STACK << GDScriptFunction::ADDR_BITS) {
|
||||
slevel++;
|
||||
codegen.alloc_stack(slevel);
|
||||
|
@ -2073,8 +2071,6 @@ Error GDScriptCompiler::_parse_class_blocks(GDScript *p_script, const GDScriptPa
|
|||
//validate instances if keeping state
|
||||
|
||||
if (p_keep_state) {
|
||||
|
||||
print_line("RELOAD KEEP " + p_script->path);
|
||||
for (Set<Object *>::Element *E = p_script->instances.front(); E;) {
|
||||
|
||||
Set<Object *>::Element *N = E->next();
|
||||
|
|
|
@ -192,7 +192,6 @@ int GDScriptLanguage::find_function(const String &p_function, const String &p_co
|
|||
if (tokenizer.get_token() == GDScriptTokenizer::TK_NEWLINE) {
|
||||
indent = tokenizer.get_token_line_indent();
|
||||
}
|
||||
//print_line("TOKEN: "+String(GDScriptTokenizer::get_token_name(tokenizer.get_token())));
|
||||
if (indent == 0 && tokenizer.get_token() == GDScriptTokenizer::TK_PR_FUNCTION && tokenizer.get_token(1) == GDScriptTokenizer::TK_IDENTIFIER) {
|
||||
|
||||
String identifier = tokenizer.get_token_identifier(1);
|
||||
|
@ -201,7 +200,6 @@ int GDScriptLanguage::find_function(const String &p_function, const String &p_co
|
|||
}
|
||||
}
|
||||
tokenizer.advance();
|
||||
//print_line("NEXT: "+String(GDScriptTokenizer::get_token_name(tokenizer.get_token())));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -2930,7 +2928,6 @@ void GDScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int p_t
|
|||
break;
|
||||
}
|
||||
|
||||
//print_line(itos(indent_stack.size())+","+itos(tc)+": "+l);
|
||||
lines.write[i] = l;
|
||||
}
|
||||
|
||||
|
|
|
@ -642,7 +642,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
|
|||
str += p_args[i]->operator String();
|
||||
}
|
||||
|
||||
//str+="\n";
|
||||
print_line(str);
|
||||
r_ret = Variant();
|
||||
|
||||
|
@ -657,7 +656,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
|
|||
str += p_args[i]->operator String();
|
||||
}
|
||||
|
||||
//str+="\n";
|
||||
print_line(str);
|
||||
r_ret = Variant();
|
||||
|
||||
|
@ -672,7 +670,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
|
|||
str += p_args[i]->operator String();
|
||||
}
|
||||
|
||||
//str+="\n";
|
||||
print_line(str);
|
||||
r_ret = Variant();
|
||||
|
||||
|
@ -686,7 +683,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
|
|||
str += p_args[i]->operator String();
|
||||
}
|
||||
|
||||
//str+="\n";
|
||||
print_error(str);
|
||||
r_ret = Variant();
|
||||
|
||||
|
@ -698,7 +694,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
|
|||
str += p_args[i]->operator String();
|
||||
}
|
||||
|
||||
//str+="\n";
|
||||
OS::get_singleton()->print("%s", str.utf8().get_data());
|
||||
r_ret = Variant();
|
||||
|
||||
|
@ -716,7 +711,6 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
|
|||
str += "At: " + script->debug_get_stack_level_source(0) + ":" + itos(script->debug_get_stack_level_line(0)); // + " in function '" + script->debug_get_stack_level_function(0) + "'";
|
||||
}
|
||||
|
||||
//str+="\n";
|
||||
print_line(str);
|
||||
r_ret = Variant();
|
||||
} break;
|
||||
|
|
|
@ -1074,9 +1074,6 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
|
|||
} else {
|
||||
|
||||
//find list [ or find dictionary {
|
||||
|
||||
//print_line("found bug?");
|
||||
|
||||
_set_error("Error parsing expression, misplaced: " + String(tokenizer->get_token_name(tokenizer->get_token())));
|
||||
return NULL; //nothing
|
||||
}
|
||||
|
|
|
@ -937,7 +937,6 @@ void GDScriptTokenizerText::_advance() {
|
|||
_make_constant(val);
|
||||
} else if (period_found || exponent_found) {
|
||||
double val = str.to_double();
|
||||
//print_line("*%*%*%*% to convert: "+str+" result: "+rtos(val));
|
||||
_make_constant(val);
|
||||
} else {
|
||||
int64_t val = str.to_int64();
|
||||
|
|
|
@ -486,8 +486,6 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
|
|||
if (!mesh_library.is_valid() || !mesh_library->has_item(c.item))
|
||||
continue;
|
||||
|
||||
//print_line("OCTANT, CELLS: "+itos(ii.cells.size()));
|
||||
|
||||
Vector3 cellpos = Vector3(E->get().x, E->get().y, E->get().z);
|
||||
Vector3 ofs = _get_offset();
|
||||
|
||||
|
@ -524,8 +522,6 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
|
|||
if (g.collision_debug.is_valid()) {
|
||||
shapes.write[i].shape->add_vertices_to_array(col_debug, xform * shapes[i].local_transform);
|
||||
}
|
||||
|
||||
//print_line("PHIS x: "+xform);
|
||||
}
|
||||
|
||||
// add the item's navmesh at given xform to GridMap's Navigation ancestor
|
||||
|
@ -614,7 +610,6 @@ void GridMap::_octant_enter_world(const OctantKey &p_key) {
|
|||
Octant &g = *octant_map[p_key];
|
||||
PhysicsServer::get_singleton()->body_set_state(g.static_body, PhysicsServer::BODY_STATE_TRANSFORM, get_global_transform());
|
||||
PhysicsServer::get_singleton()->body_set_space(g.static_body, get_world()->get_space());
|
||||
//print_line("BODYPOS: "+get_global_transform());
|
||||
|
||||
if (g.collision_debug_instance.is_valid()) {
|
||||
VS::get_singleton()->instance_set_scenario(g.collision_debug_instance, get_world()->get_scenario());
|
||||
|
@ -1086,7 +1081,6 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe
|
|||
|
||||
for (Map<OctantKey, Map<Ref<Material>, Ref<SurfaceTool> > >::Element *E = surface_map.front(); E; E = E->next()) {
|
||||
|
||||
print_line("generating mesh " + itos(ofs++) + "/" + itos(surface_map.size()));
|
||||
Ref<ArrayMesh> mesh;
|
||||
mesh.instance();
|
||||
for (Map<Ref<Material>, Ref<SurfaceTool> >::Element *F = E->get().front(); F; F = F->next()) {
|
||||
|
|
|
@ -93,7 +93,7 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
|
|||
print_line("bmask: "+itos(bmask));
|
||||
print_line("amask: "+itos(amask));
|
||||
print_line("surfcount: "+itos(surfcount));
|
||||
*/
|
||||
*/
|
||||
|
||||
PoolVector<uint8_t> data;
|
||||
data.resize(surfsize);
|
||||
|
@ -159,8 +159,6 @@ RES ResourceFormatPVR::load(const String &p_path, const String &p_original_path,
|
|||
if (mipmaps)
|
||||
tex_flags |= Texture::FLAG_MIPMAPS;
|
||||
|
||||
print_line("flip: " + itos(flags & PVR_VFLIP));
|
||||
|
||||
Ref<Image> image = memnew(Image(width, height, mipmaps, format, data));
|
||||
ERR_FAIL_COND_V(image->empty(), RES());
|
||||
|
||||
|
@ -646,12 +644,6 @@ static void decompress_pvrtc(PVRTCBlock *p_comp_img, const int p_2bit, const int
|
|||
|
||||
static void _pvrtc_decompress(Image *p_img) {
|
||||
|
||||
/*
|
||||
static void decompress_pvrtc(const void *p_comp_img, const int p_2bit, const int p_width, const int p_height, unsigned char* p_dst) {
|
||||
decompress_pvrtc((PVRTCBlock*)p_comp_img,p_2bit,p_width,p_height,1,p_dst);
|
||||
}
|
||||
*/
|
||||
|
||||
ERR_FAIL_COND(p_img->get_format() != Image::FORMAT_PVRTC2 && p_img->get_format() != Image::FORMAT_PVRTC2A && p_img->get_format() != Image::FORMAT_PVRTC4 && p_img->get_format() != Image::FORMAT_PVRTC4A);
|
||||
|
||||
bool _2bit = (p_img->get_format() == Image::FORMAT_PVRTC2 || p_img->get_format() == Image::FORMAT_PVRTC2A);
|
||||
|
@ -665,12 +657,6 @@ static void _pvrtc_decompress(Image *p_img) {
|
|||
|
||||
decompress_pvrtc((PVRTCBlock *)r.ptr(), _2bit, p_img->get_width(), p_img->get_height(), 0, (unsigned char *)w.ptr());
|
||||
|
||||
/*
|
||||
for(int i=0;i<newdata.size();i++) {
|
||||
print_line(itos(w[i]));
|
||||
}
|
||||
*/
|
||||
|
||||
w = PoolVector<uint8_t>::Write();
|
||||
r = PoolVector<uint8_t>::Read();
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ void image_decompress_squish(Image *p_image) {
|
|||
} else if (p_image->get_format() == Image::FORMAT_RGTC_RG) {
|
||||
squish_flags = squish::kBc5;
|
||||
} else {
|
||||
print_line("Can't decompress unknown format: " + itos(p_image->get_format()));
|
||||
ERR_EXPLAIN("Squish: Can't decompress unknown format: " + itos(p_image->get_format()));
|
||||
ERR_FAIL_COND(true);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -208,8 +208,6 @@ void AudioStreamOGGVorbis::set_data(const PoolVector<uint8_t> &p_data) {
|
|||
//does this work? (it's less mem..)
|
||||
//decode_mem_size = ogg_alloc.alloc_buffer_length_in_bytes + info.setup_memory_required + info.temp_memory_required + info.max_frame_size;
|
||||
|
||||
//print_line("succeeded "+itos(ogg_alloc.alloc_buffer_length_in_bytes)+" setup "+itos(info.setup_memory_required)+" setup temp "+itos(info.setup_temp_memory_required)+" temp "+itos(info.temp_memory_required)+" maxframe"+itos(info.max_frame_size));
|
||||
|
||||
length = stb_vorbis_stream_length_in_seconds(ogg_stream);
|
||||
stb_vorbis_close(ogg_stream);
|
||||
|
||||
|
|
|
@ -387,7 +387,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
|
|||
thread_sem->post();
|
||||
#endif
|
||||
|
||||
//print_line("play "+rtos(p_delta));
|
||||
time += p_delta;
|
||||
|
||||
if (videobuf_time > get_time()) {
|
||||
|
@ -442,16 +441,8 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
|
|||
|
||||
int tr = vorbis_synthesis_read(&vd, ret - to_read);
|
||||
|
||||
if (vd.granulepos >= 0) {
|
||||
//print_line("wrote: "+itos(audio_frames_wrote)+" gpos: "+itos(vd.granulepos));
|
||||
}
|
||||
|
||||
//print_line("mix audio!");
|
||||
|
||||
audio_frames_wrote += ret - to_read;
|
||||
|
||||
//print_line("AGP: "+itos(vd.granulepos)+" added "+itos(ret-to_read));
|
||||
|
||||
} else {
|
||||
|
||||
/* no pending audio; is there a pending packet to decode? */
|
||||
|
@ -460,7 +451,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
|
|||
vorbis_synthesis_blockin(&vd, &vb);
|
||||
}
|
||||
} else { /* we need more data; break out to suck in another page */
|
||||
//printf("need moar data\n");
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1144,15 +1144,12 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
|
|||
case VisualScriptBuiltinFunc::TEXT_PRINTERR: {
|
||||
|
||||
String str = *p_inputs[0];
|
||||
|
||||
//str+="\n";
|
||||
print_error(str);
|
||||
|
||||
} break;
|
||||
case VisualScriptBuiltinFunc::TEXT_PRINTRAW: {
|
||||
String str = *p_inputs[0];
|
||||
|
||||
//str+="\n";
|
||||
String str = *p_inputs[0];
|
||||
OS::get_singleton()->print("%s", str.utf8().get_data());
|
||||
|
||||
} break;
|
||||
|
|
|
@ -882,7 +882,6 @@ void VisualScriptEditor::_member_selected() {
|
|||
ERR_FAIL_COND(!ti);
|
||||
|
||||
selected = ti->get_metadata(0);
|
||||
//print_line("selected: "+String(selected));
|
||||
|
||||
if (ti->get_parent() == members->get_root()->get_children()) {
|
||||
|
||||
|
|
|
@ -394,7 +394,6 @@ void VisualScriptFunctionCall::_update_method_cache() {
|
|||
}
|
||||
}
|
||||
|
||||
//print_line("BASE: "+String(type)+" FUNC: "+String(function));
|
||||
MethodBind *mb = ClassDB::get_method(type, function);
|
||||
if (mb) {
|
||||
use_default_args = mb->get_default_argument_count();
|
||||
|
|
|
@ -285,7 +285,6 @@ void VisualScriptPropertySelector::_update_search() {
|
|||
|
||||
Ref<Texture> icon;
|
||||
script_methods = false;
|
||||
print_line("name: " + E->get().name);
|
||||
String rep = E->get().name.replace("*", "");
|
||||
if (E->get().name == "*Script Methods") {
|
||||
icon = get_icon("Script", "EditorIcons");
|
||||
|
|
|
@ -257,7 +257,6 @@ class EditorExportAndroid : public EditorExportPlatform {
|
|||
if (dpos == -1)
|
||||
continue;
|
||||
d = d.substr(0, dpos).strip_edges();
|
||||
//print_line("found device: "+d);
|
||||
ldevices.push_back(d);
|
||||
}
|
||||
|
||||
|
@ -345,8 +344,6 @@ class EditorExportAndroid : public EditorExportPlatform {
|
|||
}
|
||||
|
||||
d.name = vendor + " " + device;
|
||||
//print_line("name: "+d.name);
|
||||
//print_line("description: "+d.description);
|
||||
}
|
||||
|
||||
ndevices.push_back(d);
|
||||
|
@ -671,19 +668,14 @@ class EditorExportAndroid : public EditorExportPlatform {
|
|||
ucstring.write[len] = 0;
|
||||
string_table.write[i] = ucstring.ptr();
|
||||
}
|
||||
|
||||
//print_line("String "+itos(i)+": "+string_table[i]);
|
||||
}
|
||||
|
||||
for (uint32_t i = string_end; i < (ofs + size); i++) {
|
||||
stable_extra.push_back(p_manifest[i]);
|
||||
}
|
||||
|
||||
//printf("stable extra: %i\n",int(stable_extra.size()));
|
||||
string_table_ends = ofs + size;
|
||||
|
||||
//print_line("STABLE SIZE: "+itos(size)+" ACTUAL: "+itos(string_table_ends));
|
||||
|
||||
} break;
|
||||
case CHUNK_XML_START_TAG: {
|
||||
|
||||
|
@ -714,35 +706,25 @@ class EditorExportAndroid : public EditorExportPlatform {
|
|||
|
||||
//replace project information
|
||||
if (tname == "manifest" && attrname == "package") {
|
||||
|
||||
print_line("FOUND package");
|
||||
string_table.write[attr_value] = get_package_name(package_name);
|
||||
}
|
||||
|
||||
if (tname == "manifest" && /*nspace=="android" &&*/ attrname == "versionCode") {
|
||||
|
||||
print_line("FOUND versionCode");
|
||||
if (tname == "manifest" && attrname == "versionCode") {
|
||||
encode_uint32(version_code, &p_manifest.write[iofs + 16]);
|
||||
}
|
||||
|
||||
if (tname == "manifest" && /*nspace=="android" &&*/ attrname == "versionName") {
|
||||
|
||||
print_line("FOUND versionName");
|
||||
if (tname == "manifest" && attrname == "versionName") {
|
||||
if (attr_value == 0xFFFFFFFF) {
|
||||
WARN_PRINT("Version name in a resource, should be plaintext")
|
||||
} else
|
||||
string_table.write[attr_value] = version_name;
|
||||
}
|
||||
|
||||
if (tname == "activity" && /*nspace=="android" &&*/ attrname == "screenOrientation") {
|
||||
if (tname == "activity" && attrname == "screenOrientation") {
|
||||
|
||||
encode_uint32(orientation == 0 ? 0 : 1, &p_manifest.write[iofs + 16]);
|
||||
}
|
||||
|
||||
if (tname == "uses-feature" && /*nspace=="android" &&*/ attrname == "glEsVersion") {
|
||||
print_line("version number: " + itos(decode_uint32(&p_manifest[iofs + 16])));
|
||||
}
|
||||
|
||||
if (tname == "supports-screens") {
|
||||
|
||||
if (attrname == "smallScreens") {
|
||||
|
@ -773,7 +755,6 @@ class EditorExportAndroid : public EditorExportPlatform {
|
|||
String tname = string_table[name];
|
||||
|
||||
if (tname == "manifest") {
|
||||
print_line("Found manifest end");
|
||||
|
||||
// save manifest ending so we can restore it
|
||||
Vector<uint8_t> manifest_end;
|
||||
|
@ -913,8 +894,6 @@ class EditorExportAndroid : public EditorExportPlatform {
|
|||
encode_uint32(string_table.size(), &ret.write[16]); //update new number of strings
|
||||
encode_uint32(string_data_offset - 8, &ret.write[28]); //update new string data offset
|
||||
|
||||
//print_line("file size: "+itos(ret.size()));
|
||||
|
||||
p_manifest = ret;
|
||||
}
|
||||
|
||||
|
@ -956,7 +935,6 @@ class EditorExportAndroid : public EditorExportPlatform {
|
|||
void _fix_resources(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_manifest) {
|
||||
|
||||
const int UTF8_FLAG = 0x00000100;
|
||||
print_line("*******************GORRRGLE***********************");
|
||||
|
||||
uint32_t string_block_len = decode_uint32(&p_manifest[16]);
|
||||
uint32_t string_count = decode_uint32(&p_manifest[20]);
|
||||
|
@ -1234,8 +1212,8 @@ public:
|
|||
err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
|
||||
}
|
||||
|
||||
print_line("Installing into device (please wait..): " + devices[p_device].name);
|
||||
ep.step("Installing to Device (please wait..)..", 2);
|
||||
print_line("Installing to device (please wait...): " + devices[p_device].name);
|
||||
ep.step("Installing to device (please wait...)", 2);
|
||||
|
||||
args.clear();
|
||||
args.push_back("-s");
|
||||
|
|
|
@ -928,7 +928,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_Godot_registerMethod(JNIEnv *e
|
|||
jmethodID mid = env->GetMethodID(cls, mname.ascii().get_data(), cs.ascii().get_data());
|
||||
if (!mid) {
|
||||
|
||||
print_line("FAILED GETTING METHOD ID " + mname);
|
||||
print_line("RegisterMethod: Failed getting method ID: " + mname);
|
||||
}
|
||||
|
||||
s->add_method(mname, mid, types, get_jni_type(retval));
|
||||
|
|
|
@ -554,7 +554,6 @@ bool JavaClassWrapper::_get_type_sig(JNIEnv *env, jobject obj, uint32_t &sig, St
|
|||
|
||||
jstring name2 = (jstring)env->CallObjectMethod(obj, Class_getName);
|
||||
String str_type = env->GetStringUTFChars(name2, NULL);
|
||||
print_line("name: " + str_type);
|
||||
env->DeleteLocalRef(name2);
|
||||
uint32_t t = 0;
|
||||
|
||||
|
@ -1191,9 +1190,6 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
|
|||
env->DeleteLocalRef(obj);
|
||||
env->DeleteLocalRef(param_types);
|
||||
env->DeleteLocalRef(return_type);
|
||||
|
||||
//args[i] = _jobject_to_variant(env, obj);
|
||||
//print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type()));
|
||||
};
|
||||
|
||||
env->DeleteLocalRef(methods);
|
||||
|
@ -1210,7 +1206,6 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) {
|
|||
jstring name = (jstring)env->CallObjectMethod(obj, Field_getName);
|
||||
String str_field = env->GetStringUTFChars(name, NULL);
|
||||
env->DeleteLocalRef(name);
|
||||
print_line("FIELD: " + str_field);
|
||||
int mods = env->CallIntMethod(obj, Field_getModifiers);
|
||||
if ((mods & 0x8) && (mods & 0x10) && (mods & 0x1)) { //static final public!
|
||||
|
||||
|
|
|
@ -337,8 +337,6 @@ void OS_Android::process_event(Ref<InputEvent> p_event) {
|
|||
|
||||
void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos> &p_points) {
|
||||
|
||||
//print_line("ev: "+itos(p_what)+" pnt: "+itos(p_pointer)+" pointc: "+itos(p_points.size()));
|
||||
|
||||
switch (p_what) {
|
||||
case 0: { //gesture begin
|
||||
|
||||
|
|
|
@ -739,7 +739,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
|
|||
|
||||
String library_to_use = "libgodot.iphone." + String(p_debug ? "debug" : "release") + ".fat.a";
|
||||
|
||||
print_line("static library: " + library_to_use);
|
||||
print_line("Static library: " + library_to_use);
|
||||
String pkg_name;
|
||||
if (p_preset->get("application/name") != "")
|
||||
pkg_name = p_preset->get("application/name"); // app_name
|
||||
|
@ -809,7 +809,6 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
|
|||
file = file.replace_first("iphone/", "");
|
||||
|
||||
if (files_to_parse.has(file)) {
|
||||
print_line(String("parse ") + file);
|
||||
_fix_config_file(p_preset, data, config_data, p_debug);
|
||||
} else if (file.begins_with("libgodot.iphone")) {
|
||||
if (file != library_to_use) {
|
||||
|
|
|
@ -380,7 +380,6 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
|||
|
||||
String file = fname;
|
||||
|
||||
print_line("READ: " + file);
|
||||
Vector<uint8_t> data;
|
||||
data.resize(info.uncompressed_size);
|
||||
|
||||
|
@ -394,7 +393,6 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
|||
file = file.replace_first("osx_template.app/", "");
|
||||
|
||||
if (file == "Contents/Info.plist") {
|
||||
print_line("parse plist");
|
||||
_fix_plist(p_preset, data, pkg_name);
|
||||
}
|
||||
|
||||
|
@ -415,13 +413,12 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
|||
iconpath = p_preset->get("application/icon");
|
||||
else
|
||||
iconpath = ProjectSettings::get_singleton()->get("application/config/icon");
|
||||
print_line("icon? " + iconpath);
|
||||
|
||||
if (iconpath != "") {
|
||||
Ref<Image> icon;
|
||||
icon.instance();
|
||||
icon->load(iconpath);
|
||||
if (!icon->empty()) {
|
||||
print_line("loaded?");
|
||||
_make_icon(icon, data);
|
||||
}
|
||||
}
|
||||
|
@ -475,9 +472,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
|||
Z_DEFLATED,
|
||||
Z_DEFAULT_COMPRESSION);
|
||||
|
||||
print_line("OPEN ERR: " + itos(zerr));
|
||||
zerr = zipWriteInFileInZip(dst_pkg_zip, data.ptr(), data.size());
|
||||
print_line("WRITE ERR: " + itos(zerr));
|
||||
zipCloseFileInZip(dst_pkg_zip);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,20 +68,6 @@ void ContextGL_Win::swap_buffers() {
|
|||
SwapBuffers(hDC);
|
||||
}
|
||||
|
||||
/*
|
||||
static GLWrapperFuncPtr wrapper_get_proc_address(const char* p_function) {
|
||||
|
||||
print_line(String()+"getting proc of: "+p_function);
|
||||
GLWrapperFuncPtr func=(GLWrapperFuncPtr)get_gl_proc_address(p_function);
|
||||
if (!func) {
|
||||
print_line("Couldn't find function: "+String(p_function));
|
||||
print_line("error: "+itos(GetLastError()));
|
||||
}
|
||||
return func;
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
void ContextGL_Win::set_use_vsync(bool p_use) {
|
||||
|
||||
if (wglSwapIntervalEXT) {
|
||||
|
|
|
@ -449,7 +449,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
input->set_mouse_position(c);
|
||||
mm->set_speed(Vector2(0, 0));
|
||||
|
||||
if (raw->data.mouse.usFlags ==MOUSE_MOVE_RELATIVE) {
|
||||
if (raw->data.mouse.usFlags == MOUSE_MOVE_RELATIVE) {
|
||||
mm->set_relative(Vector2(raw->data.mouse.lLastX, raw->data.mouse.lLastY));
|
||||
|
||||
} else if (raw->data.mouse.usFlags == MOUSE_MOVE_ABSOLUTE) {
|
||||
|
@ -460,9 +460,8 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
int nScreenTop = GetSystemMetrics(SM_YVIRTUALSCREEN);
|
||||
|
||||
Vector2 abs_pos(
|
||||
(double(raw->data.mouse.lLastX) - 65536.0 / (nScreenWidth) ) * nScreenWidth / 65536.0 + nScreenLeft,
|
||||
(double(raw->data.mouse.lLastY) - 65536.0 / (nScreenHeight) ) * nScreenHeight / 65536.0 + nScreenTop
|
||||
);
|
||||
(double(raw->data.mouse.lLastX) - 65536.0 / (nScreenWidth)) * nScreenWidth / 65536.0 + nScreenLeft,
|
||||
(double(raw->data.mouse.lLastY) - 65536.0 / (nScreenHeight)) * nScreenHeight / 65536.0 + nScreenTop);
|
||||
|
||||
POINT coords; //client coords
|
||||
coords.x = abs_pos.x;
|
||||
|
@ -470,15 +469,13 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
|
||||
ScreenToClient(hWnd, &coords);
|
||||
|
||||
|
||||
mm->set_relative(Vector2(coords.x - old_x, coords.y - old_y ));
|
||||
mm->set_relative(Vector2(coords.x - old_x, coords.y - old_y));
|
||||
old_x = coords.x;
|
||||
old_y = coords.y;
|
||||
|
||||
/*Input.mi.dx = (int)((((double)(pos.x)-nScreenLeft) * 65536) / nScreenWidth + 65536 / (nScreenWidth));
|
||||
Input.mi.dy = (int)((((double)(pos.y)-nScreenTop) * 65536) / nScreenHeight + 65536 / (nScreenHeight));
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
if (window_has_focus && main_loop)
|
||||
|
@ -856,14 +853,6 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
if (ke.uMsg == WM_SYSKEYUP)
|
||||
ke.uMsg = WM_KEYUP;
|
||||
|
||||
/*if (ke.uMsg==WM_KEYDOWN && alt_mem && uMsg!=WM_SYSKEYDOWN) {
|
||||
//altgr hack for intl keyboards, not sure how good it is
|
||||
//windows is weeeeird
|
||||
ke.mod_state.alt=false;
|
||||
ke.mod_state.control=false;
|
||||
print_line("")
|
||||
}*/
|
||||
|
||||
ke.wParam = wParam;
|
||||
ke.lParam = lParam;
|
||||
key_event_buffer[key_event_pos++] = ke;
|
||||
|
@ -871,7 +860,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
} break;
|
||||
case WM_INPUTLANGCHANGEREQUEST: {
|
||||
|
||||
print_line("input lang change");
|
||||
// FIXME: Do something?
|
||||
} break;
|
||||
|
||||
case WM_TOUCH: {
|
||||
|
@ -1126,7 +1115,6 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
|
|||
WNDCLASSEXW wc;
|
||||
|
||||
if (is_hidpi_allowed()) {
|
||||
print_line("hidpi aware?");
|
||||
HMODULE Shcore = LoadLibraryW(L"Shcore.dll");
|
||||
|
||||
if (Shcore != NULL) {
|
||||
|
@ -1201,8 +1189,6 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int
|
|||
WindowRect.right = data.size.width;
|
||||
WindowRect.bottom = data.size.height;
|
||||
|
||||
print_line("wr right " + itos(WindowRect.right) + ", " + itos(WindowRect.bottom));
|
||||
|
||||
/* DEVMODE dmScreenSettings;
|
||||
memset(&dmScreenSettings,0,sizeof(dmScreenSettings));
|
||||
dmScreenSettings.dmSize=sizeof(dmScreenSettings);
|
||||
|
@ -1490,12 +1476,6 @@ void OS_Windows::finalize() {
|
|||
if (user_proc) {
|
||||
SetWindowLongPtr(hWnd, GWLP_WNDPROC, (LONG_PTR)user_proc);
|
||||
};
|
||||
|
||||
/*
|
||||
if (debugger_connection_console) {
|
||||
memdelete(debugger_connection_console);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void OS_Windows::finalize_core() {
|
||||
|
@ -1759,9 +1739,6 @@ void OS_Windows::set_window_fullscreen(bool p_enabled) {
|
|||
|
||||
if (pre_fs_valid) {
|
||||
GetWindowRect(hWnd, &pre_fs_rect);
|
||||
//print_line("A: "+itos(pre_fs_rect.left)+","+itos(pre_fs_rect.top)+","+itos(pre_fs_rect.right-pre_fs_rect.left)+","+itos(pre_fs_rect.bottom-pre_fs_rect.top));
|
||||
//MapWindowPoints(hWnd, GetParent(hWnd), (LPPOINT) &pre_fs_rect, 2);
|
||||
//print_line("B: "+itos(pre_fs_rect.left)+","+itos(pre_fs_rect.top)+","+itos(pre_fs_rect.right-pre_fs_rect.left)+","+itos(pre_fs_rect.bottom-pre_fs_rect.top));
|
||||
}
|
||||
|
||||
int cs = get_current_screen();
|
||||
|
|
|
@ -65,19 +65,6 @@ void ContextGL_X11::swap_buffers() {
|
|||
glXSwapBuffers(x11_display, x11_window);
|
||||
}
|
||||
|
||||
/*
|
||||
static GLWrapperFuncPtr wrapper_get_proc_address(const char* p_function) {
|
||||
|
||||
//print_line(String()+"getting proc of: "+p_function);
|
||||
GLWrapperFuncPtr func=(GLWrapperFuncPtr)glXGetProcAddress( (const GLubyte*) p_function);
|
||||
if (!func) {
|
||||
print_line("Couldn't find function: "+String(p_function));
|
||||
}
|
||||
|
||||
return func;
|
||||
|
||||
}*/
|
||||
|
||||
static bool ctxErrorOccurred = false;
|
||||
static int ctxErrorHandler(Display *dpy, XErrorEvent *ev) {
|
||||
ctxErrorOccurred = true;
|
||||
|
|
|
@ -1532,7 +1532,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
|
|||
// know Mod1 was ALT and Mod4 was META (applekey/winkey)
|
||||
// just tried Mods until i found them.
|
||||
|
||||
//print_line("mod1: "+itos(xkeyevent->state&Mod1Mask)+" mod 5: "+itos(xkeyevent->state&Mod5Mask));
|
||||
//print_verbose("mod1: "+itos(xkeyevent->state&Mod1Mask)+" mod 5: "+itos(xkeyevent->state&Mod5Mask));
|
||||
|
||||
Ref<InputEventKey> k;
|
||||
k.instance();
|
||||
|
|
|
@ -121,7 +121,6 @@ void Navigation2D::_navpoly_link(int p_id) {
|
|||
pending.edge = j;
|
||||
p.edges.write[j].P = C->get().pending.push_back(pending);
|
||||
continue;
|
||||
//print_line(String()+_get_vertex(ek.a)+" -> "+_get_vertex(ek.b));
|
||||
}
|
||||
|
||||
C->get().B = &p;
|
||||
|
@ -144,8 +143,6 @@ void Navigation2D::_navpoly_unlink(int p_id) {
|
|||
NavMesh &nm = navpoly_map[p_id];
|
||||
ERR_FAIL_COND(!nm.linked);
|
||||
|
||||
//print_line("UNLINK");
|
||||
|
||||
for (List<Polygon>::Element *E = nm.polygons.front(); E; E = E->next()) {
|
||||
|
||||
Polygon &p = E->get();
|
||||
|
@ -341,7 +338,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
|
|||
path.resize(2);
|
||||
path.write[0] = begin_point;
|
||||
path.write[1] = end_point;
|
||||
//print_line("Direct Path");
|
||||
return path;
|
||||
}
|
||||
|
||||
|
@ -379,7 +375,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
|
|||
while (!found_route) {
|
||||
|
||||
if (open_list.size() == 0) {
|
||||
//print_line("NOU OPEN LIST");
|
||||
break;
|
||||
}
|
||||
//check open list
|
||||
|
@ -526,7 +521,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
|
|||
if (portal_left.distance_squared_to(apex_point) < CMP_EPSILON || CLOCK_TANGENT(apex_point, left, portal_right) > 0) {
|
||||
left_poly = p;
|
||||
portal_left = left;
|
||||
//print_line("***ADVANCE LEFT");
|
||||
} else {
|
||||
|
||||
apex_point = portal_right;
|
||||
|
@ -537,8 +531,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
|
|||
if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON)
|
||||
path.push_back(apex_point);
|
||||
skip = true;
|
||||
//print_line("addpoint left");
|
||||
//print_line("***CLIP LEFT");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -547,7 +539,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
|
|||
if (portal_right.distance_squared_to(apex_point) < CMP_EPSILON || CLOCK_TANGENT(apex_point, right, portal_left) < 0) {
|
||||
right_poly = p;
|
||||
portal_right = right;
|
||||
//print_line("***ADVANCE RIGHT");
|
||||
} else {
|
||||
|
||||
apex_point = portal_left;
|
||||
|
@ -557,8 +548,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
|
|||
portal_left = apex_point;
|
||||
if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON)
|
||||
path.push_back(apex_point);
|
||||
//print_line("addpoint right");
|
||||
//print_line("***CLIP RIGHT");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ void NavigationPolygon::make_polygons_from_outlines() {
|
|||
|
||||
TriangulatorPartition tpart;
|
||||
if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed!
|
||||
print_line("convex partition failed!");
|
||||
ERR_PRINTS("NavigationPolygon: Convex partition failed!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -365,13 +365,6 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
|
|||
ERR_FAIL_COND(!contact_monitor);
|
||||
Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid);
|
||||
|
||||
/*if (obj) {
|
||||
if (body_in)
|
||||
print_line("in: "+String(obj->call("get_name")));
|
||||
else
|
||||
print_line("out: "+String(obj->call("get_name")));
|
||||
}*/
|
||||
|
||||
ERR_FAIL_COND(!body_in && !E);
|
||||
|
||||
if (body_in) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue