diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-14 11:07:57 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-14 11:10:42 -0300 |
commit | dcb95ec1473eff3f455909cd81c3cd50b1e1159b (patch) | |
tree | 60343275911d48ebf993041dec92e1eac112b746 /scene | |
parent | 93ab45b6b5c4f8e0619e963156c983009d399a9d (diff) |
removed duplicated functions in class hierarchy that were bound more than once
added a check to detect this case in the future
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/camera_2d.cpp | 4 | ||||
-rw-r--r-- | scene/2d/canvas_item.cpp | 2 | ||||
-rw-r--r-- | scene/3d/mesh_instance.cpp | 2 | ||||
-rw-r--r-- | scene/3d/spatial.cpp | 2 | ||||
-rw-r--r-- | scene/animation/animation_tree_player.cpp | 14 | ||||
-rw-r--r-- | scene/animation/animation_tree_player.h | 6 | ||||
-rw-r--r-- | scene/gui/color_picker.cpp | 42 | ||||
-rw-r--r-- | scene/gui/color_picker.h | 8 | ||||
-rw-r--r-- | scene/gui/color_ramp_edit.cpp | 2 | ||||
-rw-r--r-- | scene/gui/graph_node.cpp | 18 | ||||
-rw-r--r-- | scene/gui/graph_node.h | 5 | ||||
-rw-r--r-- | scene/gui/texture_button.cpp | 18 | ||||
-rw-r--r-- | scene/gui/texture_button.h | 5 | ||||
-rw-r--r-- | scene/main/canvas_layer.cpp | 4 | ||||
-rw-r--r-- | scene/main/http_request.cpp | 2 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 6 | ||||
-rw-r--r-- | scene/main/viewport.h | 2 | ||||
-rw-r--r-- | scene/resources/texture.cpp | 3 |
18 files changed, 54 insertions, 91 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 882ae69a2b..0bafef1b83 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -252,7 +252,7 @@ void Camera2D::_notification(int p_what) { canvas = get_canvas(); - RID vp = viewport->get_viewport(); + RID vp = viewport->get_viewport_rid(); group_name = "__cameras_"+itos(vp.get_id()); canvas_group_name ="__cameras_c"+itos(canvas.get_id()); @@ -573,7 +573,7 @@ void Camera2D::set_custom_viewport(Node *p_viewport) { else viewport=get_viewport(); - RID vp = viewport->get_viewport(); + RID vp = viewport->get_viewport_rid(); group_name = "__cameras_"+itos(vp.get_id()); canvas_group_name ="__cameras_c"+itos(canvas.get_id()); add_to_group(group_name); diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 809469c3a3..817707f96e 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -818,7 +818,7 @@ Ref<World2D> CanvasItem::get_world_2d() const { RID CanvasItem::get_viewport_rid() const { ERR_FAIL_COND_V(!is_inside_tree(),RID()); - return get_viewport()->get_viewport(); + return get_viewport()->get_viewport_rid(); } void CanvasItem::set_block_transform_notify(bool p_enable) { diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index 66bad45c45..764aff1c08 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -298,7 +298,7 @@ void MeshInstance::_bind_methods() { ClassDB::bind_method(_MD("get_mesh:Mesh"),&MeshInstance::get_mesh); ClassDB::bind_method(_MD("set_skeleton_path","skeleton_path:NodePath"),&MeshInstance::set_skeleton_path); ClassDB::bind_method(_MD("get_skeleton_path:NodePath"),&MeshInstance::get_skeleton_path); - ClassDB::bind_method(_MD("get_aabb"),&MeshInstance::get_aabb); + ClassDB::bind_method(_MD("create_trimesh_collision"),&MeshInstance::create_trimesh_collision); ClassDB::set_method_flags("MeshInstance","create_trimesh_collision",METHOD_FLAGS_DEFAULT); ClassDB::bind_method(_MD("create_convex_collision"),&MeshInstance::create_convex_collision); diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 63a27f3554..6843a7e9b3 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -823,7 +823,7 @@ void Spatial::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"rotation",PROPERTY_HINT_NONE,"",0), _SCS("set_rotation"), _SCS("get_rotation") ); ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"scale",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("set_scale"), _SCS("get_scale") ); ADD_GROUP("Visibility",""); - ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"visible"), _SCS("_set_visible_"), _SCS("_is_visible_") ); + ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"visible"), _SCS("set_visible"), _SCS("is_visible") ); //ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"transform/local"), _SCS("set_transform"), _SCS("get_transform") ); ADD_SIGNAL( MethodInfo("visibility_changed" ) ); diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index 26c82fe1ae..c3a05240bb 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -214,7 +214,7 @@ bool AnimationTreePlayer::_set(const StringName& p_name, const Variant& p_value) StringName src = connections[i*3+0]; StringName dst = connections[i*3+1]; int dst_in = connections[i*3+2]; - connect(src,dst,dst_in); + connect_nodes(src,dst,dst_in); } set_active(data.get_valid("active")); @@ -1496,7 +1496,7 @@ AnimationTreePlayer::ConnectError AnimationTreePlayer::_cycle_test(const StringN } -Error AnimationTreePlayer::connect(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input) { +Error AnimationTreePlayer::connect_nodes(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input) { ERR_FAIL_COND_V( !node_map.has(p_src_node) , ERR_INVALID_PARAMETER); ERR_FAIL_COND_V( !node_map.has(p_dst_node) , ERR_INVALID_PARAMETER); @@ -1538,7 +1538,7 @@ Error AnimationTreePlayer::connect(const StringName& p_src_node,const StringName return OK; } -bool AnimationTreePlayer::is_connected(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input) const { +bool AnimationTreePlayer::are_nodes_connected(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input) const { ERR_FAIL_COND_V( !node_map.has(p_src_node) , false); ERR_FAIL_COND_V( !node_map.has(p_dst_node) , false); @@ -1550,7 +1550,7 @@ bool AnimationTreePlayer::is_connected(const StringName& p_src_node,const String } -void AnimationTreePlayer::disconnect(const StringName& p_node, int p_input) { +void AnimationTreePlayer::disconnect_nodes(const StringName& p_node, int p_input) { ERR_FAIL_COND( !node_map.has(p_node)); @@ -1901,9 +1901,9 @@ void AnimationTreePlayer::_bind_methods() { ClassDB::bind_method(_MD("node_get_pos","id"),&AnimationTreePlayer::node_get_pos); ClassDB::bind_method(_MD("remove_node","id"),&AnimationTreePlayer::remove_node); - ClassDB::bind_method(_MD("connect","id","dst_id","dst_input_idx"),&AnimationTreePlayer::connect); - ClassDB::bind_method(_MD("is_connected","id","dst_id","dst_input_idx"),&AnimationTreePlayer::is_connected); - ClassDB::bind_method(_MD("disconnect","id","dst_input_idx"),&AnimationTreePlayer::disconnect); + ClassDB::bind_method(_MD("connect_nodes","id","dst_id","dst_input_idx"),&AnimationTreePlayer::connect_nodes); + ClassDB::bind_method(_MD("are_nodes_connected","id","dst_id","dst_input_idx"),&AnimationTreePlayer::are_nodes_connected); + ClassDB::bind_method(_MD("disconnect_nodes","id","dst_input_idx"),&AnimationTreePlayer::disconnect_nodes); ClassDB::bind_method(_MD("set_active","enabled"),&AnimationTreePlayer::set_active); ClassDB::bind_method(_MD("is_active"),&AnimationTreePlayer::is_active); diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h index ae2fe8c2bb..5e118be034 100644 --- a/scene/animation/animation_tree_player.h +++ b/scene/animation/animation_tree_player.h @@ -397,9 +397,9 @@ public: void get_node_list(List<StringName> *p_node_list) const; void remove_node(const StringName& p_node); - Error connect(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input); - bool is_connected(const StringName& p_src_node,const StringName& p_dst_node, int p_input) const; - void disconnect(const StringName& p_src_node, int p_input); + Error connect_nodes(const StringName& p_src_node,const StringName& p_dst_node, int p_dst_input); + bool are_nodes_connected(const StringName& p_src_node,const StringName& p_dst_node, int p_input) const; + void disconnect_nodes(const StringName& p_src_node, int p_input); void set_base_path(const NodePath& p_path); NodePath get_base_path() const; diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index a0a7442849..da2fb1bc91 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -75,7 +75,7 @@ void ColorPicker::_update_controls() { } -void ColorPicker::set_color(const Color& p_color) { +void ColorPicker::set_pick_color(const Color& p_color) { color=p_color; if (color != last_hsv) { @@ -121,7 +121,7 @@ void ColorPicker::_value_changed(double) { color.components[i] = scroll[i]->get_value()/(raw_mode_enabled?1.0:255.0); } - set_color(color); + set_pick_color(color); _update_text_value(); @@ -139,7 +139,7 @@ void ColorPicker::_html_entered(const String& p_html) { if (!is_inside_tree()) return; - set_color(color); + set_pick_color(color); emit_signal("color_changed",color); } @@ -208,7 +208,7 @@ void ColorPicker::_text_type_toggled() _update_color(); } -Color ColorPicker::get_color() const { +Color ColorPicker::get_pick_color() const { return color; } @@ -320,7 +320,7 @@ void ColorPicker::_uv_input(const InputEvent &ev) { v=1.0-y/256.0; color.set_hsv(h,s,v,color.a); last_hsv = color; - set_color(color); + set_pick_color(color); _update_color(); emit_signal("color_changed", color); } else { @@ -336,7 +336,7 @@ void ColorPicker::_uv_input(const InputEvent &ev) { v=1.0-y/256.0; color.set_hsv(h,s,v,color.a); last_hsv = color; - set_color(color); + set_pick_color(color); _update_color(); emit_signal("color_changed", color); } @@ -354,7 +354,7 @@ void ColorPicker::_w_input(const InputEvent &ev) { } color.set_hsv(h,s,v,color.a); last_hsv = color; - set_color(color); + set_pick_color(color); _update_color(); emit_signal("color_changed", color); } else if (ev.type == InputEvent::MOUSE_MOTION) { @@ -365,7 +365,7 @@ void ColorPicker::_w_input(const InputEvent &ev) { h=1.0-y/256.0; color.set_hsv(h,s,v,color.a); last_hsv = color; - set_color(color); + set_pick_color(color); _update_color(); emit_signal("color_changed", color); } @@ -376,7 +376,7 @@ void ColorPicker::_preset_input(const InputEvent &ev) { const InputEventMouseButton &bev = ev.mouse_button; if (bev.pressed && bev.button_index==BUTTON_LEFT) { int index = bev.x/(preset->get_size().x/presets.size()); - set_color(presets[index]); + set_pick_color(presets[index]); } else if (bev.pressed && bev.button_index==BUTTON_RIGHT) { int index = bev.x/(preset->get_size().x/presets.size()); presets.erase(presets[index]); @@ -425,7 +425,7 @@ void ColorPicker::_screen_input(const InputEvent &ev) Color c( r[ofs+0]/255.0, r[ofs+1]/255.0, r[ofs+2]/255.0 ); - set_color(c); + set_pick_color(c); } } } @@ -451,8 +451,8 @@ void ColorPicker::_screen_pick_pressed() void ColorPicker::_bind_methods() { - ClassDB::bind_method(_MD("set_color","color"),&ColorPicker::set_color); - ClassDB::bind_method(_MD("get_color"),&ColorPicker::get_color); + ClassDB::bind_method(_MD("set_pick_color","color"),&ColorPicker::set_pick_color); + ClassDB::bind_method(_MD("get_pick_color"),&ColorPicker::get_pick_color); ClassDB::bind_method(_MD("set_raw_mode","mode"),&ColorPicker::set_raw_mode); ClassDB::bind_method(_MD("is_raw_mode"),&ColorPicker::is_raw_mode); ClassDB::bind_method(_MD("set_edit_alpha","show"),&ColorPicker::set_edit_alpha); @@ -584,7 +584,7 @@ ColorPicker::ColorPicker() : //_update_color(); updating=false; - set_color(Color(1,1,1)); + set_pick_color(Color(1,1,1)); HBoxContainer *bbc = memnew( HBoxContainer ); @@ -632,20 +632,20 @@ void ColorPickerButton::_notification(int p_what) { if (p_what==NOTIFICATION_DRAW) { Ref<StyleBox> normal = get_stylebox("normal" ); - draw_rect(Rect2(normal->get_offset(),get_size()-normal->get_minimum_size()),picker->get_color()); + draw_rect(Rect2(normal->get_offset(),get_size()-normal->get_minimum_size()),picker->get_pick_color()); } } -void ColorPickerButton::set_color(const Color& p_color){ +void ColorPickerButton::set_pick_color(const Color& p_color){ - picker->set_color(p_color); + picker->set_pick_color(p_color); update(); emit_signal("color_changed",p_color); } -Color ColorPickerButton::get_color() const{ +Color ColorPickerButton::get_pick_color() const{ - return picker->get_color(); + return picker->get_pick_color(); } void ColorPickerButton::set_edit_alpha(bool p_show) { @@ -665,15 +665,15 @@ ColorPicker *ColorPickerButton::get_picker() { void ColorPickerButton::_bind_methods(){ - ClassDB::bind_method(_MD("set_color","color"),&ColorPickerButton::set_color); - ClassDB::bind_method(_MD("get_color"),&ColorPickerButton::get_color); + ClassDB::bind_method(_MD("set_pick_color","color"),&ColorPickerButton::set_pick_color); + ClassDB::bind_method(_MD("get_pick_color"),&ColorPickerButton::get_pick_color); ClassDB::bind_method(_MD("get_picker:ColorPicker"),&ColorPickerButton::get_picker); ClassDB::bind_method(_MD("set_edit_alpha","show"),&ColorPickerButton::set_edit_alpha); ClassDB::bind_method(_MD("is_editing_alpha"),&ColorPickerButton::is_editing_alpha); ClassDB::bind_method(_MD("_color_changed"),&ColorPickerButton::_color_changed); ADD_SIGNAL( MethodInfo("color_changed",PropertyInfo(Variant::COLOR,"color"))); - ADD_PROPERTY( PropertyInfo(Variant::COLOR,"color"),_SCS("set_color"),_SCS("get_color") ); + ADD_PROPERTY( PropertyInfo(Variant::COLOR,"color"),_SCS("set_pick_color"),_SCS("get_pick_color") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"edit_alpha"),_SCS("set_edit_alpha"),_SCS("is_editing_alpha") ); } diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h index b6f9e9a070..d9db9c89f7 100644 --- a/scene/gui/color_picker.h +++ b/scene/gui/color_picker.h @@ -98,8 +98,8 @@ public: void set_edit_alpha(bool p_show); bool is_editing_alpha() const; - void set_color(const Color& p_color); - Color get_color() const; + void set_pick_color(const Color& p_color); + Color get_pick_color() const; void add_preset(const Color& p_color); void set_raw_mode(bool p_enabled); @@ -126,8 +126,8 @@ protected: static void _bind_methods(); public: - void set_color(const Color& p_color); - Color get_color() const; + void set_pick_color(const Color& p_color); + Color get_pick_color() const; void set_edit_alpha(bool p_show); bool is_editing_alpha() const; diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp index c3ed3d821d..5d5d6c31a2 100644 --- a/scene/gui/color_ramp_edit.cpp +++ b/scene/gui/color_ramp_edit.cpp @@ -60,7 +60,7 @@ void ColorRampEdit::_show_color_picker() { if (grabbed==-1) return; Size2 ms = Size2(350, picker->get_combined_minimum_size().height+10); - picker->set_color(points[grabbed].color); + picker->set_pick_color(points[grabbed].color); popup->set_pos(get_global_pos()-Vector2(ms.width-get_size().width,ms.height)); popup->set_size(ms); popup->popup(); diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 8b7b84910d..aa8c875f40 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -217,8 +217,8 @@ void GraphNode::_notification(int p_what) { sb = get_stylebox( selected ? "selectedframe" : "frame"); } - sb=sb->duplicate(); - sb->call("set_modulate",modulate); + //sb=sb->duplicate(); + //sb->call("set_modulate",modulate); Ref<Texture> port =get_icon("port"); Ref<Texture> close =get_icon("close"); Ref<Texture> resizer =get_icon("resizer"); @@ -675,16 +675,6 @@ void GraphNode::_gui_input(const InputEvent& p_ev) { } -void GraphNode::set_modulate(const Color &p_color) { - - modulate=p_color; - update(); -} - -Color GraphNode::get_modulate() const{ - - return modulate; -} void GraphNode::set_overlay(Overlay p_overlay) { overlay=p_overlay; @@ -758,9 +748,6 @@ void GraphNode::_bind_methods() { ClassDB::bind_method(_MD("get_connection_input_type","idx"),&GraphNode::get_connection_input_type); ClassDB::bind_method(_MD("get_connection_input_color","idx"),&GraphNode::get_connection_input_color); - ClassDB::bind_method(_MD("set_modulate","color"),&GraphNode::set_modulate); - ClassDB::bind_method(_MD("get_modulate"),&GraphNode::get_modulate); - ClassDB::bind_method(_MD("set_show_close_button","show"),&GraphNode::set_show_close_button); ClassDB::bind_method(_MD("is_close_button_visible"),&GraphNode::is_close_button_visible); @@ -788,7 +775,6 @@ GraphNode::GraphNode() { show_close=false; connpos_dirty=true; set_mouse_filter(MOUSE_FILTER_PASS); - modulate=Color(1,1,1,1); comment=false; resizeable=false; resizing=false; diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h index a128426d38..9cb46fc49c 100644 --- a/scene/gui/graph_node.h +++ b/scene/gui/graph_node.h @@ -92,8 +92,6 @@ private: Overlay overlay; - Color modulate; - bool has_point(const Point2& p_point) const; protected: @@ -147,9 +145,6 @@ public: Color get_connection_output_color(int p_idx); - void set_modulate(const Color& p_color); - Color get_modulate() const; - void set_overlay(Overlay p_overlay); Overlay get_overlay() const; diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp index 83cd853572..03e37e9d9f 100644 --- a/scene/gui/texture_button.cpp +++ b/scene/gui/texture_button.cpp @@ -120,13 +120,13 @@ void TextureButton::_notification(int p_what) { if (texdraw.is_valid()) { Rect2 drect(Point2(),texdraw->get_size()*scale); - draw_texture_rect(texdraw,drect,false,modulate); + draw_texture_rect(texdraw,drect,false); } if (has_focus() && focused.is_valid()) { Rect2 drect(Point2(),focused->get_size()*scale); - draw_texture_rect(focused,drect,false,modulate); + draw_texture_rect(focused,drect,false); }; @@ -143,7 +143,6 @@ void TextureButton::_bind_methods() { ClassDB::bind_method(_MD("set_focused_texture","texture:Texture"),&TextureButton::set_focused_texture); ClassDB::bind_method(_MD("set_click_mask","mask:BitMap"),&TextureButton::set_click_mask); ClassDB::bind_method(_MD("set_texture_scale","scale"),&TextureButton::set_texture_scale); - ClassDB::bind_method(_MD("set_modulate","color"),&TextureButton::set_modulate); ClassDB::bind_method(_MD("get_normal_texture:Texture"),&TextureButton::get_normal_texture); ClassDB::bind_method(_MD("get_pressed_texture:Texture"),&TextureButton::get_pressed_texture); @@ -152,7 +151,6 @@ void TextureButton::_bind_methods() { ClassDB::bind_method(_MD("get_focused_texture:Texture"),&TextureButton::get_focused_texture); ClassDB::bind_method(_MD("get_click_mask:BitMap"),&TextureButton::get_click_mask); ClassDB::bind_method(_MD("get_texture_scale"),&TextureButton::get_texture_scale); - ClassDB::bind_method(_MD("get_modulate"),&TextureButton::get_modulate); ADD_GROUP("Textures","texture_"); ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"texture_normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_normal_texture"), _SCS("get_normal_texture")); @@ -241,17 +239,7 @@ Size2 TextureButton::get_texture_scale() const{ return scale; } -void TextureButton::set_modulate(const Color& p_modulate) { - modulate=p_modulate; - update(); -} - -Color TextureButton::get_modulate() const { - return modulate; -} - - TextureButton::TextureButton() { scale=Size2(1.0, 1.0); - modulate=Color(1,1,1); + } diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h index b6cb531c71..ef4d4d5b5b 100644 --- a/scene/gui/texture_button.h +++ b/scene/gui/texture_button.h @@ -42,8 +42,6 @@ class TextureButton : public BaseButton { Ref<Texture> focused; Ref<BitMap> click_mask; Size2 scale; - Color modulate; - protected: @@ -71,9 +69,6 @@ public: void set_texture_scale(Size2 p_scale); Size2 get_texture_scale() const; - void set_modulate(const Color& p_modulate); - Color get_modulate() const; - TextureButton(); }; diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index 43092c3d64..84fe2a00f6 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -176,7 +176,7 @@ void CanvasLayer::_notification(int p_what) { } ERR_FAIL_COND(!vp); - viewport=vp->get_viewport(); + viewport=vp->get_viewport_rid(); VisualServer::get_singleton()->viewport_attach_canvas(viewport,canvas->get_canvas()); VisualServer::get_singleton()->viewport_set_canvas_layer(viewport,canvas->get_canvas(),layer); @@ -232,7 +232,7 @@ void CanvasLayer::set_custom_viewport(Node *p_viewport) { else vp=Node::get_viewport(); - viewport = vp->get_viewport(); + viewport = vp->get_viewport_rid(); VisualServer::get_singleton()->viewport_attach_canvas(viewport,canvas->get_canvas()); VisualServer::get_singleton()->viewport_set_canvas_layer(viewport,canvas->get_canvas(),layer); diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 25180b568f..63a81a139d 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -40,7 +40,7 @@ void HTTPRequest::_redirect_request(const String& p_new_url) { Error HTTPRequest::_request() { //print_line("Requesting:\n\tURL: "+url+"\n\tString: "+request_string+"\n\tPort: "+itos(port)+"\n\tSSL: "+itos(use_ssl)+"\n\tValidate SSL: "+itos(validate_ssl)); - return client->connect(url,port,use_ssl,validate_ssl); + return client->connect_to_host(url,port,use_ssl,validate_ssl); } Error HTTPRequest::_parse_url(const String& p_url) { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index ddda90c3fa..c3ece76b05 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -389,7 +389,7 @@ void Viewport::_notification(int p_what) { if (get_parent()) { parent = get_parent()->get_viewport(); - VisualServer::get_singleton()->viewport_set_parent_viewport(viewport,parent->get_viewport()); + VisualServer::get_singleton()->viewport_set_parent_viewport(viewport,parent->get_viewport_rid()); } else { parent=NULL; } @@ -736,7 +736,7 @@ void Viewport::_notification(int p_what) { } } -RID Viewport::get_viewport() const { +RID Viewport::get_viewport_rid() const { return viewport; } @@ -2754,7 +2754,7 @@ void Viewport::_bind_methods() { ClassDB::bind_method(_MD("set_physics_object_picking","enable"), &Viewport::set_physics_object_picking); ClassDB::bind_method(_MD("get_physics_object_picking"), &Viewport::get_physics_object_picking); - ClassDB::bind_method(_MD("get_viewport"), &Viewport::get_viewport); + ClassDB::bind_method(_MD("get_viewport_rid"), &Viewport::get_viewport_rid); ClassDB::bind_method(_MD("input","local_event"), &Viewport::input); ClassDB::bind_method(_MD("unhandled_input","local_event"), &Viewport::unhandled_input); diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 1f30044cef..2831d177c9 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -340,7 +340,7 @@ public: Size2 get_size() const; Rect2 get_visible_rect() const; - RID get_viewport() const; + RID get_viewport_rid() const; void set_world(const Ref<World>& p_world); void set_world_2d(const Ref<World2D>& p_world_2d); diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 462341a751..a1ad5d8237 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -66,7 +66,6 @@ void Texture::_bind_methods() { ClassDB::bind_method(_MD("get_width"),&Texture::get_width); ClassDB::bind_method(_MD("get_height"),&Texture::get_height); ClassDB::bind_method(_MD("get_size"),&Texture::get_size); - ClassDB::bind_method(_MD("get_rid"),&Texture::get_rid); ClassDB::bind_method(_MD("has_alpha"),&Texture::has_alpha); ClassDB::bind_method(_MD("set_flags","flags"),&Texture::set_flags); ClassDB::bind_method(_MD("get_flags"),&Texture::get_flags); @@ -1050,7 +1049,7 @@ void CubeMap::_bind_methods() { ClassDB::bind_method(_MD("get_width"),&CubeMap::get_width); ClassDB::bind_method(_MD("get_height"),&CubeMap::get_height); - ClassDB::bind_method(_MD("get_rid"),&CubeMap::get_rid); + //ClassDB::bind_method(_MD("get_rid"),&CubeMap::get_rid); ClassDB::bind_method(_MD("set_flags","flags"),&CubeMap::set_flags); ClassDB::bind_method(_MD("get_flags"),&CubeMap::get_flags); |