diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-14 12:26:56 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-14 14:52:23 +0100 |
| commit | 93ab45b6b5c4f8e0619e963156c983009d399a9d (patch) | |
| tree | 80e55993f29ad7bf502ef7388eef78114b2dc4ab /scene | |
| parent | 78e90ac60b81f17fdf8c319357f16962e92e6106 (diff) | |
| download | redot-engine-93ab45b6b5c4f8e0619e963156c983009d399a9d.tar.gz | |
Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
Diffstat (limited to 'scene')
64 files changed, 300 insertions, 228 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index ac24e4ee97..64d6ef5560 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -429,7 +429,7 @@ void AnimatedSprite::_notification(int p_what) { //texture->draw_rect(ci,dst_rect,false,modulate); texture->draw_rect_region(ci,dst_rect,Rect2(Vector2(),texture->get_size())); -// VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); + //VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); } break; } diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index adeaa34c3e..882ae69a2b 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -145,7 +145,7 @@ Transform2D Camera2D::get_camera_transform() { float c = smoothing*get_fixed_process_delta_time(); smoothed_camera_pos = ((camera_pos-smoothed_camera_pos)*c)+smoothed_camera_pos; ret_camera_pos=smoothed_camera_pos; - // camera_pos=camera_pos*(1.0-smoothing)+new_camera_pos*smoothing; + //camera_pos=camera_pos*(1.0-smoothing)+new_camera_pos*smoothing; } else { ret_camera_pos=smoothed_camera_pos=camera_pos; diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 550b01c2f2..809469c3a3 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1115,7 +1115,7 @@ CanvasItem::CanvasItem() : xform_change(this) { drawing=false; behind=false; block_transform_notify=false; -// viewport=NULL; + //viewport=NULL; canvas_layer=NULL; use_parent_material=false; global_invalid=true; diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index e90bf8b96e..3668963251 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -282,7 +282,7 @@ void CollisionObject2D::set_shape(int p_shape_idx, const Ref<Shape2D>& p_shape) else Physics2DServer::get_singleton()->body_set_shape(get_rid(),p_shape_idx,p_shape->get_rid()); -// _update_shapes(); + //_update_shapes(); } void CollisionObject2D::set_shape_transform(int p_shape_idx, const Transform2D& p_transform) { @@ -295,7 +295,7 @@ void CollisionObject2D::set_shape_transform(int p_shape_idx, const Transform2D& else Physics2DServer::get_singleton()->body_set_shape_transform(get_rid(),p_shape_idx,p_transform); -// _update_shapes(); + //_update_shapes(); } Ref<Shape2D> CollisionObject2D::get_shape(int p_shape_idx) const { diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp index 2d0fbf1cfc..03c2c698eb 100644 --- a/scene/2d/navigation2d.cpp +++ b/scene/2d/navigation2d.cpp @@ -432,7 +432,7 @@ 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"); + //print_line("NOU OPEN LIST"); break; } //check open list diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index b91b2d4f56..012120d023 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -310,7 +310,7 @@ void NavigationPolygonInstance::set_enabled(bool p_enabled) { if (get_tree()->is_editor_hint() || get_tree()->is_debugging_navigation_hint()) update(); -// update_gizmo(); + //update_gizmo(); } bool NavigationPolygonInstance::is_enabled() const { diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 46a345f1cb..feecbd9e20 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -375,7 +375,7 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap if (!E) { E = contact_monitor->body_map.insert(objid,BodyState()); -// E->get().rc=0; + //E->get().rc=0; E->get().in_scene=node && node->is_inside_tree(); if (node) { node->connect(SceneStringNames::get_singleton()->tree_entered,this,SceneStringNames::get_singleton()->_body_enter_tree,make_binds(objid)); @@ -494,7 +494,7 @@ void RigidBody2D::_direct_state_changed(Object *p_state) { int local_shape = state->get_contact_local_shape(i); int shape = state->get_contact_collider_shape(i); -// bool found=false; + //bool found=false; Map<ObjectID,BodyState>::Element *E=contact_monitor->body_map.find(obj); if (!E) { @@ -1141,8 +1141,10 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) { float d = a.distance_to(b); - //if (d<margin) - /// continue; + /* + if (d<margin) + continue; + */ recover_motion+=(b-a)*0.4; } diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp index 99147b0a39..20db63b66f 100644 --- a/scene/2d/screen_button.cpp +++ b/scene/2d/screen_button.cpp @@ -307,8 +307,10 @@ Rect2 TouchScreenButton::get_item_rect() const { if (texture.is_null()) return Rect2(0,0,1,1); - //if (texture.is_null()) - // return CanvasItem::get_item_rect(); + /* + if (texture.is_null()) + return CanvasItem::get_item_rect(); + */ return Rect2(Size2(),texture->get_size()); } diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 01aa99c6a4..bea45aae4e 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -255,8 +255,10 @@ Rect2 Sprite::get_item_rect() const { if (texture.is_null()) return Rect2(0,0,1,1); - //if (texture.is_null()) - // return CanvasItem::get_item_rect(); + /* + if (texture.is_null()) + return CanvasItem::get_item_rect(); + */ Size2i s; @@ -510,8 +512,10 @@ Rect2 ViewportSprite::get_item_rect() const { if (texture.is_null()) return Rect2(0,0,1,1); - //if (texture.is_null()) - // return CanvasItem::get_item_rect(); + /* + if (texture.is_null()) + return CanvasItem::get_item_rect(); + */ Size2i s; diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 26f9f7b879..a7bb53bf63 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -610,7 +610,7 @@ Map<TileMap::PosKey,TileMap::Quadrant>::Element *TileMap::_create_quadrant(const xform.set_origin( q.pos ); -// q.canvas_item = VisualServer::get_singleton()->canvas_item_create(); + //q.canvas_item = VisualServer::get_singleton()->canvas_item_create(); q.body=Physics2DServer::get_singleton()->body_create(use_kinematic?Physics2DServer::BODY_MODE_KINEMATIC:Physics2DServer::BODY_MODE_STATIC); Physics2DServer::get_singleton()->body_attach_object_instance_ID(q.body,get_instance_ID()); Physics2DServer::get_singleton()->body_set_layer_mask(q.body,collision_layer); @@ -849,8 +849,10 @@ void TileMap::_set_tile_data(const PoolVector<int>& p_data) { bool transpose = v&(1<<31); v&=(1<<29)-1; -// if (x<-20 || y <-20 || x>4000 || y>4000) -// continue; + /* + if (x<-20 || y <-20 || x>4000 || y>4000) + continue; + */ set_cell(x,y,v,flip_h,flip_v,transpose); } diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp index 59d8d7ecac..e42439bf3b 100644 --- a/scene/3d/baked_light_instance.cpp +++ b/scene/3d/baked_light_instance.cpp @@ -1524,7 +1524,7 @@ void BakedLight::set_cell_subdiv(int p_subdiv) { cell_subdiv=p_subdiv; -// VS::get_singleton()->baked_light_set_subdivision(baked_light,p_subdiv); + //VS::get_singleton()->baked_light_set_subdivision(baked_light,p_subdiv); } int BakedLight::get_cell_subdiv() const { @@ -1745,7 +1745,7 @@ void BakedLight::_bind_methods() { BakedLight::BakedLight() { -// baked_light=VisualServer::get_singleton()->baked_light_create(); + //baked_light=VisualServer::get_singleton()->baked_light_create(); VS::get_singleton()->instance_set_base(get_instance(),baked_light); cell_subdiv=8; @@ -1815,7 +1815,7 @@ void BakedLightSampler::_bind_methods() { ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/strength",PROPERTY_HINT_RANGE,"0.01,16,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_STRENGTH); ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/attenuation",PROPERTY_HINT_EXP_EASING),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION); ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0.01,1.0,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); -// ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0,20,1"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); + //ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0,20,1"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); ADD_PROPERTY( PropertyInfo(Variant::REAL,"params/resolution",PROPERTY_HINT_RANGE,"4,32,1"),_SCS("set_resolution"),_SCS("get_resolution")); } diff --git a/scene/3d/body_shape.cpp b/scene/3d/body_shape.cpp index ff8b0f15bf..f6ec8639d3 100644 --- a/scene/3d/body_shape.cpp +++ b/scene/3d/body_shape.cpp @@ -96,7 +96,7 @@ void CollisionShape::_update_indicator() { pt = VS::PRIMITIVE_LINES; } else if (shape->cast_to<SphereShape>()) { -// VisualServer *vs=VisualServer::get_singleton(); + //VisualServer *vs=VisualServer::get_singleton(); SphereShape *shapeptr=shape->cast_to<SphereShape>(); @@ -337,7 +337,7 @@ void CollisionShape::_notification(int p_what) { //indicator_instance = VisualServer::get_singleton()->instance_create2(indicator,get_world()->get_scenario()); } break; case NOTIFICATION_TRANSFORM_CHANGED: { - // VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); + //VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); if (can_update_body && updating_body) { _update_body(); } diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index 8499542850..3f36caf62c 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -190,9 +190,11 @@ void Camera::_update_camera() { tr.origin+=tr.basis.get_axis(0)*h_offset; VisualServer::get_singleton()->camera_set_transform( camera, tr ); -// here goes listener stuff -// if (viewport_ptr && is_inside_scene() && is_current()) -// get_viewport()->_camera_transform_changed_notify(); + // here goes listener stuff + /* + if (viewport_ptr && is_inside_scene() && is_current()) + get_viewport()->_camera_transform_changed_notify(); + */ if (is_inside_tree() && is_current()) { get_viewport()->_camera_transform_changed_notify(); @@ -400,7 +402,7 @@ Vector3 Camera::project_ray_origin(const Point2& p_pos) const { #endif ERR_FAIL_COND_V( viewport_size.y == 0, Vector3() ); -// float aspect = viewport_size.x / viewport_size.y; + //float aspect = viewport_size.x / viewport_size.y; if (mode == PROJECTION_PERSPECTIVE) { diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index 96d8d13a29..7bba382db0 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -339,7 +339,7 @@ CollisionObject::CollisionObject(RID p_rid, bool p_area) { } else { PhysicsServer::get_singleton()->body_attach_object_instance_ID(rid,get_instance_ID()); } -// set_transform_notify(true); + //set_transform_notify(true); } diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 13e7c175ed..54d7cb6b9e 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -1182,7 +1182,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug){ if (p_create_visual_debug) { - // _create_debug_mesh(&baker); + //_create_debug_mesh(&baker); } diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index 40666a60dc..9bb19880bf 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -368,7 +368,7 @@ 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"); + //print_line("NOU OPEN LIST"); break; } //check open list diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index 9e37658cd9..72fab4cccc 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -325,7 +325,7 @@ RES Particles::_get_gizmo_geometry() const { mat->set_parameter( FixedSpatialMaterial::PARAM_EMISSION,Color(0.5,0.7,0.8) ); mat->set_blend_mode( Material::BLEND_MODE_ADD ); mat->set_flag(Material::FLAG_DOUBLE_SIDED,true); -// mat->set_hint(Material::HINT_NO_DEPTH_DRAW,true); + //mat->set_hint(Material::HINT_NO_DEPTH_DRAW,true); surface_tool->begin(Mesh::PRIMITIVE_TRIANGLES); @@ -334,7 +334,7 @@ RES Particles::_get_gizmo_geometry() const { int sides=16; int sections=24; -// float len=1; + //float len=1; float deg=Math::deg2rad(var[VAR_SPREAD]*180); if (deg==180) deg=179.5; diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 9235eae643..0a44ad9c3d 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -437,7 +437,7 @@ void RigidBody::_direct_state_changed(Object *p_state) { int local_shape = state->get_contact_local_shape(i); int shape = state->get_contact_collider_shape(i); -// bool found=false; + //bool found=false; Map<ObjectID,BodyState>::Element *E=contact_monitor->body_map.find(obj); if (!E) { @@ -1000,7 +1000,7 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { if (collide_character) mask|=PhysicsDirectSpaceState::TYPE_MASK_CHARACTER_BODY; -// print_line("motion: "+p_motion+" margin: "+rtos(margin)); + //print_line("motion: "+p_motion+" margin: "+rtos(margin)); //print_line("margin: "+rtos(margin)); @@ -1038,10 +1038,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { #if 0 float d = a.distance_to(b); - //if (d<margin) - /// continue; - /// - /// + /* + if (d<margin) + continue; + */ recover_motion+=(b-a)*0.2; #else float dist = a.distance_to(b); @@ -1144,7 +1144,7 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { colliding=false; } - // print_line("Rest Travel: "+rest.normal); + //print_line("Rest Travel: "+rest.normal); } @@ -1159,8 +1159,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { } Vector3 motion=p_motion*safe; - //if (colliding) - // motion+=normal*0.001; + /* + if (colliding) + motion+=normal*0.001; + */ Transform gt = get_global_transform(); gt.origin+=motion; set_global_transform(gt); diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index 5e576b4960..f2e339604e 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -482,7 +482,7 @@ Transform Skeleton::get_bone_pose(int p_bone) const { void Skeleton::set_bone_custom_pose(int p_bone, const Transform& p_custom_pose) { ERR_FAIL_INDEX( p_bone, bones.size() ); -// ERR_FAIL_COND( !is_inside_scene() ); + //ERR_FAIL_COND( !is_inside_scene() ); bones[p_bone].custom_pose_enable=(p_custom_pose!=Transform()); diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 788ef7f935..63a27f3554 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -95,8 +95,10 @@ void Spatial::_propagate_transform_changed(Spatial *p_origin) { return; } -// if (data.dirty&DIRTY_GLOBAL) -// return; //already dirty + /* + if (data.dirty&DIRTY_GLOBAL) + return; //already dirty + */ data.children_lock++; @@ -179,7 +181,7 @@ void Spatial::_notification(int p_what) { #ifdef TOOLS_ENABLED if (get_tree()->is_editor_hint()) { -// get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); + //get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); get_tree()->call_group_flags(0,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); if (!data.gizmo_disabled) { diff --git a/scene/3d/spatial_stream_player.cpp b/scene/3d/spatial_stream_player.cpp index 087e60b48b..1f9765c1d3 100644 --- a/scene/3d/spatial_stream_player.cpp +++ b/scene/3d/spatial_stream_player.cpp @@ -153,10 +153,12 @@ void SpatialStreamPlayer::play(float p_from_offset) { SpatialSoundServer::get_singleton()->source_set_audio_stream(get_source_rid(),&internal_stream); -// AudioServer::get_singleton()->stream_set_active(stream_rid,true); -// AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); -// if (stream->get_update_mode()!=AudioStream::UPDATE_NONE) -// set_idle_process(true); + /* + AudioServer::get_singleton()->stream_set_active(stream_rid,true); + AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); + if (stream->get_update_mode()!=AudioStream::UPDATE_NONE) + set_idle_process(true); + */ } @@ -289,8 +291,10 @@ bool SpatialStreamPlayer::has_autoplay() const { void SpatialStreamPlayer::set_paused(bool p_paused) { paused=p_paused; - //if (stream.is_valid()) - // stream->set_paused(p_paused); + /* + if (stream.is_valid()) + stream->set_paused(p_paused); + */ } bool SpatialStreamPlayer::is_paused() const { diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index a2a96d7d0e..9f0c91c4b8 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -563,8 +563,10 @@ Rect2 Sprite3D::get_item_rect() const { if (texture.is_null()) return Rect2(0,0,1,1); - //if (texture.is_null()) - // return CanvasItem::get_item_rect(); + /* + if (texture.is_null()) + return CanvasItem::get_item_rect(); + */ Size2i s; @@ -1130,7 +1132,7 @@ void AnimatedSprite3D::_notification(int p_what) { //texture->draw_rect(ci,dst_rect,false,modulate); texture->draw_rect_region(ci,dst_rect,Rect2(Vector2(),texture->get_size()),modulate); -// VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); + //VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); } break; #endif diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h index f5d3957370..a14ce40495 100644 --- a/scene/3d/sprite_3d.h +++ b/scene/3d/sprite_3d.h @@ -185,7 +185,7 @@ public: virtual Rect2 get_item_rect() const; Sprite3D(); -// ~Sprite3D(); + //~Sprite3D(); }; #if 0 @@ -215,7 +215,7 @@ public: virtual Rect2 get_item_rect() const; AnimatedSprite3D(); -// ~AnimatedSprite3D(); + //~AnimatedSprite3D(); }; #endif diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 1cb443225c..a3f05f719d 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -340,10 +340,11 @@ void VehicleBody::_update_wheel_transform(VehicleWheel& wheel ,PhysicsDirectBody wheel.m_raycastInfo.m_isInContact = false; Transform chassisTrans = s->get_transform(); - //if (interpolatedTransform && (getRigidBody()->getMotionState())) - //{ - // getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); - //} + /* + if (interpolatedTransform && (getRigidBody()->getMotionState())) { + getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); + } + */ wheel.m_raycastInfo.m_hardPointWS = chassisTrans.xform( wheel.m_chassisConnectionPointCS ); //wheel.m_raycastInfo.m_hardPointWS+=s->get_linear_velocity()*s->get_step(); @@ -360,8 +361,8 @@ 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(); + //up = right.cross(fwd); + //up.normalize(); //rotate around steering over de wheelAxleWS real_t steering = wheel.steers?m_steeringValue:0.0; @@ -371,8 +372,10 @@ void VehicleBody::_update_wheel(int p_idx,PhysicsDirectBodyState *s) { Basis rotatingMat(right,-wheel.m_rotation); -// if (p_idx==1) -// print_line("steeringMat " +steeringMat); + /* + if (p_idx==1) + print_line("steeringMat " +steeringMat); + */ Basis basis2( right[0],up[0],fwd[0], @@ -502,7 +505,7 @@ void VehicleBody::_update_suspension(PhysicsDirectBodyState *s) if ( wheel_info.m_raycastInfo.m_isInContact ) { real_t force; - // Spring + //Spring { real_t susp_length = wheel_info.m_suspensionRestLength; real_t current_length = wheel_info.m_raycastInfo.m_suspensionLength; diff --git a/scene/3d/vehicle_body.h b/scene/3d/vehicle_body.h index cd627f8998..273e63d741 100644 --- a/scene/3d/vehicle_body.h +++ b/scene/3d/vehicle_body.h @@ -63,7 +63,7 @@ friend class VehicleBody; VehicleBody *body; -// btVector3 m_wheelAxleCS; // const or modified by steering ? + //btVector3 m_wheelAxleCS; // const or modified by steering ? real_t m_steering; real_t m_rotation; diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index ca78f8e21f..ec37aa2bc4 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -102,7 +102,7 @@ void VisualInstance::_notification(int p_what) { VisualServer::get_singleton()->instance_set_scenario( instance, RID() ); VisualServer::get_singleton()->instance_set_room(instance,RID()); VisualServer::get_singleton()->instance_attach_skeleton( instance, RID() ); - // VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() ); + //VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() ); } break; case NOTIFICATION_VISIBILITY_CHANGED: { @@ -368,7 +368,7 @@ void GeometryInstance::_bind_methods() { ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_distance",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_distance"), _SCS("get_lod_max_distance")); ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_hysteresis",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_hysteresis"), _SCS("get_lod_max_hysteresis")); -// ADD_SIGNAL( MethodInfo("visibility_changed")); + //ADD_SIGNAL( MethodInfo("visibility_changed")); BIND_CONSTANT(FLAG_CAST_SHADOW ); BIND_CONSTANT(FLAG_BILLBOARD ); @@ -399,7 +399,7 @@ GeometryInstance::GeometryInstance() { shadow_casting_setting=SHADOW_CASTING_SETTING_ON; extra_cull_margin=0; -// VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0); + //VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0); } diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 7fc2234d86..8b81c45597 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -426,8 +426,10 @@ void AnimationPlayer::_animation_process_animation(AnimationData* p_anim,float p Variant value=a->value_track_interpolate(i,p_time); //thanks to trigger mode, this should be solved now.. - //if (p_delta==0 && value.get_type()==Variant::STRING) - // continue; // doing this with strings is messy, should find another way + /* + if (p_delta==0 && value.get_type()==Variant::STRING) + continue; // doing this with strings is messy, should find another way + */ if (pa->accum_pass!=accum_pass) { ERR_CONTINUE( cache_update_prop_size >= NODE_CACHE_UPDATE_MAX ); cache_update_prop[cache_update_prop_size++]=pa; @@ -713,7 +715,7 @@ void AnimationPlayer::_animation_process(float p_delta) { -// bool any_active=false; + //bool any_active=false; if (playback.current.from) { diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index dbcdb284be..26c82fe1ae 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -506,10 +506,10 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode float rem = 0; if (!an->animation.is_null()) { - // float pos = an->time; -// float delta = p_time; + //float pos = an->time; + //float delta = p_time; - // const Animation *a = an->animation.operator->(); + //const Animation *a = an->animation.operator->(); if (p_seek) { an->time=p_time; @@ -1502,11 +1502,11 @@ Error AnimationTreePlayer::connect(const StringName& p_src_node,const StringName ERR_FAIL_COND_V( !node_map.has(p_dst_node) , ERR_INVALID_PARAMETER); ERR_FAIL_COND_V( p_src_node==p_dst_node , ERR_INVALID_PARAMETER); -// NodeBase *src = node_map[p_src_node]; + //NodeBase *src = node_map[p_src_node]; NodeBase *dst = node_map[p_dst_node]; ERR_FAIL_INDEX_V( p_dst_input, dst->inputs.size(), ERR_INVALID_PARAMETER); -// int oldval = dst->inputs[p_dst_input].node; + //int oldval = dst->inputs[p_dst_input].node; for(Map<StringName,NodeBase*>::Element *E=node_map.front();E;E=E->next()) { diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp index 2f53dc239f..9e506034a6 100644 --- a/scene/audio/stream_player.cpp +++ b/scene/audio/stream_player.cpp @@ -167,8 +167,10 @@ void StreamPlayer::play(float p_from_offset) { sp_update(); AudioServer::get_singleton()->stream_set_active(stream_rid,true); AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); -// if (stream->get_update_mode()!=AudioStream::UPDATE_NONE) -// set_idle_process(true); + /* + if (stream->get_update_mode()!=AudioStream::UPDATE_NONE) + set_idle_process(true); + */ } @@ -305,8 +307,10 @@ bool StreamPlayer::has_autoplay() const { void StreamPlayer::set_paused(bool p_paused) { paused=p_paused; - //if (stream.is_valid()) - // stream->set_paused(p_paused); + /* + if (stream.is_valid()) + stream->set_paused(p_paused); + */ } bool StreamPlayer::is_paused() const { diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 8949a080c1..0b40983ddf 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -108,7 +108,7 @@ void BaseButton::_gui_input(InputEvent p_event) { emit_signal("button_up"); /* this is pointless if (status.press_attempt && status.pressing_inside) { -// released(); + //released(); emit_signal("released"); } */ diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index 600b6141c5..7ca44ac27b 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -296,7 +296,7 @@ BoxContainer::BoxContainer(bool p_vertical) { vertical=p_vertical; align = ALIGN_BEGIN; -// set_ignore_mouse(true); + //set_ignore_mouse(true); set_mouse_filter(MOUSE_FILTER_PASS); } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 2e6dd48442..533d24f998 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -468,10 +468,12 @@ void Control::_notification(int p_notification) { } - //if (data.theme.is_null() && data.parent && data.parent->data.theme_owner) { - // data.theme_owner=data.parent->data.theme_owner; - // notification(NOTIFICATION_THEME_CHANGED); - //} + /* + if (data.theme.is_null() && data.parent && data.parent->data.theme_owner) { + data.theme_owner=data.parent->data.theme_owner; + notification(NOTIFICATION_THEME_CHANGED); + } + */ } break; case NOTIFICATION_EXIT_CANVAS: { @@ -503,10 +505,12 @@ void Control::_notification(int p_notification) { data.parent=NULL; data.parent_canvas_item=NULL; - //if (data.theme_owner && data.theme.is_null()) { - // data.theme_owner=NULL; - //notification(NOTIFICATION_THEME_CHANGED); - //} + /* + if (data.theme_owner && data.theme.is_null()) { + data.theme_owner=NULL; + notification(NOTIFICATION_THEME_CHANGED); + } + */ } break; case NOTIFICATION_MOVED_IN_PARENT: { @@ -2444,7 +2448,7 @@ bool Control::is_clipping_contents() { void Control::_bind_methods() { -// ClassDB::bind_method(_MD("_window_resize_event"),&Control::_window_resize_event); + //ClassDB::bind_method(_MD("_window_resize_event"),&Control::_window_resize_event); ClassDB::bind_method(_MD("_size_changed"),&Control::_size_changed); ClassDB::bind_method(_MD("_update_minimum_size"),&Control::_update_minimum_size); diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h index c7beeea7a3..6650c5eb5d 100644 --- a/scene/gui/dialogs.h +++ b/scene/gui/dialogs.h @@ -94,7 +94,7 @@ class AcceptDialog : public WindowDialog { HBoxContainer *hbc; Label *label; Button *ok; -// Button *cancel; no more cancel (there is X on tht titlebar) + //Button *cancel; no more cancel (there is X on tht titlebar) bool hide_on_ok; diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 2a73e32864..ba1ab1afa8 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -295,7 +295,7 @@ void GraphEdit::_notification(int p_what) { zoom_reset->set_icon(get_icon("reset")); zoom_plus->set_icon(get_icon("more")); snap_button->set_icon(get_icon("snap")); -// zoom_icon->set_texture( get_icon("Zoom", "EditorIcons")); + //zoom_icon->set_texture( get_icon("Zoom", "EditorIcons")); } if (p_what==NOTIFICATION_DRAW) { diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index 7c67d443af..597169ca83 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -70,7 +70,7 @@ void GridContainer::_notification(int p_what) { else row_minh[row]=ms.height; - // print_line("store row "+itos(row)+" mw "+itos(ms.height)); + //print_line("store row "+itos(row)+" mw "+itos(ms.height)); if (c->get_h_size_flags()&SIZE_EXPAND) col_expanded.insert(col); @@ -136,7 +136,7 @@ void GridContainer::_notification(int p_what) { Point2 p(col_ofs,row_ofs); -// print_line("col: "+itos(col)+" row: "+itos(row)+" col_ofs: "+itos(col_ofs)+" row_ofs: "+itos(row_ofs)); + //print_line("col: "+itos(col)+" row: "+itos(row)+" col_ofs: "+itos(col_ofs)+" row_ofs: "+itos(row_ofs)); fit_child_in_rect(c,Rect2(p,s)); //print_line("col: "+itos(col)+" row: "+itos(row)+" rect: "+Rect2(p,s)); diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 89a937a301..3a72e0e445 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -96,8 +96,6 @@ void LineEdit::_gui_input(InputEvent p_event) { } } - // if (!editable) - // non_editable_clicked_signal.call(); update(); } else { @@ -873,7 +871,7 @@ void LineEdit::delete_char() { if (cursor_pos==window_pos) { - // set_window_pos(cursor_pos-get_window_length()); + //set_window_pos(cursor_pos-get_window_length()); } _text_changed(); diff --git a/scene/gui/patch_9_rect.cpp b/scene/gui/patch_9_rect.cpp index 698d4aaf29..4e1856778e 100644 --- a/scene/gui/patch_9_rect.cpp +++ b/scene/gui/patch_9_rect.cpp @@ -40,7 +40,7 @@ void NinePatchRect::_notification(int p_what) { Size2 s=get_size(); RID ci = get_canvas_item(); VS::get_singleton()->canvas_item_add_nine_patch(ci,Rect2(Point2(),s),region_rect,texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),VS::NINE_PATCH_STRETCH,VS::NINE_PATCH_STRETCH,draw_center); -// draw_texture_rect(texture,Rect2(Point2(),s),false,modulate); + //draw_texture_rect(texture,Rect2(Point2(),s),false,modulate); /* Vector<Point2> points; @@ -98,8 +98,10 @@ void NinePatchRect::set_texture(const Ref<Texture>& p_tex) { return; texture=p_tex; update(); - //if (texture.is_valid()) - // texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites + /* + if (texture.is_valid()) + texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites + */ minimum_size_changed(); emit_signal("texture_changed"); } diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index c5ac6778a9..65e7c3ab39 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -136,7 +136,7 @@ int PopupMenu::_get_mouse_over(const Point2& p_over) const { Ref<Font> font = get_font("font"); int vseparation = get_constant("vseparation"); -// int hseparation = get_constant("hseparation"); + //int hseparation = get_constant("hseparation"); float font_h=font->get_height(); diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index da267b9f27..fc406ff0f5 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -51,9 +51,11 @@ void ScrollBar::_gui_input(InputEvent p_event) { if (b.button_index==5 && b.pressed) { - //if (orientation==VERTICAL) - // set_val( get_val() + get_page() / 4.0 ); - //else + /* + if (orientation==VERTICAL) + set_val( get_val() + get_page() / 4.0 ); + else + */ set_value( get_value() + get_page() / 4.0 ); accept_event(); @@ -61,9 +63,11 @@ void ScrollBar::_gui_input(InputEvent p_event) { if (b.button_index==4 && b.pressed) { - //if (orientation==HORIZONTAL) - // set_val( get_val() - get_page() / 4.0 ); - //else + /* + if (orientation==HORIZONTAL) + set_val( get_val() - get_page() / 4.0 ); + else + */ set_value( get_value() - get_page() / 4.0 ); accept_event(); } @@ -425,8 +429,10 @@ double ScrollBar::get_grabber_size() const { return 0; float page = (get_page()>0)? get_page() : 0; -// if (grabber_range < get_step()) -// grabber_range=get_step(); + /* + if (grabber_range < get_step()) + grabber_range=get_step(); + */ double area_size=get_area_size(); double grabber_size = page / range * area_size; @@ -620,12 +626,16 @@ void ScrollBar::_drag_slave_input(const InputEvent& p_input) { if (orientation==HORIZONTAL) set_value(diff.x); - //else - // drag_slave_accum.x=0; + /* + else + drag_slave_accum.x=0; + */ if (orientation==VERTICAL) set_value(diff.y); - //else - // drag_slave_accum.y=0; + /* + else + drag_slave_accum.y=0; + */ time_since_motion=0; } diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index a7cc38846d..ad6e8786d7 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -164,8 +164,10 @@ void Slider::_notification(int p_what) { if (orientation==VERTICAL) { style->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height))); - //if (mouse_inside||has_focus()) - // focus->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height))); + /* + if (mouse_inside||has_focus()) + focus->draw(ci,Rect2i(Point2i(),Size2i(style->get_minimum_size().width+style->get_center_size().width,size.height))); + */ float areasize = size.height - grabber->get_size().height; if (ticks>1) { int tickarea = size.height - tick->get_height(); @@ -179,8 +181,10 @@ void Slider::_notification(int p_what) { grabber->draw(ci,Point2i(size.width/2-grabber->get_size().width/2,size.height - get_as_ratio()*areasize - grabber->get_size().height)); } else { style->draw(ci,Rect2i(Point2i(),Size2i(size.width,style->get_minimum_size().height+style->get_center_size().height))); - //if (mouse_inside||has_focus()) - // focus->draw(ci,Rect2i(Point2i(),Size2i(size.width,style->get_minimum_size().height+style->get_center_size().height))); + /* + if (mouse_inside||has_focus()) + focus->draw(ci,Rect2i(Point2i(),Size2i(size.width,style->get_minimum_size().height+style->get_center_size().height))); + */ float areasize = size.width - grabber->get_size().width; if (ticks>1) { diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 070f9fc72e..ec6be0d19d 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -49,8 +49,10 @@ void SpinBox::_value_changed(double) { void SpinBox::_text_entered(const String& p_string) { - //if (!p_string.is_numeric()) - // return; + /* + if (!p_string.is_numeric()) + return; + */ String value = p_string; if (prefix!="" && p_string.begins_with(prefix)) value = p_string.substr(prefix.length(), p_string.length()-prefix.length()); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 46939765b0..8efff21fc9 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4357,7 +4357,7 @@ void TextEdit::_update_completion_candidates() { if (completion_options.size()==1) { //one option to complete, just complete it automagically _confirm_completion(); - // insert_text_at_cursor(completion_options[0].substr(s.length(),completion_options[0].length()-s.length())); + //insert_text_at_cursor(completion_options[0].substr(s.length(),completion_options[0].length()-s.length())); _cancel_completion(); return; @@ -4732,8 +4732,8 @@ TextEdit::TextEdit() { tab_size=4; text.set_tab_size(tab_size); text.clear(); - // text.insert(1,"Mongolia.."); - // text.insert(2,"PAIS GENEROSO!!"); + //text.insert(1,"Mongolia.."); + //text.insert(2,"PAIS GENEROSO!!"); text.set_color_regions(&color_regions); h_scroll = memnew( HScrollBar ); diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index c7467f9b13..6113fd72c2 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -294,7 +294,7 @@ class TextEdit : public Control { void _scroll_lines_up(); void _scroll_lines_down(); -// void mouse_motion(const Point& p_pos, const Point& p_rel, int p_button_mask); + //void mouse_motion(const Point& p_pos, const Point& p_rel, int p_button_mask); Size2 get_minimum_size() const; int get_row_height() const; diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp index 68755c0ac2..cbb077ef5d 100644 --- a/scene/gui/texture_rect.cpp +++ b/scene/gui/texture_rect.cpp @@ -121,8 +121,10 @@ void TextureRect::set_texture(const Ref<Texture>& p_tex) { texture=p_tex; update(); - //if (texture.is_valid()) - // texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites + /* + if (texture.is_valid()) + texture->set_flags(texture->get_flags()&(~Texture::FLAG_REPEAT)); //remove repeat from texture, it looks bad in sprites + */ minimum_size_changed(); } diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index b50ecc58ef..58c829690f 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -949,8 +949,10 @@ void Tree::draw_item_rect(const TreeItem::Cell& p_cell,const Rect2i& p_rect,cons } -// if (p_tool) -// rect.size.x-=Math::floor(rect.size.y/2); + /* + if (p_tool) + rect.size.x-=Math::floor(rect.size.y/2); + */ Ref<Font> font = cache.font; @@ -1029,7 +1031,7 @@ int Tree::draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2& } //draw separation. -// if (p_item->get_parent()!=root || !hide_root) + //if (p_item->get_parent()!=root || !hide_root) Ref<Font> font = cache.font; @@ -1262,7 +1264,7 @@ int Tree::draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2& } break; case TreeItem::CELL_MODE_CUSTOM: { - // int option = (int)p_item->cells[i].val; + //int option = (int)p_item->cells[i].val; @@ -1414,8 +1416,10 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c emit_signal("item_selected"); emitted_row=true; } - //if (p_col==i) - // p_current->selected_signal.call(p_col); + /* + if (p_col==i) + p_current->selected_signal.call(p_col); + */ } else if (c.selected) { @@ -1672,9 +1676,11 @@ int Tree::propagate_mouse_event(const Point2i &p_pos,int x_ofs,int y_ofs,bool p_ } } - //if (!c.selected && select_mode==SELECT_MULTI) { - // emit_signal("multi_selected",p_item,col,true); - //} + /* + if (!c.selected && select_mode==SELECT_MULTI) { + emit_signal("multi_selected",p_item,col,true); + } + */ update(); } @@ -1997,7 +2003,7 @@ void Tree::_gui_input(InputEvent p_event) { } break; case KEY_LEFT: { -// TreeItem *next = NULL; + //TreeItem *next = NULL; if (!selected_item) break; if (select_mode==SELECT_ROW) @@ -2027,7 +2033,7 @@ void Tree::_gui_input(InputEvent p_event) { next=selected_item->get_next_visible(); -// if (diff < uint64_t(GLOBAL_DEF("gui/incr_search_max_interval_msec",2000))) { + //if (diff < uint64_t(GLOBAL_DEF("gui/incr_search_max_interval_msec",2000))) { if (last_keypress!=0) { //incr search next int col; @@ -2470,7 +2476,7 @@ void Tree::_gui_input(InputEvent p_event) { if (!click_handled) { drag_speed=0; drag_accum=0; -// last_drag_accum=0; + //last_drag_accum=0; drag_from=v_scroll->get_value(); drag_touching=OS::get_singleton()->has_touchscreen_ui_hint(); drag_touching_deaccel=false; @@ -2787,13 +2793,10 @@ void Tree::_notification(int p_what) { } int ofs=0; -// int from_y=exposed.pos.y+bg->get_margin(MARGIN_TOP); -// int size_y=exposed.size.height-bg->get_minimum_size().height; for (int i=0;i<(columns.size()-1-1);i++) { ofs+=get_column_width(i); - //get_painter()->draw_fill_rect( Point2(ofs+cache.hseparation/2, from_y), Size2( 1, size_y ),color( COLOR_TREE_GRID) ); } if (show_column_titles) { @@ -3016,8 +3019,10 @@ int Tree::get_edited_column() const { TreeItem* Tree::get_next_selected( TreeItem* p_item) { - //if (!p_item) - // return NULL; + /* + if (!p_item) + return NULL; + */ if (!root) return NULL; diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 8327e356b3..d715ff4772 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -334,7 +334,7 @@ friend class TreeItem; int compute_item_height(TreeItem *p_item) const; int get_item_height(TreeItem *p_item) const; -// void draw_item_text(String p_text,const Ref<Texture>& p_icon,int p_icon_max_w,bool p_tool,Rect2i p_rect,const Color& p_color); + //void draw_item_text(String p_text,const Ref<Texture>& p_icon,int p_icon_max_w,bool p_tool,Rect2i p_rect,const Color& p_color); void draw_item_rect(const TreeItem::Cell& p_cell,const Rect2i& p_rect,const Color& p_color); int draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2& p_draw_size,TreeItem *p_item); void select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col,TreeItem *p_prev=NULL,bool *r_in_range=NULL,bool p_force_deselect=false); diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index f7d2ad1c63..4c177ea53c 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -394,7 +394,7 @@ void VideoPlayer::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::INT, "audio_track",PROPERTY_HINT_RANGE,"0,128,1"), _SCS("set_audio_track"), _SCS("get_audio_track") ); ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE,"VideoStream"), _SCS("set_stream"), _SCS("get_stream") ); -// ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), _SCS("set_loop"), _SCS("has_loop") ); + //ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), _SCS("set_loop"), _SCS("has_loop") ); ADD_PROPERTY( PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL, "autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL, "paused"), _SCS("set_paused"), _SCS("is_paused") ); diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index 2e2e1d6c80..43092c3d64 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -285,7 +285,7 @@ void CanvasLayer::_bind_methods() { ClassDB::bind_method(_MD("get_custom_viewport:Viewport"),&CanvasLayer::get_custom_viewport); ClassDB::bind_method(_MD("get_world_2d:World2D"),&CanvasLayer::get_world_2d); -// ClassDB::bind_method(_MD("get_viewport"),&CanvasLayer::get_viewport); + //ClassDB::bind_method(_MD("get_viewport"),&CanvasLayer::get_viewport); ADD_PROPERTY( PropertyInfo(Variant::INT,"layer",PROPERTY_HINT_RANGE,"-128,128,1"),_SCS("set_layer"),_SCS("get_layer") ); //ADD_PROPERTY( PropertyInfo(Variant::MATRIX32,"transform",PROPERTY_HINT_RANGE),_SCS("set_transform"),_SCS("get_transform") ); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index ebf61994ed..86b78f60f6 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2734,7 +2734,7 @@ void Node::_set_tree(SceneTree *p_tree) { SceneTree *tree_changed_a=NULL; SceneTree *tree_changed_b=NULL; -// ERR_FAIL_COND(p_scene && data.parent && !data.parent->data.scene); //nobug if both are null + //ERR_FAIL_COND(p_scene && data.parent && !data.parent->data.scene); //nobug if both are null if (data.tree) { _propagate_exit_tree(); @@ -3062,8 +3062,8 @@ void Node::_bind_methods() { ADD_SIGNAL( MethodInfo("tree_entered") ); ADD_SIGNAL( MethodInfo("tree_exited") ); -// ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/process" ),_SCS("set_process"),_SCS("is_processing") ); -// ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/fixed_process" ), _SCS("set_fixed_process"),_SCS("is_fixed_processing") ); + //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/process" ),_SCS("set_process"),_SCS("is_processing") ); + //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/fixed_process" ), _SCS("set_fixed_process"),_SCS("is_fixed_processing") ); //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/input" ), _SCS("set_process_input"),_SCS("is_processing_input" ) ); //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/unhandled_input" ), _SCS("set_process_unhandled_input"),_SCS("is_processing_unhandled_input" ) ); ADD_GROUP("Pause","pause_"); diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp index bc5f99b2f2..147409a862 100644 --- a/scene/main/scene_main_loop.cpp +++ b/scene/main/scene_main_loop.cpp @@ -455,16 +455,17 @@ void SceneTree::input_event( const InputEvent& p_event ) { //call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"input","_input",ev); - /*if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F12) { + /* + if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F12) { print_line("RAM: "+itos(Memory::get_static_mem_usage())); print_line("DRAM: "+itos(Memory::get_dynamic_mem_usage())); } -*/ - //if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F11) { + if (ev.type==InputEvent::KEY && ev.key.pressed && !ev.key.echo && ev.key.scancode==KEY_F11) { - // Memory::dump_static_mem_to_file("memdump.txt"); - //} + Memory::dump_static_mem_to_file("memdump.txt"); + } + */ //transform for the rest #else @@ -557,9 +558,9 @@ bool SceneTree::iteration(float p_time) { bool SceneTree::idle(float p_time){ -// print_line("ram: "+itos(OS::get_singleton()->get_static_memory_usage())+" sram: "+itos(OS::get_singleton()->get_dynamic_memory_usage())); -// print_line("node count: "+itos(get_node_count())); -// print_line("TEXTURE RAM: "+itos(VS::get_singleton()->get_render_info(VS::INFO_TEXTURE_MEM_USED))); + //print_line("ram: "+itos(OS::get_singleton()->get_static_memory_usage())+" sram: "+itos(OS::get_singleton()->get_dynamic_memory_usage())); + //print_line("node count: "+itos(get_node_count())); + //print_line("TEXTURE RAM: "+itos(VS::get_singleton()->get_render_info(VS::INFO_TEXTURE_MEM_USED))); root_lock++; @@ -1237,8 +1238,8 @@ 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); + //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 319f1c9467..ddda90c3fa 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -293,12 +293,12 @@ void Viewport::_vp_enter_tree() { VisualServer::get_singleton()->canvas_item_set_parent(canvas_item,parent_ci); VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,false); -// VisualServer::get_singleton()->canvas_item_attach_viewport(canvas_item,viewport); + //VisualServer::get_singleton()->canvas_item_attach_viewport(canvas_item,viewport); parent_control->connect("resized",this,"_parent_resized"); parent_control->connect("visibility_changed",this,"_parent_visibility_changed"); } else if (!parent){ -// VisualServer::get_singleton()->viewport_attach_to_screen(viewport,0); + //VisualServer::get_singleton()->viewport_attach_to_screen(viewport,0); } */ @@ -462,8 +462,10 @@ void Viewport::_notification(int p_what) { if (world_2d.is_valid()) world_2d->_remove_viewport(this); - //if (!render_target) - // _vp_exit_tree(); + /* + if (!render_target) + _vp_exit_tree(); + */ VisualServer::get_singleton()->viewport_set_scenario(viewport,RID()); SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, RID()); @@ -1309,7 +1311,7 @@ void Viewport::queue_screen_capture(){ } Image Viewport::get_screen_capture() const { -// return VS::get_singleton()->viewport_get_screen_capture(viewport); + //return VS::get_singleton()->viewport_get_screen_capture(viewport); return Image(); } @@ -1379,7 +1381,7 @@ Viewport::ShadowAtlasQuadrantSubdiv Viewport::get_shadow_atlas_quadrant_subdiv(i void Viewport::clear() { //clear=true; -// VisualServer::get_singleton()->viewport_clear(viewport); + //VisualServer::get_singleton()->viewport_clear(viewport); } @@ -1399,9 +1401,11 @@ Transform2D Viewport::_get_input_pre_xform() const { Vector2 Viewport::_get_window_offset() const { -// if (parent_control) { -// return (parent_control->get_viewport()->get_final_transform() * parent_control->get_global_transform_with_canvas()).get_origin(); -// } + /* + if (parent_control) { + return (parent_control->get_viewport()->get_final_transform() * parent_control->get_global_transform_with_canvas()).get_origin(); + } + */ return Vector2(); } @@ -1521,8 +1525,10 @@ void Viewport::_vp_unhandled_input(const InputEvent& p_ev) { } #endif -// if (parent_control && !parent_control->is_visible_in_tree()) -// return; + /* + if (parent_control && !parent_control->is_visible_in_tree()) + return; + */ if (to_screen_rect==Rect2()) return; //if render target, can't get input events @@ -1647,7 +1653,7 @@ void Viewport::_gui_show_tooltip() { void Viewport::_gui_call_input(Control *p_control,const InputEvent& p_input) { -// _block(); + //_block(); InputEvent ev = p_input; @@ -1745,7 +1751,7 @@ Control* Viewport::_gui_find_control_at_pos(CanvasItem* p_node,const Point2& p_g Control *c=p_node->cast_to<Control>(); if (c) { - // print_line("at "+String(c->get_path())+" POS "+c->get_pos()+" bt "+p_xform); + //print_line("at "+String(c->get_path())+" POS "+c->get_pos()+" bt "+p_xform); } //subwindows first!! @@ -1798,9 +1804,11 @@ void Viewport::_gui_input_event(InputEvent p_event) { return; } //? -// if (!is_visible()) { -// return; //simple and plain -// } + /* + if (!is_visible()) { + return; //simple and plain + } + */ switch(p_event.type) { @@ -1849,10 +1857,10 @@ void Viewport::_gui_input_event(InputEvent p_event) { //Matrix32 parent_xform; - //if (data.parent_canvas_item) - // parent_xform=data.parent_canvas_item->get_global_transform(); - - + /* + if (data.parent_canvas_item) + parent_xform=data.parent_canvas_item->get_global_transform(); + */ gui.mouse_focus = _gui_find_control(pos); //print_line("has mf "+itos(gui.mouse_focus!=NULL)); @@ -2788,7 +2796,7 @@ void Viewport::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::RECT2,"size"), _SCS("set_size"), _SCS("get_size") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"own_world"), _SCS("set_use_own_world"), _SCS("is_using_own_world") ); ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world",PROPERTY_HINT_RESOURCE_TYPE,"World"), _SCS("set_world"), _SCS("get_world") ); -// ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world_2d",PROPERTY_HINT_RESOURCE_TYPE,"World2D"), _SCS("set_world_2d"), _SCS("get_world_2d") ); + //ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world_2d",PROPERTY_HINT_RESOURCE_TYPE,"World2D"), _SCS("set_world_2d"), _SCS("get_world_2d") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"transparent_bg"), _SCS("set_transparent_background"), _SCS("has_transparent_background") ); ADD_GROUP("Rendering",""); ADD_PROPERTY( PropertyInfo(Variant::INT,"msaa",PROPERTY_HINT_ENUM,"Disabled,2x,4x,8x,16x"), _SCS("set_msaa"), _SCS("get_msaa") ); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 3e5af50b36..f68e5ca959 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -319,7 +319,7 @@ void register_scene_types() { ClassDB::register_class<ShortCut>(); ClassDB::register_class<Control>(); -// ClassDB::register_type<EmptyControl>(); + //ClassDB::register_type<EmptyControl>(); ClassDB::register_class<Button>(); ClassDB::register_class<Label>(); ClassDB::register_class<HScrollBar>(); @@ -494,7 +494,7 @@ void register_scene_types() { ClassDB::register_class<Particles2D>(); ClassDB::register_class<ParticleAttractor2D>(); ClassDB::register_class<Sprite>(); -// ClassDB::register_type<ViewportSprite>(); + //ClassDB::register_type<ViewportSprite>(); ClassDB::register_class<SpriteFrames>(); ClassDB::register_class<AnimatedSprite>(); ClassDB::register_class<Position2D>(); @@ -537,9 +537,9 @@ void register_scene_types() { /* REGISTER RESOURCES */ ClassDB::register_virtual_class<Shader>(); -// ClassDB::register_virtual_type<ShaderGraph>(); + //ClassDB::register_virtual_type<ShaderGraph>(); ClassDB::register_class<CanvasItemShader>(); -// ClassDB::register_type<CanvasItemShaderGraph>(); + //ClassDB::register_type<CanvasItemShaderGraph>(); #ifndef _3D_DISABLED ClassDB::register_class<Mesh>(); @@ -547,9 +547,9 @@ void register_scene_types() { ClassDB::register_class<FixedSpatialMaterial>(); SceneTree::add_idle_callback(FixedSpatialMaterial::flush_changes); FixedSpatialMaterial::init_shaders(); -// ClassDB::register_type<ShaderMaterial>(); + //ClassDB::register_type<ShaderMaterial>(); ClassDB::register_class<RoomBounds>(); -// ClassDB::register_type<MaterialShaderGraph>(); + //ClassDB::register_type<MaterialShaderGraph>(); ClassDB::register_class<SpatialShader>(); ClassDB::register_class<ParticlesShader>(); ClassDB::register_class<MultiMesh>(); @@ -605,7 +605,7 @@ void register_scene_types() { ClassDB::register_virtual_class<AudioStream>(); ClassDB::register_virtual_class<AudioStreamPlayback>(); //TODO: Adapt to the new AudioStream API or drop (GH-3307) -// ClassDB::register_type<AudioStreamGibberish>(); + //ClassDB::register_type<AudioStreamGibberish>(); ClassDB::register_virtual_class<VideoStream>(); OS::get_singleton()->yield(); //may take time to init diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 1fbb149bf3..5b9baa6a67 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -2005,11 +2005,6 @@ void Animation::_transform_track_optimize(int p_idx,float p_alowed_linear_err,fl prev_erased=false; norm=Vector3(); } - - - - // print_line(itos(i)+" could be eliminated: "+rtos(tr)); - //} } diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index da8fbafde3..50c6a6c725 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -125,7 +125,7 @@ static Ref<Texture> make_icon(T p_src) { static Ref<Shader> make_shader(const char*vertex_code,const char*fragment_code,const char*lighting_code) { Ref<Shader> shader = (memnew( Shader(Shader::MODE_CANVAS_ITEM) )); -// shader->set_code(vertex_code, fragment_code, lighting_code); + //shader->set_code(vertex_code, fragment_code, lighting_code); return shader; } diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index bb1552e2d6..63a7829d26 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -511,7 +511,7 @@ 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)); + //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 diff --git a/scene/resources/dynamic_font_stb.cpp b/scene/resources/dynamic_font_stb.cpp index a25667d85a..cbbca49f0f 100644 --- a/scene/resources/dynamic_font_stb.cpp +++ b/scene/resources/dynamic_font_stb.cpp @@ -260,7 +260,7 @@ 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)); + //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 diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 3373478336..b1d0611f48 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -252,8 +252,10 @@ Error BitmapFont::create_from_fnt(const String& p_string) { if (keys.has("face")) set_name(keys["face"]); - //if (keys.has("size")) - // font->set_height(keys["size"].to_int()); + /* + if (keys.has("size")) + font->set_height(keys["size"].to_int()); + */ } else if (type=="common") { diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 625cc6a596..5cefca348b 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -529,9 +529,11 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S bool isdefault = ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONZERO) && value.is_zero()) || ((E->get().usage & PROPERTY_USAGE_STORE_IF_NONONE) && value.is_one()); -// 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; -// } + /* + 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; + } + */ @@ -614,8 +616,10 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S if (!gi.persistent) continue; -// if (instance_state_node>=0 && instance_state->is_node_in_group(instance_state_node,gi.name)) -// continue; //group was instanced, don't add here + /* + if (instance_state_node>=0 && instance_state->is_node_in_group(instance_state_node,gi.name)) + continue; //group was instanced, don't add here + */ bool skip=false; for (List<PackState>::Element *F=pack_state_stack.front();F;F=F->next()) { @@ -1166,7 +1170,7 @@ void SceneState::set_bundled_scene(const Dictionary& d) { ERR_FAIL_COND( !d.has("nodes")); ERR_FAIL_COND( !d.has("conn_count")); ERR_FAIL_COND( !d.has("conns")); -// ERR_FAIL_COND( !d.has("path")); + //ERR_FAIL_COND( !d.has("path")); int version=1; if (d.has("version")) @@ -1277,7 +1281,7 @@ void SceneState::set_bundled_scene(const Dictionary& d) { editable_instances[i]=ei[i]; } -// path=d["path"]; + //path=d["path"]; } @@ -1362,7 +1366,7 @@ Dictionary SceneState::get_bundled_scene() const { d["version"]=PACK_VERSION; -// d["path"]=path; + //d["path"]=path; return d; diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp index 448e18ce39..a913687e7f 100644 --- a/scene/resources/scene_format_text.cpp +++ b/scene/resources/scene_format_text.cpp @@ -397,7 +397,7 @@ Error ResourceInteractiveLoaderText::poll() { int type=-1; int name=-1; int instance=-1; -// int base_scene=-1; + //int base_scene=-1; if (next_tag.fields.has("name")) { name=packed_scene->get_state()->add_name(next_tag.fields["name"]); @@ -950,7 +950,7 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); ria->open(f); return ria; @@ -1001,7 +1001,7 @@ String ResourceFormatLoaderText::get_resource_type(const String &p_path) const{ Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); String r = ria->recognize(f); return r; } @@ -1018,7 +1018,7 @@ void ResourceFormatLoaderText::get_dependencies(const String& p_path,List<String Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); ria->get_dependencies(f,p_dependencies,p_add_types); @@ -1035,7 +1035,7 @@ Error ResourceFormatLoaderText::rename_dependencies(const String &p_path,const M Ref<ResourceInteractiveLoaderText> ria = memnew( ResourceInteractiveLoaderText ); ria->local_path=GlobalConfig::get_singleton()->localize_path(p_path); ria->res_path=ria->local_path; -// ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); + //ria->set_local_path( GlobalConfig::get_singleton()->localize_path(p_path) ); return ria->rename_dependencies(f,p_path,p_map); } @@ -1208,10 +1208,12 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re if (packed_scene.is_null()) title+="type=\""+p_resource->get_class()+"\" "; int load_steps=saved_resources.size()+external_resources.size(); - //if (packed_scene.is_valid()) { - // load_steps+=packed_scene->get_node_count(); - //} + /* + if (packed_scene.is_valid()) { + load_steps+=packed_scene->get_node_count(); + } //no, better to not use load steps from nodes, no point to that + */ if (load_steps>1) { title+="load_steps="+itos(load_steps)+" "; @@ -1299,7 +1301,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re List<PropertyInfo> property_list; res->get_property_list(&property_list); -// property_list.sort(); + //property_list.sort(); for(List<PropertyInfo>::Element *PE = property_list.front();PE;PE=PE->next()) { diff --git a/scene/resources/scene_format_text.h b/scene/resources/scene_format_text.h index 58660fa639..ce18f6a702 100644 --- a/scene/resources/scene_format_text.h +++ b/scene/resources/scene_format_text.h @@ -58,7 +58,7 @@ class ResourceInteractiveLoaderText : public ResourceInteractiveLoader { bool ignore_resource_parsing; -// Map<String,String> remaps; + //Map<String,String> remaps; Map<int,ExtResource> ext_resources; diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp index 37b019e369..10f852f17c 100644 --- a/scene/resources/shader_graph.cpp +++ b/scene/resources/shader_graph.cpp @@ -192,7 +192,7 @@ void ShaderGraph::_bind_methods() { ClassDB::bind_method(_MD("xform_const_node_get_value","shader_type","id"),&ShaderGraph::xform_const_node_get_value); -// void get_node_list(ShaderType p_which,List<int> *p_node_list) const; + //void get_node_list(ShaderType p_which,List<int> *p_node_list) const; ClassDB::bind_method(_MD("texture_node_set_filter_size","shader_type","id","filter_size"),&ShaderGraph::texture_node_set_filter_size); ClassDB::bind_method(_MD("texture_node_get_filter_size","shader_type","id"),&ShaderGraph::texture_node_get_filter_size); diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 066062f302..e5e32ba4e9 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -75,8 +75,8 @@ void StyleBox::_bind_methods() { ClassDB::bind_method(_MD("set_default_margin","margin","offset"),&StyleBox::set_default_margin); ClassDB::bind_method(_MD("get_default_margin","margin"),&StyleBox::get_default_margin); -// ClassDB::bind_method(_MD("set_default_margin"),&StyleBox::set_default_margin); -// ClassDB::bind_method(_MD("get_default_margin"),&StyleBox::get_default_margin); + //ClassDB::bind_method(_MD("set_default_margin"),&StyleBox::set_default_margin); + //ClassDB::bind_method(_MD("get_default_margin"),&StyleBox::get_default_margin); ClassDB::bind_method(_MD("get_margin","margin"),&StyleBox::get_margin); ClassDB::bind_method(_MD("get_minimum_size"),&StyleBox::get_minimum_size); diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index cc13c0ff11..27cc7e131b 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -650,9 +650,11 @@ void SurfaceTool::append_from(const Ref<Mesh>& p_existing, int p_surface,const T 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!"); - //} + /* + if (dst_index <0 || dst_index>=vertex_array.size()) { + print_line("invalid index!"); + } + */ index_array.push_back(dst_index); } if (index_array.size()%3) diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index 0ddc907aa0..d950407f54 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -267,7 +267,7 @@ void Theme::set_default_font( const Ref<Font>& p_font ) { void Theme::set_icon(const StringName& p_name,const StringName& p_type,const Ref<Texture>& p_icon) { -// ERR_FAIL_COND(p_icon.is_null()); + //ERR_FAIL_COND(p_icon.is_null()); bool new_value=!icon_map.has(p_type) || !icon_map[p_type].has(p_name); @@ -367,7 +367,7 @@ void Theme::get_shader_list(const StringName &p_type, List<StringName> *p_list) void Theme::set_stylebox(const StringName& p_name,const StringName& p_type,const Ref<StyleBox>& p_style) { -// ERR_FAIL_COND(p_style.is_null()); + //ERR_FAIL_COND(p_style.is_null()); bool new_value=!style_map.has(p_type) || !style_map[p_type].has(p_name); @@ -430,7 +430,7 @@ void Theme::get_stylebox_types(List<StringName> *p_list) const { void Theme::set_font(const StringName& p_name,const StringName& p_type,const Ref<Font>& p_font) { -// ERR_FAIL_COND(p_font.is_null()); + //ERR_FAIL_COND(p_font.is_null()); bool new_value=!font_map.has(p_type) || !font_map[p_type].has(p_name); @@ -999,7 +999,7 @@ RES ResourceFormatLoaderTheme::load(const String &p_path, const String& p_origin ERR_FAIL_V(RES()); } -// int margin = params[i+ccodes+1].to_int(); + //int margin = params[i+ccodes+1].to_int(); //sbflat->set_margin_size(Margin(i),margin); } } else if (params.size()!=ccodes+1) { |
