summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-02 23:03:46 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-02 23:03:46 -0300
commit118eed485e8f928a5a0dab530ae93211afa10525 (patch)
tree83efb5cbcebb7046e5b64dfe1712475a7d3b7f14 /scene/main
parentce26eb74bca48f16e9a34b4eb1c34e50dfc5daae (diff)
ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/canvas_layer.cpp36
-rw-r--r--scene/main/canvas_layer.h2
-rw-r--r--scene/main/http_request.cpp32
-rw-r--r--scene/main/http_request.h2
-rw-r--r--scene/main/instance_placeholder.cpp6
-rw-r--r--scene/main/instance_placeholder.h2
-rw-r--r--scene/main/node.cpp190
-rw-r--r--scene/main/node.h2
-rw-r--r--scene/main/resource_preloader.cpp18
-rw-r--r--scene/main/resource_preloader.h2
-rw-r--r--scene/main/scene_main_loop.cpp92
-rw-r--r--scene/main/scene_main_loop.h4
-rw-r--r--scene/main/timer.cpp26
-rw-r--r--scene/main/timer.h2
-rw-r--r--scene/main/viewport.cpp142
-rw-r--r--scene/main/viewport.h4
16 files changed, 281 insertions, 281 deletions
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp
index 9f20e0f845..c5fdcddf15 100644
--- a/scene/main/canvas_layer.cpp
+++ b/scene/main/canvas_layer.cpp
@@ -259,33 +259,33 @@ int CanvasLayer::get_sort_index() {
void CanvasLayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_layer","layer"),&CanvasLayer::set_layer);
- ObjectTypeDB::bind_method(_MD("get_layer"),&CanvasLayer::get_layer);
+ ClassDB::bind_method(_MD("set_layer","layer"),&CanvasLayer::set_layer);
+ ClassDB::bind_method(_MD("get_layer"),&CanvasLayer::get_layer);
- ObjectTypeDB::bind_method(_MD("set_transform","transform"),&CanvasLayer::set_transform);
- ObjectTypeDB::bind_method(_MD("get_transform"),&CanvasLayer::get_transform);
+ ClassDB::bind_method(_MD("set_transform","transform"),&CanvasLayer::set_transform);
+ ClassDB::bind_method(_MD("get_transform"),&CanvasLayer::get_transform);
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&CanvasLayer::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&CanvasLayer::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&CanvasLayer::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&CanvasLayer::get_offset);
- ObjectTypeDB::bind_method(_MD("set_rotation","radians"),&CanvasLayer::set_rotation);
- ObjectTypeDB::bind_method(_MD("get_rotation"),&CanvasLayer::get_rotation);
+ ClassDB::bind_method(_MD("set_rotation","radians"),&CanvasLayer::set_rotation);
+ ClassDB::bind_method(_MD("get_rotation"),&CanvasLayer::get_rotation);
- ObjectTypeDB::bind_method(_MD("set_rotationd","degrees"),&CanvasLayer::set_rotationd);
- ObjectTypeDB::bind_method(_MD("get_rotationd"),&CanvasLayer::get_rotationd);
+ ClassDB::bind_method(_MD("set_rotationd","degrees"),&CanvasLayer::set_rotationd);
+ ClassDB::bind_method(_MD("get_rotationd"),&CanvasLayer::get_rotationd);
// TODO: Obsolete those two methods (old name) properly (GH-4397)
- ObjectTypeDB::bind_method(_MD("_set_rotationd","degrees"),&CanvasLayer::_set_rotationd);
- ObjectTypeDB::bind_method(_MD("_get_rotationd"),&CanvasLayer::_get_rotationd);
+ ClassDB::bind_method(_MD("_set_rotationd","degrees"),&CanvasLayer::_set_rotationd);
+ ClassDB::bind_method(_MD("_get_rotationd"),&CanvasLayer::_get_rotationd);
- ObjectTypeDB::bind_method(_MD("set_scale","scale"),&CanvasLayer::set_scale);
- ObjectTypeDB::bind_method(_MD("get_scale"),&CanvasLayer::get_scale);
+ ClassDB::bind_method(_MD("set_scale","scale"),&CanvasLayer::set_scale);
+ ClassDB::bind_method(_MD("get_scale"),&CanvasLayer::get_scale);
- ObjectTypeDB::bind_method(_MD("set_custom_viewport","viewport:Viewport"),&CanvasLayer::set_custom_viewport);
- ObjectTypeDB::bind_method(_MD("get_custom_viewport:Viewport"),&CanvasLayer::get_custom_viewport);
+ ClassDB::bind_method(_MD("set_custom_viewport","viewport:Viewport"),&CanvasLayer::set_custom_viewport);
+ ClassDB::bind_method(_MD("get_custom_viewport:Viewport"),&CanvasLayer::get_custom_viewport);
- ObjectTypeDB::bind_method(_MD("get_world_2d:World2D"),&CanvasLayer::get_world_2d);
-// ObjectTypeDB::bind_method(_MD("get_viewport"),&CanvasLayer::get_viewport);
+ ClassDB::bind_method(_MD("get_world_2d:World2D"),&CanvasLayer::get_world_2d);
+// 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/canvas_layer.h b/scene/main/canvas_layer.h
index 2e3c917205..ea05fd7e1f 100644
--- a/scene/main/canvas_layer.h
+++ b/scene/main/canvas_layer.h
@@ -36,7 +36,7 @@
class Viewport;
class CanvasLayer : public Node {
- OBJ_TYPE( CanvasLayer, Node );
+ GDCLASS( CanvasLayer, Node );
bool locrotscale_dirty;
Vector2 ofs;
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index 4203edda77..1be43826f7 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -539,29 +539,29 @@ int HTTPRequest::get_body_size() const{
void HTTPRequest::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPRequest::set_ip_type);
- ObjectTypeDB::bind_method(_MD("request","url","custom_headers","ssl_validate_domain","method","request_data"),&HTTPRequest::request,DEFVAL(StringArray()),DEFVAL(true),DEFVAL(HTTPClient::METHOD_GET),DEFVAL(String()));
- ObjectTypeDB::bind_method(_MD("cancel_request"),&HTTPRequest::cancel_request);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPRequest::set_ip_type);
+ ClassDB::bind_method(_MD("request","url","custom_headers","ssl_validate_domain","method","request_data"),&HTTPRequest::request,DEFVAL(StringArray()),DEFVAL(true),DEFVAL(HTTPClient::METHOD_GET),DEFVAL(String()));
+ ClassDB::bind_method(_MD("cancel_request"),&HTTPRequest::cancel_request);
- ObjectTypeDB::bind_method(_MD("get_http_client_status"),&HTTPRequest::get_http_client_status);
+ ClassDB::bind_method(_MD("get_http_client_status"),&HTTPRequest::get_http_client_status);
- ObjectTypeDB::bind_method(_MD("set_use_threads","enable"),&HTTPRequest::set_use_threads);
- ObjectTypeDB::bind_method(_MD("is_using_threads"),&HTTPRequest::is_using_threads);
+ ClassDB::bind_method(_MD("set_use_threads","enable"),&HTTPRequest::set_use_threads);
+ ClassDB::bind_method(_MD("is_using_threads"),&HTTPRequest::is_using_threads);
- ObjectTypeDB::bind_method(_MD("set_body_size_limit","bytes"),&HTTPRequest::set_body_size_limit);
- ObjectTypeDB::bind_method(_MD("get_body_size_limit"),&HTTPRequest::get_body_size_limit);
+ ClassDB::bind_method(_MD("set_body_size_limit","bytes"),&HTTPRequest::set_body_size_limit);
+ ClassDB::bind_method(_MD("get_body_size_limit"),&HTTPRequest::get_body_size_limit);
- ObjectTypeDB::bind_method(_MD("set_max_redirects","amount"),&HTTPRequest::set_max_redirects);
- ObjectTypeDB::bind_method(_MD("get_max_redirects"),&HTTPRequest::get_max_redirects);
+ ClassDB::bind_method(_MD("set_max_redirects","amount"),&HTTPRequest::set_max_redirects);
+ ClassDB::bind_method(_MD("get_max_redirects"),&HTTPRequest::get_max_redirects);
- ObjectTypeDB::bind_method(_MD("set_download_file","path"),&HTTPRequest::set_download_file);
- ObjectTypeDB::bind_method(_MD("get_download_file"),&HTTPRequest::get_download_file);
+ ClassDB::bind_method(_MD("set_download_file","path"),&HTTPRequest::set_download_file);
+ ClassDB::bind_method(_MD("get_download_file"),&HTTPRequest::get_download_file);
- ObjectTypeDB::bind_method(_MD("get_downloaded_bytes"),&HTTPRequest::get_downloaded_bytes);
- ObjectTypeDB::bind_method(_MD("get_body_size"),&HTTPRequest::get_body_size);
+ ClassDB::bind_method(_MD("get_downloaded_bytes"),&HTTPRequest::get_downloaded_bytes);
+ ClassDB::bind_method(_MD("get_body_size"),&HTTPRequest::get_body_size);
- ObjectTypeDB::bind_method(_MD("_redirect_request"),&HTTPRequest::_redirect_request);
- ObjectTypeDB::bind_method(_MD("_request_done"),&HTTPRequest::_request_done);
+ ClassDB::bind_method(_MD("_redirect_request"),&HTTPRequest::_redirect_request);
+ ClassDB::bind_method(_MD("_request_done"),&HTTPRequest::_request_done);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"use_threads"),_SCS("set_use_threads"),_SCS("is_using_threads"));
ADD_PROPERTY(PropertyInfo(Variant::INT,"body_size_limit",PROPERTY_HINT_RANGE,"-1,2000000000"),_SCS("set_body_size_limit"),_SCS("get_body_size_limit"));
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index 5bf47111e8..d4adaa16d4 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -36,7 +36,7 @@
class HTTPRequest : public Node {
- OBJ_TYPE(HTTPRequest,Node);
+ GDCLASS(HTTPRequest,Node);
public:
enum Result {
diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp
index ebba96ff81..289adc3c53 100644
--- a/scene/main/instance_placeholder.cpp
+++ b/scene/main/instance_placeholder.cpp
@@ -122,9 +122,9 @@ Dictionary InstancePlaceholder::get_stored_values(bool p_with_order) {
void InstancePlaceholder::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_stored_values","with_order"),&InstancePlaceholder::get_stored_values,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("replace_by_instance","custom_scene:PackedScene"),&InstancePlaceholder::replace_by_instance,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("get_instance_path"),&InstancePlaceholder::get_instance_path);
+ ClassDB::bind_method(_MD("get_stored_values","with_order"),&InstancePlaceholder::get_stored_values,DEFVAL(false));
+ ClassDB::bind_method(_MD("replace_by_instance","custom_scene:PackedScene"),&InstancePlaceholder::replace_by_instance,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("get_instance_path"),&InstancePlaceholder::get_instance_path);
}
InstancePlaceholder::InstancePlaceholder() {
diff --git a/scene/main/instance_placeholder.h b/scene/main/instance_placeholder.h
index 85de393247..069b1c9756 100644
--- a/scene/main/instance_placeholder.h
+++ b/scene/main/instance_placeholder.h
@@ -35,7 +35,7 @@ class PackedScene;
class InstancePlaceholder : public Node {
- OBJ_TYPE(InstancePlaceholder,Node);
+ GDCLASS(InstancePlaceholder,Node);
String path;
struct PropSet {
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 23230a8b40..c065c62ab4 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1314,7 +1314,7 @@ String Node::_generate_serial_child_name(Node *p_child) {
if (name=="") {
- name = p_child->get_type();
+ name = p_child->get_class();
}
// Extract trailing number
@@ -2233,7 +2233,7 @@ Node *Node::_duplicate(bool p_use_instancing) const {
} else {
- Object *obj = ObjectTypeDB::instance(get_type());
+ Object *obj = ClassDB::instance(get_class());
ERR_FAIL_COND_V(!obj,NULL);
node = obj->cast_to<Node>();
if (!node)
@@ -2318,9 +2318,9 @@ void Node::_duplicate_and_reown(Node* p_new_parent, const Map<Node*,Node*>& p_re
ERR_FAIL_COND(!node);
} else {
- Object *obj = ObjectTypeDB::instance(get_type());
+ Object *obj = ClassDB::instance(get_class());
if (!obj) {
- print_line("could not duplicate: "+String(get_type()));
+ print_line("could not duplicate: "+String(get_class()));
}
ERR_FAIL_COND(!obj);
node = obj->cast_to<Node>();
@@ -2414,9 +2414,9 @@ Node *Node::duplicate_and_reown(const Map<Node*,Node*>& p_reown_map) const {
Node *node=NULL;
- Object *obj = ObjectTypeDB::instance(get_type());
+ Object *obj = ClassDB::instance(get_class());
if (!obj) {
- print_line("could not duplicate: "+String(get_type()));
+ print_line("could not duplicate: "+String(get_class()));
}
ERR_FAIL_COND_V(!obj,NULL);
node = obj->cast_to<Node>();
@@ -2704,7 +2704,7 @@ static void _Node_debug_sn(Object *p_obj) {
path=n->get_name();
else
path=String(p->get_name())+"/"+p->get_path_to(n);
- print_line(itos(p_obj->get_instance_ID())+"- Stray Node: "+path+" (Type: "+n->get_type()+")");
+ print_line(itos(p_obj->get_instance_ID())+"- Stray Node: "+path+" (Type: "+n->get_class()+")");
}
@@ -2819,87 +2819,87 @@ void Node::_bind_methods() {
Globals::get_singleton()->set_custom_property_info("node/name_num_separator",PropertyInfo(Variant::INT,"node/name_num_separator",PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash"));
- ObjectTypeDB::bind_method(_MD("_add_child_below_node","node:Node","child_node:Node","legible_unique_name"),&Node::add_child_below_node,DEFVAL(false));
-
- ObjectTypeDB::bind_method(_MD("set_name","name"),&Node::set_name);
- ObjectTypeDB::bind_method(_MD("get_name"),&Node::get_name);
- ObjectTypeDB::bind_method(_MD("add_child","node:Node","legible_unique_name"),&Node::add_child,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("remove_child","node:Node"),&Node::remove_child);
- //ObjectTypeDB::bind_method(_MD("remove_and_delete_child","node:Node"),&Node::remove_and_delete_child);
- ObjectTypeDB::bind_method(_MD("get_child_count"),&Node::get_child_count);
- ObjectTypeDB::bind_method(_MD("get_children"),&Node::_get_children);
- 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("get_node:Node","path"),&Node::get_node);
- 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("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("is_inside_tree"),&Node::is_inside_tree);
- ObjectTypeDB::bind_method(_MD("is_a_parent_of","node:Node"),&Node::is_a_parent_of);
- ObjectTypeDB::bind_method(_MD("is_greater_than","node:Node"),&Node::is_greater_than);
- ObjectTypeDB::bind_method(_MD("get_path"),&Node::get_path);
- ObjectTypeDB::bind_method(_MD("get_path_to","node:Node"),&Node::get_path_to);
- ObjectTypeDB::bind_method(_MD("add_to_group","group","persistent"),&Node::add_to_group,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("remove_from_group","group"),&Node::remove_from_group);
- ObjectTypeDB::bind_method(_MD("is_in_group","group"),&Node::is_in_group);
- ObjectTypeDB::bind_method(_MD("move_child","child_node:Node","to_pos"),&Node::move_child);
- ObjectTypeDB::bind_method(_MD("get_groups"),&Node::_get_groups);
- ObjectTypeDB::bind_method(_MD("raise"),&Node::raise);
- ObjectTypeDB::bind_method(_MD("set_owner","owner:Node"),&Node::set_owner);
- ObjectTypeDB::bind_method(_MD("get_owner:Node"),&Node::get_owner);
- ObjectTypeDB::bind_method(_MD("remove_and_skip"),&Node::remove_and_skip);
- ObjectTypeDB::bind_method(_MD("get_index"),&Node::get_index);
- ObjectTypeDB::bind_method(_MD("print_tree"),&Node::print_tree);
- ObjectTypeDB::bind_method(_MD("set_filename","filename"),&Node::set_filename);
- ObjectTypeDB::bind_method(_MD("get_filename"),&Node::get_filename);
- ObjectTypeDB::bind_method(_MD("propagate_notification","what"),&Node::propagate_notification);
- ObjectTypeDB::bind_method(_MD("set_fixed_process","enable"),&Node::set_fixed_process);
- ObjectTypeDB::bind_method(_MD("get_fixed_process_delta_time"),&Node::get_fixed_process_delta_time);
- ObjectTypeDB::bind_method(_MD("is_fixed_processing"),&Node::is_fixed_processing);
- ObjectTypeDB::bind_method(_MD("set_process","enable"),&Node::set_process);
- ObjectTypeDB::bind_method(_MD("get_process_delta_time"),&Node::get_process_delta_time);
- ObjectTypeDB::bind_method(_MD("is_processing"),&Node::is_processing);
- ObjectTypeDB::bind_method(_MD("set_process_input","enable"),&Node::set_process_input);
- ObjectTypeDB::bind_method(_MD("is_processing_input"),&Node::is_processing_input);
- ObjectTypeDB::bind_method(_MD("set_process_unhandled_input","enable"),&Node::set_process_unhandled_input);
- ObjectTypeDB::bind_method(_MD("is_processing_unhandled_input"),&Node::is_processing_unhandled_input);
- ObjectTypeDB::bind_method(_MD("set_process_unhandled_key_input","enable"),&Node::set_process_unhandled_key_input);
- ObjectTypeDB::bind_method(_MD("is_processing_unhandled_key_input"),&Node::is_processing_unhandled_key_input);
- ObjectTypeDB::bind_method(_MD("set_pause_mode","mode"),&Node::set_pause_mode);
- ObjectTypeDB::bind_method(_MD("get_pause_mode"),&Node::get_pause_mode);
- ObjectTypeDB::bind_method(_MD("can_process"),&Node::can_process);
- ObjectTypeDB::bind_method(_MD("print_stray_nodes"),&Node::_print_stray_nodes);
- ObjectTypeDB::bind_method(_MD("get_position_in_parent"),&Node::get_position_in_parent);
- ObjectTypeDB::bind_method(_MD("set_display_folded","fold"),&Node::set_display_folded);
- ObjectTypeDB::bind_method(_MD("is_displayed_folded"),&Node::is_displayed_folded);
-
- ObjectTypeDB::bind_method(_MD("get_tree:SceneTree"),&Node::get_tree);
-
- ObjectTypeDB::bind_method(_MD("duplicate:Node","use_instancing"),&Node::duplicate,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("replace_by","node:Node","keep_data"),&Node::replace_by,DEFVAL(false));
-
- ObjectTypeDB::bind_method(_MD("set_scene_instance_load_placeholder","load_placeholder"),&Node::set_scene_instance_load_placeholder);
- ObjectTypeDB::bind_method(_MD("get_scene_instance_load_placeholder"),&Node::get_scene_instance_load_placeholder);
-
-
- ObjectTypeDB::bind_method(_MD("get_viewport"),&Node::get_viewport);
-
- ObjectTypeDB::bind_method(_MD("queue_free"),&Node::queue_delete);
-
- ObjectTypeDB::bind_method(_MD("set_network_mode","mode"),&Node::set_network_mode);
- ObjectTypeDB::bind_method(_MD("get_network_mode"),&Node::get_network_mode);
-
- ObjectTypeDB::bind_method(_MD("is_network_master"),&Node::is_network_master);
-
- ObjectTypeDB::bind_method(_MD("rpc_config","method","mode"),&Node::rpc_config);
- ObjectTypeDB::bind_method(_MD("rset_config","property","mode"),&Node::rset_config);
+ ClassDB::bind_method(_MD("_add_child_below_node","node:Node","child_node:Node","legible_unique_name"),&Node::add_child_below_node,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("set_name","name"),&Node::set_name);
+ ClassDB::bind_method(_MD("get_name"),&Node::get_name);
+ ClassDB::bind_method(_MD("add_child","node:Node","legible_unique_name"),&Node::add_child,DEFVAL(false));
+ ClassDB::bind_method(_MD("remove_child","node:Node"),&Node::remove_child);
+ //ClassDB::bind_method(_MD("remove_and_delete_child","node:Node"),&Node::remove_and_delete_child);
+ ClassDB::bind_method(_MD("get_child_count"),&Node::get_child_count);
+ ClassDB::bind_method(_MD("get_children"),&Node::_get_children);
+ ClassDB::bind_method(_MD("get_child:Node","idx"),&Node::get_child);
+ ClassDB::bind_method(_MD("has_node","path"),&Node::has_node);
+ ClassDB::bind_method(_MD("get_node:Node","path"),&Node::get_node);
+ ClassDB::bind_method(_MD("get_parent:Node"),&Node::get_parent);
+ ClassDB::bind_method(_MD("find_node:Node","mask","recursive","owned"),&Node::find_node,DEFVAL(true),DEFVAL(true));
+ ClassDB::bind_method(_MD("has_node_and_resource","path"),&Node::has_node_and_resource);
+ ClassDB::bind_method(_MD("get_node_and_resource","path"),&Node::_get_node_and_resource);
+
+ ClassDB::bind_method(_MD("is_inside_tree"),&Node::is_inside_tree);
+ ClassDB::bind_method(_MD("is_a_parent_of","node:Node"),&Node::is_a_parent_of);
+ ClassDB::bind_method(_MD("is_greater_than","node:Node"),&Node::is_greater_than);
+ ClassDB::bind_method(_MD("get_path"),&Node::get_path);
+ ClassDB::bind_method(_MD("get_path_to","node:Node"),&Node::get_path_to);
+ ClassDB::bind_method(_MD("add_to_group","group","persistent"),&Node::add_to_group,DEFVAL(false));
+ ClassDB::bind_method(_MD("remove_from_group","group"),&Node::remove_from_group);
+ ClassDB::bind_method(_MD("is_in_group","group"),&Node::is_in_group);
+ ClassDB::bind_method(_MD("move_child","child_node:Node","to_pos"),&Node::move_child);
+ ClassDB::bind_method(_MD("get_groups"),&Node::_get_groups);
+ ClassDB::bind_method(_MD("raise"),&Node::raise);
+ ClassDB::bind_method(_MD("set_owner","owner:Node"),&Node::set_owner);
+ ClassDB::bind_method(_MD("get_owner:Node"),&Node::get_owner);
+ ClassDB::bind_method(_MD("remove_and_skip"),&Node::remove_and_skip);
+ ClassDB::bind_method(_MD("get_index"),&Node::get_index);
+ ClassDB::bind_method(_MD("print_tree"),&Node::print_tree);
+ ClassDB::bind_method(_MD("set_filename","filename"),&Node::set_filename);
+ ClassDB::bind_method(_MD("get_filename"),&Node::get_filename);
+ ClassDB::bind_method(_MD("propagate_notification","what"),&Node::propagate_notification);
+ ClassDB::bind_method(_MD("set_fixed_process","enable"),&Node::set_fixed_process);
+ ClassDB::bind_method(_MD("get_fixed_process_delta_time"),&Node::get_fixed_process_delta_time);
+ ClassDB::bind_method(_MD("is_fixed_processing"),&Node::is_fixed_processing);
+ ClassDB::bind_method(_MD("set_process","enable"),&Node::set_process);
+ ClassDB::bind_method(_MD("get_process_delta_time"),&Node::get_process_delta_time);
+ ClassDB::bind_method(_MD("is_processing"),&Node::is_processing);
+ ClassDB::bind_method(_MD("set_process_input","enable"),&Node::set_process_input);
+ ClassDB::bind_method(_MD("is_processing_input"),&Node::is_processing_input);
+ ClassDB::bind_method(_MD("set_process_unhandled_input","enable"),&Node::set_process_unhandled_input);
+ ClassDB::bind_method(_MD("is_processing_unhandled_input"),&Node::is_processing_unhandled_input);
+ ClassDB::bind_method(_MD("set_process_unhandled_key_input","enable"),&Node::set_process_unhandled_key_input);
+ ClassDB::bind_method(_MD("is_processing_unhandled_key_input"),&Node::is_processing_unhandled_key_input);
+ ClassDB::bind_method(_MD("set_pause_mode","mode"),&Node::set_pause_mode);
+ ClassDB::bind_method(_MD("get_pause_mode"),&Node::get_pause_mode);
+ ClassDB::bind_method(_MD("can_process"),&Node::can_process);
+ ClassDB::bind_method(_MD("print_stray_nodes"),&Node::_print_stray_nodes);
+ ClassDB::bind_method(_MD("get_position_in_parent"),&Node::get_position_in_parent);
+ ClassDB::bind_method(_MD("set_display_folded","fold"),&Node::set_display_folded);
+ ClassDB::bind_method(_MD("is_displayed_folded"),&Node::is_displayed_folded);
+
+ ClassDB::bind_method(_MD("get_tree:SceneTree"),&Node::get_tree);
+
+ ClassDB::bind_method(_MD("duplicate:Node","use_instancing"),&Node::duplicate,DEFVAL(false));
+ ClassDB::bind_method(_MD("replace_by","node:Node","keep_data"),&Node::replace_by,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("set_scene_instance_load_placeholder","load_placeholder"),&Node::set_scene_instance_load_placeholder);
+ ClassDB::bind_method(_MD("get_scene_instance_load_placeholder"),&Node::get_scene_instance_load_placeholder);
+
+
+ ClassDB::bind_method(_MD("get_viewport"),&Node::get_viewport);
+
+ ClassDB::bind_method(_MD("queue_free"),&Node::queue_delete);
+
+ ClassDB::bind_method(_MD("set_network_mode","mode"),&Node::set_network_mode);
+ ClassDB::bind_method(_MD("get_network_mode"),&Node::get_network_mode);
+
+ ClassDB::bind_method(_MD("is_network_master"),&Node::is_network_master);
+
+ ClassDB::bind_method(_MD("rpc_config","method","mode"),&Node::rpc_config);
+ ClassDB::bind_method(_MD("rset_config","property","mode"),&Node::rset_config);
#ifdef TOOLS_ENABLED
- ObjectTypeDB::bind_method(_MD("_set_import_path","import_path"),&Node::set_import_path);
- ObjectTypeDB::bind_method(_MD("_get_import_path"),&Node::get_import_path);
+ ClassDB::bind_method(_MD("_set_import_path","import_path"),&Node::set_import_path);
+ ClassDB::bind_method(_MD("_get_import_path"),&Node::get_import_path);
ADD_PROPERTYNZ( PropertyInfo(Variant::NODE_PATH,"_import_path",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_import_path"),_SCS("_get_import_path"));
#endif
@@ -2911,24 +2911,24 @@ void Node::_bind_methods() {
mi.name="rpc";
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc",&Node::_rpc_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc",&Node::_rpc_bind,mi);
mi.name="rpc_unreliable";
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable",&Node::_rpc_unreliable_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable",&Node::_rpc_unreliable_bind,mi);
mi.arguments.push_front( PropertyInfo( Variant::INT, "peer_id") );
mi.name="rpc_id";
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_id",&Node::_rpc_id_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_id",&Node::_rpc_id_bind,mi);
mi.name="rpc_unreliable_id";
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable_id",&Node::_rpc_unreliable_id_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable_id",&Node::_rpc_unreliable_id_bind,mi);
}
- ObjectTypeDB::bind_method(_MD("rset","property","value:Variant"),&Node::rset);
- ObjectTypeDB::bind_method(_MD("rset_id","peer_id","property","value:Variant"),&Node::rset_id);
- ObjectTypeDB::bind_method(_MD("rset_unreliable","property","value:Variant"),&Node::rset_unreliable);
- ObjectTypeDB::bind_method(_MD("rset_unreliable_id","peer_id","property","value:Variant"),&Node::rset_unreliable_id);
+ ClassDB::bind_method(_MD("rset","property","value:Variant"),&Node::rset);
+ ClassDB::bind_method(_MD("rset_id","peer_id","property","value:Variant"),&Node::rset_id);
+ ClassDB::bind_method(_MD("rset_unreliable","property","value:Variant"),&Node::rset_unreliable);
+ ClassDB::bind_method(_MD("rset_unreliable_id","peer_id","property","value:Variant"),&Node::rset_unreliable_id);
BIND_CONSTANT( NOTIFICATION_ENTER_TREE );
@@ -2982,8 +2982,8 @@ void Node::_bind_methods() {
BIND_VMETHOD( MethodInfo("_unhandled_input",PropertyInfo(Variant::INPUT_EVENT,"event")) );
BIND_VMETHOD( MethodInfo("_unhandled_key_input",PropertyInfo(Variant::INPUT_EVENT,"key_event")) );
- //ObjectTypeDB::bind_method(_MD("get_child",&Node::get_child,PH("index")));
- //ObjectTypeDB::bind_method(_MD("get_node",&Node::get_node,PH("path")));
+ //ClassDB::bind_method(_MD("get_child",&Node::get_child,PH("index")));
+ //ClassDB::bind_method(_MD("get_node",&Node::get_node,PH("path")));
}
diff --git a/scene/main/node.h b/scene/main/node.h
index 66846217d1..5c8cde5192 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -42,7 +42,7 @@ class Viewport;
class SceneState;
class Node : public Object {
- OBJ_TYPE( Node, Object );
+ GDCLASS( Node, Object );
OBJ_CATEGORY("Nodes");
public:
diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp
index 49bf6106b3..57bda91494 100644
--- a/scene/main/resource_preloader.cpp
+++ b/scene/main/resource_preloader.cpp
@@ -163,15 +163,15 @@ void ResourcePreloader::get_resource_list(List<StringName> *p_list) {
void ResourcePreloader::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_set_resources"),&ResourcePreloader::_set_resources);
- ObjectTypeDB::bind_method(_MD("_get_resources"),&ResourcePreloader::_get_resources);
-
- ObjectTypeDB::bind_method(_MD("add_resource","name","resource"),&ResourcePreloader::add_resource);
- ObjectTypeDB::bind_method(_MD("remove_resource","name"),&ResourcePreloader::remove_resource);
- ObjectTypeDB::bind_method(_MD("rename_resource","name","newname"),&ResourcePreloader::rename_resource);
- ObjectTypeDB::bind_method(_MD("has_resource","name"),&ResourcePreloader::has_resource);
- ObjectTypeDB::bind_method(_MD("get_resource","name"),&ResourcePreloader::get_resource);
- ObjectTypeDB::bind_method(_MD("get_resource_list"),&ResourcePreloader::_get_resource_list);
+ ClassDB::bind_method(_MD("_set_resources"),&ResourcePreloader::_set_resources);
+ ClassDB::bind_method(_MD("_get_resources"),&ResourcePreloader::_get_resources);
+
+ ClassDB::bind_method(_MD("add_resource","name","resource"),&ResourcePreloader::add_resource);
+ ClassDB::bind_method(_MD("remove_resource","name"),&ResourcePreloader::remove_resource);
+ ClassDB::bind_method(_MD("rename_resource","name","newname"),&ResourcePreloader::rename_resource);
+ ClassDB::bind_method(_MD("has_resource","name"),&ResourcePreloader::has_resource);
+ ClassDB::bind_method(_MD("get_resource","name"),&ResourcePreloader::get_resource);
+ ClassDB::bind_method(_MD("get_resource_list"),&ResourcePreloader::_get_resource_list);
ADD_PROPERTY( PropertyInfo(Variant::ARRAY,"resources",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_resources"), _SCS("_get_resources"));
diff --git a/scene/main/resource_preloader.h b/scene/main/resource_preloader.h
index f2d1461fba..8f4f997cee 100644
--- a/scene/main/resource_preloader.h
+++ b/scene/main/resource_preloader.h
@@ -34,7 +34,7 @@
class ResourcePreloader : public Node {
- OBJ_TYPE(ResourcePreloader,Node);
+ GDCLASS(ResourcePreloader,Node);
Map<StringName,RES > resources;
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp
index 874562ad3b..966d4c82ef 100644
--- a/scene/main/scene_main_loop.cpp
+++ b/scene/main/scene_main_loop.cpp
@@ -48,8 +48,8 @@
void SceneTreeTimer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_time_left","time"),&SceneTreeTimer::set_time_left);
- ObjectTypeDB::bind_method(_MD("get_time_left"),&SceneTreeTimer::get_time_left);
+ ClassDB::bind_method(_MD("set_time_left","time"),&SceneTreeTimer::set_time_left);
+ ClassDB::bind_method(_MD("get_time_left"),&SceneTreeTimer::get_time_left);
ADD_SIGNAL(MethodInfo("timeout"));
}
@@ -1052,7 +1052,7 @@ static void _fill_array(Node *p_node, Array& array, int p_level) {
array.push_back(p_level);
array.push_back(p_node->get_name());
- array.push_back(p_node->get_type());
+ array.push_back(p_node->get_class());
array.push_back(p_node->get_instance_ID());
for(int i=0;i<p_node->get_child_count();i++) {
@@ -1427,7 +1427,7 @@ void SceneTree::_live_edit_create_node_func(const NodePath& p_parent,const Strin
continue;
Node *n2 = n->get_node(p_parent);
- Object *o = ObjectTypeDB::instance(p_type);
+ Object *o = ClassDB::instance(p_type);
if (!o)
continue;
Node *no=o->cast_to<Node>();
@@ -2062,7 +2062,7 @@ void SceneTree::_network_process_packet(int p_from, const uint8_t* p_packet, int
node->set(name,value,&valid);
if (!valid) {
- String error = "Error setting remote property '"+String(name)+"', not found in object of type "+node->get_type();
+ String error = "Error setting remote property '"+String(name)+"', not found in object of type "+node->get_class();
ERR_PRINTS(error);
}
}
@@ -2160,43 +2160,43 @@ void SceneTree::_network_poll() {
void SceneTree::_bind_methods() {
- //ObjectTypeDB::bind_method(_MD("call_group","call_flags","group","method","arg1","arg2"),&SceneMainLoop::_call_group,DEFVAL(Variant()),DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("notify_group","call_flags","group","notification"),&SceneTree::notify_group);
- ObjectTypeDB::bind_method(_MD("set_group","call_flags","group","property","value"),&SceneTree::set_group);
+ //ClassDB::bind_method(_MD("call_group","call_flags","group","method","arg1","arg2"),&SceneMainLoop::_call_group,DEFVAL(Variant()),DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("notify_group","call_flags","group","notification"),&SceneTree::notify_group);
+ ClassDB::bind_method(_MD("set_group","call_flags","group","property","value"),&SceneTree::set_group);
- ObjectTypeDB::bind_method(_MD("get_nodes_in_group","group"),&SceneTree::_get_nodes_in_group);
+ ClassDB::bind_method(_MD("get_nodes_in_group","group"),&SceneTree::_get_nodes_in_group);
- ObjectTypeDB::bind_method(_MD("get_root:Viewport"),&SceneTree::get_root);
- ObjectTypeDB::bind_method(_MD("has_group","name"),&SceneTree::has_group);
+ ClassDB::bind_method(_MD("get_root:Viewport"),&SceneTree::get_root);
+ ClassDB::bind_method(_MD("has_group","name"),&SceneTree::has_group);
- ObjectTypeDB::bind_method(_MD("set_auto_accept_quit","enabled"),&SceneTree::set_auto_accept_quit);
+ ClassDB::bind_method(_MD("set_auto_accept_quit","enabled"),&SceneTree::set_auto_accept_quit);
- ObjectTypeDB::bind_method(_MD("set_editor_hint","enable"),&SceneTree::set_editor_hint);
- ObjectTypeDB::bind_method(_MD("is_editor_hint"),&SceneTree::is_editor_hint);
- ObjectTypeDB::bind_method(_MD("set_debug_collisions_hint","enable"),&SceneTree::set_debug_collisions_hint);
- ObjectTypeDB::bind_method(_MD("is_debugging_collisions_hint"),&SceneTree::is_debugging_collisions_hint);
- ObjectTypeDB::bind_method(_MD("set_debug_navigation_hint","enable"),&SceneTree::set_debug_navigation_hint);
- ObjectTypeDB::bind_method(_MD("is_debugging_navigation_hint"),&SceneTree::is_debugging_navigation_hint);
+ ClassDB::bind_method(_MD("set_editor_hint","enable"),&SceneTree::set_editor_hint);
+ ClassDB::bind_method(_MD("is_editor_hint"),&SceneTree::is_editor_hint);
+ ClassDB::bind_method(_MD("set_debug_collisions_hint","enable"),&SceneTree::set_debug_collisions_hint);
+ ClassDB::bind_method(_MD("is_debugging_collisions_hint"),&SceneTree::is_debugging_collisions_hint);
+ ClassDB::bind_method(_MD("set_debug_navigation_hint","enable"),&SceneTree::set_debug_navigation_hint);
+ ClassDB::bind_method(_MD("is_debugging_navigation_hint"),&SceneTree::is_debugging_navigation_hint);
#ifdef TOOLS_ENABLED
- ObjectTypeDB::bind_method(_MD("set_edited_scene_root","scene"),&SceneTree::set_edited_scene_root);
- ObjectTypeDB::bind_method(_MD("get_edited_scene_root"),&SceneTree::get_edited_scene_root);
+ ClassDB::bind_method(_MD("set_edited_scene_root","scene"),&SceneTree::set_edited_scene_root);
+ ClassDB::bind_method(_MD("get_edited_scene_root"),&SceneTree::get_edited_scene_root);
#endif
- ObjectTypeDB::bind_method(_MD("set_pause","enable"),&SceneTree::set_pause);
- ObjectTypeDB::bind_method(_MD("is_paused"),&SceneTree::is_paused);
- ObjectTypeDB::bind_method(_MD("set_input_as_handled"),&SceneTree::set_input_as_handled);
+ ClassDB::bind_method(_MD("set_pause","enable"),&SceneTree::set_pause);
+ ClassDB::bind_method(_MD("is_paused"),&SceneTree::is_paused);
+ ClassDB::bind_method(_MD("set_input_as_handled"),&SceneTree::set_input_as_handled);
- ObjectTypeDB::bind_method(_MD("create_timer:SceneTreeTimer","time_sec"),&SceneTree::create_timer);
+ ClassDB::bind_method(_MD("create_timer:SceneTreeTimer","time_sec"),&SceneTree::create_timer);
- ObjectTypeDB::bind_method(_MD("get_node_count"),&SceneTree::get_node_count);
- ObjectTypeDB::bind_method(_MD("get_frame"),&SceneTree::get_frame);
- ObjectTypeDB::bind_method(_MD("quit"),&SceneTree::quit);
+ ClassDB::bind_method(_MD("get_node_count"),&SceneTree::get_node_count);
+ ClassDB::bind_method(_MD("get_frame"),&SceneTree::get_frame);
+ ClassDB::bind_method(_MD("quit"),&SceneTree::quit);
- ObjectTypeDB::bind_method(_MD("set_screen_stretch","mode","aspect","minsize"),&SceneTree::set_screen_stretch);
+ ClassDB::bind_method(_MD("set_screen_stretch","mode","aspect","minsize"),&SceneTree::set_screen_stretch);
- ObjectTypeDB::bind_method(_MD("queue_delete","obj"),&SceneTree::queue_delete);
+ ClassDB::bind_method(_MD("queue_delete","obj"),&SceneTree::queue_delete);
@@ -2208,29 +2208,29 @@ void SceneTree::_bind_methods() {
mi.arguments.push_back( PropertyInfo( Variant::STRING, "method"));
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call_group",&SceneTree::_call_group,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call_group",&SceneTree::_call_group,mi);
- ObjectTypeDB::bind_method(_MD("set_current_scene","child_node:Node"),&SceneTree::set_current_scene);
- ObjectTypeDB::bind_method(_MD("get_current_scene:Node"),&SceneTree::get_current_scene);
+ ClassDB::bind_method(_MD("set_current_scene","child_node:Node"),&SceneTree::set_current_scene);
+ ClassDB::bind_method(_MD("get_current_scene:Node"),&SceneTree::get_current_scene);
- ObjectTypeDB::bind_method(_MD("change_scene","path"),&SceneTree::change_scene);
- ObjectTypeDB::bind_method(_MD("change_scene_to","packed_scene:PackedScene"),&SceneTree::change_scene_to);
+ ClassDB::bind_method(_MD("change_scene","path"),&SceneTree::change_scene);
+ ClassDB::bind_method(_MD("change_scene_to","packed_scene:PackedScene"),&SceneTree::change_scene_to);
- ObjectTypeDB::bind_method(_MD("reload_current_scene"),&SceneTree::reload_current_scene);
+ ClassDB::bind_method(_MD("reload_current_scene"),&SceneTree::reload_current_scene);
- ObjectTypeDB::bind_method(_MD("_change_scene"),&SceneTree::_change_scene);
+ ClassDB::bind_method(_MD("_change_scene"),&SceneTree::_change_scene);
- ObjectTypeDB::bind_method(_MD("set_network_peer","peer:NetworkedMultiplayerPeer"),&SceneTree::set_network_peer);
- ObjectTypeDB::bind_method(_MD("is_network_server"),&SceneTree::is_network_server);
- ObjectTypeDB::bind_method(_MD("get_network_unique_id"),&SceneTree::get_network_unique_id);
- ObjectTypeDB::bind_method(_MD("set_refuse_new_network_connections","refuse"),&SceneTree::set_refuse_new_network_connections);
- ObjectTypeDB::bind_method(_MD("is_refusing_new_network_connections"),&SceneTree::is_refusing_new_network_connections);
- ObjectTypeDB::bind_method(_MD("_network_peer_connected"),&SceneTree::_network_peer_connected);
- ObjectTypeDB::bind_method(_MD("_network_peer_disconnected"),&SceneTree::_network_peer_disconnected);
- ObjectTypeDB::bind_method(_MD("_connected_to_server"),&SceneTree::_connected_to_server);
- ObjectTypeDB::bind_method(_MD("_connection_failed"),&SceneTree::_connection_failed);
- ObjectTypeDB::bind_method(_MD("_server_disconnected"),&SceneTree::_server_disconnected);
+ ClassDB::bind_method(_MD("set_network_peer","peer:NetworkedMultiplayerPeer"),&SceneTree::set_network_peer);
+ ClassDB::bind_method(_MD("is_network_server"),&SceneTree::is_network_server);
+ ClassDB::bind_method(_MD("get_network_unique_id"),&SceneTree::get_network_unique_id);
+ ClassDB::bind_method(_MD("set_refuse_new_network_connections","refuse"),&SceneTree::set_refuse_new_network_connections);
+ ClassDB::bind_method(_MD("is_refusing_new_network_connections"),&SceneTree::is_refusing_new_network_connections);
+ ClassDB::bind_method(_MD("_network_peer_connected"),&SceneTree::_network_peer_connected);
+ ClassDB::bind_method(_MD("_network_peer_disconnected"),&SceneTree::_network_peer_disconnected);
+ ClassDB::bind_method(_MD("_connected_to_server"),&SceneTree::_connected_to_server);
+ ClassDB::bind_method(_MD("_connection_failed"),&SceneTree::_connection_failed);
+ ClassDB::bind_method(_MD("_server_disconnected"),&SceneTree::_server_disconnected);
ADD_SIGNAL( MethodInfo("tree_changed") );
ADD_SIGNAL( MethodInfo("node_removed",PropertyInfo( Variant::OBJECT, "node") ) );
diff --git a/scene/main/scene_main_loop.h b/scene/main/scene_main_loop.h
index 915a78918a..164ffe2ef7 100644
--- a/scene/main/scene_main_loop.h
+++ b/scene/main/scene_main_loop.h
@@ -53,7 +53,7 @@ class Mesh;
class SceneTreeTimer : public Reference {
- OBJ_TYPE(SceneTreeTimer,Reference);
+ GDCLASS(SceneTreeTimer,Reference);
float time_left;
protected:
@@ -70,7 +70,7 @@ class SceneTree : public MainLoop {
_THREAD_SAFE_CLASS_
- OBJ_TYPE( SceneTree, MainLoop );
+ GDCLASS( SceneTree, MainLoop );
public:
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 721e9a56cd..408a3e9a2c 100644
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -179,25 +179,25 @@ void Timer::_set_process(bool p_process, bool p_force)
void Timer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_wait_time","time_sec"),&Timer::set_wait_time);
- ObjectTypeDB::bind_method(_MD("get_wait_time"),&Timer::get_wait_time);
+ ClassDB::bind_method(_MD("set_wait_time","time_sec"),&Timer::set_wait_time);
+ ClassDB::bind_method(_MD("get_wait_time"),&Timer::get_wait_time);
- ObjectTypeDB::bind_method(_MD("set_one_shot","enable"),&Timer::set_one_shot);
- ObjectTypeDB::bind_method(_MD("is_one_shot"),&Timer::is_one_shot);
+ ClassDB::bind_method(_MD("set_one_shot","enable"),&Timer::set_one_shot);
+ ClassDB::bind_method(_MD("is_one_shot"),&Timer::is_one_shot);
- ObjectTypeDB::bind_method(_MD("set_autostart","enable"),&Timer::set_autostart);
- ObjectTypeDB::bind_method(_MD("has_autostart"),&Timer::has_autostart);
+ ClassDB::bind_method(_MD("set_autostart","enable"),&Timer::set_autostart);
+ ClassDB::bind_method(_MD("has_autostart"),&Timer::has_autostart);
- ObjectTypeDB::bind_method(_MD("start"),&Timer::start);
- ObjectTypeDB::bind_method(_MD("stop"),&Timer::stop);
+ ClassDB::bind_method(_MD("start"),&Timer::start);
+ ClassDB::bind_method(_MD("stop"),&Timer::stop);
- ObjectTypeDB::bind_method(_MD("set_active", "active"), &Timer::set_active);
- ObjectTypeDB::bind_method(_MD("is_active"), &Timer::is_active);
+ ClassDB::bind_method(_MD("set_active", "active"), &Timer::set_active);
+ ClassDB::bind_method(_MD("is_active"), &Timer::is_active);
- ObjectTypeDB::bind_method(_MD("get_time_left"),&Timer::get_time_left);
+ ClassDB::bind_method(_MD("get_time_left"),&Timer::get_time_left);
- ObjectTypeDB::bind_method(_MD("set_timer_process_mode", "mode"), &Timer::set_timer_process_mode);
- ObjectTypeDB::bind_method(_MD("get_timer_process_mode"), &Timer::get_timer_process_mode);
+ ClassDB::bind_method(_MD("set_timer_process_mode", "mode"), &Timer::set_timer_process_mode);
+ ClassDB::bind_method(_MD("get_timer_process_mode"), &Timer::get_timer_process_mode);
ADD_SIGNAL( MethodInfo("timeout") );
diff --git a/scene/main/timer.h b/scene/main/timer.h
index ea8d24b3a0..6b69f3f409 100644
--- a/scene/main/timer.h
+++ b/scene/main/timer.h
@@ -33,7 +33,7 @@
class Timer : public Node {
- OBJ_TYPE( Timer, Node );
+ GDCLASS( Timer, Node );
float wait_time;
bool one_shot;
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index ff148cc413..4894dfd30f 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -106,7 +106,7 @@ ViewportTexture::ViewportTexture(Viewport *p_vp){
class TooltipPanel : public Panel {
- OBJ_TYPE(TooltipPanel,Panel)
+ GDCLASS(TooltipPanel,Panel)
public:
TooltipPanel() {};
@@ -114,7 +114,7 @@ public:
class TooltipLabel : public Label {
- OBJ_TYPE(TooltipLabel,Label)
+ GDCLASS(TooltipLabel,Label)
public:
TooltipLabel() {};
@@ -1824,7 +1824,7 @@ void Viewport::_gui_input_event(InputEvent p_event) {
Array arr;
arr.push_back(gui.mouse_focus->get_path());
- arr.push_back(gui.mouse_focus->get_type());
+ arr.push_back(gui.mouse_focus->get_class());
ScriptDebugger::get_singleton()->send_message("click_ctrl",arr);
}
@@ -2630,101 +2630,101 @@ bool Viewport::get_hdr() const{
void Viewport::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_size","size"), &Viewport::set_size);
- ObjectTypeDB::bind_method(_MD("get_size"), &Viewport::get_size);
- ObjectTypeDB::bind_method(_MD("set_world_2d","world_2d:World2D"), &Viewport::set_world_2d);
- ObjectTypeDB::bind_method(_MD("get_world_2d:World2D"), &Viewport::get_world_2d);
- ObjectTypeDB::bind_method(_MD("find_world_2d:World2D"), &Viewport::find_world_2d);
- ObjectTypeDB::bind_method(_MD("set_world","world:World"), &Viewport::set_world);
- ObjectTypeDB::bind_method(_MD("get_world:World"), &Viewport::get_world);
- ObjectTypeDB::bind_method(_MD("find_world:World"), &Viewport::find_world);
+ ClassDB::bind_method(_MD("set_size","size"), &Viewport::set_size);
+ ClassDB::bind_method(_MD("get_size"), &Viewport::get_size);
+ ClassDB::bind_method(_MD("set_world_2d","world_2d:World2D"), &Viewport::set_world_2d);
+ ClassDB::bind_method(_MD("get_world_2d:World2D"), &Viewport::get_world_2d);
+ ClassDB::bind_method(_MD("find_world_2d:World2D"), &Viewport::find_world_2d);
+ ClassDB::bind_method(_MD("set_world","world:World"), &Viewport::set_world);
+ ClassDB::bind_method(_MD("get_world:World"), &Viewport::get_world);
+ ClassDB::bind_method(_MD("find_world:World"), &Viewport::find_world);
- ObjectTypeDB::bind_method(_MD("set_canvas_transform","xform"), &Viewport::set_canvas_transform);
- ObjectTypeDB::bind_method(_MD("get_canvas_transform"), &Viewport::get_canvas_transform);
+ ClassDB::bind_method(_MD("set_canvas_transform","xform"), &Viewport::set_canvas_transform);
+ ClassDB::bind_method(_MD("get_canvas_transform"), &Viewport::get_canvas_transform);
- ObjectTypeDB::bind_method(_MD("set_global_canvas_transform","xform"), &Viewport::set_global_canvas_transform);
- ObjectTypeDB::bind_method(_MD("get_global_canvas_transform"), &Viewport::get_global_canvas_transform);
- ObjectTypeDB::bind_method(_MD("get_final_transform"), &Viewport::get_final_transform);
+ ClassDB::bind_method(_MD("set_global_canvas_transform","xform"), &Viewport::set_global_canvas_transform);
+ ClassDB::bind_method(_MD("get_global_canvas_transform"), &Viewport::get_global_canvas_transform);
+ ClassDB::bind_method(_MD("get_final_transform"), &Viewport::get_final_transform);
- ObjectTypeDB::bind_method(_MD("get_visible_rect"), &Viewport::get_visible_rect);
- ObjectTypeDB::bind_method(_MD("set_transparent_background","enable"), &Viewport::set_transparent_background);
- ObjectTypeDB::bind_method(_MD("has_transparent_background"), &Viewport::has_transparent_background);
+ ClassDB::bind_method(_MD("get_visible_rect"), &Viewport::get_visible_rect);
+ ClassDB::bind_method(_MD("set_transparent_background","enable"), &Viewport::set_transparent_background);
+ ClassDB::bind_method(_MD("has_transparent_background"), &Viewport::has_transparent_background);
- ObjectTypeDB::bind_method(_MD("_parent_visibility_changed"), &Viewport::_parent_visibility_changed);
+ ClassDB::bind_method(_MD("_parent_visibility_changed"), &Viewport::_parent_visibility_changed);
- ObjectTypeDB::bind_method(_MD("_parent_resized"), &Viewport::_parent_resized);
- ObjectTypeDB::bind_method(_MD("_vp_input"), &Viewport::_vp_input);
- ObjectTypeDB::bind_method(_MD("_vp_input_text","text"), &Viewport::_vp_input_text);
- ObjectTypeDB::bind_method(_MD("_vp_unhandled_input"), &Viewport::_vp_unhandled_input);
+ ClassDB::bind_method(_MD("_parent_resized"), &Viewport::_parent_resized);
+ ClassDB::bind_method(_MD("_vp_input"), &Viewport::_vp_input);
+ ClassDB::bind_method(_MD("_vp_input_text","text"), &Viewport::_vp_input_text);
+ ClassDB::bind_method(_MD("_vp_unhandled_input"), &Viewport::_vp_unhandled_input);
- ObjectTypeDB::bind_method(_MD("set_size_override","enable","size","margin"), &Viewport::set_size_override,DEFVAL(Size2(-1,-1)),DEFVAL(Size2(0,0)));
- ObjectTypeDB::bind_method(_MD("get_size_override"), &Viewport::get_size_override);
- ObjectTypeDB::bind_method(_MD("is_size_override_enabled"), &Viewport::is_size_override_enabled);
- ObjectTypeDB::bind_method(_MD("set_size_override_stretch","enabled"), &Viewport::set_size_override_stretch);
- ObjectTypeDB::bind_method(_MD("is_size_override_stretch_enabled"), &Viewport::is_size_override_stretch_enabled);
- ObjectTypeDB::bind_method(_MD("queue_screen_capture"), &Viewport::queue_screen_capture);
- ObjectTypeDB::bind_method(_MD("get_screen_capture"), &Viewport::get_screen_capture);
+ ClassDB::bind_method(_MD("set_size_override","enable","size","margin"), &Viewport::set_size_override,DEFVAL(Size2(-1,-1)),DEFVAL(Size2(0,0)));
+ ClassDB::bind_method(_MD("get_size_override"), &Viewport::get_size_override);
+ ClassDB::bind_method(_MD("is_size_override_enabled"), &Viewport::is_size_override_enabled);
+ ClassDB::bind_method(_MD("set_size_override_stretch","enabled"), &Viewport::set_size_override_stretch);
+ ClassDB::bind_method(_MD("is_size_override_stretch_enabled"), &Viewport::is_size_override_stretch_enabled);
+ ClassDB::bind_method(_MD("queue_screen_capture"), &Viewport::queue_screen_capture);
+ ClassDB::bind_method(_MD("get_screen_capture"), &Viewport::get_screen_capture);
- ObjectTypeDB::bind_method(_MD("set_vflip","enable"), &Viewport::set_vflip);
- ObjectTypeDB::bind_method(_MD("get_vflip"), &Viewport::get_vflip);
+ ClassDB::bind_method(_MD("set_vflip","enable"), &Viewport::set_vflip);
+ ClassDB::bind_method(_MD("get_vflip"), &Viewport::get_vflip);
- ObjectTypeDB::bind_method(_MD("set_clear_on_new_frame","enable"), &Viewport::set_clear_on_new_frame);
- ObjectTypeDB::bind_method(_MD("get_clear_on_new_frame"), &Viewport::get_clear_on_new_frame);
+ ClassDB::bind_method(_MD("set_clear_on_new_frame","enable"), &Viewport::set_clear_on_new_frame);
+ ClassDB::bind_method(_MD("get_clear_on_new_frame"), &Viewport::get_clear_on_new_frame);
- ObjectTypeDB::bind_method(_MD("clear"), &Viewport::clear);
- ObjectTypeDB::bind_method(_MD("set_update_mode","mode"), &Viewport::set_update_mode);
- ObjectTypeDB::bind_method(_MD("get_update_mode"), &Viewport::get_update_mode);
+ ClassDB::bind_method(_MD("clear"), &Viewport::clear);
+ ClassDB::bind_method(_MD("set_update_mode","mode"), &Viewport::set_update_mode);
+ ClassDB::bind_method(_MD("get_update_mode"), &Viewport::get_update_mode);
- ObjectTypeDB::bind_method(_MD("set_msaa","msaa"), &Viewport::set_msaa);
- ObjectTypeDB::bind_method(_MD("get_msaa"), &Viewport::get_msaa);
+ ClassDB::bind_method(_MD("set_msaa","msaa"), &Viewport::set_msaa);
+ ClassDB::bind_method(_MD("get_msaa"), &Viewport::get_msaa);
- ObjectTypeDB::bind_method(_MD("set_hdr","enable"), &Viewport::set_hdr);
- ObjectTypeDB::bind_method(_MD("get_hdr"), &Viewport::get_hdr);
+ ClassDB::bind_method(_MD("set_hdr","enable"), &Viewport::set_hdr);
+ ClassDB::bind_method(_MD("get_hdr"), &Viewport::get_hdr);
- ObjectTypeDB::bind_method(_MD("get_texture:ViewportTexture"), &Viewport::get_texture);
+ ClassDB::bind_method(_MD("get_texture:ViewportTexture"), &Viewport::get_texture);
- ObjectTypeDB::bind_method(_MD("set_physics_object_picking","enable"), &Viewport::set_physics_object_picking);
- ObjectTypeDB::bind_method(_MD("get_physics_object_picking"), &Viewport::get_physics_object_picking);
+ 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);
- ObjectTypeDB::bind_method(_MD("get_viewport"), &Viewport::get_viewport);
- ObjectTypeDB::bind_method(_MD("input","local_event"), &Viewport::input);
- ObjectTypeDB::bind_method(_MD("unhandled_input","local_event"), &Viewport::unhandled_input);
+ ClassDB::bind_method(_MD("get_viewport"), &Viewport::get_viewport);
+ ClassDB::bind_method(_MD("input","local_event"), &Viewport::input);
+ ClassDB::bind_method(_MD("unhandled_input","local_event"), &Viewport::unhandled_input);
- ObjectTypeDB::bind_method(_MD("update_worlds"), &Viewport::update_worlds);
+ ClassDB::bind_method(_MD("update_worlds"), &Viewport::update_worlds);
- ObjectTypeDB::bind_method(_MD("set_use_own_world","enable"), &Viewport::set_use_own_world);
- ObjectTypeDB::bind_method(_MD("is_using_own_world"), &Viewport::is_using_own_world);
+ ClassDB::bind_method(_MD("set_use_own_world","enable"), &Viewport::set_use_own_world);
+ ClassDB::bind_method(_MD("is_using_own_world"), &Viewport::is_using_own_world);
- ObjectTypeDB::bind_method(_MD("get_camera:Camera"), &Viewport::get_camera);
+ ClassDB::bind_method(_MD("get_camera:Camera"), &Viewport::get_camera);
- ObjectTypeDB::bind_method(_MD("set_as_audio_listener","enable"), &Viewport::set_as_audio_listener);
- ObjectTypeDB::bind_method(_MD("is_audio_listener","enable"), &Viewport::is_audio_listener);
+ ClassDB::bind_method(_MD("set_as_audio_listener","enable"), &Viewport::set_as_audio_listener);
+ ClassDB::bind_method(_MD("is_audio_listener","enable"), &Viewport::is_audio_listener);
- ObjectTypeDB::bind_method(_MD("set_as_audio_listener_2d","enable"), &Viewport::set_as_audio_listener_2d);
- ObjectTypeDB::bind_method(_MD("is_audio_listener_2d","enable"), &Viewport::is_audio_listener_2d);
- ObjectTypeDB::bind_method(_MD("set_attach_to_screen_rect","rect"), &Viewport::set_attach_to_screen_rect);
+ ClassDB::bind_method(_MD("set_as_audio_listener_2d","enable"), &Viewport::set_as_audio_listener_2d);
+ ClassDB::bind_method(_MD("is_audio_listener_2d","enable"), &Viewport::is_audio_listener_2d);
+ ClassDB::bind_method(_MD("set_attach_to_screen_rect","rect"), &Viewport::set_attach_to_screen_rect);
- ObjectTypeDB::bind_method(_MD("get_mouse_pos"), &Viewport::get_mouse_pos);
- ObjectTypeDB::bind_method(_MD("warp_mouse","to_pos"), &Viewport::warp_mouse);
+ ClassDB::bind_method(_MD("get_mouse_pos"), &Viewport::get_mouse_pos);
+ ClassDB::bind_method(_MD("warp_mouse","to_pos"), &Viewport::warp_mouse);
- ObjectTypeDB::bind_method(_MD("gui_has_modal_stack"), &Viewport::gui_has_modal_stack);
- ObjectTypeDB::bind_method(_MD("gui_get_drag_data:Variant"), &Viewport::gui_get_drag_data);
+ ClassDB::bind_method(_MD("gui_has_modal_stack"), &Viewport::gui_has_modal_stack);
+ ClassDB::bind_method(_MD("gui_get_drag_data:Variant"), &Viewport::gui_get_drag_data);
- ObjectTypeDB::bind_method(_MD("set_disable_input","disable"), &Viewport::set_disable_input);
- ObjectTypeDB::bind_method(_MD("is_input_disabled"), &Viewport::is_input_disabled);
+ ClassDB::bind_method(_MD("set_disable_input","disable"), &Viewport::set_disable_input);
+ ClassDB::bind_method(_MD("is_input_disabled"), &Viewport::is_input_disabled);
- ObjectTypeDB::bind_method(_MD("set_disable_3d","disable"), &Viewport::set_disable_3d);
- ObjectTypeDB::bind_method(_MD("is_3d_disabled"), &Viewport::is_3d_disabled);
+ ClassDB::bind_method(_MD("set_disable_3d","disable"), &Viewport::set_disable_3d);
+ ClassDB::bind_method(_MD("is_3d_disabled"), &Viewport::is_3d_disabled);
- ObjectTypeDB::bind_method(_MD("_gui_show_tooltip"), &Viewport::_gui_show_tooltip);
- ObjectTypeDB::bind_method(_MD("_gui_remove_focus"), &Viewport::_gui_remove_focus);
+ ClassDB::bind_method(_MD("_gui_show_tooltip"), &Viewport::_gui_show_tooltip);
+ ClassDB::bind_method(_MD("_gui_remove_focus"), &Viewport::_gui_remove_focus);
- ObjectTypeDB::bind_method(_MD("set_shadow_atlas_size","size"), &Viewport::set_shadow_atlas_size);
- ObjectTypeDB::bind_method(_MD("get_shadow_atlas_size"), &Viewport::get_shadow_atlas_size);
+ ClassDB::bind_method(_MD("set_shadow_atlas_size","size"), &Viewport::set_shadow_atlas_size);
+ ClassDB::bind_method(_MD("get_shadow_atlas_size"), &Viewport::get_shadow_atlas_size);
- ObjectTypeDB::bind_method(_MD("set_shadow_atlas_quadrant_subdiv","quadrant","subdiv"), &Viewport::set_shadow_atlas_quadrant_subdiv);
- ObjectTypeDB::bind_method(_MD("get_shadow_atlas_quadrant_subdiv","quadrant"), &Viewport::get_shadow_atlas_quadrant_subdiv);
+ ClassDB::bind_method(_MD("set_shadow_atlas_quadrant_subdiv","quadrant","subdiv"), &Viewport::set_shadow_atlas_quadrant_subdiv);
+ ClassDB::bind_method(_MD("get_shadow_atlas_quadrant_subdiv","quadrant"), &Viewport::get_shadow_atlas_quadrant_subdiv);
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") );
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index c4b4948c30..702c9f792f 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -50,7 +50,7 @@ class Viewport;
class ViewportTexture : public Texture {
- OBJ_TYPE( ViewportTexture, Texture );
+ GDCLASS( ViewportTexture, Texture );
int flags;
friend class Viewport;
@@ -76,7 +76,7 @@ public:
class Viewport : public Node {
- OBJ_TYPE( Viewport, Node );
+ GDCLASS( Viewport, Node );
public:
enum UpdateMode {