Merge pull request #4547 from neikeq/pr-wrong-debug-methods
Fix wrong return and argument types in documentation
This commit is contained in:
commit
99e31e1005
|
@ -1556,6 +1556,18 @@ Variant::operator String() const {
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
} break;
|
} break;
|
||||||
|
case VECTOR2_ARRAY: {
|
||||||
|
|
||||||
|
DVector<Vector2> vec = operator DVector<Vector2>();
|
||||||
|
String str;
|
||||||
|
for(int i=0;i<vec.size();i++) {
|
||||||
|
|
||||||
|
if (i>0)
|
||||||
|
str+=", ";
|
||||||
|
str=str+Variant( vec[i] );
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
} break;
|
||||||
case VECTOR3_ARRAY: {
|
case VECTOR3_ARRAY: {
|
||||||
|
|
||||||
DVector<Vector3> vec = operator DVector<Vector3>();
|
DVector<Vector3> vec = operator DVector<Vector3>();
|
||||||
|
|
|
@ -1085,9 +1085,9 @@ void CanvasItem::_bind_methods() {
|
||||||
ObjectTypeDB::bind_method(_MD("draw_texture_rect","texture:Texture","rect","tile","modulate","transpose"),&CanvasItem::draw_texture_rect,DEFVAL(Color(1,1,1)),DEFVAL(false));
|
ObjectTypeDB::bind_method(_MD("draw_texture_rect","texture:Texture","rect","tile","modulate","transpose"),&CanvasItem::draw_texture_rect,DEFVAL(Color(1,1,1)),DEFVAL(false));
|
||||||
ObjectTypeDB::bind_method(_MD("draw_texture_rect_region","texture:Texture","rect","src_rect","modulate","transpose"),&CanvasItem::draw_texture_rect_region,DEFVAL(Color(1,1,1)),DEFVAL(false));
|
ObjectTypeDB::bind_method(_MD("draw_texture_rect_region","texture:Texture","rect","src_rect","modulate","transpose"),&CanvasItem::draw_texture_rect_region,DEFVAL(Color(1,1,1)),DEFVAL(false));
|
||||||
ObjectTypeDB::bind_method(_MD("draw_style_box","style_box:StyleBox","rect"),&CanvasItem::draw_style_box);
|
ObjectTypeDB::bind_method(_MD("draw_style_box","style_box:StyleBox","rect"),&CanvasItem::draw_style_box);
|
||||||
ObjectTypeDB::bind_method(_MD("draw_primitive","points","colors","uvs","texture:Texture","width"),&CanvasItem::draw_primitive,DEFVAL(Array()),DEFVAL(Ref<Texture>()),DEFVAL(1.0));
|
ObjectTypeDB::bind_method(_MD("draw_primitive","points","colors","uvs","texture:Texture","width"),&CanvasItem::draw_primitive,DEFVAL(Variant()),DEFVAL(1.0));
|
||||||
ObjectTypeDB::bind_method(_MD("draw_polygon","points","colors","uvs","texture:Texture"),&CanvasItem::draw_polygon,DEFVAL(Array()),DEFVAL(Ref<Texture>()));
|
ObjectTypeDB::bind_method(_MD("draw_polygon","points","colors","uvs","texture:Texture"),&CanvasItem::draw_polygon,DEFVAL(Vector2Array()),DEFVAL(Variant()));
|
||||||
ObjectTypeDB::bind_method(_MD("draw_colored_polygon","points","color","uvs","texture:Texture"),&CanvasItem::draw_colored_polygon,DEFVAL(Array()),DEFVAL(Ref<Texture>()));
|
ObjectTypeDB::bind_method(_MD("draw_colored_polygon","points","color","uvs","texture:Texture"),&CanvasItem::draw_colored_polygon,DEFVAL(Vector2Array()),DEFVAL(Variant()));
|
||||||
ObjectTypeDB::bind_method(_MD("draw_string","font:Font","pos","text","modulate","clip_w"),&CanvasItem::draw_string,DEFVAL(Color(1,1,1)),DEFVAL(-1));
|
ObjectTypeDB::bind_method(_MD("draw_string","font:Font","pos","text","modulate","clip_w"),&CanvasItem::draw_string,DEFVAL(Color(1,1,1)),DEFVAL(-1));
|
||||||
ObjectTypeDB::bind_method(_MD("draw_char","font:Font","pos","char","next","modulate"),&CanvasItem::draw_char,DEFVAL(Color(1,1,1)));
|
ObjectTypeDB::bind_method(_MD("draw_char","font:Font","pos","char","next","modulate"),&CanvasItem::draw_char,DEFVAL(Color(1,1,1)));
|
||||||
|
|
||||||
|
|
|
@ -329,8 +329,8 @@ int SpatialStreamPlayer::get_buffering_msec() const{
|
||||||
|
|
||||||
void SpatialStreamPlayer::_bind_methods() {
|
void SpatialStreamPlayer::_bind_methods() {
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("set_stream","stream:Stream"),&SpatialStreamPlayer::set_stream);
|
ObjectTypeDB::bind_method(_MD("set_stream","stream:AudioStream"),&SpatialStreamPlayer::set_stream);
|
||||||
ObjectTypeDB::bind_method(_MD("get_stream:Stream"),&SpatialStreamPlayer::get_stream);
|
ObjectTypeDB::bind_method(_MD("get_stream:AudioStream"),&SpatialStreamPlayer::get_stream);
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("play","offset"),&SpatialStreamPlayer::play,DEFVAL(0));
|
ObjectTypeDB::bind_method(_MD("play","offset"),&SpatialStreamPlayer::play,DEFVAL(0));
|
||||||
ObjectTypeDB::bind_method(_MD("stop"),&SpatialStreamPlayer::stop);
|
ObjectTypeDB::bind_method(_MD("stop"),&SpatialStreamPlayer::stop);
|
||||||
|
|
|
@ -1115,7 +1115,7 @@ int ItemList::find_metadata(const Variant& p_metadata) const {
|
||||||
|
|
||||||
void ItemList::_bind_methods(){
|
void ItemList::_bind_methods(){
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("add_item","text","icon:Texture","selectable"),&ItemList::add_item,DEFVAL(Ref<Texture>()),DEFVAL(true));
|
ObjectTypeDB::bind_method(_MD("add_item","text","icon:Texture","selectable"),&ItemList::add_item,DEFVAL(Variant()),DEFVAL(true));
|
||||||
ObjectTypeDB::bind_method(_MD("add_icon_item","icon:Texture","selectable"),&ItemList::add_icon_item,DEFVAL(true));
|
ObjectTypeDB::bind_method(_MD("add_icon_item","icon:Texture","selectable"),&ItemList::add_icon_item,DEFVAL(true));
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("set_item_text","idx","text"),&ItemList::set_item_text);
|
ObjectTypeDB::bind_method(_MD("set_item_text","idx","text"),&ItemList::set_item_text);
|
||||||
|
|
|
@ -3252,7 +3252,7 @@ void Tree::_bind_methods() {
|
||||||
ObjectTypeDB::bind_method(_MD("_scroll_moved"),&Tree::_scroll_moved);
|
ObjectTypeDB::bind_method(_MD("_scroll_moved"),&Tree::_scroll_moved);
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("clear"),&Tree::clear);
|
ObjectTypeDB::bind_method(_MD("clear"),&Tree::clear);
|
||||||
ObjectTypeDB::bind_method(_MD("create_item:TreeItem","parent:TreeItem"),&Tree::_create_item,DEFVAL((Object*)NULL));
|
ObjectTypeDB::bind_method(_MD("create_item:TreeItem","parent:TreeItem"),&Tree::_create_item,DEFVAL(Variant()));
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("get_root:TreeItem"),&Tree::get_root);
|
ObjectTypeDB::bind_method(_MD("get_root:TreeItem"),&Tree::get_root);
|
||||||
ObjectTypeDB::bind_method(_MD("set_column_min_width","column","min_width"),&Tree::set_column_min_width);
|
ObjectTypeDB::bind_method(_MD("set_column_min_width","column","min_width"),&Tree::set_column_min_width);
|
||||||
|
|
|
@ -360,8 +360,8 @@ bool VideoPlayer::has_autoplay() const {
|
||||||
|
|
||||||
void VideoPlayer::_bind_methods() {
|
void VideoPlayer::_bind_methods() {
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("set_stream","stream:Stream"),&VideoPlayer::set_stream);
|
ObjectTypeDB::bind_method(_MD("set_stream","stream:VideoStream"),&VideoPlayer::set_stream);
|
||||||
ObjectTypeDB::bind_method(_MD("get_stream:Stream"),&VideoPlayer::get_stream);
|
ObjectTypeDB::bind_method(_MD("get_stream:VideoStream"),&VideoPlayer::get_stream);
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("play"),&VideoPlayer::play);
|
ObjectTypeDB::bind_method(_MD("play"),&VideoPlayer::play);
|
||||||
ObjectTypeDB::bind_method(_MD("stop"),&VideoPlayer::stop);
|
ObjectTypeDB::bind_method(_MD("stop"),&VideoPlayer::stop);
|
||||||
|
|
|
@ -225,7 +225,7 @@ void CanvasLayer::_bind_methods() {
|
||||||
ObjectTypeDB::bind_method(_MD("set_scale","scale"),&CanvasLayer::set_scale);
|
ObjectTypeDB::bind_method(_MD("set_scale","scale"),&CanvasLayer::set_scale);
|
||||||
ObjectTypeDB::bind_method(_MD("get_scale"),&CanvasLayer::get_scale);
|
ObjectTypeDB::bind_method(_MD("get_scale"),&CanvasLayer::get_scale);
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("get_world_2d:Canvas"),&CanvasLayer::get_world_2d);
|
ObjectTypeDB::bind_method(_MD("get_world_2d:World2D"),&CanvasLayer::get_world_2d);
|
||||||
ObjectTypeDB::bind_method(_MD("get_viewport"),&CanvasLayer::get_viewport);
|
ObjectTypeDB::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::INT,"layer",PROPERTY_HINT_RANGE,"-128,128,1"),_SCS("set_layer"),_SCS("get_layer") );
|
||||||
|
|
|
@ -2022,7 +2022,7 @@ void Node::_bind_methods() {
|
||||||
ObjectTypeDB::bind_method(_MD("get_child:Node","idx"),&Node::get_child);
|
ObjectTypeDB::bind_method(_MD("get_child:Node","idx"),&Node::get_child);
|
||||||
ObjectTypeDB::bind_method(_MD("has_node","path"),&Node::has_node);
|
ObjectTypeDB::bind_method(_MD("has_node","path"),&Node::has_node);
|
||||||
ObjectTypeDB::bind_method(_MD("get_node:Node","path"),&Node::get_node);
|
ObjectTypeDB::bind_method(_MD("get_node:Node","path"),&Node::get_node);
|
||||||
ObjectTypeDB::bind_method(_MD("get_parent:Parent"),&Node::get_parent);
|
ObjectTypeDB::bind_method(_MD("get_parent:Node"),&Node::get_parent);
|
||||||
ObjectTypeDB::bind_method(_MD("find_node:Node","mask","recursive","owned"),&Node::find_node,DEFVAL(true),DEFVAL(true));
|
ObjectTypeDB::bind_method(_MD("find_node:Node","mask","recursive","owned"),&Node::find_node,DEFVAL(true),DEFVAL(true));
|
||||||
ObjectTypeDB::bind_method(_MD("has_node_and_resource","path"),&Node::has_node_and_resource);
|
ObjectTypeDB::bind_method(_MD("has_node_and_resource","path"),&Node::has_node_and_resource);
|
||||||
ObjectTypeDB::bind_method(_MD("get_node_and_resource","path"),&Node::_get_node_and_resource);
|
ObjectTypeDB::bind_method(_MD("get_node_and_resource","path"),&Node::_get_node_and_resource);
|
||||||
|
|
|
@ -862,7 +862,7 @@ void SurfaceTool::_bind_methods() {
|
||||||
ObjectTypeDB::bind_method(_MD("deindex"),&SurfaceTool::deindex);
|
ObjectTypeDB::bind_method(_MD("deindex"),&SurfaceTool::deindex);
|
||||||
///ObjectTypeDB::bind_method(_MD("generate_flat_normals"),&SurfaceTool::generate_flat_normals);
|
///ObjectTypeDB::bind_method(_MD("generate_flat_normals"),&SurfaceTool::generate_flat_normals);
|
||||||
ObjectTypeDB::bind_method(_MD("generate_normals"),&SurfaceTool::generate_normals);
|
ObjectTypeDB::bind_method(_MD("generate_normals"),&SurfaceTool::generate_normals);
|
||||||
ObjectTypeDB::bind_method(_MD("commit:Mesh","existing:Mesh"),&SurfaceTool::commit,DEFVAL( RefPtr() ));
|
ObjectTypeDB::bind_method(_MD("commit:Mesh","existing:Mesh"),&SurfaceTool::commit,DEFVAL(Variant()));
|
||||||
ObjectTypeDB::bind_method(_MD("clear"),&SurfaceTool::clear);
|
ObjectTypeDB::bind_method(_MD("clear"),&SurfaceTool::clear);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -630,7 +630,7 @@ void Physics2DServer::_bind_methods() {
|
||||||
ObjectTypeDB::bind_method(_MD("groove_joint_create","groove1_a","groove2_a","anchor_b","body_a","body_b"),&Physics2DServer::groove_joint_create,DEFVAL(RID()),DEFVAL(RID()));
|
ObjectTypeDB::bind_method(_MD("groove_joint_create","groove1_a","groove2_a","anchor_b","body_a","body_b"),&Physics2DServer::groove_joint_create,DEFVAL(RID()),DEFVAL(RID()));
|
||||||
ObjectTypeDB::bind_method(_MD("damped_spring_joint_create","anchor_a","anchor_b","body_a","body_b"),&Physics2DServer::damped_spring_joint_create,DEFVAL(RID()));
|
ObjectTypeDB::bind_method(_MD("damped_spring_joint_create","anchor_a","anchor_b","body_a","body_b"),&Physics2DServer::damped_spring_joint_create,DEFVAL(RID()));
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("damped_string_joint_set_param","joint","param","value"),&Physics2DServer::damped_string_joint_set_param,DEFVAL(RID()));
|
ObjectTypeDB::bind_method(_MD("damped_string_joint_set_param","joint","param","value"),&Physics2DServer::damped_string_joint_set_param);
|
||||||
ObjectTypeDB::bind_method(_MD("damped_string_joint_get_param","joint","param"),&Physics2DServer::damped_string_joint_get_param);
|
ObjectTypeDB::bind_method(_MD("damped_string_joint_get_param","joint","param"),&Physics2DServer::damped_string_joint_get_param);
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("joint_get_type","joint"),&Physics2DServer::joint_get_type);
|
ObjectTypeDB::bind_method(_MD("joint_get_type","joint"),&Physics2DServer::joint_get_type);
|
||||||
|
|
|
@ -287,6 +287,7 @@ void DocData::generate(bool p_basic_types) {
|
||||||
case Variant::INT_ARRAY:
|
case Variant::INT_ARRAY:
|
||||||
case Variant::REAL_ARRAY:
|
case Variant::REAL_ARRAY:
|
||||||
case Variant::STRING_ARRAY: //25
|
case Variant::STRING_ARRAY: //25
|
||||||
|
case Variant::VECTOR2_ARRAY:
|
||||||
case Variant::VECTOR3_ARRAY:
|
case Variant::VECTOR3_ARRAY:
|
||||||
case Variant::COLOR_ARRAY:
|
case Variant::COLOR_ARRAY:
|
||||||
default_arg_text=Variant::get_type_name(default_arg.get_type())+"("+default_arg_text+")";
|
default_arg_text=Variant::get_type_name(default_arg.get_type())+"("+default_arg_text+")";
|
||||||
|
|
Loading…
Reference in New Issue