diff options
Diffstat (limited to 'scene')
27 files changed, 15 insertions, 152 deletions
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp index e3b048fd74..9eec8e6cc3 100644 --- a/scene/2d/navigation2d.cpp +++ b/scene/2d/navigation2d.cpp @@ -121,7 +121,6 @@ void Navigation2D::_navpoly_link(int p_id) { pending.edge = j; p.edges.write[j].P = C->get().pending.push_back(pending); continue; - //print_line(String()+_get_vertex(ek.a)+" -> "+_get_vertex(ek.b)); } C->get().B = &p; @@ -144,8 +143,6 @@ void Navigation2D::_navpoly_unlink(int p_id) { NavMesh &nm = navpoly_map[p_id]; ERR_FAIL_COND(!nm.linked); - //print_line("UNLINK"); - for (List<Polygon>::Element *E = nm.polygons.front(); E; E = E->next()) { Polygon &p = E->get(); @@ -341,7 +338,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect path.resize(2); path.write[0] = begin_point; path.write[1] = end_point; - //print_line("Direct Path"); return path; } @@ -379,7 +375,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect while (!found_route) { if (open_list.size() == 0) { - //print_line("NOU OPEN LIST"); break; } //check open list @@ -526,7 +521,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect if (portal_left.distance_squared_to(apex_point) < CMP_EPSILON || CLOCK_TANGENT(apex_point, left, portal_right) > 0) { left_poly = p; portal_left = left; - //print_line("***ADVANCE LEFT"); } else { apex_point = portal_right; @@ -537,8 +531,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON) path.push_back(apex_point); skip = true; - //print_line("addpoint left"); - //print_line("***CLIP LEFT"); } } @@ -547,7 +539,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect if (portal_right.distance_squared_to(apex_point) < CMP_EPSILON || CLOCK_TANGENT(apex_point, right, portal_left) < 0) { right_poly = p; portal_right = right; - //print_line("***ADVANCE RIGHT"); } else { apex_point = portal_left; @@ -557,8 +548,6 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect portal_left = apex_point; if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON) path.push_back(apex_point); - //print_line("addpoint right"); - //print_line("***CLIP RIGHT"); } } diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index 2d6679272a..84b12b0bfe 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -257,7 +257,7 @@ void NavigationPolygon::make_polygons_from_outlines() { TriangulatorPartition tpart; if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed! - print_line("convex partition failed!"); + ERR_PRINTS("NavigationPolygon: Convex partition failed!"); return; } diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 02213e07d0..8e31688d90 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -365,13 +365,6 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap ERR_FAIL_COND(!contact_monitor); Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid); - /*if (obj) { - if (body_in) - print_line("in: "+String(obj->call("get_name"))); - else - print_line("out: "+String(obj->call("get_name"))); - }*/ - ERR_FAIL_COND(!body_in && !E); if (body_in) { diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index 34f4ccc03e..fc0741cc5c 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -253,7 +253,6 @@ void Polygon2D::_notification(int p_what) { //normalize for (int j = 0; j < 4; j++) { weightsw[i * 4 + j] /= tw; - // print_line("point " + itos(i) + " idx " + itos(j) + " index: " + itos(bonesw[i * 4 + j]) + " weight: " + rtos(weightsw[i * 4 + j])); } } } @@ -345,8 +344,6 @@ void Polygon2D::_notification(int p_what) { } } - //print_line("loops: " + itos(loops.size()) + " indices: " + itos(indices.size())); - VS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, bones, weights, texture.is_valid() ? texture->get_rid() : RID()); } diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 26fd5ed658..2cb59c871c 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -374,9 +374,6 @@ BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, bool p_create_vi capture_subdiv--; css *= 2.0; } - - print_line("bake subdiv: " + itos(bake_subdiv)); - print_line("capture subdiv: " + itos(capture_subdiv)); } baker.begin_bake(bake_subdiv, bake_bounds); diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp index 8b2000d2e9..af8bfcbe9b 100644 --- a/scene/3d/cpu_particles.cpp +++ b/scene/3d/cpu_particles.cpp @@ -921,8 +921,6 @@ void CPUParticles::_update_particle_data_buffer() { t = un_transform * t; } - // print_line(" particle " + itos(i) + ": " + String(r[idx].active ? "[x]" : "[ ]") + "\n\txform " + r[idx].transform + "\n\t" + r[idx].velocity + "\n\tcolor: " + r[idx].color); - if (r[idx].active) { ptr[0] = t.basis.elements[0][0]; ptr[1] = t.basis.elements[0][1]; diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index f5b77d361c..8d84d2408c 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -120,9 +120,7 @@ void Navigation::_navmesh_link(int p_id) { pending.edge = j; p.edges.write[j].P = C->get().pending.push_back(pending); continue; - //print_line(String()+_get_vertex(ek.a)+" -> "+_get_vertex(ek.b)); } - //ERR_CONTINUE(C->get().B!=NULL); //wut C->get().B = &p; C->get().B_edge = j; @@ -312,7 +310,6 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector if (!begin_poly || !end_poly) { - //print_line("No Path Path"); return Vector<Vector3>(); //no path } @@ -322,7 +319,6 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector path.resize(2); path.write[0] = begin_point; path.write[1] = end_point; - //print_line("Direct Path"); return path; } @@ -347,7 +343,6 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3 &p_start, const Vector while (!found_route) { if (open_list.size() == 0) { - //print_line("NOU OPEN LIST"); break; } //check open list @@ -581,10 +576,6 @@ Vector3 Navigation::get_closest_point_to_segment(const Vector3 &p_from, const Ve } } - if (closest_navmesh && closest_navmesh->owner) { - //print_line("navmesh is: "+Object::cast_to<Node>(closest_navmesh->owner)->get_name()); - } - return closest_point; } diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 26958930e4..f9d096633c 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -366,22 +366,14 @@ void VehicleBody::_update_wheel(int p_idx, PhysicsDirectBodyState *s) { const Vector3 &right = wheel.m_raycastInfo.m_wheelAxleWS; Vector3 fwd = up.cross(right); fwd = fwd.normalized(); - //up = right.cross(fwd); - //up.normalize(); //rotate around steering over de wheelAxleWS real_t steering = wheel.steers ? m_steeringValue : 0.0; - //print_line(itos(p_idx)+": "+rtos(steering)); Basis steeringMat(up, steering); Basis rotatingMat(right, wheel.m_rotation); - /* - if (p_idx==1) - print_line("steeringMat " +steeringMat); - */ - Basis basis2( right[0], up[0], fwd[0], right[1], up[1], fwd[1], @@ -420,8 +412,6 @@ real_t VehicleBody::_ray_cast(int p_idx, PhysicsDirectBodyState *s) { wheel.m_raycastInfo.m_groundObject = 0; if (col) { - //print_line("WHEEL "+itos(p_idx)+" FROM "+source+" TO: "+target); - //print_line("WHEEL "+itos(p_idx)+" COLLIDE? "+itos(col)); param = source.distance_to(rr.position) / source.distance_to(target); depth = raylen * param; wheel.m_raycastInfo.m_contactNormalWS = rr.normal; diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index f3abdc6bbe..e846e1763d 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -491,8 +491,6 @@ Vector<Color> VoxelLightBaker::_get_bake_texture(Ref<Image> p_image, const Color p_image = p_image->duplicate(); if (p_image->is_compressed()) { - print_line("DECOMPRESSING!!!!"); - p_image->decompress(); } p_image->convert(Image::FORMAT_RGBA8); @@ -859,7 +857,6 @@ void VoxelLightBaker::plot_light_directional(const Vector3 &p_direction, const C int idx = first_leaf; while (idx >= 0) { - //print_line("plot idx " + itos(idx)); Light *light = &light_data[idx]; Vector3 to(light->x + 0.5, light->y + 0.5, light->z + 0.5); @@ -949,7 +946,6 @@ void VoxelLightBaker::plot_light_omni(const Vector3 &p_pos, const Color &p_color int idx = first_leaf; while (idx >= 0) { - //print_line("plot idx " + itos(idx)); Light *light = &light_data[idx]; Vector3 to(light->x + 0.5, light->y + 0.5, light->z + 0.5); @@ -1079,7 +1075,6 @@ void VoxelLightBaker::plot_light_spot(const Vector3 &p_pos, const Vector3 &p_axi int idx = first_leaf; while (idx >= 0) { - //print_line("plot idx " + itos(idx)); Light *light = &light_data[idx]; Vector3 to(light->x + 0.5, light->y + 0.5, light->z + 0.5); @@ -1498,12 +1493,8 @@ void VoxelLightBaker::_sample_baked_octree_filtered_and_anisotropic(const Vector for (int i = 0; i < 6; i++) { //anisotropic read light float amount = p_direction.dot(aniso_normal[i]); - //if (c == 0) { - // print_line("\t" + itos(n) + " aniso " + itos(i) + " " + rtos(light[cell].accum[i][0]) + " VEC: " + aniso_normal[i]); - //} if (amount < 0) amount = 0; - //amount = 1; color[c][n].x += light[cell].accum[i][0] * amount; color[c][n].y += light[cell].accum[i][1] * amount; color[c][n].z += light[cell].accum[i][2] * amount; @@ -1513,8 +1504,6 @@ void VoxelLightBaker::_sample_baked_octree_filtered_and_anisotropic(const Vector color[c][n].y += cells[cell].emission[1]; color[c][n].z += cells[cell].emission[2]; } - - //print_line("\tlev " + itos(c) + " - " + itos(n) + " alpha: " + rtos(cells[test_cell].alpha) + " col: " + color[c][n]); } } @@ -1559,8 +1548,6 @@ void VoxelLightBaker::_sample_baked_octree_filtered_and_anisotropic(const Vector r_color = color_interp[0].linear_interpolate(color_interp[1], level_filter); r_alpha = Math::lerp(alpha_interp[0], alpha_interp[1], level_filter); - - // print_line("pos: " + p_posf + " level " + rtos(p_level) + " down to " + itos(target_level) + "." + rtos(level_filter) + " color " + r_color + " alpha " + rtos(r_alpha)); } Vector3 VoxelLightBaker::_voxel_cone_trace(const Vector3 &p_pos, const Vector3 &p_normal, float p_aperture) { @@ -1577,8 +1564,6 @@ Vector3 VoxelLightBaker::_voxel_cone_trace(const Vector3 &p_pos, const Vector3 & while (dist < max_distance && alpha < 0.95) { float diameter = MAX(1.0, 2.0 * p_aperture * dist); - //print_line("VCT: pos " + (p_pos + dist * p_normal) + " dist " + rtos(dist) + " mipmap " + rtos(log2(diameter)) + " alpha " + rtos(alpha)); - //Plane scolor = textureLod(probe, (pos + dist * direction) * cell_size, log2(diameter) ); _sample_baked_octree_filtered_and_anisotropic(p_pos + dist * p_normal, p_normal, log2(diameter), scolor, salpha); float a = (1.0 - alpha); color += scolor * a; @@ -1601,7 +1586,6 @@ Vector3 VoxelLightBaker::_compute_pixel_light_at_pos(const Vector3 &p_pos, const Vector3 bitangent = tangent.cross(p_normal).normalized(); Basis normal_xform = Basis(tangent, bitangent, p_normal).transposed(); - // print_line("normal xform: " + normal_xform); const Vector3 *cone_dirs; const float *cone_weights; int cone_dir_count; @@ -1667,10 +1651,7 @@ Vector3 VoxelLightBaker::_compute_pixel_light_at_pos(const Vector3 &p_pos, const Vector3 accum; for (int i = 0; i < cone_dir_count; i++) { - // if (i > 0) - // continue; Vector3 dir = normal_xform.xform(cone_dirs[i]).normalized(); //normal may not completely correct when transformed to cell - //print_line("direction: " + dir); accum += _voxel_cone_trace(p_pos, dir, cone_aperture) * cone_weights[i]; } @@ -1802,7 +1783,6 @@ void VoxelLightBaker::_lightmap_bake_point(uint32_t p_x, LightMap *p_line) { LightMap *pixel = &p_line[p_x]; if (pixel->pos == Vector3()) return; - //print_line("pos: " + pixel->pos + " normal " + pixel->normal); switch (bake_mode) { case BAKE_MODE_CONE_TRACE: { pixel->light = _compute_pixel_light_at_pos(pixel->pos, pixel->normal) * energy; @@ -1810,8 +1790,6 @@ void VoxelLightBaker::_lightmap_bake_point(uint32_t p_x, LightMap *p_line) { case BAKE_MODE_RAY_TRACE: { pixel->light = _compute_ray_trace_at_pos(pixel->pos, pixel->normal) * energy; } break; - // pixel->light = Vector3(1, 1, 1); - //} } } @@ -1895,7 +1873,6 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh if (bake_mode == BAKE_MODE_RAY_TRACE) { //blur - print_line("bluring, use pos for separatable copy"); //gauss kernel, 7 step sigma 2 static const float gauss_kernel[4] = { 0.214607, 0.189879, 0.131514, 0.071303 }; //horizontal pass @@ -1960,8 +1937,6 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh #pragma omp parallel #endif for (int i = 0; i < height; i++) { - - //print_line("bake line " + itos(i) + " / " + itos(height)); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, 1) #endif @@ -2304,7 +2279,6 @@ Ref<MultiMesh> VoxelLightBaker::create_debug_multimesh(DebugMode p_mode) { mm->set_transform_format(MultiMesh::TRANSFORM_3D); mm->set_color_format(MultiMesh::COLOR_8BIT); - print_line("leaf voxels: " + itos(leaf_voxel_count)); mm->set_instance_count(leaf_voxel_count); Ref<ArrayMesh> mesh; diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index a660665d3f..d8db1973d2 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -960,8 +960,6 @@ Error AnimationPlayer::add_animation(const StringName &p_name, const Ref<Animati ERR_FAIL_COND_V(p_animation.is_null(), ERR_INVALID_PARAMETER); - //print_line("Add anim: "+String(p_name)+" name: "+p_animation->get_name()); - if (animation_set.has(p_name)) { _unref_anim(animation_set[p_name].animation); diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index acdbd9de08..d17ae1d84c 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -31,7 +31,6 @@ #include "base_button.h" #include "os/keyboard.h" -#include "print_string.h" #include "scene/main/viewport.h" #include "scene/scene_string_names.h" @@ -361,7 +360,6 @@ BaseButton::DrawMode BaseButton::get_draw_mode() const { return DRAW_DISABLED; }; - //print_line("press attempt: "+itos(status.press_attempt)+" hover: "+itos(status.hovering)+" pressed: "+itos(status.pressed)); if (status.press_attempt == false && status.hovering && !status.pressed) { return DRAW_HOVER; diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 03b25a138f..a34f2f1ad5 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -29,7 +29,6 @@ /*************************************************************************/ #include "button.h" -#include "print_string.h" #include "servers/visual_server.h" #include "translation.h" @@ -76,8 +75,6 @@ void Button::_notification(int p_what) { Color color; Color color_icon(1, 1, 1, 1); - //print_line(get_text()+": "+itos(is_flat())+" hover "+itos(get_draw_mode())); - Ref<StyleBox> style = get_stylebox("normal"); switch (get_draw_mode()) { diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index d862e8669c..8560efdde5 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -68,8 +68,6 @@ void LinkButton::_notification(int p_what) { Color color; bool do_underline = false; - //print_line(get_text()+": "+itos(is_flat())+" hover "+itos(get_draw_mode())); - switch (get_draw_mode()) { case DRAW_NORMAL: { diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index a3748bf14c..a5f9bea1b1 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2034,7 +2034,6 @@ void RichTextLabel::selection_copy() { if (text != "") { OS::get_singleton()->set_clipboard(text); - //print_line("COPY: "+text); } } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 9a8dc62e4e..9616caa811 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -5692,15 +5692,12 @@ void TextEdit::_update_completion_candidates() { bool pre_keyword = false; bool cancel = false; - //print_line("inquote: "+itos(inquote)+"first quote "+itos(first_quote)+" cofs-1 "+itos(cofs-1)); if (!inquote && first_quote == cofs - 1) { //no completion here - //print_line("cancel!"); cancel = true; } else if (inquote && first_quote != -1) { s = l.substr(first_quote, cofs - first_quote); - //print_line("s: 1"+s); } else if (cofs > 0 && l[cofs - 1] == ' ') { int kofs = cofs - 1; String kw; @@ -5713,7 +5710,6 @@ void TextEdit::_update_completion_candidates() { } pre_keyword = keywords.has(kw); - //print_line("KW "+kw+"? "+itos(pre_keyword)); } else { diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f6905e7c2e..e30f58e012 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2082,9 +2082,7 @@ void Node::_duplicate_and_reown(Node *p_new_parent, const Map<Node *, Node *> &p } else { Object *obj = ClassDB::instance(get_class()); - if (!obj) { - print_line("could not duplicate: " + String(get_class())); - } + ERR_EXPLAIN("Node: Could not duplicate: " + String(get_class())); ERR_FAIL_COND(!obj); node = Object::cast_to<Node>(obj); if (!node) @@ -2179,9 +2177,7 @@ Node *Node::duplicate_and_reown(const Map<Node *, Node *> &p_reown_map) const { Node *node = NULL; Object *obj = ClassDB::instance(get_class()); - if (!obj) { - print_line("could not duplicate: " + String(get_class())); - } + ERR_EXPLAIN("Node: Could not duplicate: " + String(get_class())); ERR_FAIL_COND_V(!obj, NULL); node = Object::cast_to<Node>(obj); if (!node) @@ -2472,7 +2468,7 @@ static void _Node_debug_sn(Object *p_obj) { path = n->get_name(); else path = String(p->get_name()) + "/" + p->get_path_to(n); - print_line(itos(p_obj->get_instance_id()) + "- Stray Node: " + path + " (Type: " + n->get_class() + ")"); + print_line(itos(p_obj->get_instance_id()) + " - Stray Node: " + path + " (Type: " + n->get_class() + ")"); } void Node::_print_stray_nodes() { diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index e99f785848..1d23650a1e 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1195,8 +1195,6 @@ void SceneTree::_update_root_rect() { VisualServer::get_singleton()->black_bars_set_margins(0, 0, 0, 0); } - //print_line("VP SIZE: "+viewport_size+" OFFSET: "+offset+" = "+(offset*2+viewport_size)); - //print_line("SS: "+video_mode); switch (stretch_mode) { case STRETCH_MODE_2D: { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index f92b6e7583..b6d0a0caa8 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1506,12 +1506,6 @@ Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_ if (Object::cast_to<Viewport>(p_node)) return NULL; - Control *c = Object::cast_to<Control>(p_node); - - if (c) { - //print_line("at "+String(c->get_path())+" POS "+c->get_position()+" bt "+p_xform); - } - //subwindows first!! if (!p_node->is_visible()) { @@ -1524,6 +1518,8 @@ Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_ if (matrix.basis_determinant() == 0.0f) return NULL; + Control *c = Object::cast_to<Control>(p_node); + if (!c || !c->clips_input() || c->has_point(matrix.affine_inverse().xform(p_global))) { for (int i = p_node->get_child_count() - 1; i >= 0; i--) { @@ -1654,7 +1650,6 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { */ gui.mouse_focus = _gui_find_control(pos); - //print_line("has mf "+itos(gui.mouse_focus!=NULL)); gui.mouse_focus_button = mb->get_button_index(); if (!gui.mouse_focus) { @@ -1683,11 +1678,6 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { arr.push_back(gui.mouse_focus->get_class()); ScriptDebugger::get_singleton()->send_message("click_ctrl", arr); } - -/*if (bool(GLOBAL_DEF("debug/print_clicked_control",false))) { - - print_line(String(gui.mouse_focus->get_path())+" - "+pos); - }*/ #endif if (mb->get_button_index() == BUTTON_LEFT) { //assign focus diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 7041b62487..58e6db3f5e 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -2906,8 +2906,6 @@ bool Animation::_transform_track_optimize_key(const TKey<TransformKey> &t0, cons //able to optimize more erase = false; } else { - - //print_line(itos(i)+"because of interp"); } } } diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp index 39206ed043..5694099754 100644 --- a/scene/resources/bit_mask.cpp +++ b/scene/resources/bit_mask.cpp @@ -492,18 +492,14 @@ static void fill_bits(const BitMap *p_src, Ref<BitMap> &p_map, const Point2i &p_ } } while (reenter || popped); -#ifdef DEBUG_ENABLED - print_line("max stack size: " + itos(stack.size())); -#endif + print_verbose("BitMap: Max stack size: " + itos(stack.size())); } Vector<Vector<Vector2> > BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, float p_epsilon) const { Rect2i r = Rect2i(0, 0, width, height).clip(p_rect); + print_verbose("BitMap: Rect: " + r); -#ifdef DEBUG_ENABLED - print_line("Rect: " + r); -#endif Point2i from; Ref<BitMap> fill; fill.instance(); @@ -515,13 +511,9 @@ Vector<Vector<Vector2> > BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, fl if (!fill->get_bit(Point2(j, i)) && get_bit(Point2(j, i))) { Vector<Vector2> polygon = _march_square(r, Point2i(j, i)); -#ifdef DEBUG_ENABLED - print_line("pre reduce: " + itos(polygon.size())); -#endif + print_verbose("BitMap: Pre reduce: " + itos(polygon.size())); polygon = reduce(polygon, r, p_epsilon); -#ifdef DEBUG_ENABLED - print_line("post reduce: " + itos(polygon.size())); -#endif + print_verbose("BitMap: Post reduce: " + itos(polygon.size())); polygons.push_back(polygon); fill_bits(this, fill, Point2i(j, i), r); } diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 2f2abd4e08..c536f9c1d2 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -435,8 +435,6 @@ DynamicFontAtSize::TexturePosition DynamicFontAtSize::_find_texture_pos_for_glyp break; } - //print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" X: "+itos(tex_x)+" Y: "+itos(tex_y)); - if (ret.index == -1) { //could not find texture to fit, create one ret.x = 0; diff --git a/scene/resources/dynamic_font_stb.cpp b/scene/resources/dynamic_font_stb.cpp index 29f1106d16..be394e19c4 100644 --- a/scene/resources/dynamic_font_stb.cpp +++ b/scene/resources/dynamic_font_stb.cpp @@ -214,7 +214,6 @@ void DynamicFontAtSize::_update_char(CharType p_char) { int advance; stbtt_GetCodepointHMetrics(&font->info, p_char, &advance, 0); - //print_line("char has no bitmap: "+itos(p_char)+" but advance is "+itos(advance*scale)); Character ch; ch.texture_idx = -1; ch.advance = advance * scale; @@ -279,8 +278,6 @@ void DynamicFontAtSize::_update_char(CharType p_char) { break; } - //print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" X: "+itos(tex_x)+" Y: "+itos(tex_y)); - if (tex_index == -1) { //could not find texture to fit, create one tex_x = 0; @@ -364,8 +361,6 @@ void DynamicFontAtSize::_update_char(CharType p_char) { chr.rect = Rect2(tex_x + rect_margin, tex_y + rect_margin, w, h); - //print_line("CHAR: "+String::chr(p_char)+" TEX INDEX: "+itos(tex_index)+" RECT: "+chr.rect+" X OFS: "+itos(xofs)+" Y OFS: "+itos(yofs)); - char_map[p_char] = chr; stbtt_FreeBitmap(cpbitmap, NULL); diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index dcd87a2a61..042cf28fec 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -1241,7 +1241,7 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe surfaces_tools.push_back(st); //stay there } - print_line("gen indices: " + itos(gen_index_count)); + print_verbose("Mesh: Gen indices: " + itos(gen_index_count)); //go through all indices for (int i = 0; i < gen_index_count; i += 3) { diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 07783d5f4a..f034e07ff9 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -106,7 +106,6 @@ Node *SceneState::instance(GenEditState p_edit_state) const { if (i == 0 && base_scene_idx >= 0) { //scene inheritance on root node - //print_line("scene inherit"); Ref<PackedScene> sdata = props[base_scene_idx]; ERR_FAIL_COND_V(!sdata.is_valid(), NULL); node = sdata->instance(p_edit_state == GEN_EDIT_STATE_DISABLED ? PackedScene::GEN_EDIT_STATE_DISABLED : PackedScene::GEN_EDIT_STATE_INSTANCE); //only main gets main edit state @@ -117,7 +116,6 @@ Node *SceneState::instance(GenEditState p_edit_state) const { } else if (n.instance >= 0) { //instance a scene into this node - //print_line("instance"); if (n.instance & FLAG_INSTANCE_IS_PLACEHOLDER) { String path = props[n.instance & FLAG_MASK]; @@ -141,7 +139,6 @@ Node *SceneState::instance(GenEditState p_edit_state) const { } } else if (n.type == TYPE_INSTANCED) { - //print_line("instanced"); //get the node from somewhere, it likely already exists from another instance if (parent) { node = parent->_get_child_by_name(snames[n.name]); @@ -152,7 +149,6 @@ Node *SceneState::instance(GenEditState p_edit_state) const { #endif } } else if (ClassDB::is_class_enabled(snames[n.type])) { - //print_line("created"); //node belongs to this scene and must be created Object *obj = ClassDB::instance(snames[n.type]); if (!Object::cast_to<Node>(obj)) { @@ -491,15 +487,6 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map if (E->get().usage & PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE) { isdefault = true; //is script default value } - /* - if (nd.instance<0 && ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO) && value.is_zero()) || ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONONE) && value.is_one())) { - continue; - } - */ - - //print_line("PASSED!"); - //print_line("at: "+String(p_node->get_name())+"::"+name+": - nz: "+itos(E->get().usage&PROPERTY_USAGE_STORE_IF_NONZERO)+" no: "+itos(E->get().usage&PROPERTY_USAGE_STORE_IF_NONONE)); - //print_line("value: "+String(value)+" is zero: "+itos(value.is_zero())+" is one" +itos(value.is_one())); if (pack_state_stack.size()) { // we are on part of an instanced subscene diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index ec489e5c5b..81fabf40fe 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -755,15 +755,11 @@ void SurfaceTool::append_from(const Ref<Mesh> &p_existing, int p_surface, const for (List<int>::Element *E = nindices.front(); E; E = E->next()) { int dst_index = E->get() + vfrom; - /* - if (dst_index <0 || dst_index>=vertex_array.size()) { - print_line("invalid index!"); - } - */ index_array.push_back(dst_index); } - if (index_array.size() % 3) - print_line("IA not div of 3?"); + if (index_array.size() % 3) { + WARN_PRINT("SurfaceTool: Index array not a multiple of 3."); + } } //mikktspace callbacks diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index c763c9bc79..ea3273713e 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -480,7 +480,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla flags = f->get_32(); //texture flags! uint32_t df = f->get_32(); //data format -/* + /* print_line("width: " + itos(tw)); print_line("height: " + itos(th)); print_line("flags: " + itos(flags)); diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index d8fc3677fb..dac12205b6 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -431,7 +431,6 @@ String VisualShader::generate_preview_shader(Type p_type, int p_node, int p_port global_code += "\n\n"; String final_code = global_code; final_code += code; - //print_line(final_code); return final_code; } @@ -914,7 +913,6 @@ void VisualShader::_update_shader() const { String final_code = global_code; final_code += code; const_cast<VisualShader *>(this)->set_code(final_code); - //print_line(final_code); for (int i = 0; i < default_tex_params.size(); i++) { const_cast<VisualShader *>(this)->set_default_texture_param(default_tex_params[i].name, default_tex_params[i].param); } |