summaryrefslogtreecommitdiff
path: root/scene/2d
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/2d
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/2d')
-rw-r--r--scene/2d/animated_sprite.cpp82
-rw-r--r--scene/2d/animated_sprite.h4
-rw-r--r--scene/2d/area_2d.cpp76
-rw-r--r--scene/2d/area_2d.h2
-rw-r--r--scene/2d/back_buffer_copy.cpp8
-rw-r--r--scene/2d/back_buffer_copy.h2
-rw-r--r--scene/2d/camera_2d.cpp80
-rw-r--r--scene/2d/camera_2d.h2
-rw-r--r--scene/2d/canvas_item.cpp162
-rw-r--r--scene/2d/canvas_item.h4
-rw-r--r--scene/2d/canvas_modulate.cpp4
-rw-r--r--scene/2d/canvas_modulate.h2
-rw-r--r--scene/2d/collision_object_2d.cpp28
-rw-r--r--scene/2d/collision_object_2d.h2
-rw-r--r--scene/2d/collision_polygon_2d.cpp22
-rw-r--r--scene/2d/collision_polygon_2d.h2
-rw-r--r--scene/2d/collision_shape_2d.cpp18
-rw-r--r--scene/2d/collision_shape_2d.h2
-rw-r--r--scene/2d/joints_2d.cpp44
-rw-r--r--scene/2d/joints_2d.h8
-rw-r--r--scene/2d/light_2d.cpp80
-rw-r--r--scene/2d/light_2d.h2
-rw-r--r--scene/2d/light_occluder_2d.cpp22
-rw-r--r--scene/2d/light_occluder_2d.h4
-rw-r--r--scene/2d/navigation2d.cpp12
-rw-r--r--scene/2d/navigation2d.h2
-rw-r--r--scene/2d/navigation_polygon.cpp46
-rw-r--r--scene/2d/navigation_polygon.h4
-rw-r--r--scene/2d/node_2d.cpp88
-rw-r--r--scene/2d/node_2d.h2
-rw-r--r--scene/2d/parallax_background.cpp26
-rw-r--r--scene/2d/parallax_background.h2
-rw-r--r--scene/2d/parallax_layer.cpp12
-rw-r--r--scene/2d/parallax_layer.h2
-rw-r--r--scene/2d/particles_2d.cpp124
-rw-r--r--scene/2d/particles_2d.h4
-rw-r--r--scene/2d/path_2d.cpp34
-rw-r--r--scene/2d/path_2d.h4
-rw-r--r--scene/2d/path_texture.h2
-rw-r--r--scene/2d/physics_body_2d.cpp186
-rw-r--r--scene/2d/physics_body_2d.h8
-rw-r--r--scene/2d/polygon_2d.cpp48
-rw-r--r--scene/2d/polygon_2d.h2
-rw-r--r--scene/2d/position_2d.h2
-rw-r--r--scene/2d/ray_cast_2d.cpp42
-rw-r--r--scene/2d/ray_cast_2d.h2
-rw-r--r--scene/2d/remote_transform_2d.cpp4
-rw-r--r--scene/2d/remote_transform_2d.h2
-rw-r--r--scene/2d/sample_player_2d.cpp24
-rw-r--r--scene/2d/sample_player_2d.h2
-rw-r--r--scene/2d/screen_button.cpp28
-rw-r--r--scene/2d/screen_button.h2
-rw-r--r--scene/2d/sound_player_2d.cpp4
-rw-r--r--scene/2d/sound_player_2d.h2
-rw-r--r--scene/2d/sprite.cpp60
-rw-r--r--scene/2d/sprite.h4
-rw-r--r--scene/2d/tile_map.cpp100
-rw-r--r--scene/2d/tile_map.h2
-rw-r--r--scene/2d/visibility_notifier_2d.cpp12
-rw-r--r--scene/2d/visibility_notifier_2d.h4
-rw-r--r--scene/2d/y_sort.cpp4
-rw-r--r--scene/2d/y_sort.h2
62 files changed, 786 insertions, 786 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index 2ead6b2c96..bde3f50754 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -222,32 +222,32 @@ void SpriteFrames::_set_animations(const Array& p_animations) {
void SpriteFrames::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_animation","anim"),&SpriteFrames::add_animation);
- ObjectTypeDB::bind_method(_MD("has_animation","anim"),&SpriteFrames::has_animation);
- ObjectTypeDB::bind_method(_MD("remove_animation","anim"),&SpriteFrames::remove_animation);
- ObjectTypeDB::bind_method(_MD("rename_animation","anim","newname"),&SpriteFrames::rename_animation);
+ ClassDB::bind_method(_MD("add_animation","anim"),&SpriteFrames::add_animation);
+ ClassDB::bind_method(_MD("has_animation","anim"),&SpriteFrames::has_animation);
+ ClassDB::bind_method(_MD("remove_animation","anim"),&SpriteFrames::remove_animation);
+ ClassDB::bind_method(_MD("rename_animation","anim","newname"),&SpriteFrames::rename_animation);
- ObjectTypeDB::bind_method(_MD("set_animation_speed","anim","speed"),&SpriteFrames::set_animation_speed);
- ObjectTypeDB::bind_method(_MD("get_animation_speed","anim"),&SpriteFrames::get_animation_speed);
+ ClassDB::bind_method(_MD("set_animation_speed","anim","speed"),&SpriteFrames::set_animation_speed);
+ ClassDB::bind_method(_MD("get_animation_speed","anim"),&SpriteFrames::get_animation_speed);
- ObjectTypeDB::bind_method(_MD("set_animation_loop","anim","loop"),&SpriteFrames::set_animation_loop);
- ObjectTypeDB::bind_method(_MD("get_animation_loop","anim"),&SpriteFrames::get_animation_loop);
+ ClassDB::bind_method(_MD("set_animation_loop","anim","loop"),&SpriteFrames::set_animation_loop);
+ ClassDB::bind_method(_MD("get_animation_loop","anim"),&SpriteFrames::get_animation_loop);
- ObjectTypeDB::bind_method(_MD("add_frame","anim","frame","atpos"),&SpriteFrames::add_frame,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("get_frame_count","anim"),&SpriteFrames::get_frame_count);
- ObjectTypeDB::bind_method(_MD("get_frame","anim","idx"),&SpriteFrames::get_frame);
- ObjectTypeDB::bind_method(_MD("set_frame","anim","idx","txt"),&SpriteFrames::set_frame);
- ObjectTypeDB::bind_method(_MD("remove_frame","anim","idx"),&SpriteFrames::remove_frame);
- ObjectTypeDB::bind_method(_MD("clear","anim"),&SpriteFrames::clear);
- ObjectTypeDB::bind_method(_MD("clear_all"),&SpriteFrames::clear_all);
+ ClassDB::bind_method(_MD("add_frame","anim","frame","atpos"),&SpriteFrames::add_frame,DEFVAL(-1));
+ ClassDB::bind_method(_MD("get_frame_count","anim"),&SpriteFrames::get_frame_count);
+ ClassDB::bind_method(_MD("get_frame","anim","idx"),&SpriteFrames::get_frame);
+ ClassDB::bind_method(_MD("set_frame","anim","idx","txt"),&SpriteFrames::set_frame);
+ ClassDB::bind_method(_MD("remove_frame","anim","idx"),&SpriteFrames::remove_frame);
+ ClassDB::bind_method(_MD("clear","anim"),&SpriteFrames::clear);
+ ClassDB::bind_method(_MD("clear_all"),&SpriteFrames::clear_all);
- ObjectTypeDB::bind_method(_MD("_set_frames"),&SpriteFrames::_set_frames);
- ObjectTypeDB::bind_method(_MD("_get_frames"),&SpriteFrames::_get_frames);
+ ClassDB::bind_method(_MD("_set_frames"),&SpriteFrames::_set_frames);
+ ClassDB::bind_method(_MD("_get_frames"),&SpriteFrames::_get_frames);
ADD_PROPERTYNZ( PropertyInfo(Variant::ARRAY,"frames",PROPERTY_HINT_NONE,"",0),_SCS("_set_frames"),_SCS("_get_frames")); //compatibility
- ObjectTypeDB::bind_method(_MD("_set_animations"),&SpriteFrames::_set_animations);
- ObjectTypeDB::bind_method(_MD("_get_animations"),&SpriteFrames::_get_animations);
+ ClassDB::bind_method(_MD("_set_animations"),&SpriteFrames::_set_animations);
+ ClassDB::bind_method(_MD("_get_animations"),&SpriteFrames::_get_animations);
ADD_PROPERTYNZ( PropertyInfo(Variant::ARRAY,"animations",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_animations"),_SCS("_get_animations")); //compatibility
@@ -664,39 +664,39 @@ String AnimatedSprite::get_configuration_warning() const {
void AnimatedSprite::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_sprite_frames","sprite_frames:SpriteFrames"),&AnimatedSprite::set_sprite_frames);
- ObjectTypeDB::bind_method(_MD("get_sprite_frames:SpriteFrames"),&AnimatedSprite::get_sprite_frames);
+ ClassDB::bind_method(_MD("set_sprite_frames","sprite_frames:SpriteFrames"),&AnimatedSprite::set_sprite_frames);
+ ClassDB::bind_method(_MD("get_sprite_frames:SpriteFrames"),&AnimatedSprite::get_sprite_frames);
- ObjectTypeDB::bind_method(_MD("set_animation","animation"),&AnimatedSprite::set_animation);
- ObjectTypeDB::bind_method(_MD("get_animation"),&AnimatedSprite::get_animation);
+ ClassDB::bind_method(_MD("set_animation","animation"),&AnimatedSprite::set_animation);
+ ClassDB::bind_method(_MD("get_animation"),&AnimatedSprite::get_animation);
- ObjectTypeDB::bind_method(_MD("_set_playing","playing"),&AnimatedSprite::_set_playing);
- ObjectTypeDB::bind_method(_MD("_is_playing"),&AnimatedSprite::_is_playing);
+ ClassDB::bind_method(_MD("_set_playing","playing"),&AnimatedSprite::_set_playing);
+ ClassDB::bind_method(_MD("_is_playing"),&AnimatedSprite::_is_playing);
- ObjectTypeDB::bind_method(_MD("play","anim"),&AnimatedSprite::play,DEFVAL(StringName()));
- ObjectTypeDB::bind_method(_MD("stop"),&AnimatedSprite::stop);
- ObjectTypeDB::bind_method(_MD("is_playing"),&AnimatedSprite::is_playing);
+ ClassDB::bind_method(_MD("play","anim"),&AnimatedSprite::play,DEFVAL(StringName()));
+ ClassDB::bind_method(_MD("stop"),&AnimatedSprite::stop);
+ ClassDB::bind_method(_MD("is_playing"),&AnimatedSprite::is_playing);
- ObjectTypeDB::bind_method(_MD("set_centered","centered"),&AnimatedSprite::set_centered);
- ObjectTypeDB::bind_method(_MD("is_centered"),&AnimatedSprite::is_centered);
+ ClassDB::bind_method(_MD("set_centered","centered"),&AnimatedSprite::set_centered);
+ ClassDB::bind_method(_MD("is_centered"),&AnimatedSprite::is_centered);
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&AnimatedSprite::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&AnimatedSprite::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&AnimatedSprite::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&AnimatedSprite::get_offset);
- ObjectTypeDB::bind_method(_MD("set_flip_h","flip_h"),&AnimatedSprite::set_flip_h);
- ObjectTypeDB::bind_method(_MD("is_flipped_h"),&AnimatedSprite::is_flipped_h);
+ ClassDB::bind_method(_MD("set_flip_h","flip_h"),&AnimatedSprite::set_flip_h);
+ ClassDB::bind_method(_MD("is_flipped_h"),&AnimatedSprite::is_flipped_h);
- ObjectTypeDB::bind_method(_MD("set_flip_v","flip_v"),&AnimatedSprite::set_flip_v);
- ObjectTypeDB::bind_method(_MD("is_flipped_v"),&AnimatedSprite::is_flipped_v);
+ ClassDB::bind_method(_MD("set_flip_v","flip_v"),&AnimatedSprite::set_flip_v);
+ ClassDB::bind_method(_MD("is_flipped_v"),&AnimatedSprite::is_flipped_v);
- ObjectTypeDB::bind_method(_MD("set_frame","frame"),&AnimatedSprite::set_frame);
- ObjectTypeDB::bind_method(_MD("get_frame"),&AnimatedSprite::get_frame);
+ ClassDB::bind_method(_MD("set_frame","frame"),&AnimatedSprite::set_frame);
+ ClassDB::bind_method(_MD("get_frame"),&AnimatedSprite::get_frame);
- ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&AnimatedSprite::set_modulate);
- ObjectTypeDB::bind_method(_MD("get_modulate"),&AnimatedSprite::get_modulate);
+ ClassDB::bind_method(_MD("set_modulate","modulate"),&AnimatedSprite::set_modulate);
+ ClassDB::bind_method(_MD("get_modulate"),&AnimatedSprite::get_modulate);
- ObjectTypeDB::bind_method(_MD("_res_changed"),&AnimatedSprite::_res_changed);
+ ClassDB::bind_method(_MD("_res_changed"),&AnimatedSprite::_res_changed);
ADD_SIGNAL(MethodInfo("frame_changed"));
ADD_SIGNAL(MethodInfo("finished"));
diff --git a/scene/2d/animated_sprite.h b/scene/2d/animated_sprite.h
index d447455545..f546de038b 100644
--- a/scene/2d/animated_sprite.h
+++ b/scene/2d/animated_sprite.h
@@ -35,7 +35,7 @@
class SpriteFrames : public Resource {
- OBJ_TYPE(SpriteFrames,Resource);
+ GDCLASS(SpriteFrames,Resource);
struct Anim {
@@ -109,7 +109,7 @@ public:
class AnimatedSprite : public Node2D {
- OBJ_TYPE(AnimatedSprite,Node2D);
+ GDCLASS(AnimatedSprite,Node2D);
Ref<SpriteFrames> frames;
bool playing;
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index e14f8ee063..c1d0d9ab50 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -587,62 +587,62 @@ bool Area2D::get_layer_mask_bit(int p_bit) const{
void Area2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_body_enter_tree","id"),&Area2D::_body_enter_tree);
- ObjectTypeDB::bind_method(_MD("_body_exit_tree","id"),&Area2D::_body_exit_tree);
+ ClassDB::bind_method(_MD("_body_enter_tree","id"),&Area2D::_body_enter_tree);
+ ClassDB::bind_method(_MD("_body_exit_tree","id"),&Area2D::_body_exit_tree);
- ObjectTypeDB::bind_method(_MD("_area_enter_tree","id"),&Area2D::_area_enter_tree);
- ObjectTypeDB::bind_method(_MD("_area_exit_tree","id"),&Area2D::_area_exit_tree);
+ ClassDB::bind_method(_MD("_area_enter_tree","id"),&Area2D::_area_enter_tree);
+ ClassDB::bind_method(_MD("_area_exit_tree","id"),&Area2D::_area_exit_tree);
- ObjectTypeDB::bind_method(_MD("set_space_override_mode","enable"),&Area2D::set_space_override_mode);
- ObjectTypeDB::bind_method(_MD("get_space_override_mode"),&Area2D::get_space_override_mode);
+ ClassDB::bind_method(_MD("set_space_override_mode","enable"),&Area2D::set_space_override_mode);
+ ClassDB::bind_method(_MD("get_space_override_mode"),&Area2D::get_space_override_mode);
- ObjectTypeDB::bind_method(_MD("set_gravity_is_point","enable"),&Area2D::set_gravity_is_point);
- ObjectTypeDB::bind_method(_MD("is_gravity_a_point"),&Area2D::is_gravity_a_point);
+ ClassDB::bind_method(_MD("set_gravity_is_point","enable"),&Area2D::set_gravity_is_point);
+ ClassDB::bind_method(_MD("is_gravity_a_point"),&Area2D::is_gravity_a_point);
- ObjectTypeDB::bind_method(_MD("set_gravity_distance_scale","distance_scale"),&Area2D::set_gravity_distance_scale);
- ObjectTypeDB::bind_method(_MD("get_gravity_distance_scale"),&Area2D::get_gravity_distance_scale);
+ ClassDB::bind_method(_MD("set_gravity_distance_scale","distance_scale"),&Area2D::set_gravity_distance_scale);
+ ClassDB::bind_method(_MD("get_gravity_distance_scale"),&Area2D::get_gravity_distance_scale);
- ObjectTypeDB::bind_method(_MD("set_gravity_vector","vector"),&Area2D::set_gravity_vector);
- ObjectTypeDB::bind_method(_MD("get_gravity_vector"),&Area2D::get_gravity_vector);
+ ClassDB::bind_method(_MD("set_gravity_vector","vector"),&Area2D::set_gravity_vector);
+ ClassDB::bind_method(_MD("get_gravity_vector"),&Area2D::get_gravity_vector);
- ObjectTypeDB::bind_method(_MD("set_gravity","gravity"),&Area2D::set_gravity);
- ObjectTypeDB::bind_method(_MD("get_gravity"),&Area2D::get_gravity);
+ ClassDB::bind_method(_MD("set_gravity","gravity"),&Area2D::set_gravity);
+ ClassDB::bind_method(_MD("get_gravity"),&Area2D::get_gravity);
- ObjectTypeDB::bind_method(_MD("set_linear_damp","linear_damp"),&Area2D::set_linear_damp);
- ObjectTypeDB::bind_method(_MD("get_linear_damp"),&Area2D::get_linear_damp);
+ ClassDB::bind_method(_MD("set_linear_damp","linear_damp"),&Area2D::set_linear_damp);
+ ClassDB::bind_method(_MD("get_linear_damp"),&Area2D::get_linear_damp);
- ObjectTypeDB::bind_method(_MD("set_angular_damp","angular_damp"),&Area2D::set_angular_damp);
- ObjectTypeDB::bind_method(_MD("get_angular_damp"),&Area2D::get_angular_damp);
+ ClassDB::bind_method(_MD("set_angular_damp","angular_damp"),&Area2D::set_angular_damp);
+ ClassDB::bind_method(_MD("get_angular_damp"),&Area2D::get_angular_damp);
- ObjectTypeDB::bind_method(_MD("set_priority","priority"),&Area2D::set_priority);
- ObjectTypeDB::bind_method(_MD("get_priority"),&Area2D::get_priority);
+ ClassDB::bind_method(_MD("set_priority","priority"),&Area2D::set_priority);
+ ClassDB::bind_method(_MD("get_priority"),&Area2D::get_priority);
- ObjectTypeDB::bind_method(_MD("set_collision_mask","collision_mask"),&Area2D::set_collision_mask);
- ObjectTypeDB::bind_method(_MD("get_collision_mask"),&Area2D::get_collision_mask);
+ ClassDB::bind_method(_MD("set_collision_mask","collision_mask"),&Area2D::set_collision_mask);
+ ClassDB::bind_method(_MD("get_collision_mask"),&Area2D::get_collision_mask);
- ObjectTypeDB::bind_method(_MD("set_layer_mask","layer_mask"),&Area2D::set_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_layer_mask"),&Area2D::get_layer_mask);
+ ClassDB::bind_method(_MD("set_layer_mask","layer_mask"),&Area2D::set_layer_mask);
+ ClassDB::bind_method(_MD("get_layer_mask"),&Area2D::get_layer_mask);
- ObjectTypeDB::bind_method(_MD("set_collision_mask_bit","bit","value"),&Area2D::set_collision_mask_bit);
- ObjectTypeDB::bind_method(_MD("get_collision_mask_bit","bit"),&Area2D::get_collision_mask_bit);
+ ClassDB::bind_method(_MD("set_collision_mask_bit","bit","value"),&Area2D::set_collision_mask_bit);
+ ClassDB::bind_method(_MD("get_collision_mask_bit","bit"),&Area2D::get_collision_mask_bit);
- ObjectTypeDB::bind_method(_MD("set_layer_mask_bit","bit","value"),&Area2D::set_layer_mask_bit);
- ObjectTypeDB::bind_method(_MD("get_layer_mask_bit","bit"),&Area2D::get_layer_mask_bit);
+ ClassDB::bind_method(_MD("set_layer_mask_bit","bit","value"),&Area2D::set_layer_mask_bit);
+ ClassDB::bind_method(_MD("get_layer_mask_bit","bit"),&Area2D::get_layer_mask_bit);
- ObjectTypeDB::bind_method(_MD("set_enable_monitoring","enable"),&Area2D::set_enable_monitoring);
- ObjectTypeDB::bind_method(_MD("is_monitoring_enabled"),&Area2D::is_monitoring_enabled);
+ ClassDB::bind_method(_MD("set_enable_monitoring","enable"),&Area2D::set_enable_monitoring);
+ ClassDB::bind_method(_MD("is_monitoring_enabled"),&Area2D::is_monitoring_enabled);
- ObjectTypeDB::bind_method(_MD("set_monitorable","enable"),&Area2D::set_monitorable);
- ObjectTypeDB::bind_method(_MD("is_monitorable"),&Area2D::is_monitorable);
+ ClassDB::bind_method(_MD("set_monitorable","enable"),&Area2D::set_monitorable);
+ ClassDB::bind_method(_MD("is_monitorable"),&Area2D::is_monitorable);
- ObjectTypeDB::bind_method(_MD("get_overlapping_bodies"),&Area2D::get_overlapping_bodies);
- ObjectTypeDB::bind_method(_MD("get_overlapping_areas"),&Area2D::get_overlapping_areas);
+ ClassDB::bind_method(_MD("get_overlapping_bodies"),&Area2D::get_overlapping_bodies);
+ ClassDB::bind_method(_MD("get_overlapping_areas"),&Area2D::get_overlapping_areas);
- ObjectTypeDB::bind_method(_MD("overlaps_body","body"),&Area2D::overlaps_body);
- ObjectTypeDB::bind_method(_MD("overlaps_area","area"),&Area2D::overlaps_area);
+ ClassDB::bind_method(_MD("overlaps_body","body"),&Area2D::overlaps_body);
+ ClassDB::bind_method(_MD("overlaps_area","area"),&Area2D::overlaps_area);
- ObjectTypeDB::bind_method(_MD("_body_inout"),&Area2D::_body_inout);
- ObjectTypeDB::bind_method(_MD("_area_inout"),&Area2D::_area_inout);
+ ClassDB::bind_method(_MD("_body_inout"),&Area2D::_body_inout);
+ ClassDB::bind_method(_MD("_area_inout"),&Area2D::_area_inout);
ADD_SIGNAL( MethodInfo("body_enter_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body",PROPERTY_HINT_RESOURCE_TYPE,"PhysicsBody2D"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape")));
diff --git a/scene/2d/area_2d.h b/scene/2d/area_2d.h
index 9fa31abb62..e1adc16666 100644
--- a/scene/2d/area_2d.h
+++ b/scene/2d/area_2d.h
@@ -34,7 +34,7 @@
class Area2D : public CollisionObject2D {
- OBJ_TYPE( Area2D, CollisionObject2D );
+ GDCLASS( Area2D, CollisionObject2D );
public:
enum SpaceOverride {
diff --git a/scene/2d/back_buffer_copy.cpp b/scene/2d/back_buffer_copy.cpp
index bdc06aa675..bbeed322b1 100644
--- a/scene/2d/back_buffer_copy.cpp
+++ b/scene/2d/back_buffer_copy.cpp
@@ -77,11 +77,11 @@ BackBufferCopy::CopyMode BackBufferCopy::get_copy_mode() const{
void BackBufferCopy::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_rect","rect"),&BackBufferCopy::set_rect);
- ObjectTypeDB::bind_method(_MD("get_rect"),&BackBufferCopy::get_rect);
+ ClassDB::bind_method(_MD("set_rect","rect"),&BackBufferCopy::set_rect);
+ ClassDB::bind_method(_MD("get_rect"),&BackBufferCopy::get_rect);
- ObjectTypeDB::bind_method(_MD("set_copy_mode","copy_mode"),&BackBufferCopy::set_copy_mode);
- ObjectTypeDB::bind_method(_MD("get_copy_mode"),&BackBufferCopy::get_copy_mode);
+ ClassDB::bind_method(_MD("set_copy_mode","copy_mode"),&BackBufferCopy::set_copy_mode);
+ ClassDB::bind_method(_MD("get_copy_mode"),&BackBufferCopy::get_copy_mode);
ADD_PROPERTY( PropertyInfo(Variant::INT,"copy_mode",PROPERTY_HINT_ENUM,"Disabled,Rect,Viewport"),_SCS("set_copy_mode"),_SCS("get_copy_mode"));
ADD_PROPERTY( PropertyInfo(Variant::RECT2,"rect"),_SCS("set_rect"),_SCS("get_rect"));
diff --git a/scene/2d/back_buffer_copy.h b/scene/2d/back_buffer_copy.h
index 4e49e3fbff..22387f3e9d 100644
--- a/scene/2d/back_buffer_copy.h
+++ b/scene/2d/back_buffer_copy.h
@@ -32,7 +32,7 @@
#include "scene/2d/node_2d.h"
class BackBufferCopy : public Node2D {
- OBJ_TYPE( BackBufferCopy,Node2D);
+ GDCLASS( BackBufferCopy,Node2D);
public:
enum CopyMode {
COPY_MODE_DISABLED,
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 1da32bb950..e3ac5e3c2b 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -590,65 +590,65 @@ Node* Camera2D::get_custom_viewport() const {
void Camera2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&Camera2D::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&Camera2D::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&Camera2D::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&Camera2D::get_offset);
- ObjectTypeDB::bind_method(_MD("set_anchor_mode","anchor_mode"),&Camera2D::set_anchor_mode);
- ObjectTypeDB::bind_method(_MD("get_anchor_mode"),&Camera2D::get_anchor_mode);
+ ClassDB::bind_method(_MD("set_anchor_mode","anchor_mode"),&Camera2D::set_anchor_mode);
+ ClassDB::bind_method(_MD("get_anchor_mode"),&Camera2D::get_anchor_mode);
- ObjectTypeDB::bind_method(_MD("set_rotating","rotating"),&Camera2D::set_rotating);
- ObjectTypeDB::bind_method(_MD("is_rotating"),&Camera2D::is_rotating);
+ ClassDB::bind_method(_MD("set_rotating","rotating"),&Camera2D::set_rotating);
+ ClassDB::bind_method(_MD("is_rotating"),&Camera2D::is_rotating);
- ObjectTypeDB::bind_method(_MD("make_current"),&Camera2D::make_current);
- ObjectTypeDB::bind_method(_MD("clear_current"),&Camera2D::clear_current);
- ObjectTypeDB::bind_method(_MD("_make_current"),&Camera2D::_make_current);
+ ClassDB::bind_method(_MD("make_current"),&Camera2D::make_current);
+ ClassDB::bind_method(_MD("clear_current"),&Camera2D::clear_current);
+ ClassDB::bind_method(_MD("_make_current"),&Camera2D::_make_current);
- ObjectTypeDB::bind_method(_MD("_update_scroll"),&Camera2D::_update_scroll);
+ ClassDB::bind_method(_MD("_update_scroll"),&Camera2D::_update_scroll);
- ObjectTypeDB::bind_method(_MD("_set_current","current"),&Camera2D::_set_current);
- ObjectTypeDB::bind_method(_MD("is_current"),&Camera2D::is_current);
+ ClassDB::bind_method(_MD("_set_current","current"),&Camera2D::_set_current);
+ ClassDB::bind_method(_MD("is_current"),&Camera2D::is_current);
- ObjectTypeDB::bind_method(_MD("set_limit","margin","limit"),&Camera2D::set_limit);
- ObjectTypeDB::bind_method(_MD("get_limit","margin"),&Camera2D::get_limit);
+ ClassDB::bind_method(_MD("set_limit","margin","limit"),&Camera2D::set_limit);
+ ClassDB::bind_method(_MD("get_limit","margin"),&Camera2D::get_limit);
- ObjectTypeDB::bind_method(_MD("set_limit_smoothing_enabled","limit_smoothing_enabled"),&Camera2D::set_limit_smoothing_enabled);
- ObjectTypeDB::bind_method(_MD("is_limit_smoothing_enabled"),&Camera2D::is_limit_smoothing_enabled);
+ ClassDB::bind_method(_MD("set_limit_smoothing_enabled","limit_smoothing_enabled"),&Camera2D::set_limit_smoothing_enabled);
+ ClassDB::bind_method(_MD("is_limit_smoothing_enabled"),&Camera2D::is_limit_smoothing_enabled);
- ObjectTypeDB::bind_method(_MD("set_v_drag_enabled","enabled"),&Camera2D::set_v_drag_enabled);
- ObjectTypeDB::bind_method(_MD("is_v_drag_enabled"),&Camera2D::is_v_drag_enabled);
+ ClassDB::bind_method(_MD("set_v_drag_enabled","enabled"),&Camera2D::set_v_drag_enabled);
+ ClassDB::bind_method(_MD("is_v_drag_enabled"),&Camera2D::is_v_drag_enabled);
- ObjectTypeDB::bind_method(_MD("set_h_drag_enabled","enabled"),&Camera2D::set_h_drag_enabled);
- ObjectTypeDB::bind_method(_MD("is_h_drag_enabled"),&Camera2D::is_h_drag_enabled);
+ ClassDB::bind_method(_MD("set_h_drag_enabled","enabled"),&Camera2D::set_h_drag_enabled);
+ ClassDB::bind_method(_MD("is_h_drag_enabled"),&Camera2D::is_h_drag_enabled);
- ObjectTypeDB::bind_method(_MD("set_v_offset","ofs"),&Camera2D::set_v_offset);
- ObjectTypeDB::bind_method(_MD("get_v_offset"),&Camera2D::get_v_offset);
+ ClassDB::bind_method(_MD("set_v_offset","ofs"),&Camera2D::set_v_offset);
+ ClassDB::bind_method(_MD("get_v_offset"),&Camera2D::get_v_offset);
- ObjectTypeDB::bind_method(_MD("set_h_offset","ofs"),&Camera2D::set_h_offset);
- ObjectTypeDB::bind_method(_MD("get_h_offset"),&Camera2D::get_h_offset);
+ ClassDB::bind_method(_MD("set_h_offset","ofs"),&Camera2D::set_h_offset);
+ ClassDB::bind_method(_MD("get_h_offset"),&Camera2D::get_h_offset);
- ObjectTypeDB::bind_method(_MD("set_drag_margin","margin","drag_margin"),&Camera2D::set_drag_margin);
- ObjectTypeDB::bind_method(_MD("get_drag_margin","margin"),&Camera2D::get_drag_margin);
+ ClassDB::bind_method(_MD("set_drag_margin","margin","drag_margin"),&Camera2D::set_drag_margin);
+ ClassDB::bind_method(_MD("get_drag_margin","margin"),&Camera2D::get_drag_margin);
- ObjectTypeDB::bind_method(_MD("get_camera_pos"),&Camera2D::get_camera_pos);
- ObjectTypeDB::bind_method(_MD("get_camera_screen_center"),&Camera2D::get_camera_screen_center);
+ ClassDB::bind_method(_MD("get_camera_pos"),&Camera2D::get_camera_pos);
+ ClassDB::bind_method(_MD("get_camera_screen_center"),&Camera2D::get_camera_screen_center);
- ObjectTypeDB::bind_method(_MD("set_zoom","zoom"),&Camera2D::set_zoom);
- ObjectTypeDB::bind_method(_MD("get_zoom"),&Camera2D::get_zoom);
+ ClassDB::bind_method(_MD("set_zoom","zoom"),&Camera2D::set_zoom);
+ ClassDB::bind_method(_MD("get_zoom"),&Camera2D::get_zoom);
- ObjectTypeDB::bind_method(_MD("set_custom_viewport","viewport:Viewport"),&Camera2D::set_custom_viewport);
- ObjectTypeDB::bind_method(_MD("get_custom_viewport:Viewport"),&Camera2D::get_custom_viewport);
+ ClassDB::bind_method(_MD("set_custom_viewport","viewport:Viewport"),&Camera2D::set_custom_viewport);
+ ClassDB::bind_method(_MD("get_custom_viewport:Viewport"),&Camera2D::get_custom_viewport);
- ObjectTypeDB::bind_method(_MD("set_follow_smoothing","follow_smoothing"),&Camera2D::set_follow_smoothing);
- ObjectTypeDB::bind_method(_MD("get_follow_smoothing"),&Camera2D::get_follow_smoothing);
+ ClassDB::bind_method(_MD("set_follow_smoothing","follow_smoothing"),&Camera2D::set_follow_smoothing);
+ ClassDB::bind_method(_MD("get_follow_smoothing"),&Camera2D::get_follow_smoothing);
- ObjectTypeDB::bind_method(_MD("set_enable_follow_smoothing","follow_smoothing"),&Camera2D::set_enable_follow_smoothing);
- ObjectTypeDB::bind_method(_MD("is_follow_smoothing_enabled"),&Camera2D::is_follow_smoothing_enabled);
+ ClassDB::bind_method(_MD("set_enable_follow_smoothing","follow_smoothing"),&Camera2D::set_enable_follow_smoothing);
+ ClassDB::bind_method(_MD("is_follow_smoothing_enabled"),&Camera2D::is_follow_smoothing_enabled);
- ObjectTypeDB::bind_method(_MD("force_update_scroll"),&Camera2D::force_update_scroll);
- ObjectTypeDB::bind_method(_MD("reset_smoothing"),&Camera2D::reset_smoothing);
- ObjectTypeDB::bind_method(_MD("align"),&Camera2D::align);
+ ClassDB::bind_method(_MD("force_update_scroll"),&Camera2D::force_update_scroll);
+ ClassDB::bind_method(_MD("reset_smoothing"),&Camera2D::reset_smoothing);
+ ClassDB::bind_method(_MD("align"),&Camera2D::align);
- ObjectTypeDB::bind_method(_MD("_set_old_smoothing","follow_smoothing"),&Camera2D::_set_old_smoothing);
+ ClassDB::bind_method(_MD("_set_old_smoothing","follow_smoothing"),&Camera2D::_set_old_smoothing);
ADD_PROPERTYNZ( PropertyInfo(Variant::VECTOR2,"offset"),_SCS("set_offset"),_SCS("get_offset"));
ADD_PROPERTY( PropertyInfo(Variant::INT,"anchor_mode",PROPERTY_HINT_ENUM,"Fixed TopLeft,Drag Center"),_SCS("set_anchor_mode"),_SCS("get_anchor_mode"));
diff --git a/scene/2d/camera_2d.h b/scene/2d/camera_2d.h
index e479f5c290..da36b04924 100644
--- a/scene/2d/camera_2d.h
+++ b/scene/2d/camera_2d.h
@@ -35,7 +35,7 @@
class Camera2D : public Node2D {
- OBJ_TYPE( Camera2D, Node2D );
+ GDCLASS( Camera2D, Node2D );
public:
enum AnchorMode {
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index aba2175fda..667fc6dcad 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -135,10 +135,10 @@ Variant CanvasItemMaterial::get_shader_param(const StringName& p_param) const{
void CanvasItemMaterial::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_shader","shader:Shader"),&CanvasItemMaterial::set_shader);
- ObjectTypeDB::bind_method(_MD("get_shader:Shader"),&CanvasItemMaterial::get_shader);
- ObjectTypeDB::bind_method(_MD("set_shader_param","param","value"),&CanvasItemMaterial::set_shader_param);
- ObjectTypeDB::bind_method(_MD("get_shader_param","param"),&CanvasItemMaterial::get_shader_param);
+ ClassDB::bind_method(_MD("set_shader","shader:Shader"),&CanvasItemMaterial::set_shader);
+ ClassDB::bind_method(_MD("get_shader:Shader"),&CanvasItemMaterial::get_shader);
+ ClassDB::bind_method(_MD("set_shader_param","param","value"),&CanvasItemMaterial::set_shader_param);
+ ClassDB::bind_method(_MD("get_shader_param","param"),&CanvasItemMaterial::get_shader_param);
@@ -922,84 +922,84 @@ Vector2 CanvasItem::get_local_mouse_pos() const{
void CanvasItem::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_toplevel_raise_self"),&CanvasItem::_toplevel_raise_self);
- ObjectTypeDB::bind_method(_MD("_update_callback"),&CanvasItem::_update_callback);
- ObjectTypeDB::bind_method(_MD("_set_visible_"),&CanvasItem::_set_visible_);
- ObjectTypeDB::bind_method(_MD("_is_visible_"),&CanvasItem::_is_visible_);
-
- ObjectTypeDB::bind_method(_MD("edit_set_state","state"),&CanvasItem::edit_set_state);
- ObjectTypeDB::bind_method(_MD("edit_get_state:Variant"),&CanvasItem::edit_get_state);
- ObjectTypeDB::bind_method(_MD("edit_set_rect","rect"),&CanvasItem::edit_set_rect);
- ObjectTypeDB::bind_method(_MD("edit_rotate","degrees"),&CanvasItem::edit_rotate);
-
- ObjectTypeDB::bind_method(_MD("get_item_rect"),&CanvasItem::get_item_rect);
- ObjectTypeDB::bind_method(_MD("get_item_and_children_rect"),&CanvasItem::get_item_and_children_rect);
- //ObjectTypeDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform);
-
- ObjectTypeDB::bind_method(_MD("get_canvas_item"),&CanvasItem::get_canvas_item);
-
- ObjectTypeDB::bind_method(_MD("is_visible"),&CanvasItem::is_visible);
- ObjectTypeDB::bind_method(_MD("is_hidden"),&CanvasItem::is_hidden);
- ObjectTypeDB::bind_method(_MD("show"),&CanvasItem::show);
- ObjectTypeDB::bind_method(_MD("hide"),&CanvasItem::hide);
- ObjectTypeDB::bind_method(_MD("set_hidden","hidden"),&CanvasItem::set_hidden);
-
- ObjectTypeDB::bind_method(_MD("update"),&CanvasItem::update);
-
- ObjectTypeDB::bind_method(_MD("set_as_toplevel","enable"),&CanvasItem::set_as_toplevel);
- ObjectTypeDB::bind_method(_MD("is_set_as_toplevel"),&CanvasItem::is_set_as_toplevel);
-
- ObjectTypeDB::bind_method(_MD("set_light_mask","light_mask"),&CanvasItem::set_light_mask);
- ObjectTypeDB::bind_method(_MD("get_light_mask"),&CanvasItem::get_light_mask);
-
- ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&CanvasItem::set_modulate);
- ObjectTypeDB::bind_method(_MD("get_modulate"),&CanvasItem::get_modulate);
- ObjectTypeDB::bind_method(_MD("set_self_modulate","self_modulate"),&CanvasItem::set_self_modulate);
- ObjectTypeDB::bind_method(_MD("get_self_modulate"),&CanvasItem::get_self_modulate);
-
- ObjectTypeDB::bind_method(_MD("set_draw_behind_parent","enable"),&CanvasItem::set_draw_behind_parent);
- ObjectTypeDB::bind_method(_MD("is_draw_behind_parent_enabled"),&CanvasItem::is_draw_behind_parent_enabled);
-
- ObjectTypeDB::bind_method(_MD("_set_on_top","on_top"),&CanvasItem::_set_on_top);
- ObjectTypeDB::bind_method(_MD("_is_on_top"),&CanvasItem::_is_on_top);
- //ObjectTypeDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform);
-
- ObjectTypeDB::bind_method(_MD("draw_line","from","to","color","width","antialiased"),&CanvasItem::draw_line,DEFVAL(1.0),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("draw_rect","rect","color"),&CanvasItem::draw_rect);
- ObjectTypeDB::bind_method(_MD("draw_circle","pos","radius","color"),&CanvasItem::draw_circle);
- ObjectTypeDB::bind_method(_MD("draw_texture","texture:Texture","pos","modulate"),&CanvasItem::draw_texture,DEFVAL(Color(1,1,1,1)));
- 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_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(Variant()),DEFVAL(1.0));
- 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(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_char","font:Font","pos","char","next","modulate"),&CanvasItem::draw_char,DEFVAL(Color(1,1,1)));
-
- ObjectTypeDB::bind_method(_MD("draw_set_transform","pos","rot","scale"),&CanvasItem::draw_set_transform);
- ObjectTypeDB::bind_method(_MD("draw_set_transform_matrix","xform"),&CanvasItem::draw_set_transform_matrix);
- ObjectTypeDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform);
- ObjectTypeDB::bind_method(_MD("get_global_transform"),&CanvasItem::get_global_transform);
- ObjectTypeDB::bind_method(_MD("get_global_transform_with_canvas"),&CanvasItem::get_global_transform_with_canvas);
- ObjectTypeDB::bind_method(_MD("get_viewport_transform"),&CanvasItem::get_viewport_transform);
- ObjectTypeDB::bind_method(_MD("get_viewport_rect"),&CanvasItem::get_viewport_rect);
- ObjectTypeDB::bind_method(_MD("get_canvas_transform"),&CanvasItem::get_canvas_transform);
- ObjectTypeDB::bind_method(_MD("get_local_mouse_pos"),&CanvasItem::get_local_mouse_pos);
- ObjectTypeDB::bind_method(_MD("get_global_mouse_pos"),&CanvasItem::get_global_mouse_pos);
- ObjectTypeDB::bind_method(_MD("get_canvas"),&CanvasItem::get_canvas);
- ObjectTypeDB::bind_method(_MD("get_world_2d"),&CanvasItem::get_world_2d);
- //ObjectTypeDB::bind_method(_MD("get_viewport"),&CanvasItem::get_viewport);
-
- ObjectTypeDB::bind_method(_MD("set_material","material:CanvasItemMaterial"),&CanvasItem::set_material);
- ObjectTypeDB::bind_method(_MD("get_material:CanvasItemMaterial"),&CanvasItem::get_material);
-
- ObjectTypeDB::bind_method(_MD("set_use_parent_material","enable"),&CanvasItem::set_use_parent_material);
- ObjectTypeDB::bind_method(_MD("get_use_parent_material"),&CanvasItem::get_use_parent_material);
-
- ObjectTypeDB::bind_method(_MD("make_canvas_pos_local","screen_point"),
+ ClassDB::bind_method(_MD("_toplevel_raise_self"),&CanvasItem::_toplevel_raise_self);
+ ClassDB::bind_method(_MD("_update_callback"),&CanvasItem::_update_callback);
+ ClassDB::bind_method(_MD("_set_visible_"),&CanvasItem::_set_visible_);
+ ClassDB::bind_method(_MD("_is_visible_"),&CanvasItem::_is_visible_);
+
+ ClassDB::bind_method(_MD("edit_set_state","state"),&CanvasItem::edit_set_state);
+ ClassDB::bind_method(_MD("edit_get_state:Variant"),&CanvasItem::edit_get_state);
+ ClassDB::bind_method(_MD("edit_set_rect","rect"),&CanvasItem::edit_set_rect);
+ ClassDB::bind_method(_MD("edit_rotate","degrees"),&CanvasItem::edit_rotate);
+
+ ClassDB::bind_method(_MD("get_item_rect"),&CanvasItem::get_item_rect);
+ ClassDB::bind_method(_MD("get_item_and_children_rect"),&CanvasItem::get_item_and_children_rect);
+ //ClassDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform);
+
+ ClassDB::bind_method(_MD("get_canvas_item"),&CanvasItem::get_canvas_item);
+
+ ClassDB::bind_method(_MD("is_visible"),&CanvasItem::is_visible);
+ ClassDB::bind_method(_MD("is_hidden"),&CanvasItem::is_hidden);
+ ClassDB::bind_method(_MD("show"),&CanvasItem::show);
+ ClassDB::bind_method(_MD("hide"),&CanvasItem::hide);
+ ClassDB::bind_method(_MD("set_hidden","hidden"),&CanvasItem::set_hidden);
+
+ ClassDB::bind_method(_MD("update"),&CanvasItem::update);
+
+ ClassDB::bind_method(_MD("set_as_toplevel","enable"),&CanvasItem::set_as_toplevel);
+ ClassDB::bind_method(_MD("is_set_as_toplevel"),&CanvasItem::is_set_as_toplevel);
+
+ ClassDB::bind_method(_MD("set_light_mask","light_mask"),&CanvasItem::set_light_mask);
+ ClassDB::bind_method(_MD("get_light_mask"),&CanvasItem::get_light_mask);
+
+ ClassDB::bind_method(_MD("set_modulate","modulate"),&CanvasItem::set_modulate);
+ ClassDB::bind_method(_MD("get_modulate"),&CanvasItem::get_modulate);
+ ClassDB::bind_method(_MD("set_self_modulate","self_modulate"),&CanvasItem::set_self_modulate);
+ ClassDB::bind_method(_MD("get_self_modulate"),&CanvasItem::get_self_modulate);
+
+ ClassDB::bind_method(_MD("set_draw_behind_parent","enable"),&CanvasItem::set_draw_behind_parent);
+ ClassDB::bind_method(_MD("is_draw_behind_parent_enabled"),&CanvasItem::is_draw_behind_parent_enabled);
+
+ ClassDB::bind_method(_MD("_set_on_top","on_top"),&CanvasItem::_set_on_top);
+ ClassDB::bind_method(_MD("_is_on_top"),&CanvasItem::_is_on_top);
+ //ClassDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform);
+
+ ClassDB::bind_method(_MD("draw_line","from","to","color","width","antialiased"),&CanvasItem::draw_line,DEFVAL(1.0),DEFVAL(false));
+ ClassDB::bind_method(_MD("draw_rect","rect","color"),&CanvasItem::draw_rect);
+ ClassDB::bind_method(_MD("draw_circle","pos","radius","color"),&CanvasItem::draw_circle);
+ ClassDB::bind_method(_MD("draw_texture","texture:Texture","pos","modulate"),&CanvasItem::draw_texture,DEFVAL(Color(1,1,1,1)));
+ ClassDB::bind_method(_MD("draw_texture_rect","texture:Texture","rect","tile","modulate","transpose"),&CanvasItem::draw_texture_rect,DEFVAL(Color(1,1,1)),DEFVAL(false));
+ ClassDB::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));
+ ClassDB::bind_method(_MD("draw_style_box","style_box:StyleBox","rect"),&CanvasItem::draw_style_box);
+ ClassDB::bind_method(_MD("draw_primitive","points","colors","uvs","texture:Texture","width"),&CanvasItem::draw_primitive,DEFVAL(Variant()),DEFVAL(1.0));
+ ClassDB::bind_method(_MD("draw_polygon","points","colors","uvs","texture:Texture"),&CanvasItem::draw_polygon,DEFVAL(Vector2Array()),DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("draw_colored_polygon","points","color","uvs","texture:Texture"),&CanvasItem::draw_colored_polygon,DEFVAL(Vector2Array()),DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("draw_string","font:Font","pos","text","modulate","clip_w"),&CanvasItem::draw_string,DEFVAL(Color(1,1,1)),DEFVAL(-1));
+ ClassDB::bind_method(_MD("draw_char","font:Font","pos","char","next","modulate"),&CanvasItem::draw_char,DEFVAL(Color(1,1,1)));
+
+ ClassDB::bind_method(_MD("draw_set_transform","pos","rot","scale"),&CanvasItem::draw_set_transform);
+ ClassDB::bind_method(_MD("draw_set_transform_matrix","xform"),&CanvasItem::draw_set_transform_matrix);
+ ClassDB::bind_method(_MD("get_transform"),&CanvasItem::get_transform);
+ ClassDB::bind_method(_MD("get_global_transform"),&CanvasItem::get_global_transform);
+ ClassDB::bind_method(_MD("get_global_transform_with_canvas"),&CanvasItem::get_global_transform_with_canvas);
+ ClassDB::bind_method(_MD("get_viewport_transform"),&CanvasItem::get_viewport_transform);
+ ClassDB::bind_method(_MD("get_viewport_rect"),&CanvasItem::get_viewport_rect);
+ ClassDB::bind_method(_MD("get_canvas_transform"),&CanvasItem::get_canvas_transform);
+ ClassDB::bind_method(_MD("get_local_mouse_pos"),&CanvasItem::get_local_mouse_pos);
+ ClassDB::bind_method(_MD("get_global_mouse_pos"),&CanvasItem::get_global_mouse_pos);
+ ClassDB::bind_method(_MD("get_canvas"),&CanvasItem::get_canvas);
+ ClassDB::bind_method(_MD("get_world_2d"),&CanvasItem::get_world_2d);
+ //ClassDB::bind_method(_MD("get_viewport"),&CanvasItem::get_viewport);
+
+ ClassDB::bind_method(_MD("set_material","material:CanvasItemMaterial"),&CanvasItem::set_material);
+ ClassDB::bind_method(_MD("get_material:CanvasItemMaterial"),&CanvasItem::get_material);
+
+ ClassDB::bind_method(_MD("set_use_parent_material","enable"),&CanvasItem::set_use_parent_material);
+ ClassDB::bind_method(_MD("get_use_parent_material"),&CanvasItem::get_use_parent_material);
+
+ ClassDB::bind_method(_MD("make_canvas_pos_local","screen_point"),
&CanvasItem::make_canvas_pos_local);
- ObjectTypeDB::bind_method(_MD("make_input_local","event"),&CanvasItem::make_input_local);
+ ClassDB::bind_method(_MD("make_input_local","event"),&CanvasItem::make_input_local);
BIND_VMETHOD(MethodInfo("_draw"));
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index e6abc891c7..d0dd5be5a3 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -43,7 +43,7 @@ class StyleBox;
class CanvasItemMaterial : public Material {
- OBJ_TYPE(CanvasItemMaterial,Material);
+ GDCLASS(CanvasItemMaterial,Material);
Ref<Shader> shader;
public:
/*enum ShadingMode {
@@ -78,7 +78,7 @@ public:
class CanvasItem : public Node {
- OBJ_TYPE( CanvasItem, Node );
+ GDCLASS( CanvasItem, Node );
public:
enum BlendMode {
diff --git a/scene/2d/canvas_modulate.cpp b/scene/2d/canvas_modulate.cpp
index 383006838a..583f03eab1 100644
--- a/scene/2d/canvas_modulate.cpp
+++ b/scene/2d/canvas_modulate.cpp
@@ -62,8 +62,8 @@ void CanvasModulate::_notification(int p_what) {
void CanvasModulate::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_color","color"),&CanvasModulate::set_color);
- ObjectTypeDB::bind_method(_MD("get_color"),&CanvasModulate::get_color);
+ ClassDB::bind_method(_MD("set_color","color"),&CanvasModulate::set_color);
+ ClassDB::bind_method(_MD("get_color"),&CanvasModulate::get_color);
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"color"),_SCS("set_color"),_SCS("get_color"));
}
diff --git a/scene/2d/canvas_modulate.h b/scene/2d/canvas_modulate.h
index d4cfc0ff68..a0bb27b1c5 100644
--- a/scene/2d/canvas_modulate.h
+++ b/scene/2d/canvas_modulate.h
@@ -33,7 +33,7 @@
class CanvasModulate : public Node2D {
- OBJ_TYPE(CanvasModulate,Node2D);
+ GDCLASS(CanvasModulate,Node2D);
Color color;
protected:
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index 1ea8921bf5..e4900e38ec 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -221,20 +221,20 @@ void CollisionObject2D::_update_pickable() {
void CollisionObject2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_shape","shape:Shape2D","transform"),&CollisionObject2D::add_shape,DEFVAL(Matrix32()));
- ObjectTypeDB::bind_method(_MD("get_shape_count"),&CollisionObject2D::get_shape_count);
- ObjectTypeDB::bind_method(_MD("set_shape","shape_idx","shape:Shape"),&CollisionObject2D::set_shape);
- ObjectTypeDB::bind_method(_MD("set_shape_transform","shape_idx","transform"),&CollisionObject2D::set_shape_transform);
- ObjectTypeDB::bind_method(_MD("set_shape_as_trigger","shape_idx","enable"),&CollisionObject2D::set_shape_as_trigger);
- ObjectTypeDB::bind_method(_MD("get_shape:Shape2D","shape_idx"),&CollisionObject2D::get_shape);
- ObjectTypeDB::bind_method(_MD("get_shape_transform","shape_idx"),&CollisionObject2D::get_shape_transform);
- ObjectTypeDB::bind_method(_MD("is_shape_set_as_trigger","shape_idx"),&CollisionObject2D::is_shape_set_as_trigger);
- ObjectTypeDB::bind_method(_MD("remove_shape","shape_idx"),&CollisionObject2D::remove_shape);
- ObjectTypeDB::bind_method(_MD("clear_shapes"),&CollisionObject2D::clear_shapes);
- ObjectTypeDB::bind_method(_MD("get_rid"),&CollisionObject2D::get_rid);
-
- ObjectTypeDB::bind_method(_MD("set_pickable","enabled"),&CollisionObject2D::set_pickable);
- ObjectTypeDB::bind_method(_MD("is_pickable"),&CollisionObject2D::is_pickable);
+ ClassDB::bind_method(_MD("add_shape","shape:Shape2D","transform"),&CollisionObject2D::add_shape,DEFVAL(Matrix32()));
+ ClassDB::bind_method(_MD("get_shape_count"),&CollisionObject2D::get_shape_count);
+ ClassDB::bind_method(_MD("set_shape","shape_idx","shape:Shape"),&CollisionObject2D::set_shape);
+ ClassDB::bind_method(_MD("set_shape_transform","shape_idx","transform"),&CollisionObject2D::set_shape_transform);
+ ClassDB::bind_method(_MD("set_shape_as_trigger","shape_idx","enable"),&CollisionObject2D::set_shape_as_trigger);
+ ClassDB::bind_method(_MD("get_shape:Shape2D","shape_idx"),&CollisionObject2D::get_shape);
+ ClassDB::bind_method(_MD("get_shape_transform","shape_idx"),&CollisionObject2D::get_shape_transform);
+ ClassDB::bind_method(_MD("is_shape_set_as_trigger","shape_idx"),&CollisionObject2D::is_shape_set_as_trigger);
+ ClassDB::bind_method(_MD("remove_shape","shape_idx"),&CollisionObject2D::remove_shape);
+ ClassDB::bind_method(_MD("clear_shapes"),&CollisionObject2D::clear_shapes);
+ ClassDB::bind_method(_MD("get_rid"),&CollisionObject2D::get_rid);
+
+ ClassDB::bind_method(_MD("set_pickable","enabled"),&CollisionObject2D::set_pickable);
+ ClassDB::bind_method(_MD("is_pickable"),&CollisionObject2D::is_pickable);
BIND_VMETHOD( MethodInfo("_input_event",PropertyInfo(Variant::OBJECT,"viewport"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::INT,"shape_idx")));
diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h
index 78dacc1fd0..6f6d3520da 100644
--- a/scene/2d/collision_object_2d.h
+++ b/scene/2d/collision_object_2d.h
@@ -34,7 +34,7 @@
class CollisionObject2D : public Node2D {
- OBJ_TYPE( CollisionObject2D, Node2D );
+ GDCLASS( CollisionObject2D, Node2D );
bool area;
RID rid;
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 52f2cd6c6a..4b7a918023 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -313,21 +313,21 @@ String CollisionPolygon2D::get_configuration_warning() const {
void CollisionPolygon2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_add_to_collision_object"),&CollisionPolygon2D::_add_to_collision_object);
- ObjectTypeDB::bind_method(_MD("set_polygon","polygon"),&CollisionPolygon2D::set_polygon);
- ObjectTypeDB::bind_method(_MD("get_polygon"),&CollisionPolygon2D::get_polygon);
+ ClassDB::bind_method(_MD("_add_to_collision_object"),&CollisionPolygon2D::_add_to_collision_object);
+ ClassDB::bind_method(_MD("set_polygon","polygon"),&CollisionPolygon2D::set_polygon);
+ ClassDB::bind_method(_MD("get_polygon"),&CollisionPolygon2D::get_polygon);
- ObjectTypeDB::bind_method(_MD("set_build_mode","build_mode"),&CollisionPolygon2D::set_build_mode);
- ObjectTypeDB::bind_method(_MD("get_build_mode"),&CollisionPolygon2D::get_build_mode);
+ ClassDB::bind_method(_MD("set_build_mode","build_mode"),&CollisionPolygon2D::set_build_mode);
+ ClassDB::bind_method(_MD("get_build_mode"),&CollisionPolygon2D::get_build_mode);
- ObjectTypeDB::bind_method(_MD("set_trigger","trigger"),&CollisionPolygon2D::set_trigger);
- ObjectTypeDB::bind_method(_MD("is_trigger"),&CollisionPolygon2D::is_trigger);
+ ClassDB::bind_method(_MD("set_trigger","trigger"),&CollisionPolygon2D::set_trigger);
+ ClassDB::bind_method(_MD("is_trigger"),&CollisionPolygon2D::is_trigger);
- ObjectTypeDB::bind_method(_MD("_set_shape_range","shape_range"),&CollisionPolygon2D::_set_shape_range);
- ObjectTypeDB::bind_method(_MD("_get_shape_range"),&CollisionPolygon2D::_get_shape_range);
+ ClassDB::bind_method(_MD("_set_shape_range","shape_range"),&CollisionPolygon2D::_set_shape_range);
+ ClassDB::bind_method(_MD("_get_shape_range"),&CollisionPolygon2D::_get_shape_range);
- ObjectTypeDB::bind_method(_MD("get_collision_object_first_shape"),&CollisionPolygon2D::get_collision_object_first_shape);
- ObjectTypeDB::bind_method(_MD("get_collision_object_last_shape"),&CollisionPolygon2D::get_collision_object_last_shape);
+ ClassDB::bind_method(_MD("get_collision_object_first_shape"),&CollisionPolygon2D::get_collision_object_first_shape);
+ ClassDB::bind_method(_MD("get_collision_object_last_shape"),&CollisionPolygon2D::get_collision_object_last_shape);
ADD_PROPERTY( PropertyInfo(Variant::INT,"build_mode",PROPERTY_HINT_ENUM,"Solids,Segments"),_SCS("set_build_mode"),_SCS("get_build_mode"));
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2_ARRAY,"polygon"),_SCS("set_polygon"),_SCS("get_polygon"));
diff --git a/scene/2d/collision_polygon_2d.h b/scene/2d/collision_polygon_2d.h
index eaec2d1c14..dda850b41d 100644
--- a/scene/2d/collision_polygon_2d.h
+++ b/scene/2d/collision_polygon_2d.h
@@ -36,7 +36,7 @@
class CollisionPolygon2D : public Node2D {
- OBJ_TYPE(CollisionPolygon2D,Node2D);
+ GDCLASS(CollisionPolygon2D,Node2D);
public:
enum BuildMode {
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index d93840ef67..a92065d6fb 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -217,17 +217,17 @@ String CollisionShape2D::get_configuration_warning() const {
void CollisionShape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_shape","shape"),&CollisionShape2D::set_shape);
- ObjectTypeDB::bind_method(_MD("get_shape"),&CollisionShape2D::get_shape);
- ObjectTypeDB::bind_method(_MD("_shape_changed"),&CollisionShape2D::_shape_changed);
- ObjectTypeDB::bind_method(_MD("_add_to_collision_object"),&CollisionShape2D::_add_to_collision_object);
- ObjectTypeDB::bind_method(_MD("set_trigger","enable"),&CollisionShape2D::set_trigger);
- ObjectTypeDB::bind_method(_MD("is_trigger"),&CollisionShape2D::is_trigger);
+ ClassDB::bind_method(_MD("set_shape","shape"),&CollisionShape2D::set_shape);
+ ClassDB::bind_method(_MD("get_shape"),&CollisionShape2D::get_shape);
+ ClassDB::bind_method(_MD("_shape_changed"),&CollisionShape2D::_shape_changed);
+ ClassDB::bind_method(_MD("_add_to_collision_object"),&CollisionShape2D::_add_to_collision_object);
+ ClassDB::bind_method(_MD("set_trigger","enable"),&CollisionShape2D::set_trigger);
+ ClassDB::bind_method(_MD("is_trigger"),&CollisionShape2D::is_trigger);
- ObjectTypeDB::bind_method(_MD("_set_update_shape_index","index"),&CollisionShape2D::_set_update_shape_index);
- ObjectTypeDB::bind_method(_MD("_get_update_shape_index"),&CollisionShape2D::_get_update_shape_index);
+ ClassDB::bind_method(_MD("_set_update_shape_index","index"),&CollisionShape2D::_set_update_shape_index);
+ ClassDB::bind_method(_MD("_get_update_shape_index"),&CollisionShape2D::_get_update_shape_index);
- ObjectTypeDB::bind_method(_MD("get_collision_object_shape_index"),&CollisionShape2D::get_collision_object_shape_index);
+ ClassDB::bind_method(_MD("get_collision_object_shape_index"),&CollisionShape2D::get_collision_object_shape_index);
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"shape",PROPERTY_HINT_RESOURCE_TYPE,"Shape2D"),_SCS("set_shape"),_SCS("get_shape"));
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"trigger"),_SCS("set_trigger"),_SCS("is_trigger"));
diff --git a/scene/2d/collision_shape_2d.h b/scene/2d/collision_shape_2d.h
index 13ece8243d..b5cc789416 100644
--- a/scene/2d/collision_shape_2d.h
+++ b/scene/2d/collision_shape_2d.h
@@ -34,7 +34,7 @@
class CollisionShape2D : public Node2D {
- OBJ_TYPE(CollisionShape2D,Node2D);
+ GDCLASS(CollisionShape2D,Node2D);
Ref<Shape2D> shape;
Rect2 rect;
bool trigger;
diff --git a/scene/2d/joints_2d.cpp b/scene/2d/joints_2d.cpp
index 76ba66bfc9..e315a45838 100644
--- a/scene/2d/joints_2d.cpp
+++ b/scene/2d/joints_2d.cpp
@@ -128,17 +128,17 @@ bool Joint2D::get_exclude_nodes_from_collision() const{
void Joint2D::_bind_methods() {
- ObjectTypeDB::bind_method( _MD("set_node_a","node"), &Joint2D::set_node_a );
- ObjectTypeDB::bind_method( _MD("get_node_a"), &Joint2D::get_node_a );
+ ClassDB::bind_method( _MD("set_node_a","node"), &Joint2D::set_node_a );
+ ClassDB::bind_method( _MD("get_node_a"), &Joint2D::get_node_a );
- ObjectTypeDB::bind_method( _MD("set_node_b","node"), &Joint2D::set_node_b );
- ObjectTypeDB::bind_method( _MD("get_node_b"), &Joint2D::get_node_b );
+ ClassDB::bind_method( _MD("set_node_b","node"), &Joint2D::set_node_b );
+ ClassDB::bind_method( _MD("get_node_b"), &Joint2D::get_node_b );
- ObjectTypeDB::bind_method( _MD("set_bias","bias"), &Joint2D::set_bias );
- ObjectTypeDB::bind_method( _MD("get_bias"), &Joint2D::get_bias );
+ ClassDB::bind_method( _MD("set_bias","bias"), &Joint2D::set_bias );
+ ClassDB::bind_method( _MD("get_bias"), &Joint2D::get_bias );
- ObjectTypeDB::bind_method( _MD("set_exclude_nodes_from_collision","enable"), &Joint2D::set_exclude_nodes_from_collision );
- ObjectTypeDB::bind_method( _MD("get_exclude_nodes_from_collision"), &Joint2D::get_exclude_nodes_from_collision );
+ ClassDB::bind_method( _MD("set_exclude_nodes_from_collision","enable"), &Joint2D::set_exclude_nodes_from_collision );
+ ClassDB::bind_method( _MD("get_exclude_nodes_from_collision"), &Joint2D::get_exclude_nodes_from_collision );
ADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, "node_a"), _SCS("set_node_a"),_SCS("get_node_a") );
ADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, "node_b"), _SCS("set_node_b"),_SCS("get_node_b") );
@@ -225,8 +225,8 @@ real_t PinJoint2D::get_softness() const {
void PinJoint2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_softness","softness"), &PinJoint2D::set_softness);
- ObjectTypeDB::bind_method(_MD("get_softness"), &PinJoint2D::get_softness);
+ ClassDB::bind_method(_MD("set_softness","softness"), &PinJoint2D::set_softness);
+ ClassDB::bind_method(_MD("get_softness"), &PinJoint2D::get_softness);
ADD_PROPERTY( PropertyInfo( Variant::REAL, "softness", PROPERTY_HINT_EXP_RANGE,"0.00,16,0.01"), _SCS("set_softness"), _SCS("get_softness"));
}
@@ -321,10 +321,10 @@ real_t GrooveJoint2D::get_initial_offset() const {
void GrooveJoint2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_length","length"),&GrooveJoint2D::set_length);
- ObjectTypeDB::bind_method(_MD("get_length"),&GrooveJoint2D::get_length);
- ObjectTypeDB::bind_method(_MD("set_initial_offset","offset"),&GrooveJoint2D::set_initial_offset);
- ObjectTypeDB::bind_method(_MD("get_initial_offset"),&GrooveJoint2D::get_initial_offset);
+ ClassDB::bind_method(_MD("set_length","length"),&GrooveJoint2D::set_length);
+ ClassDB::bind_method(_MD("get_length"),&GrooveJoint2D::get_length);
+ ClassDB::bind_method(_MD("set_initial_offset","offset"),&GrooveJoint2D::set_initial_offset);
+ ClassDB::bind_method(_MD("get_initial_offset"),&GrooveJoint2D::get_initial_offset);
ADD_PROPERTY( PropertyInfo( Variant::REAL, "length", PROPERTY_HINT_EXP_RANGE,"1,65535,1"), _SCS("set_length"),_SCS("get_length"));
ADD_PROPERTY( PropertyInfo( Variant::REAL, "initial_offset", PROPERTY_HINT_EXP_RANGE,"1,65535,1"), _SCS("set_initial_offset"),_SCS("get_initial_offset"));
@@ -453,14 +453,14 @@ real_t DampedSpringJoint2D::get_damping() const {
void DampedSpringJoint2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_length","length"),&DampedSpringJoint2D::set_length);
- ObjectTypeDB::bind_method(_MD("get_length"),&DampedSpringJoint2D::get_length);
- ObjectTypeDB::bind_method(_MD("set_rest_length","rest_length"),&DampedSpringJoint2D::set_rest_length);
- ObjectTypeDB::bind_method(_MD("get_rest_length"),&DampedSpringJoint2D::get_rest_length);
- ObjectTypeDB::bind_method(_MD("set_stiffness","stiffness"),&DampedSpringJoint2D::set_stiffness);
- ObjectTypeDB::bind_method(_MD("get_stiffness"),&DampedSpringJoint2D::get_stiffness);
- ObjectTypeDB::bind_method(_MD("set_damping","damping"),&DampedSpringJoint2D::set_damping);
- ObjectTypeDB::bind_method(_MD("get_damping"),&DampedSpringJoint2D::get_damping);
+ ClassDB::bind_method(_MD("set_length","length"),&DampedSpringJoint2D::set_length);
+ ClassDB::bind_method(_MD("get_length"),&DampedSpringJoint2D::get_length);
+ ClassDB::bind_method(_MD("set_rest_length","rest_length"),&DampedSpringJoint2D::set_rest_length);
+ ClassDB::bind_method(_MD("get_rest_length"),&DampedSpringJoint2D::get_rest_length);
+ ClassDB::bind_method(_MD("set_stiffness","stiffness"),&DampedSpringJoint2D::set_stiffness);
+ ClassDB::bind_method(_MD("get_stiffness"),&DampedSpringJoint2D::get_stiffness);
+ ClassDB::bind_method(_MD("set_damping","damping"),&DampedSpringJoint2D::set_damping);
+ ClassDB::bind_method(_MD("get_damping"),&DampedSpringJoint2D::get_damping);
ADD_PROPERTY( PropertyInfo( Variant::REAL, "length", PROPERTY_HINT_EXP_RANGE,"1,65535,1"), _SCS("set_length"),_SCS("get_length"));
ADD_PROPERTY( PropertyInfo( Variant::REAL, "rest_length", PROPERTY_HINT_EXP_RANGE,"0,65535,1"), _SCS("set_rest_length"),_SCS("get_rest_length"));
diff --git a/scene/2d/joints_2d.h b/scene/2d/joints_2d.h
index d91e477bd6..3b3eec6bd6 100644
--- a/scene/2d/joints_2d.h
+++ b/scene/2d/joints_2d.h
@@ -34,7 +34,7 @@
class Joint2D : public Node2D {
- OBJ_TYPE(Joint2D,Node2D);
+ GDCLASS(Joint2D,Node2D);
RID joint;
@@ -75,7 +75,7 @@ public:
class PinJoint2D : public Joint2D {
- OBJ_TYPE(PinJoint2D,Joint2D);
+ GDCLASS(PinJoint2D,Joint2D);
real_t softness;
@@ -94,7 +94,7 @@ public:
class GrooveJoint2D : public Joint2D {
- OBJ_TYPE(GrooveJoint2D,Joint2D);
+ GDCLASS(GrooveJoint2D,Joint2D);
real_t length;
real_t initial_offset;
@@ -117,7 +117,7 @@ public:
class DampedSpringJoint2D : public Joint2D {
- OBJ_TYPE(DampedSpringJoint2D,Joint2D);
+ GDCLASS(DampedSpringJoint2D,Joint2D);
real_t stiffness;
real_t damping;
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index e5b0d54376..b5ecec4a84 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -365,67 +365,67 @@ String Light2D::get_configuration_warning() const {
void Light2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_enabled","enabled"),&Light2D::set_enabled);
- ObjectTypeDB::bind_method(_MD("is_enabled"),&Light2D::is_enabled);
+ ClassDB::bind_method(_MD("set_enabled","enabled"),&Light2D::set_enabled);
+ ClassDB::bind_method(_MD("is_enabled"),&Light2D::is_enabled);
- ObjectTypeDB::bind_method(_MD("set_editor_only","editor_only"), &Light2D::set_editor_only );
- ObjectTypeDB::bind_method(_MD("is_editor_only"), &Light2D::is_editor_only );
+ ClassDB::bind_method(_MD("set_editor_only","editor_only"), &Light2D::set_editor_only );
+ ClassDB::bind_method(_MD("is_editor_only"), &Light2D::is_editor_only );
- ObjectTypeDB::bind_method(_MD("set_texture","texture"),&Light2D::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture"),&Light2D::get_texture);
+ ClassDB::bind_method(_MD("set_texture","texture"),&Light2D::set_texture);
+ ClassDB::bind_method(_MD("get_texture"),&Light2D::get_texture);
- ObjectTypeDB::bind_method(_MD("set_texture_offset","texture_offset"),&Light2D::set_texture_offset);
- ObjectTypeDB::bind_method(_MD("get_texture_offset"),&Light2D::get_texture_offset);
+ ClassDB::bind_method(_MD("set_texture_offset","texture_offset"),&Light2D::set_texture_offset);
+ ClassDB::bind_method(_MD("get_texture_offset"),&Light2D::get_texture_offset);
- ObjectTypeDB::bind_method(_MD("set_color","color"),&Light2D::set_color);
- ObjectTypeDB::bind_method(_MD("get_color"),&Light2D::get_color);
+ ClassDB::bind_method(_MD("set_color","color"),&Light2D::set_color);
+ ClassDB::bind_method(_MD("get_color"),&Light2D::get_color);
- ObjectTypeDB::bind_method(_MD("set_height","height"),&Light2D::set_height);
- ObjectTypeDB::bind_method(_MD("get_height"),&Light2D::get_height);
+ ClassDB::bind_method(_MD("set_height","height"),&Light2D::set_height);
+ ClassDB::bind_method(_MD("get_height"),&Light2D::get_height);
- ObjectTypeDB::bind_method(_MD("set_energy","energy"),&Light2D::set_energy);
- ObjectTypeDB::bind_method(_MD("get_energy"),&Light2D::get_energy);
+ ClassDB::bind_method(_MD("set_energy","energy"),&Light2D::set_energy);
+ ClassDB::bind_method(_MD("get_energy"),&Light2D::get_energy);
- ObjectTypeDB::bind_method(_MD("set_texture_scale","texture_scale"),&Light2D::set_texture_scale);
- ObjectTypeDB::bind_method(_MD("get_texture_scale"),&Light2D::get_texture_scale);
+ ClassDB::bind_method(_MD("set_texture_scale","texture_scale"),&Light2D::set_texture_scale);
+ ClassDB::bind_method(_MD("get_texture_scale"),&Light2D::get_texture_scale);
- ObjectTypeDB::bind_method(_MD("set_z_range_min","z"),&Light2D::set_z_range_min);
- ObjectTypeDB::bind_method(_MD("get_z_range_min"),&Light2D::get_z_range_min);
+ ClassDB::bind_method(_MD("set_z_range_min","z"),&Light2D::set_z_range_min);
+ ClassDB::bind_method(_MD("get_z_range_min"),&Light2D::get_z_range_min);
- ObjectTypeDB::bind_method(_MD("set_z_range_max","z"),&Light2D::set_z_range_max);
- ObjectTypeDB::bind_method(_MD("get_z_range_max"),&Light2D::get_z_range_max);
+ ClassDB::bind_method(_MD("set_z_range_max","z"),&Light2D::set_z_range_max);
+ ClassDB::bind_method(_MD("get_z_range_max"),&Light2D::get_z_range_max);
- ObjectTypeDB::bind_method(_MD("set_layer_range_min","layer"),&Light2D::set_layer_range_min);
- ObjectTypeDB::bind_method(_MD("get_layer_range_min"),&Light2D::get_layer_range_min);
+ ClassDB::bind_method(_MD("set_layer_range_min","layer"),&Light2D::set_layer_range_min);
+ ClassDB::bind_method(_MD("get_layer_range_min"),&Light2D::get_layer_range_min);
- ObjectTypeDB::bind_method(_MD("set_layer_range_max","layer"),&Light2D::set_layer_range_max);
- ObjectTypeDB::bind_method(_MD("get_layer_range_max"),&Light2D::get_layer_range_max);
+ ClassDB::bind_method(_MD("set_layer_range_max","layer"),&Light2D::set_layer_range_max);
+ ClassDB::bind_method(_MD("get_layer_range_max"),&Light2D::get_layer_range_max);
- ObjectTypeDB::bind_method(_MD("set_item_cull_mask","item_cull_mask"),&Light2D::set_item_cull_mask);
- ObjectTypeDB::bind_method(_MD("get_item_cull_mask"),&Light2D::get_item_cull_mask);
+ ClassDB::bind_method(_MD("set_item_cull_mask","item_cull_mask"),&Light2D::set_item_cull_mask);
+ ClassDB::bind_method(_MD("get_item_cull_mask"),&Light2D::get_item_cull_mask);
- ObjectTypeDB::bind_method(_MD("set_item_shadow_cull_mask","item_shadow_cull_mask"),&Light2D::set_item_shadow_cull_mask);
- ObjectTypeDB::bind_method(_MD("get_item_shadow_cull_mask"),&Light2D::get_item_shadow_cull_mask);
+ ClassDB::bind_method(_MD("set_item_shadow_cull_mask","item_shadow_cull_mask"),&Light2D::set_item_shadow_cull_mask);
+ ClassDB::bind_method(_MD("get_item_shadow_cull_mask"),&Light2D::get_item_shadow_cull_mask);
- ObjectTypeDB::bind_method(_MD("set_mode","mode"),&Light2D::set_mode);
- ObjectTypeDB::bind_method(_MD("get_mode"),&Light2D::get_mode);
+ ClassDB::bind_method(_MD("set_mode","mode"),&Light2D::set_mode);
+ ClassDB::bind_method(_MD("get_mode"),&Light2D::get_mode);
- ObjectTypeDB::bind_method(_MD("set_shadow_enabled","enabled"),&Light2D::set_shadow_enabled);
- ObjectTypeDB::bind_method(_MD("is_shadow_enabled"),&Light2D::is_shadow_enabled);
+ ClassDB::bind_method(_MD("set_shadow_enabled","enabled"),&Light2D::set_shadow_enabled);
+ ClassDB::bind_method(_MD("is_shadow_enabled"),&Light2D::is_shadow_enabled);
- ObjectTypeDB::bind_method(_MD("set_shadow_buffer_size","size"),&Light2D::set_shadow_buffer_size);
- ObjectTypeDB::bind_method(_MD("get_shadow_buffer_size"),&Light2D::get_shadow_buffer_size);
+ ClassDB::bind_method(_MD("set_shadow_buffer_size","size"),&Light2D::set_shadow_buffer_size);
+ ClassDB::bind_method(_MD("get_shadow_buffer_size"),&Light2D::get_shadow_buffer_size);
- ObjectTypeDB::bind_method(_MD("set_shadow_gradient_length","multiplier"),&Light2D::set_shadow_gradient_length);
- ObjectTypeDB::bind_method(_MD("get_shadow_gradient_length"),&Light2D::get_shadow_gradient_length);
+ ClassDB::bind_method(_MD("set_shadow_gradient_length","multiplier"),&Light2D::set_shadow_gradient_length);
+ ClassDB::bind_method(_MD("get_shadow_gradient_length"),&Light2D::get_shadow_gradient_length);
- ObjectTypeDB::bind_method(_MD("set_shadow_filter","filter"),&Light2D::set_shadow_filter);
- ObjectTypeDB::bind_method(_MD("get_shadow_filter"),&Light2D::get_shadow_filter);
+ ClassDB::bind_method(_MD("set_shadow_filter","filter"),&Light2D::set_shadow_filter);
+ ClassDB::bind_method(_MD("get_shadow_filter"),&Light2D::get_shadow_filter);
- ObjectTypeDB::bind_method(_MD("set_shadow_color","shadow_color"),&Light2D::set_shadow_color);
- ObjectTypeDB::bind_method(_MD("get_shadow_color"),&Light2D::get_shadow_color);
+ ClassDB::bind_method(_MD("set_shadow_color","shadow_color"),&Light2D::set_shadow_color);
+ ClassDB::bind_method(_MD("get_shadow_color"),&Light2D::get_shadow_color);
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled"));
diff --git a/scene/2d/light_2d.h b/scene/2d/light_2d.h
index d3aaa0f1ed..2bdcca5d01 100644
--- a/scene/2d/light_2d.h
+++ b/scene/2d/light_2d.h
@@ -33,7 +33,7 @@
class Light2D : public Node2D {
- OBJ_TYPE(Light2D,Node2D);
+ GDCLASS(Light2D,Node2D);
public:
enum Mode {
MODE_ADD,
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp
index 28044801a1..ac1fb16d78 100644
--- a/scene/2d/light_occluder_2d.cpp
+++ b/scene/2d/light_occluder_2d.cpp
@@ -78,14 +78,14 @@ RID OccluderPolygon2D::get_rid() const {
void OccluderPolygon2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_closed","closed"),&OccluderPolygon2D::set_closed);
- ObjectTypeDB::bind_method(_MD("is_closed"),&OccluderPolygon2D::is_closed);
+ ClassDB::bind_method(_MD("set_closed","closed"),&OccluderPolygon2D::set_closed);
+ ClassDB::bind_method(_MD("is_closed"),&OccluderPolygon2D::is_closed);
- ObjectTypeDB::bind_method(_MD("set_cull_mode","cull_mode"),&OccluderPolygon2D::set_cull_mode);
- ObjectTypeDB::bind_method(_MD("get_cull_mode"),&OccluderPolygon2D::get_cull_mode);
+ ClassDB::bind_method(_MD("set_cull_mode","cull_mode"),&OccluderPolygon2D::set_cull_mode);
+ ClassDB::bind_method(_MD("get_cull_mode"),&OccluderPolygon2D::get_cull_mode);
- ObjectTypeDB::bind_method(_MD("set_polygon","polygon"),&OccluderPolygon2D::set_polygon);
- ObjectTypeDB::bind_method(_MD("get_polygon"),&OccluderPolygon2D::get_polygon);
+ ClassDB::bind_method(_MD("set_polygon","polygon"),&OccluderPolygon2D::set_polygon);
+ ClassDB::bind_method(_MD("get_polygon"),&OccluderPolygon2D::get_polygon);
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"closed"),_SCS("set_closed"),_SCS("is_closed"));
ADD_PROPERTY( PropertyInfo(Variant::INT,"cull_mode",PROPERTY_HINT_ENUM,"Disabled,ClockWise,CounterClockWise"),_SCS("set_cull_mode"),_SCS("get_cull_mode"));
@@ -224,14 +224,14 @@ String LightOccluder2D::get_configuration_warning() const {
void LightOccluder2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_occluder_polygon","polygon:OccluderPolygon2D"),&LightOccluder2D::set_occluder_polygon);
- ObjectTypeDB::bind_method(_MD("get_occluder_polygon:OccluderPolygon2D"),&LightOccluder2D::get_occluder_polygon);
+ ClassDB::bind_method(_MD("set_occluder_polygon","polygon:OccluderPolygon2D"),&LightOccluder2D::set_occluder_polygon);
+ ClassDB::bind_method(_MD("get_occluder_polygon:OccluderPolygon2D"),&LightOccluder2D::get_occluder_polygon);
- ObjectTypeDB::bind_method(_MD("set_occluder_light_mask","mask"),&LightOccluder2D::set_occluder_light_mask);
- ObjectTypeDB::bind_method(_MD("get_occluder_light_mask"),&LightOccluder2D::get_occluder_light_mask);
+ ClassDB::bind_method(_MD("set_occluder_light_mask","mask"),&LightOccluder2D::set_occluder_light_mask);
+ ClassDB::bind_method(_MD("get_occluder_light_mask"),&LightOccluder2D::get_occluder_light_mask);
#ifdef DEBUG_ENABLED
- ObjectTypeDB::bind_method("_poly_changed",&LightOccluder2D::_poly_changed);
+ ClassDB::bind_method("_poly_changed",&LightOccluder2D::_poly_changed);
#endif
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"occluder",PROPERTY_HINT_RESOURCE_TYPE,"OccluderPolygon2D"),_SCS("set_occluder_polygon"),_SCS("get_occluder_polygon"));
diff --git a/scene/2d/light_occluder_2d.h b/scene/2d/light_occluder_2d.h
index a6a3fb68e7..1d7430689f 100644
--- a/scene/2d/light_occluder_2d.h
+++ b/scene/2d/light_occluder_2d.h
@@ -33,7 +33,7 @@
class OccluderPolygon2D : public Resource {
- OBJ_TYPE(OccluderPolygon2D,Resource);
+ GDCLASS(OccluderPolygon2D,Resource);
public:
enum CullMode {
@@ -72,7 +72,7 @@ public:
VARIANT_ENUM_CAST(OccluderPolygon2D::CullMode);
class LightOccluder2D : public Node2D {
- OBJ_TYPE(LightOccluder2D,Node2D);
+ GDCLASS(LightOccluder2D,Node2D);
RID occluder;
bool enabled;
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp
index 91ab7a617c..1a7d01c762 100644
--- a/scene/2d/navigation2d.cpp
+++ b/scene/2d/navigation2d.cpp
@@ -804,13 +804,13 @@ Object* Navigation2D::get_closest_point_owner(const Vector2& p_point) {
void Navigation2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("navpoly_create","mesh:NavigationPolygon","xform","owner"),&Navigation2D::navpoly_create,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("navpoly_set_transform","id","xform"),&Navigation2D::navpoly_set_transform);
- ObjectTypeDB::bind_method(_MD("navpoly_remove","id"),&Navigation2D::navpoly_remove);
+ ClassDB::bind_method(_MD("navpoly_create","mesh:NavigationPolygon","xform","owner"),&Navigation2D::navpoly_create,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("navpoly_set_transform","id","xform"),&Navigation2D::navpoly_set_transform);
+ ClassDB::bind_method(_MD("navpoly_remove","id"),&Navigation2D::navpoly_remove);
- ObjectTypeDB::bind_method(_MD("get_simple_path","start","end","optimize"),&Navigation2D::get_simple_path,DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("get_closest_point","to_point"),&Navigation2D::get_closest_point);
- ObjectTypeDB::bind_method(_MD("get_closest_point_owner","to_point"),&Navigation2D::get_closest_point_owner);
+ ClassDB::bind_method(_MD("get_simple_path","start","end","optimize"),&Navigation2D::get_simple_path,DEFVAL(true));
+ ClassDB::bind_method(_MD("get_closest_point","to_point"),&Navigation2D::get_closest_point);
+ ClassDB::bind_method(_MD("get_closest_point_owner","to_point"),&Navigation2D::get_closest_point_owner);
}
diff --git a/scene/2d/navigation2d.h b/scene/2d/navigation2d.h
index a5468d7702..c1c1600291 100644
--- a/scene/2d/navigation2d.h
+++ b/scene/2d/navigation2d.h
@@ -34,7 +34,7 @@
class Navigation2D : public Node2D {
- OBJ_TYPE( Navigation2D, Node2D);
+ GDCLASS( Navigation2D, Node2D);
union Point {
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp
index eb4cbaa09f..a11f2240f9 100644
--- a/scene/2d/navigation_polygon.cpp
+++ b/scene/2d/navigation_polygon.cpp
@@ -247,28 +247,28 @@ void NavigationPolygon::make_polygons_from_outlines(){
void NavigationPolygon::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_vertices","vertices"),&NavigationPolygon::set_vertices);
- ObjectTypeDB::bind_method(_MD("get_vertices"),&NavigationPolygon::get_vertices);
+ ClassDB::bind_method(_MD("set_vertices","vertices"),&NavigationPolygon::set_vertices);
+ ClassDB::bind_method(_MD("get_vertices"),&NavigationPolygon::get_vertices);
- ObjectTypeDB::bind_method(_MD("add_polygon","polygon"),&NavigationPolygon::add_polygon);
- ObjectTypeDB::bind_method(_MD("get_polygon_count"),&NavigationPolygon::get_polygon_count);
- ObjectTypeDB::bind_method(_MD("get_polygon","idx"),&NavigationPolygon::get_polygon);
- ObjectTypeDB::bind_method(_MD("clear_polygons"),&NavigationPolygon::clear_polygons);
+ ClassDB::bind_method(_MD("add_polygon","polygon"),&NavigationPolygon::add_polygon);
+ ClassDB::bind_method(_MD("get_polygon_count"),&NavigationPolygon::get_polygon_count);
+ ClassDB::bind_method(_MD("get_polygon","idx"),&NavigationPolygon::get_polygon);
+ ClassDB::bind_method(_MD("clear_polygons"),&NavigationPolygon::clear_polygons);
- ObjectTypeDB::bind_method(_MD("add_outline","outline"),&NavigationPolygon::add_outline);
- ObjectTypeDB::bind_method(_MD("add_outline_at_index","outline","index"),&NavigationPolygon::add_outline_at_index);
- ObjectTypeDB::bind_method(_MD("get_outline_count"),&NavigationPolygon::get_outline_count);
- ObjectTypeDB::bind_method(_MD("set_outline","idx","outline"),&NavigationPolygon::set_outline);
- ObjectTypeDB::bind_method(_MD("get_outline","idx"),&NavigationPolygon::get_outline);
- ObjectTypeDB::bind_method(_MD("remove_outline","idx"),&NavigationPolygon::remove_outline);
- ObjectTypeDB::bind_method(_MD("clear_outlines"),&NavigationPolygon::clear_outlines);
- ObjectTypeDB::bind_method(_MD("make_polygons_from_outlines"),&NavigationPolygon::make_polygons_from_outlines);
+ ClassDB::bind_method(_MD("add_outline","outline"),&NavigationPolygon::add_outline);
+ ClassDB::bind_method(_MD("add_outline_at_index","outline","index"),&NavigationPolygon::add_outline_at_index);
+ ClassDB::bind_method(_MD("get_outline_count"),&NavigationPolygon::get_outline_count);
+ ClassDB::bind_method(_MD("set_outline","idx","outline"),&NavigationPolygon::set_outline);
+ ClassDB::bind_method(_MD("get_outline","idx"),&NavigationPolygon::get_outline);
+ ClassDB::bind_method(_MD("remove_outline","idx"),&NavigationPolygon::remove_outline);
+ ClassDB::bind_method(_MD("clear_outlines"),&NavigationPolygon::clear_outlines);
+ ClassDB::bind_method(_MD("make_polygons_from_outlines"),&NavigationPolygon::make_polygons_from_outlines);
- ObjectTypeDB::bind_method(_MD("_set_polygons","polygons"),&NavigationPolygon::_set_polygons);
- ObjectTypeDB::bind_method(_MD("_get_polygons"),&NavigationPolygon::_get_polygons);
+ ClassDB::bind_method(_MD("_set_polygons","polygons"),&NavigationPolygon::_set_polygons);
+ ClassDB::bind_method(_MD("_get_polygons"),&NavigationPolygon::_get_polygons);
- ObjectTypeDB::bind_method(_MD("_set_outlines","outlines"),&NavigationPolygon::_set_outlines);
- ObjectTypeDB::bind_method(_MD("_get_outlines"),&NavigationPolygon::_get_outlines);
+ ClassDB::bind_method(_MD("_set_outlines","outlines"),&NavigationPolygon::_set_outlines);
+ ClassDB::bind_method(_MD("_get_outlines"),&NavigationPolygon::_get_outlines);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3_ARRAY,"vertices",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("set_vertices"),_SCS("get_vertices"));
ADD_PROPERTY(PropertyInfo(Variant::ARRAY,"polygons",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_polygons"),_SCS("_get_polygons"));
@@ -480,13 +480,13 @@ String NavigationPolygonInstance::get_configuration_warning() const {
void NavigationPolygonInstance::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_navigation_polygon","navpoly:NavigationPolygon"),&NavigationPolygonInstance::set_navigation_polygon);
- ObjectTypeDB::bind_method(_MD("get_navigation_polygon:NavigationPolygon"),&NavigationPolygonInstance::get_navigation_polygon);
+ ClassDB::bind_method(_MD("set_navigation_polygon","navpoly:NavigationPolygon"),&NavigationPolygonInstance::set_navigation_polygon);
+ ClassDB::bind_method(_MD("get_navigation_polygon:NavigationPolygon"),&NavigationPolygonInstance::get_navigation_polygon);
- ObjectTypeDB::bind_method(_MD("set_enabled","enabled"),&NavigationPolygonInstance::set_enabled);
- ObjectTypeDB::bind_method(_MD("is_enabled"),&NavigationPolygonInstance::is_enabled);
+ ClassDB::bind_method(_MD("set_enabled","enabled"),&NavigationPolygonInstance::set_enabled);
+ ClassDB::bind_method(_MD("is_enabled"),&NavigationPolygonInstance::is_enabled);
- ObjectTypeDB::bind_method(_MD("_navpoly_changed"),&NavigationPolygonInstance::_navpoly_changed);
+ ClassDB::bind_method(_MD("_navpoly_changed"),&NavigationPolygonInstance::_navpoly_changed);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"navpoly",PROPERTY_HINT_RESOURCE_TYPE,"NavigationPolygon"),_SCS("set_navigation_polygon"),_SCS("get_navigation_polygon"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled"));
diff --git a/scene/2d/navigation_polygon.h b/scene/2d/navigation_polygon.h
index f35315804c..edf3dcadc3 100644
--- a/scene/2d/navigation_polygon.h
+++ b/scene/2d/navigation_polygon.h
@@ -34,7 +34,7 @@
class NavigationPolygon : public Resource {
- OBJ_TYPE( NavigationPolygon, Resource );
+ GDCLASS( NavigationPolygon, Resource );
DVector<Vector2> vertices;
struct Polygon {
@@ -84,7 +84,7 @@ class Navigation2D;
class NavigationPolygonInstance : public Node2D {
- OBJ_TYPE(NavigationPolygonInstance,Node2D);
+ GDCLASS(NavigationPolygonInstance,Node2D);
bool enabled;
int nav_id;
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 7e3057dbff..11cc07d275 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -423,50 +423,50 @@ void Node2D::_bind_methods() {
// TODO: Obsolete those two methods (old name) properly (GH-4397)
- ObjectTypeDB::bind_method(_MD("_get_rotd"),&Node2D::_get_rotd);
- ObjectTypeDB::bind_method(_MD("_set_rotd","degrees"),&Node2D::_set_rotd);
-
- ObjectTypeDB::bind_method(_MD("set_pos","pos"),&Node2D::set_pos);
- ObjectTypeDB::bind_method(_MD("set_rot","radians"),&Node2D::set_rot);
- ObjectTypeDB::bind_method(_MD("set_rotd","degrees"),&Node2D::set_rotd);
- ObjectTypeDB::bind_method(_MD("set_scale","scale"),&Node2D::set_scale);
-
- ObjectTypeDB::bind_method(_MD("get_pos"),&Node2D::get_pos);
- ObjectTypeDB::bind_method(_MD("get_rot"),&Node2D::get_rot);
- ObjectTypeDB::bind_method(_MD("get_rotd"),&Node2D::get_rotd);
- ObjectTypeDB::bind_method(_MD("get_scale"),&Node2D::get_scale);
-
- ObjectTypeDB::bind_method(_MD("rotate","radians"),&Node2D::rotate);
- ObjectTypeDB::bind_method(_MD("move_local_x","delta","scaled"),&Node2D::move_x,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("move_local_y","delta","scaled"),&Node2D::move_y,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("translate","offset"),&Node2D::translate);
- ObjectTypeDB::bind_method(_MD("global_translate","offset"),&Node2D::global_translate);
- ObjectTypeDB::bind_method(_MD("scale","ratio"),&Node2D::scale);
-
- ObjectTypeDB::bind_method(_MD("set_global_pos","pos"),&Node2D::set_global_pos);
- ObjectTypeDB::bind_method(_MD("get_global_pos"),&Node2D::get_global_pos);
- ObjectTypeDB::bind_method(_MD("set_global_rot","radians"),&Node2D::set_global_rot);
- ObjectTypeDB::bind_method(_MD("get_global_rot"),&Node2D::get_global_rot);
- ObjectTypeDB::bind_method(_MD("set_global_rotd","degrees"),&Node2D::set_global_rotd);
- ObjectTypeDB::bind_method(_MD("get_global_rotd"),&Node2D::get_global_rotd);
- ObjectTypeDB::bind_method(_MD("set_global_scale","scale"),&Node2D::set_global_scale);
- ObjectTypeDB::bind_method(_MD("get_global_scale"),&Node2D::get_global_scale);
-
- ObjectTypeDB::bind_method(_MD("set_transform","xform"),&Node2D::set_transform);
- ObjectTypeDB::bind_method(_MD("set_global_transform","xform"),&Node2D::set_global_transform);
-
- ObjectTypeDB::bind_method(_MD("look_at","point"),&Node2D::look_at);
- ObjectTypeDB::bind_method(_MD("get_angle_to","point"),&Node2D::get_angle_to);
-
- ObjectTypeDB::bind_method(_MD("set_z","z"),&Node2D::set_z);
- ObjectTypeDB::bind_method(_MD("get_z"),&Node2D::get_z);
-
- ObjectTypeDB::bind_method(_MD("set_z_as_relative","enable"),&Node2D::set_z_as_relative);
- ObjectTypeDB::bind_method(_MD("is_z_relative"),&Node2D::is_z_relative);
-
- ObjectTypeDB::bind_method(_MD("edit_set_pivot","pivot"),&Node2D::edit_set_pivot);
-
- ObjectTypeDB::bind_method(_MD("get_relative_transform_to_parent","parent"),&Node2D::get_relative_transform_to_parent);
+ ClassDB::bind_method(_MD("_get_rotd"),&Node2D::_get_rotd);
+ ClassDB::bind_method(_MD("_set_rotd","degrees"),&Node2D::_set_rotd);
+
+ ClassDB::bind_method(_MD("set_pos","pos"),&Node2D::set_pos);
+ ClassDB::bind_method(_MD("set_rot","radians"),&Node2D::set_rot);
+ ClassDB::bind_method(_MD("set_rotd","degrees"),&Node2D::set_rotd);
+ ClassDB::bind_method(_MD("set_scale","scale"),&Node2D::set_scale);
+
+ ClassDB::bind_method(_MD("get_pos"),&Node2D::get_pos);
+ ClassDB::bind_method(_MD("get_rot"),&Node2D::get_rot);
+ ClassDB::bind_method(_MD("get_rotd"),&Node2D::get_rotd);
+ ClassDB::bind_method(_MD("get_scale"),&Node2D::get_scale);
+
+ ClassDB::bind_method(_MD("rotate","radians"),&Node2D::rotate);
+ ClassDB::bind_method(_MD("move_local_x","delta","scaled"),&Node2D::move_x,DEFVAL(false));
+ ClassDB::bind_method(_MD("move_local_y","delta","scaled"),&Node2D::move_y,DEFVAL(false));
+ ClassDB::bind_method(_MD("translate","offset"),&Node2D::translate);
+ ClassDB::bind_method(_MD("global_translate","offset"),&Node2D::global_translate);
+ ClassDB::bind_method(_MD("scale","ratio"),&Node2D::scale);
+
+ ClassDB::bind_method(_MD("set_global_pos","pos"),&Node2D::set_global_pos);
+ ClassDB::bind_method(_MD("get_global_pos"),&Node2D::get_global_pos);
+ ClassDB::bind_method(_MD("set_global_rot","radians"),&Node2D::set_global_rot);
+ ClassDB::bind_method(_MD("get_global_rot"),&Node2D::get_global_rot);
+ ClassDB::bind_method(_MD("set_global_rotd","degrees"),&Node2D::set_global_rotd);
+ ClassDB::bind_method(_MD("get_global_rotd"),&Node2D::get_global_rotd);
+ ClassDB::bind_method(_MD("set_global_scale","scale"),&Node2D::set_global_scale);
+ ClassDB::bind_method(_MD("get_global_scale"),&Node2D::get_global_scale);
+
+ ClassDB::bind_method(_MD("set_transform","xform"),&Node2D::set_transform);
+ ClassDB::bind_method(_MD("set_global_transform","xform"),&Node2D::set_global_transform);
+
+ ClassDB::bind_method(_MD("look_at","point"),&Node2D::look_at);
+ ClassDB::bind_method(_MD("get_angle_to","point"),&Node2D::get_angle_to);
+
+ ClassDB::bind_method(_MD("set_z","z"),&Node2D::set_z);
+ ClassDB::bind_method(_MD("get_z"),&Node2D::get_z);
+
+ ClassDB::bind_method(_MD("set_z_as_relative","enable"),&Node2D::set_z_as_relative);
+ ClassDB::bind_method(_MD("is_z_relative"),&Node2D::is_z_relative);
+
+ ClassDB::bind_method(_MD("edit_set_pivot","pivot"),&Node2D::edit_set_pivot);
+
+ ClassDB::bind_method(_MD("get_relative_transform_to_parent","parent"),&Node2D::get_relative_transform_to_parent);
ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"transform/pos"),_SCS("set_pos"),_SCS("get_pos"));
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"transform/rot",PROPERTY_HINT_RANGE,"-1440,1440,0.1"),_SCS("set_rotd"),_SCS("get_rotd"));
diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h
index 6e1659542c..514b7b24a8 100644
--- a/scene/2d/node_2d.h
+++ b/scene/2d/node_2d.h
@@ -33,7 +33,7 @@
class Node2D : public CanvasItem {
- OBJ_TYPE(Node2D, CanvasItem );
+ GDCLASS(Node2D, CanvasItem );
Point2 pos;
float angle;
diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp
index 4c466c03d9..326e46dd2d 100644
--- a/scene/2d/parallax_background.cpp
+++ b/scene/2d/parallax_background.cpp
@@ -189,19 +189,19 @@ Vector2 ParallaxBackground::get_final_offset() const {
void ParallaxBackground::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_camera_moved"),&ParallaxBackground::_camera_moved);
- ObjectTypeDB::bind_method(_MD("set_scroll_offset","ofs"),&ParallaxBackground::set_scroll_offset);
- ObjectTypeDB::bind_method(_MD("get_scroll_offset"),&ParallaxBackground::get_scroll_offset);
- ObjectTypeDB::bind_method(_MD("set_scroll_base_offset","ofs"),&ParallaxBackground::set_scroll_base_offset);
- ObjectTypeDB::bind_method(_MD("get_scroll_base_offset"),&ParallaxBackground::get_scroll_base_offset);
- ObjectTypeDB::bind_method(_MD("set_scroll_base_scale","scale"),&ParallaxBackground::set_scroll_base_scale);
- ObjectTypeDB::bind_method(_MD("get_scroll_base_scale"),&ParallaxBackground::get_scroll_base_scale);
- ObjectTypeDB::bind_method(_MD("set_limit_begin","ofs"),&ParallaxBackground::set_limit_begin);
- ObjectTypeDB::bind_method(_MD("get_limit_begin"),&ParallaxBackground::get_limit_begin);
- ObjectTypeDB::bind_method(_MD("set_limit_end","ofs"),&ParallaxBackground::set_limit_end);
- ObjectTypeDB::bind_method(_MD("get_limit_end"),&ParallaxBackground::get_limit_end);
- ObjectTypeDB::bind_method(_MD("set_ignore_camera_zoom","ignore"), &ParallaxBackground::set_ignore_camera_zoom);
- ObjectTypeDB::bind_method(_MD("is_ignore_camera_zoom"), &ParallaxBackground::is_ignore_camera_zoom);
+ ClassDB::bind_method(_MD("_camera_moved"),&ParallaxBackground::_camera_moved);
+ ClassDB::bind_method(_MD("set_scroll_offset","ofs"),&ParallaxBackground::set_scroll_offset);
+ ClassDB::bind_method(_MD("get_scroll_offset"),&ParallaxBackground::get_scroll_offset);
+ ClassDB::bind_method(_MD("set_scroll_base_offset","ofs"),&ParallaxBackground::set_scroll_base_offset);
+ ClassDB::bind_method(_MD("get_scroll_base_offset"),&ParallaxBackground::get_scroll_base_offset);
+ ClassDB::bind_method(_MD("set_scroll_base_scale","scale"),&ParallaxBackground::set_scroll_base_scale);
+ ClassDB::bind_method(_MD("get_scroll_base_scale"),&ParallaxBackground::get_scroll_base_scale);
+ ClassDB::bind_method(_MD("set_limit_begin","ofs"),&ParallaxBackground::set_limit_begin);
+ ClassDB::bind_method(_MD("get_limit_begin"),&ParallaxBackground::get_limit_begin);
+ ClassDB::bind_method(_MD("set_limit_end","ofs"),&ParallaxBackground::set_limit_end);
+ ClassDB::bind_method(_MD("get_limit_end"),&ParallaxBackground::get_limit_end);
+ ClassDB::bind_method(_MD("set_ignore_camera_zoom","ignore"), &ParallaxBackground::set_ignore_camera_zoom);
+ ClassDB::bind_method(_MD("is_ignore_camera_zoom"), &ParallaxBackground::is_ignore_camera_zoom);
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"scroll/offset"),_SCS("set_scroll_offset"),_SCS("get_scroll_offset"));
diff --git a/scene/2d/parallax_background.h b/scene/2d/parallax_background.h
index b4ea545586..9eafc07fd6 100644
--- a/scene/2d/parallax_background.h
+++ b/scene/2d/parallax_background.h
@@ -35,7 +35,7 @@
class ParallaxBackground : public CanvasLayer {
- OBJ_TYPE( ParallaxBackground, CanvasLayer );
+ GDCLASS( ParallaxBackground, CanvasLayer );
Point2 offset;
float scale;
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp
index d9836bc085..4ba64c9f6c 100644
--- a/scene/2d/parallax_layer.cpp
+++ b/scene/2d/parallax_layer.cpp
@@ -150,12 +150,12 @@ String ParallaxLayer::get_configuration_warning() const {
void ParallaxLayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_motion_scale","scale"),&ParallaxLayer::set_motion_scale);
- ObjectTypeDB::bind_method(_MD("get_motion_scale"),&ParallaxLayer::get_motion_scale);
- ObjectTypeDB::bind_method(_MD("set_motion_offset","offset"),&ParallaxLayer::set_motion_offset);
- ObjectTypeDB::bind_method(_MD("get_motion_offset"),&ParallaxLayer::get_motion_offset);
- ObjectTypeDB::bind_method(_MD("set_mirroring","mirror"),&ParallaxLayer::set_mirroring);
- ObjectTypeDB::bind_method(_MD("get_mirroring"),&ParallaxLayer::get_mirroring);
+ ClassDB::bind_method(_MD("set_motion_scale","scale"),&ParallaxLayer::set_motion_scale);
+ ClassDB::bind_method(_MD("get_motion_scale"),&ParallaxLayer::get_motion_scale);
+ ClassDB::bind_method(_MD("set_motion_offset","offset"),&ParallaxLayer::set_motion_offset);
+ ClassDB::bind_method(_MD("get_motion_offset"),&ParallaxLayer::get_motion_offset);
+ ClassDB::bind_method(_MD("set_mirroring","mirror"),&ParallaxLayer::set_mirroring);
+ ClassDB::bind_method(_MD("get_mirroring"),&ParallaxLayer::get_mirroring);
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"motion/scale"),_SCS("set_motion_scale"),_SCS("get_motion_scale"));
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"motion/offset"),_SCS("set_motion_offset"),_SCS("get_motion_offset"));
diff --git a/scene/2d/parallax_layer.h b/scene/2d/parallax_layer.h
index 9561955024..1b3d67af5e 100644
--- a/scene/2d/parallax_layer.h
+++ b/scene/2d/parallax_layer.h
@@ -33,7 +33,7 @@
class ParallaxLayer : public Node2D {
- OBJ_TYPE( ParallaxLayer, Node2D );
+ GDCLASS( ParallaxLayer, Node2D );
Point2 orig_offset;
Point2 orig_scale;
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index 69ed991caf..ddaaecb43c 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -113,23 +113,23 @@ void ParticleAttractor2D::_set_owner(Particles2D* p_owner) {
void ParticleAttractor2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_enabled","enabled"),&ParticleAttractor2D::set_enabled);
- ObjectTypeDB::bind_method(_MD("is_enabled"),&ParticleAttractor2D::is_enabled);
+ ClassDB::bind_method(_MD("set_enabled","enabled"),&ParticleAttractor2D::set_enabled);
+ ClassDB::bind_method(_MD("is_enabled"),&ParticleAttractor2D::is_enabled);
- ObjectTypeDB::bind_method(_MD("set_radius","radius"),&ParticleAttractor2D::set_radius);
- ObjectTypeDB::bind_method(_MD("get_radius"),&ParticleAttractor2D::get_radius);
+ ClassDB::bind_method(_MD("set_radius","radius"),&ParticleAttractor2D::set_radius);
+ ClassDB::bind_method(_MD("get_radius"),&ParticleAttractor2D::get_radius);
- ObjectTypeDB::bind_method(_MD("set_disable_radius","radius"),&ParticleAttractor2D::set_disable_radius);
- ObjectTypeDB::bind_method(_MD("get_disable_radius"),&ParticleAttractor2D::get_disable_radius);
+ ClassDB::bind_method(_MD("set_disable_radius","radius"),&ParticleAttractor2D::set_disable_radius);
+ ClassDB::bind_method(_MD("get_disable_radius"),&ParticleAttractor2D::get_disable_radius);
- ObjectTypeDB::bind_method(_MD("set_gravity","gravity"),&ParticleAttractor2D::set_gravity);
- ObjectTypeDB::bind_method(_MD("get_gravity"),&ParticleAttractor2D::get_gravity);
+ ClassDB::bind_method(_MD("set_gravity","gravity"),&ParticleAttractor2D::set_gravity);
+ ClassDB::bind_method(_MD("get_gravity"),&ParticleAttractor2D::get_gravity);
- ObjectTypeDB::bind_method(_MD("set_absorption","absorption"),&ParticleAttractor2D::set_absorption);
- ObjectTypeDB::bind_method(_MD("get_absorption"),&ParticleAttractor2D::get_absorption);
+ ClassDB::bind_method(_MD("set_absorption","absorption"),&ParticleAttractor2D::set_absorption);
+ ClassDB::bind_method(_MD("get_absorption"),&ParticleAttractor2D::get_absorption);
- ObjectTypeDB::bind_method(_MD("set_particles_path","path"),&ParticleAttractor2D::set_particles_path);
- ObjectTypeDB::bind_method(_MD("get_particles_path"),&ParticleAttractor2D::get_particles_path);
+ ClassDB::bind_method(_MD("set_particles_path","path"),&ParticleAttractor2D::set_particles_path);
+ ClassDB::bind_method(_MD("get_particles_path"),&ParticleAttractor2D::get_particles_path);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled"));
ADD_PROPERTY(PropertyInfo(Variant::REAL,"radius",PROPERTY_HINT_RANGE,"0.1,16000,0.1"),_SCS("set_radius"),_SCS("get_radius"));
@@ -1013,80 +1013,80 @@ void Particles2D::reset() {
void Particles2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_emitting","active"),&Particles2D::set_emitting);
- ObjectTypeDB::bind_method(_MD("is_emitting"),&Particles2D::is_emitting);
+ ClassDB::bind_method(_MD("set_emitting","active"),&Particles2D::set_emitting);
+ ClassDB::bind_method(_MD("is_emitting"),&Particles2D::is_emitting);
- ObjectTypeDB::bind_method(_MD("set_amount","amount"),&Particles2D::set_amount);
- ObjectTypeDB::bind_method(_MD("get_amount"),&Particles2D::get_amount);
+ ClassDB::bind_method(_MD("set_amount","amount"),&Particles2D::set_amount);
+ ClassDB::bind_method(_MD("get_amount"),&Particles2D::get_amount);
- ObjectTypeDB::bind_method(_MD("set_lifetime","lifetime"),&Particles2D::set_lifetime);
- ObjectTypeDB::bind_method(_MD("get_lifetime"),&Particles2D::get_lifetime);
+ ClassDB::bind_method(_MD("set_lifetime","lifetime"),&Particles2D::set_lifetime);
+ ClassDB::bind_method(_MD("get_lifetime"),&Particles2D::get_lifetime);
- ObjectTypeDB::bind_method(_MD("set_time_scale","time_scale"),&Particles2D::set_time_scale);
- ObjectTypeDB::bind_method(_MD("get_time_scale"),&Particles2D::get_time_scale);
+ ClassDB::bind_method(_MD("set_time_scale","time_scale"),&Particles2D::set_time_scale);
+ ClassDB::bind_method(_MD("get_time_scale"),&Particles2D::get_time_scale);
- ObjectTypeDB::bind_method(_MD("set_pre_process_time","time"),&Particles2D::set_pre_process_time);
- ObjectTypeDB::bind_method(_MD("get_pre_process_time"),&Particles2D::get_pre_process_time);
+ ClassDB::bind_method(_MD("set_pre_process_time","time"),&Particles2D::set_pre_process_time);
+ ClassDB::bind_method(_MD("get_pre_process_time"),&Particles2D::get_pre_process_time);
- ObjectTypeDB::bind_method(_MD("set_emit_timeout","value"),&Particles2D::set_emit_timeout);
- ObjectTypeDB::bind_method(_MD("get_emit_timeout"),&Particles2D::get_emit_timeout);
+ ClassDB::bind_method(_MD("set_emit_timeout","value"),&Particles2D::set_emit_timeout);
+ ClassDB::bind_method(_MD("get_emit_timeout"),&Particles2D::get_emit_timeout);
- ObjectTypeDB::bind_method(_MD("set_param","param","value"),&Particles2D::set_param);
- ObjectTypeDB::bind_method(_MD("get_param","param"),&Particles2D::get_param);
+ ClassDB::bind_method(_MD("set_param","param","value"),&Particles2D::set_param);
+ ClassDB::bind_method(_MD("get_param","param"),&Particles2D::get_param);
- ObjectTypeDB::bind_method(_MD("set_randomness","param","value"),&Particles2D::set_randomness);
- ObjectTypeDB::bind_method(_MD("get_randomness","param"),&Particles2D::get_randomness);
+ ClassDB::bind_method(_MD("set_randomness","param","value"),&Particles2D::set_randomness);
+ ClassDB::bind_method(_MD("get_randomness","param"),&Particles2D::get_randomness);
- ObjectTypeDB::bind_method(_MD("set_texture:Texture","texture"),&Particles2D::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture:Texture"),&Particles2D::get_texture);
+ ClassDB::bind_method(_MD("set_texture:Texture","texture"),&Particles2D::set_texture);
+ ClassDB::bind_method(_MD("get_texture:Texture"),&Particles2D::get_texture);
- ObjectTypeDB::bind_method(_MD("set_color","color"),&Particles2D::set_color);
- ObjectTypeDB::bind_method(_MD("get_color"),&Particles2D::get_color);
+ ClassDB::bind_method(_MD("set_color","color"),&Particles2D::set_color);
+ ClassDB::bind_method(_MD("get_color"),&Particles2D::get_color);
- ObjectTypeDB::bind_method(_MD("set_color_ramp:ColorRamp","color_ramp"),&Particles2D::set_color_ramp);
- ObjectTypeDB::bind_method(_MD("get_color_ramp:ColorRamp"),&Particles2D::get_color_ramp);
+ ClassDB::bind_method(_MD("set_color_ramp:ColorRamp","color_ramp"),&Particles2D::set_color_ramp);
+ ClassDB::bind_method(_MD("get_color_ramp:ColorRamp"),&Particles2D::get_color_ramp);
- ObjectTypeDB::bind_method(_MD("set_emissor_offset","offset"),&Particles2D::set_emissor_offset);
- ObjectTypeDB::bind_method(_MD("get_emissor_offset"),&Particles2D::get_emissor_offset);
+ ClassDB::bind_method(_MD("set_emissor_offset","offset"),&Particles2D::set_emissor_offset);
+ ClassDB::bind_method(_MD("get_emissor_offset"),&Particles2D::get_emissor_offset);
- ObjectTypeDB::bind_method(_MD("set_flip_h","enable"),&Particles2D::set_flip_h);
- ObjectTypeDB::bind_method(_MD("is_flipped_h"),&Particles2D::is_flipped_h);
+ ClassDB::bind_method(_MD("set_flip_h","enable"),&Particles2D::set_flip_h);
+ ClassDB::bind_method(_MD("is_flipped_h"),&Particles2D::is_flipped_h);
- ObjectTypeDB::bind_method(_MD("set_flip_v","enable"),&Particles2D::set_flip_v);
- ObjectTypeDB::bind_method(_MD("is_flipped_v"),&Particles2D::is_flipped_v);
+ ClassDB::bind_method(_MD("set_flip_v","enable"),&Particles2D::set_flip_v);
+ ClassDB::bind_method(_MD("is_flipped_v"),&Particles2D::is_flipped_v);
- ObjectTypeDB::bind_method(_MD("set_h_frames","enable"),&Particles2D::set_h_frames);
- ObjectTypeDB::bind_method(_MD("get_h_frames"),&Particles2D::get_h_frames);
+ ClassDB::bind_method(_MD("set_h_frames","enable"),&Particles2D::set_h_frames);
+ ClassDB::bind_method(_MD("get_h_frames"),&Particles2D::get_h_frames);
- ObjectTypeDB::bind_method(_MD("set_v_frames","enable"),&Particles2D::set_v_frames);
- ObjectTypeDB::bind_method(_MD("get_v_frames"),&Particles2D::get_v_frames);
+ ClassDB::bind_method(_MD("set_v_frames","enable"),&Particles2D::set_v_frames);
+ ClassDB::bind_method(_MD("get_v_frames"),&Particles2D::get_v_frames);
- ObjectTypeDB::bind_method(_MD("set_emission_half_extents","extents"),&Particles2D::set_emission_half_extents);
- ObjectTypeDB::bind_method(_MD("get_emission_half_extents"),&Particles2D::get_emission_half_extents);
+ ClassDB::bind_method(_MD("set_emission_half_extents","extents"),&Particles2D::set_emission_half_extents);
+ ClassDB::bind_method(_MD("get_emission_half_extents"),&Particles2D::get_emission_half_extents);
- ObjectTypeDB::bind_method(_MD("set_color_phases","phases"),&Particles2D::set_color_phases);
- ObjectTypeDB::bind_method(_MD("get_color_phases"),&Particles2D::get_color_phases);
+ ClassDB::bind_method(_MD("set_color_phases","phases"),&Particles2D::set_color_phases);
+ ClassDB::bind_method(_MD("get_color_phases"),&Particles2D::get_color_phases);
- ObjectTypeDB::bind_method(_MD("set_color_phase_color","phase","color"),&Particles2D::set_color_phase_color);
- ObjectTypeDB::bind_method(_MD("get_color_phase_color","phase"),&Particles2D::get_color_phase_color);
+ ClassDB::bind_method(_MD("set_color_phase_color","phase","color"),&Particles2D::set_color_phase_color);
+ ClassDB::bind_method(_MD("get_color_phase_color","phase"),&Particles2D::get_color_phase_color);
- ObjectTypeDB::bind_method(_MD("set_color_phase_pos","phase","pos"),&Particles2D::set_color_phase_pos);
- ObjectTypeDB::bind_method(_MD("get_color_phase_pos","phase"),&Particles2D::get_color_phase_pos);
+ ClassDB::bind_method(_MD("set_color_phase_pos","phase","pos"),&Particles2D::set_color_phase_pos);
+ ClassDB::bind_method(_MD("get_color_phase_pos","phase"),&Particles2D::get_color_phase_pos);
- ObjectTypeDB::bind_method(_MD("pre_process","time"),&Particles2D::pre_process);
- ObjectTypeDB::bind_method(_MD("reset"),&Particles2D::reset);
+ ClassDB::bind_method(_MD("pre_process","time"),&Particles2D::pre_process);
+ ClassDB::bind_method(_MD("reset"),&Particles2D::reset);
- ObjectTypeDB::bind_method(_MD("set_use_local_space","enable"),&Particles2D::set_use_local_space);
- ObjectTypeDB::bind_method(_MD("is_using_local_space"),&Particles2D::is_using_local_space);
+ ClassDB::bind_method(_MD("set_use_local_space","enable"),&Particles2D::set_use_local_space);
+ ClassDB::bind_method(_MD("is_using_local_space"),&Particles2D::is_using_local_space);
- ObjectTypeDB::bind_method(_MD("set_initial_velocity","velocity"),&Particles2D::set_initial_velocity);
- ObjectTypeDB::bind_method(_MD("get_initial_velocity"),&Particles2D::get_initial_velocity);
+ ClassDB::bind_method(_MD("set_initial_velocity","velocity"),&Particles2D::set_initial_velocity);
+ ClassDB::bind_method(_MD("get_initial_velocity"),&Particles2D::get_initial_velocity);
- ObjectTypeDB::bind_method(_MD("set_explosiveness","amount"),&Particles2D::set_explosiveness);
- ObjectTypeDB::bind_method(_MD("get_explosiveness"),&Particles2D::get_explosiveness);
+ ClassDB::bind_method(_MD("set_explosiveness","amount"),&Particles2D::set_explosiveness);
+ ClassDB::bind_method(_MD("get_explosiveness"),&Particles2D::get_explosiveness);
- ObjectTypeDB::bind_method(_MD("set_emission_points","points"),&Particles2D::set_emission_points);
- ObjectTypeDB::bind_method(_MD("get_emission_points"),&Particles2D::get_emission_points);
+ ClassDB::bind_method(_MD("set_emission_points","points"),&Particles2D::set_emission_points);
+ ClassDB::bind_method(_MD("get_emission_points"),&Particles2D::get_emission_points);
ADD_PROPERTY(PropertyInfo(Variant::INT,"config/amount",PROPERTY_HINT_EXP_RANGE,"1,1024"),_SCS("set_amount"),_SCS("get_amount") );
ADD_PROPERTY(PropertyInfo(Variant::REAL,"config/lifetime",PROPERTY_HINT_EXP_RANGE,"0.1,3600,0.1"),_SCS("set_lifetime"),_SCS("get_lifetime") );
diff --git a/scene/2d/particles_2d.h b/scene/2d/particles_2d.h
index 52e92cd5fe..9b740dad7d 100644
--- a/scene/2d/particles_2d.h
+++ b/scene/2d/particles_2d.h
@@ -36,7 +36,7 @@
class Particles2D;
class ParticleAttractor2D : public Node2D {
- OBJ_TYPE(ParticleAttractor2D,Node2D);
+ GDCLASS(ParticleAttractor2D,Node2D);
friend class Particles2D;
@@ -84,7 +84,7 @@ public:
class Particles2D : public Node2D {
- OBJ_TYPE(Particles2D, Node2D);
+ GDCLASS(Particles2D, Node2D);
public:
enum Parameter {
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index f426b7fd0e..112bd2f02b 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -85,9 +85,9 @@ Ref<Curve2D> Path2D::get_curve() const{
void Path2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_curve","curve:Curve2D"),&Path2D::set_curve);
- ObjectTypeDB::bind_method(_MD("get_curve:Curve2D","curve"),&Path2D::get_curve);
- ObjectTypeDB::bind_method(_MD("_curve_changed"),&Path2D::_curve_changed);
+ ClassDB::bind_method(_MD("set_curve","curve:Curve2D"),&Path2D::set_curve);
+ ClassDB::bind_method(_MD("get_curve:Curve2D","curve"),&Path2D::get_curve);
+ ClassDB::bind_method(_MD("_curve_changed"),&Path2D::_curve_changed);
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve2D"), _SCS("set_curve"),_SCS("get_curve"));
}
@@ -252,26 +252,26 @@ String PathFollow2D::get_configuration_warning() const {
void PathFollow2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&PathFollow2D::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&PathFollow2D::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&PathFollow2D::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&PathFollow2D::get_offset);
- ObjectTypeDB::bind_method(_MD("set_h_offset","h_offset"),&PathFollow2D::set_h_offset);
- ObjectTypeDB::bind_method(_MD("get_h_offset"),&PathFollow2D::get_h_offset);
+ ClassDB::bind_method(_MD("set_h_offset","h_offset"),&PathFollow2D::set_h_offset);
+ ClassDB::bind_method(_MD("get_h_offset"),&PathFollow2D::get_h_offset);
- ObjectTypeDB::bind_method(_MD("set_v_offset","v_offset"),&PathFollow2D::set_v_offset);
- ObjectTypeDB::bind_method(_MD("get_v_offset"),&PathFollow2D::get_v_offset);
+ ClassDB::bind_method(_MD("set_v_offset","v_offset"),&PathFollow2D::set_v_offset);
+ ClassDB::bind_method(_MD("get_v_offset"),&PathFollow2D::get_v_offset);
- ObjectTypeDB::bind_method(_MD("set_unit_offset","unit_offset"),&PathFollow2D::set_unit_offset);
- ObjectTypeDB::bind_method(_MD("get_unit_offset"),&PathFollow2D::get_unit_offset);
+ ClassDB::bind_method(_MD("set_unit_offset","unit_offset"),&PathFollow2D::set_unit_offset);
+ ClassDB::bind_method(_MD("get_unit_offset"),&PathFollow2D::get_unit_offset);
- ObjectTypeDB::bind_method(_MD("set_rotate","enable"),&PathFollow2D::set_rotate);
- ObjectTypeDB::bind_method(_MD("is_rotating"),&PathFollow2D::is_rotating);
+ ClassDB::bind_method(_MD("set_rotate","enable"),&PathFollow2D::set_rotate);
+ ClassDB::bind_method(_MD("is_rotating"),&PathFollow2D::is_rotating);
- ObjectTypeDB::bind_method(_MD("set_cubic_interpolation","enable"),&PathFollow2D::set_cubic_interpolation);
- ObjectTypeDB::bind_method(_MD("get_cubic_interpolation"),&PathFollow2D::get_cubic_interpolation);
+ ClassDB::bind_method(_MD("set_cubic_interpolation","enable"),&PathFollow2D::set_cubic_interpolation);
+ ClassDB::bind_method(_MD("get_cubic_interpolation"),&PathFollow2D::get_cubic_interpolation);
- ObjectTypeDB::bind_method(_MD("set_loop","loop"),&PathFollow2D::set_loop);
- ObjectTypeDB::bind_method(_MD("has_loop"),&PathFollow2D::has_loop);
+ ClassDB::bind_method(_MD("set_loop","loop"),&PathFollow2D::set_loop);
+ ClassDB::bind_method(_MD("has_loop"),&PathFollow2D::has_loop);
}
diff --git a/scene/2d/path_2d.h b/scene/2d/path_2d.h
index 875a7be0df..4fc26dbf9b 100644
--- a/scene/2d/path_2d.h
+++ b/scene/2d/path_2d.h
@@ -34,7 +34,7 @@
class Path2D : public Node2D {
- OBJ_TYPE( Path2D, Node2D );
+ GDCLASS( Path2D, Node2D );
Ref<Curve2D> curve;
@@ -58,7 +58,7 @@ public:
class PathFollow2D : public Node2D {
- OBJ_TYPE(PathFollow2D,Node2D);
+ GDCLASS(PathFollow2D,Node2D);
public:
diff --git a/scene/2d/path_texture.h b/scene/2d/path_texture.h
index 2f2e404090..cc502a2fa4 100644
--- a/scene/2d/path_texture.h
+++ b/scene/2d/path_texture.h
@@ -32,7 +32,7 @@
#include "scene/2d/node_2d.h"
class PathTexture : public Node2D {
- OBJ_TYPE( PathTexture, Node2D );
+ GDCLASS( PathTexture, Node2D );
Ref<Texture> begin;
Ref<Texture> repeat;
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 98087e09f9..a20834e7e3 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -81,26 +81,26 @@ uint32_t PhysicsBody2D::_get_layers() const{
void PhysicsBody2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&PhysicsBody2D::set_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_layer_mask"),&PhysicsBody2D::get_layer_mask);
- ObjectTypeDB::bind_method(_MD("set_collision_mask","mask"),&PhysicsBody2D::set_collision_mask);
- ObjectTypeDB::bind_method(_MD("get_collision_mask"),&PhysicsBody2D::get_collision_mask);
-
-
- ObjectTypeDB::bind_method(_MD("set_collision_mask_bit","bit","value"),&PhysicsBody2D::set_collision_mask_bit);
- ObjectTypeDB::bind_method(_MD("get_collision_mask_bit","bit"),&PhysicsBody2D::get_collision_mask_bit);
-
- ObjectTypeDB::bind_method(_MD("set_layer_mask_bit","bit","value"),&PhysicsBody2D::set_layer_mask_bit);
- ObjectTypeDB::bind_method(_MD("get_layer_mask_bit","bit"),&PhysicsBody2D::get_layer_mask_bit);
-
- ObjectTypeDB::bind_method(_MD("_set_layers","mask"),&PhysicsBody2D::_set_layers);
- ObjectTypeDB::bind_method(_MD("_get_layers"),&PhysicsBody2D::_get_layers);
- ObjectTypeDB::bind_method(_MD("set_one_way_collision_direction","dir"),&PhysicsBody2D::set_one_way_collision_direction);
- ObjectTypeDB::bind_method(_MD("get_one_way_collision_direction"),&PhysicsBody2D::get_one_way_collision_direction);
- ObjectTypeDB::bind_method(_MD("set_one_way_collision_max_depth","depth"),&PhysicsBody2D::set_one_way_collision_max_depth);
- ObjectTypeDB::bind_method(_MD("get_one_way_collision_max_depth"),&PhysicsBody2D::get_one_way_collision_max_depth);
- ObjectTypeDB::bind_method(_MD("add_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::add_collision_exception_with);
- ObjectTypeDB::bind_method(_MD("remove_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::remove_collision_exception_with);
+ ClassDB::bind_method(_MD("set_layer_mask","mask"),&PhysicsBody2D::set_layer_mask);
+ ClassDB::bind_method(_MD("get_layer_mask"),&PhysicsBody2D::get_layer_mask);
+ ClassDB::bind_method(_MD("set_collision_mask","mask"),&PhysicsBody2D::set_collision_mask);
+ ClassDB::bind_method(_MD("get_collision_mask"),&PhysicsBody2D::get_collision_mask);
+
+
+ ClassDB::bind_method(_MD("set_collision_mask_bit","bit","value"),&PhysicsBody2D::set_collision_mask_bit);
+ ClassDB::bind_method(_MD("get_collision_mask_bit","bit"),&PhysicsBody2D::get_collision_mask_bit);
+
+ ClassDB::bind_method(_MD("set_layer_mask_bit","bit","value"),&PhysicsBody2D::set_layer_mask_bit);
+ ClassDB::bind_method(_MD("get_layer_mask_bit","bit"),&PhysicsBody2D::get_layer_mask_bit);
+
+ ClassDB::bind_method(_MD("_set_layers","mask"),&PhysicsBody2D::_set_layers);
+ ClassDB::bind_method(_MD("_get_layers"),&PhysicsBody2D::_get_layers);
+ ClassDB::bind_method(_MD("set_one_way_collision_direction","dir"),&PhysicsBody2D::set_one_way_collision_direction);
+ ClassDB::bind_method(_MD("get_one_way_collision_direction"),&PhysicsBody2D::get_one_way_collision_direction);
+ ClassDB::bind_method(_MD("set_one_way_collision_max_depth","depth"),&PhysicsBody2D::set_one_way_collision_max_depth);
+ ClassDB::bind_method(_MD("get_one_way_collision_max_depth"),&PhysicsBody2D::get_one_way_collision_max_depth);
+ ClassDB::bind_method(_MD("add_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::add_collision_exception_with);
+ ClassDB::bind_method(_MD("remove_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::remove_collision_exception_with);
ADD_PROPERTY(PropertyInfo(Variant::INT,"layers",PROPERTY_HINT_ALL_FLAGS,"",0),_SCS("_set_layers"),_SCS("_get_layers")); //for backwards compat
ADD_PROPERTY(PropertyInfo(Variant::INT,"collision/layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_layer_mask"),_SCS("get_layer_mask"));
ADD_PROPERTY(PropertyInfo(Variant::INT,"collision/mask",PROPERTY_HINT_ALL_FLAGS),_SCS("set_collision_mask"),_SCS("get_collision_mask"));
@@ -268,15 +268,15 @@ real_t StaticBody2D::get_bounce() const{
void StaticBody2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_constant_linear_velocity","vel"),&StaticBody2D::set_constant_linear_velocity);
- ObjectTypeDB::bind_method(_MD("set_constant_angular_velocity","vel"),&StaticBody2D::set_constant_angular_velocity);
- ObjectTypeDB::bind_method(_MD("get_constant_linear_velocity"),&StaticBody2D::get_constant_linear_velocity);
- ObjectTypeDB::bind_method(_MD("get_constant_angular_velocity"),&StaticBody2D::get_constant_angular_velocity);
- ObjectTypeDB::bind_method(_MD("set_friction","friction"),&StaticBody2D::set_friction);
- ObjectTypeDB::bind_method(_MD("get_friction"),&StaticBody2D::get_friction);
+ ClassDB::bind_method(_MD("set_constant_linear_velocity","vel"),&StaticBody2D::set_constant_linear_velocity);
+ ClassDB::bind_method(_MD("set_constant_angular_velocity","vel"),&StaticBody2D::set_constant_angular_velocity);
+ ClassDB::bind_method(_MD("get_constant_linear_velocity"),&StaticBody2D::get_constant_linear_velocity);
+ ClassDB::bind_method(_MD("get_constant_angular_velocity"),&StaticBody2D::get_constant_angular_velocity);
+ ClassDB::bind_method(_MD("set_friction","friction"),&StaticBody2D::set_friction);
+ ClassDB::bind_method(_MD("get_friction"),&StaticBody2D::get_friction);
- ObjectTypeDB::bind_method(_MD("set_bounce","bounce"),&StaticBody2D::set_bounce);
- ObjectTypeDB::bind_method(_MD("get_bounce"),&StaticBody2D::get_bounce);
+ ClassDB::bind_method(_MD("set_bounce","bounce"),&StaticBody2D::set_bounce);
+ ClassDB::bind_method(_MD("get_bounce"),&StaticBody2D::get_bounce);
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"constant_linear_velocity"),_SCS("set_constant_linear_velocity"),_SCS("get_constant_linear_velocity"));
ADD_PROPERTY(PropertyInfo(Variant::REAL,"constant_angular_velocity"),_SCS("set_constant_angular_velocity"),_SCS("get_constant_angular_velocity"));
@@ -879,75 +879,75 @@ bool RigidBody2D::is_contact_monitor_enabled() const {
void RigidBody2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_mode","mode"),&RigidBody2D::set_mode);
- ObjectTypeDB::bind_method(_MD("get_mode"),&RigidBody2D::get_mode);
+ ClassDB::bind_method(_MD("set_mode","mode"),&RigidBody2D::set_mode);
+ ClassDB::bind_method(_MD("get_mode"),&RigidBody2D::get_mode);
- ObjectTypeDB::bind_method(_MD("set_mass","mass"),&RigidBody2D::set_mass);
- ObjectTypeDB::bind_method(_MD("get_mass"),&RigidBody2D::get_mass);
+ ClassDB::bind_method(_MD("set_mass","mass"),&RigidBody2D::set_mass);
+ ClassDB::bind_method(_MD("get_mass"),&RigidBody2D::get_mass);
- ObjectTypeDB::bind_method(_MD("get_inertia"),&RigidBody2D::get_inertia);
- ObjectTypeDB::bind_method(_MD("set_inertia","inertia"),&RigidBody2D::set_inertia);
+ ClassDB::bind_method(_MD("get_inertia"),&RigidBody2D::get_inertia);
+ ClassDB::bind_method(_MD("set_inertia","inertia"),&RigidBody2D::set_inertia);
- ObjectTypeDB::bind_method(_MD("set_weight","weight"),&RigidBody2D::set_weight);
- ObjectTypeDB::bind_method(_MD("get_weight"),&RigidBody2D::get_weight);
+ ClassDB::bind_method(_MD("set_weight","weight"),&RigidBody2D::set_weight);
+ ClassDB::bind_method(_MD("get_weight"),&RigidBody2D::get_weight);
- ObjectTypeDB::bind_method(_MD("set_friction","friction"),&RigidBody2D::set_friction);
- ObjectTypeDB::bind_method(_MD("get_friction"),&RigidBody2D::get_friction);
+ ClassDB::bind_method(_MD("set_friction","friction"),&RigidBody2D::set_friction);
+ ClassDB::bind_method(_MD("get_friction"),&RigidBody2D::get_friction);
- ObjectTypeDB::bind_method(_MD("set_bounce","bounce"),&RigidBody2D::set_bounce);
- ObjectTypeDB::bind_method(_MD("get_bounce"),&RigidBody2D::get_bounce);
+ ClassDB::bind_method(_MD("set_bounce","bounce"),&RigidBody2D::set_bounce);
+ ClassDB::bind_method(_MD("get_bounce"),&RigidBody2D::get_bounce);
- ObjectTypeDB::bind_method(_MD("set_gravity_scale","gravity_scale"),&RigidBody2D::set_gravity_scale);
- ObjectTypeDB::bind_method(_MD("get_gravity_scale"),&RigidBody2D::get_gravity_scale);
+ ClassDB::bind_method(_MD("set_gravity_scale","gravity_scale"),&RigidBody2D::set_gravity_scale);
+ ClassDB::bind_method(_MD("get_gravity_scale"),&RigidBody2D::get_gravity_scale);
- ObjectTypeDB::bind_method(_MD("set_linear_damp","linear_damp"),&RigidBody2D::set_linear_damp);
- ObjectTypeDB::bind_method(_MD("get_linear_damp"),&RigidBody2D::get_linear_damp);
+ ClassDB::bind_method(_MD("set_linear_damp","linear_damp"),&RigidBody2D::set_linear_damp);
+ ClassDB::bind_method(_MD("get_linear_damp"),&RigidBody2D::get_linear_damp);
- ObjectTypeDB::bind_method(_MD("set_angular_damp","angular_damp"),&RigidBody2D::set_angular_damp);
- ObjectTypeDB::bind_method(_MD("get_angular_damp"),&RigidBody2D::get_angular_damp);
+ ClassDB::bind_method(_MD("set_angular_damp","angular_damp"),&RigidBody2D::set_angular_damp);
+ ClassDB::bind_method(_MD("get_angular_damp"),&RigidBody2D::get_angular_damp);
- ObjectTypeDB::bind_method(_MD("set_linear_velocity","linear_velocity"),&RigidBody2D::set_linear_velocity);
- ObjectTypeDB::bind_method(_MD("get_linear_velocity"),&RigidBody2D::get_linear_velocity);
+ ClassDB::bind_method(_MD("set_linear_velocity","linear_velocity"),&RigidBody2D::set_linear_velocity);
+ ClassDB::bind_method(_MD("get_linear_velocity"),&RigidBody2D::get_linear_velocity);
- ObjectTypeDB::bind_method(_MD("set_angular_velocity","angular_velocity"),&RigidBody2D::set_angular_velocity);
- ObjectTypeDB::bind_method(_MD("get_angular_velocity"),&RigidBody2D::get_angular_velocity);
+ ClassDB::bind_method(_MD("set_angular_velocity","angular_velocity"),&RigidBody2D::set_angular_velocity);
+ ClassDB::bind_method(_MD("get_angular_velocity"),&RigidBody2D::get_angular_velocity);
- ObjectTypeDB::bind_method(_MD("set_max_contacts_reported","amount"),&RigidBody2D::set_max_contacts_reported);
- ObjectTypeDB::bind_method(_MD("get_max_contacts_reported"),&RigidBody2D::get_max_contacts_reported);
+ ClassDB::bind_method(_MD("set_max_contacts_reported","amount"),&RigidBody2D::set_max_contacts_reported);
+ ClassDB::bind_method(_MD("get_max_contacts_reported"),&RigidBody2D::get_max_contacts_reported);
- ObjectTypeDB::bind_method(_MD("set_use_custom_integrator","enable"),&RigidBody2D::set_use_custom_integrator);
- ObjectTypeDB::bind_method(_MD("is_using_custom_integrator"),&RigidBody2D::is_using_custom_integrator);
+ ClassDB::bind_method(_MD("set_use_custom_integrator","enable"),&RigidBody2D::set_use_custom_integrator);
+ ClassDB::bind_method(_MD("is_using_custom_integrator"),&RigidBody2D::is_using_custom_integrator);
- ObjectTypeDB::bind_method(_MD("set_contact_monitor","enabled"),&RigidBody2D::set_contact_monitor);
- ObjectTypeDB::bind_method(_MD("is_contact_monitor_enabled"),&RigidBody2D::is_contact_monitor_enabled);
+ ClassDB::bind_method(_MD("set_contact_monitor","enabled"),&RigidBody2D::set_contact_monitor);
+ ClassDB::bind_method(_MD("is_contact_monitor_enabled"),&RigidBody2D::is_contact_monitor_enabled);
- ObjectTypeDB::bind_method(_MD("set_continuous_collision_detection_mode","mode"),&RigidBody2D::set_continuous_collision_detection_mode);
- ObjectTypeDB::bind_method(_MD("get_continuous_collision_detection_mode"),&RigidBody2D::get_continuous_collision_detection_mode);
+ ClassDB::bind_method(_MD("set_continuous_collision_detection_mode","mode"),&RigidBody2D::set_continuous_collision_detection_mode);
+ ClassDB::bind_method(_MD("get_continuous_collision_detection_mode"),&RigidBody2D::get_continuous_collision_detection_mode);
- ObjectTypeDB::bind_method(_MD("set_axis_velocity","axis_velocity"),&RigidBody2D::set_axis_velocity);
- ObjectTypeDB::bind_method(_MD("apply_impulse","offset","impulse"),&RigidBody2D::apply_impulse);
+ ClassDB::bind_method(_MD("set_axis_velocity","axis_velocity"),&RigidBody2D::set_axis_velocity);
+ ClassDB::bind_method(_MD("apply_impulse","offset","impulse"),&RigidBody2D::apply_impulse);
- ObjectTypeDB::bind_method(_MD("set_applied_force","force"),&RigidBody2D::set_applied_force);
- ObjectTypeDB::bind_method(_MD("get_applied_force"),&RigidBody2D::get_applied_force);
+ ClassDB::bind_method(_MD("set_applied_force","force"),&RigidBody2D::set_applied_force);
+ ClassDB::bind_method(_MD("get_applied_force"),&RigidBody2D::get_applied_force);
- ObjectTypeDB::bind_method(_MD("set_applied_torque","torque"),&RigidBody2D::set_applied_torque);
- ObjectTypeDB::bind_method(_MD("get_applied_torque"),&RigidBody2D::get_applied_torque);
+ ClassDB::bind_method(_MD("set_applied_torque","torque"),&RigidBody2D::set_applied_torque);
+ ClassDB::bind_method(_MD("get_applied_torque"),&RigidBody2D::get_applied_torque);
- ObjectTypeDB::bind_method(_MD("add_force","offset","force"),&RigidBody2D::add_force);
+ ClassDB::bind_method(_MD("add_force","offset","force"),&RigidBody2D::add_force);
- ObjectTypeDB::bind_method(_MD("set_sleeping","sleeping"),&RigidBody2D::set_sleeping);
- ObjectTypeDB::bind_method(_MD("is_sleeping"),&RigidBody2D::is_sleeping);
+ ClassDB::bind_method(_MD("set_sleeping","sleeping"),&RigidBody2D::set_sleeping);
+ ClassDB::bind_method(_MD("is_sleeping"),&RigidBody2D::is_sleeping);
- ObjectTypeDB::bind_method(_MD("set_can_sleep","able_to_sleep"),&RigidBody2D::set_can_sleep);
- ObjectTypeDB::bind_method(_MD("is_able_to_sleep"),&RigidBody2D::is_able_to_sleep);
+ ClassDB::bind_method(_MD("set_can_sleep","able_to_sleep"),&RigidBody2D::set_can_sleep);
+ ClassDB::bind_method(_MD("is_able_to_sleep"),&RigidBody2D::is_able_to_sleep);
- ObjectTypeDB::bind_method(_MD("test_motion","motion","margin","result:Physics2DTestMotionResult"),&RigidBody2D::_test_motion,DEFVAL(0.08),DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("test_motion","motion","margin","result:Physics2DTestMotionResult"),&RigidBody2D::_test_motion,DEFVAL(0.08),DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("_direct_state_changed"),&RigidBody2D::_direct_state_changed);
- ObjectTypeDB::bind_method(_MD("_body_enter_tree"),&RigidBody2D::_body_enter_tree);
- ObjectTypeDB::bind_method(_MD("_body_exit_tree"),&RigidBody2D::_body_exit_tree);
+ ClassDB::bind_method(_MD("_direct_state_changed"),&RigidBody2D::_direct_state_changed);
+ ClassDB::bind_method(_MD("_body_enter_tree"),&RigidBody2D::_body_enter_tree);
+ ClassDB::bind_method(_MD("_body_exit_tree"),&RigidBody2D::_body_exit_tree);
- ObjectTypeDB::bind_method(_MD("get_colliding_bodies"),&RigidBody2D::get_colliding_bodies);
+ ClassDB::bind_method(_MD("get_colliding_bodies"),&RigidBody2D::get_colliding_bodies);
BIND_VMETHOD(MethodInfo("_integrate_forces",PropertyInfo(Variant::OBJECT,"state:Physics2DDirectBodyState")));
@@ -1381,29 +1381,29 @@ float KinematicBody2D::get_collision_margin() const{
void KinematicBody2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("move","rel_vec"),&KinematicBody2D::move);
- ObjectTypeDB::bind_method(_MD("move_to","position"),&KinematicBody2D::move_to);
- ObjectTypeDB::bind_method(_MD("move_and_slide","linear_velocity","floor_normal","slope_stop_min_velocity","max_bounces"),&KinematicBody2D::move_and_slide,DEFVAL(Vector2(0,0)),DEFVAL(5),DEFVAL(4));
+ ClassDB::bind_method(_MD("move","rel_vec"),&KinematicBody2D::move);
+ ClassDB::bind_method(_MD("move_to","position"),&KinematicBody2D::move_to);
+ ClassDB::bind_method(_MD("move_and_slide","linear_velocity","floor_normal","slope_stop_min_velocity","max_bounces"),&KinematicBody2D::move_and_slide,DEFVAL(Vector2(0,0)),DEFVAL(5),DEFVAL(4));
- ObjectTypeDB::bind_method(_MD("test_move","from","rel_vec"),&KinematicBody2D::test_move);
- ObjectTypeDB::bind_method(_MD("get_travel"),&KinematicBody2D::get_travel);
- ObjectTypeDB::bind_method(_MD("revert_motion"),&KinematicBody2D::revert_motion);
+ ClassDB::bind_method(_MD("test_move","from","rel_vec"),&KinematicBody2D::test_move);
+ ClassDB::bind_method(_MD("get_travel"),&KinematicBody2D::get_travel);
+ ClassDB::bind_method(_MD("revert_motion"),&KinematicBody2D::revert_motion);
- ObjectTypeDB::bind_method(_MD("is_colliding"),&KinematicBody2D::is_colliding);
+ ClassDB::bind_method(_MD("is_colliding"),&KinematicBody2D::is_colliding);
- ObjectTypeDB::bind_method(_MD("get_collision_pos"),&KinematicBody2D::get_collision_pos);
- ObjectTypeDB::bind_method(_MD("get_collision_normal"),&KinematicBody2D::get_collision_normal);
- ObjectTypeDB::bind_method(_MD("get_collider_velocity"),&KinematicBody2D::get_collider_velocity);
- ObjectTypeDB::bind_method(_MD("get_collider:Variant"),&KinematicBody2D::_get_collider);
- ObjectTypeDB::bind_method(_MD("get_collider_shape"),&KinematicBody2D::get_collider_shape);
- ObjectTypeDB::bind_method(_MD("get_collider_metadata:Variant"),&KinematicBody2D::get_collider_metadata);
- ObjectTypeDB::bind_method(_MD("get_move_and_slide_colliders"),&KinematicBody2D::get_move_and_slide_colliders);
- ObjectTypeDB::bind_method(_MD("is_move_and_slide_on_floor"),&KinematicBody2D::is_move_and_slide_on_floor);
- ObjectTypeDB::bind_method(_MD("is_move_and_slide_on_ceiling"),&KinematicBody2D::is_move_and_slide_on_ceiling);
- ObjectTypeDB::bind_method(_MD("is_move_and_slide_on_wall"),&KinematicBody2D::is_move_and_slide_on_wall);
+ ClassDB::bind_method(_MD("get_collision_pos"),&KinematicBody2D::get_collision_pos);
+ ClassDB::bind_method(_MD("get_collision_normal"),&KinematicBody2D::get_collision_normal);
+ ClassDB::bind_method(_MD("get_collider_velocity"),&KinematicBody2D::get_collider_velocity);
+ ClassDB::bind_method(_MD("get_collider:Variant"),&KinematicBody2D::_get_collider);
+ ClassDB::bind_method(_MD("get_collider_shape"),&KinematicBody2D::get_collider_shape);
+ ClassDB::bind_method(_MD("get_collider_metadata:Variant"),&KinematicBody2D::get_collider_metadata);
+ ClassDB::bind_method(_MD("get_move_and_slide_colliders"),&KinematicBody2D::get_move_and_slide_colliders);
+ ClassDB::bind_method(_MD("is_move_and_slide_on_floor"),&KinematicBody2D::is_move_and_slide_on_floor);
+ ClassDB::bind_method(_MD("is_move_and_slide_on_ceiling"),&KinematicBody2D::is_move_and_slide_on_ceiling);
+ ClassDB::bind_method(_MD("is_move_and_slide_on_wall"),&KinematicBody2D::is_move_and_slide_on_wall);
- ObjectTypeDB::bind_method(_MD("set_collision_margin","pixels"),&KinematicBody2D::set_collision_margin);
- ObjectTypeDB::bind_method(_MD("get_collision_margin","pixels"),&KinematicBody2D::get_collision_margin);
+ ClassDB::bind_method(_MD("set_collision_margin","pixels"),&KinematicBody2D::set_collision_margin);
+ ClassDB::bind_method(_MD("get_collision_margin","pixels"),&KinematicBody2D::get_collision_margin);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"collision/margin",PROPERTY_HINT_RANGE,"0.001,256,0.001"),_SCS("set_collision_margin"),_SCS("get_collision_margin"));
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index 82b22066a0..240def543d 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -36,7 +36,7 @@
class PhysicsBody2D : public CollisionObject2D {
- OBJ_TYPE(PhysicsBody2D,CollisionObject2D);
+ GDCLASS(PhysicsBody2D,CollisionObject2D);
uint32_t mask;
uint32_t collision_mask;
@@ -83,7 +83,7 @@ public:
class StaticBody2D : public PhysicsBody2D {
- OBJ_TYPE(StaticBody2D,PhysicsBody2D);
+ GDCLASS(StaticBody2D,PhysicsBody2D);
Vector2 constant_linear_velocity;
real_t constant_angular_velocity;
@@ -118,7 +118,7 @@ public:
class RigidBody2D : public PhysicsBody2D {
- OBJ_TYPE(RigidBody2D,PhysicsBody2D);
+ GDCLASS(RigidBody2D,PhysicsBody2D);
public:
enum Mode {
@@ -290,7 +290,7 @@ VARIANT_ENUM_CAST(RigidBody2D::CCDMode);
class KinematicBody2D : public PhysicsBody2D {
- OBJ_TYPE(KinematicBody2D,PhysicsBody2D);
+ GDCLASS(KinematicBody2D,PhysicsBody2D);
float margin;
bool colliding;
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index db71a2701a..c7ba58b9e8 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -333,42 +333,42 @@ Vector2 Polygon2D::get_offset() const {
void Polygon2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_polygon","polygon"),&Polygon2D::set_polygon);
- ObjectTypeDB::bind_method(_MD("get_polygon"),&Polygon2D::get_polygon);
+ ClassDB::bind_method(_MD("set_polygon","polygon"),&Polygon2D::set_polygon);
+ ClassDB::bind_method(_MD("get_polygon"),&Polygon2D::get_polygon);
- ObjectTypeDB::bind_method(_MD("set_uv","uv"),&Polygon2D::set_uv);
- ObjectTypeDB::bind_method(_MD("get_uv"),&Polygon2D::get_uv);
+ ClassDB::bind_method(_MD("set_uv","uv"),&Polygon2D::set_uv);
+ ClassDB::bind_method(_MD("get_uv"),&Polygon2D::get_uv);
- ObjectTypeDB::bind_method(_MD("set_color","color"),&Polygon2D::set_color);
- ObjectTypeDB::bind_method(_MD("get_color"),&Polygon2D::get_color);
+ ClassDB::bind_method(_MD("set_color","color"),&Polygon2D::set_color);
+ ClassDB::bind_method(_MD("get_color"),&Polygon2D::get_color);
- ObjectTypeDB::bind_method(_MD("set_vertex_colors","vertex_colors"),&Polygon2D::set_vertex_colors);
- ObjectTypeDB::bind_method(_MD("get_vertex_colors"),&Polygon2D::get_vertex_colors);
+ ClassDB::bind_method(_MD("set_vertex_colors","vertex_colors"),&Polygon2D::set_vertex_colors);
+ ClassDB::bind_method(_MD("get_vertex_colors"),&Polygon2D::get_vertex_colors);
- ObjectTypeDB::bind_method(_MD("set_texture","texture"),&Polygon2D::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture"),&Polygon2D::get_texture);
+ ClassDB::bind_method(_MD("set_texture","texture"),&Polygon2D::set_texture);
+ ClassDB::bind_method(_MD("get_texture"),&Polygon2D::get_texture);
- ObjectTypeDB::bind_method(_MD("set_texture_offset","texture_offset"),&Polygon2D::set_texture_offset);
- ObjectTypeDB::bind_method(_MD("get_texture_offset"),&Polygon2D::get_texture_offset);
+ ClassDB::bind_method(_MD("set_texture_offset","texture_offset"),&Polygon2D::set_texture_offset);
+ ClassDB::bind_method(_MD("get_texture_offset"),&Polygon2D::get_texture_offset);
- ObjectTypeDB::bind_method(_MD("set_texture_rotation","texture_rotation"),&Polygon2D::set_texture_rotation);
- ObjectTypeDB::bind_method(_MD("get_texture_rotation"),&Polygon2D::get_texture_rotation);
+ ClassDB::bind_method(_MD("set_texture_rotation","texture_rotation"),&Polygon2D::set_texture_rotation);
+ ClassDB::bind_method(_MD("get_texture_rotation"),&Polygon2D::get_texture_rotation);
- ObjectTypeDB::bind_method(_MD("_set_texture_rotationd","texture_rotation"),&Polygon2D::_set_texture_rotationd);
- ObjectTypeDB::bind_method(_MD("_get_texture_rotationd"),&Polygon2D::_get_texture_rotationd);
+ ClassDB::bind_method(_MD("_set_texture_rotationd","texture_rotation"),&Polygon2D::_set_texture_rotationd);
+ ClassDB::bind_method(_MD("_get_texture_rotationd"),&Polygon2D::_get_texture_rotationd);
- ObjectTypeDB::bind_method(_MD("set_texture_scale","texture_scale"),&Polygon2D::set_texture_scale);
- ObjectTypeDB::bind_method(_MD("get_texture_scale"),&Polygon2D::get_texture_scale);
+ ClassDB::bind_method(_MD("set_texture_scale","texture_scale"),&Polygon2D::set_texture_scale);
+ ClassDB::bind_method(_MD("get_texture_scale"),&Polygon2D::get_texture_scale);
- ObjectTypeDB::bind_method(_MD("set_invert","invert"),&Polygon2D::set_invert);
- ObjectTypeDB::bind_method(_MD("get_invert"),&Polygon2D::get_invert);
+ ClassDB::bind_method(_MD("set_invert","invert"),&Polygon2D::set_invert);
+ ClassDB::bind_method(_MD("get_invert"),&Polygon2D::get_invert);
- ObjectTypeDB::bind_method(_MD("set_invert_border","invert_border"),&Polygon2D::set_invert_border);
- ObjectTypeDB::bind_method(_MD("get_invert_border"),&Polygon2D::get_invert_border);
+ ClassDB::bind_method(_MD("set_invert_border","invert_border"),&Polygon2D::set_invert_border);
+ ClassDB::bind_method(_MD("get_invert_border"),&Polygon2D::get_invert_border);
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&Polygon2D::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&Polygon2D::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&Polygon2D::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&Polygon2D::get_offset);
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index b092a8e3d8..6327021295 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -33,7 +33,7 @@
class Polygon2D : public Node2D {
- OBJ_TYPE(Polygon2D,Node2D);
+ GDCLASS(Polygon2D,Node2D);
DVector<Vector2> polygon;
DVector<Vector2> uv;
diff --git a/scene/2d/position_2d.h b/scene/2d/position_2d.h
index f743a06ddb..fb68c265b3 100644
--- a/scene/2d/position_2d.h
+++ b/scene/2d/position_2d.h
@@ -34,7 +34,7 @@
class Position2D : public Node2D {
- OBJ_TYPE(Position2D,Node2D)
+ GDCLASS(Position2D,Node2D)
void _draw_cross();
protected:
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index c699b94e69..144e7b391b 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -263,36 +263,36 @@ void RayCast2D::clear_exceptions(){
void RayCast2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_enabled","enabled"),&RayCast2D::set_enabled);
- ObjectTypeDB::bind_method(_MD("is_enabled"),&RayCast2D::is_enabled);
+ ClassDB::bind_method(_MD("set_enabled","enabled"),&RayCast2D::set_enabled);
+ ClassDB::bind_method(_MD("is_enabled"),&RayCast2D::is_enabled);
- ObjectTypeDB::bind_method(_MD("set_cast_to","local_point"),&RayCast2D::set_cast_to);
- ObjectTypeDB::bind_method(_MD("get_cast_to"),&RayCast2D::get_cast_to);
+ ClassDB::bind_method(_MD("set_cast_to","local_point"),&RayCast2D::set_cast_to);
+ ClassDB::bind_method(_MD("get_cast_to"),&RayCast2D::get_cast_to);
- ObjectTypeDB::bind_method(_MD("is_colliding"),&RayCast2D::is_colliding);
- ObjectTypeDB::bind_method(_MD("force_raycast_update"),&RayCast2D::force_raycast_update);
+ ClassDB::bind_method(_MD("is_colliding"),&RayCast2D::is_colliding);
+ ClassDB::bind_method(_MD("force_raycast_update"),&RayCast2D::force_raycast_update);
- ObjectTypeDB::bind_method(_MD("get_collider"),&RayCast2D::get_collider);
- ObjectTypeDB::bind_method(_MD("get_collider_shape"),&RayCast2D::get_collider_shape);
- ObjectTypeDB::bind_method(_MD("get_collision_point"),&RayCast2D::get_collision_point);
- ObjectTypeDB::bind_method(_MD("get_collision_normal"),&RayCast2D::get_collision_normal);
+ ClassDB::bind_method(_MD("get_collider"),&RayCast2D::get_collider);
+ ClassDB::bind_method(_MD("get_collider_shape"),&RayCast2D::get_collider_shape);
+ ClassDB::bind_method(_MD("get_collision_point"),&RayCast2D::get_collision_point);
+ ClassDB::bind_method(_MD("get_collision_normal"),&RayCast2D::get_collision_normal);
- ObjectTypeDB::bind_method(_MD("add_exception_rid","rid"),&RayCast2D::add_exception_rid);
- ObjectTypeDB::bind_method(_MD("add_exception","node"),&RayCast2D::add_exception);
+ ClassDB::bind_method(_MD("add_exception_rid","rid"),&RayCast2D::add_exception_rid);
+ ClassDB::bind_method(_MD("add_exception","node"),&RayCast2D::add_exception);
- ObjectTypeDB::bind_method(_MD("remove_exception_rid","rid"),&RayCast2D::remove_exception_rid);
- ObjectTypeDB::bind_method(_MD("remove_exception","node"),&RayCast2D::remove_exception);
+ ClassDB::bind_method(_MD("remove_exception_rid","rid"),&RayCast2D::remove_exception_rid);
+ ClassDB::bind_method(_MD("remove_exception","node"),&RayCast2D::remove_exception);
- ObjectTypeDB::bind_method(_MD("clear_exceptions"),&RayCast2D::clear_exceptions);
+ ClassDB::bind_method(_MD("clear_exceptions"),&RayCast2D::clear_exceptions);
- ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&RayCast2D::set_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_layer_mask"),&RayCast2D::get_layer_mask);
+ ClassDB::bind_method(_MD("set_layer_mask","mask"),&RayCast2D::set_layer_mask);
+ ClassDB::bind_method(_MD("get_layer_mask"),&RayCast2D::get_layer_mask);
- ObjectTypeDB::bind_method(_MD("set_type_mask","mask"),&RayCast2D::set_type_mask);
- ObjectTypeDB::bind_method(_MD("get_type_mask"),&RayCast2D::get_type_mask);
+ ClassDB::bind_method(_MD("set_type_mask","mask"),&RayCast2D::set_type_mask);
+ ClassDB::bind_method(_MD("get_type_mask"),&RayCast2D::get_type_mask);
- ObjectTypeDB::bind_method(_MD("set_exclude_parent_body","mask"),&RayCast2D::set_exclude_parent_body);
- ObjectTypeDB::bind_method(_MD("get_exclude_parent_body"),&RayCast2D::get_exclude_parent_body);
+ ClassDB::bind_method(_MD("set_exclude_parent_body","mask"),&RayCast2D::set_exclude_parent_body);
+ ClassDB::bind_method(_MD("get_exclude_parent_body"),&RayCast2D::get_exclude_parent_body);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled"));
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"exclude_parent"),_SCS("set_exclude_parent_body"),_SCS("get_exclude_parent_body"));
diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h
index d363940702..3e7a39ffde 100644
--- a/scene/2d/ray_cast_2d.h
+++ b/scene/2d/ray_cast_2d.h
@@ -33,7 +33,7 @@
class RayCast2D : public Node2D {
- OBJ_TYPE(RayCast2D,Node2D);
+ GDCLASS(RayCast2D,Node2D);
bool enabled;
diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp
index 4bb1bcb414..c7ec84a8d7 100644
--- a/scene/2d/remote_transform_2d.cpp
+++ b/scene/2d/remote_transform_2d.cpp
@@ -118,8 +118,8 @@ String RemoteTransform2D::get_configuration_warning() const {
void RemoteTransform2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_remote_node","path"),&RemoteTransform2D::set_remote_node);
- ObjectTypeDB::bind_method(_MD("get_remote_node"),&RemoteTransform2D::get_remote_node);
+ ClassDB::bind_method(_MD("set_remote_node","path"),&RemoteTransform2D::set_remote_node);
+ ClassDB::bind_method(_MD("get_remote_node"),&RemoteTransform2D::get_remote_node);
ADD_PROPERTY( PropertyInfo(Variant::NODE_PATH,"remote_path"),_SCS("set_remote_node"),_SCS("get_remote_node"));
}
diff --git a/scene/2d/remote_transform_2d.h b/scene/2d/remote_transform_2d.h
index 27b76bcdc6..52c28ffd4f 100644
--- a/scene/2d/remote_transform_2d.h
+++ b/scene/2d/remote_transform_2d.h
@@ -30,7 +30,7 @@
class RemoteTransform2D : public Node2D {
- OBJ_TYPE(RemoteTransform2D,Node2D);
+ GDCLASS(RemoteTransform2D,Node2D);
NodePath remote_node;
diff --git a/scene/2d/sample_player_2d.cpp b/scene/2d/sample_player_2d.cpp
index 2158faac2b..b96470879c 100644
--- a/scene/2d/sample_player_2d.cpp
+++ b/scene/2d/sample_player_2d.cpp
@@ -220,23 +220,23 @@ String SamplePlayer2D::get_configuration_warning() const {
void SamplePlayer2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_sample_library","library:SampleLibrary"),&SamplePlayer2D::set_sample_library);
- ObjectTypeDB::bind_method(_MD("get_sample_library:SampleLibrary"),&SamplePlayer2D::get_sample_library);
+ ClassDB::bind_method(_MD("set_sample_library","library:SampleLibrary"),&SamplePlayer2D::set_sample_library);
+ ClassDB::bind_method(_MD("get_sample_library:SampleLibrary"),&SamplePlayer2D::get_sample_library);
- ObjectTypeDB::bind_method(_MD("set_polyphony","max_voices"),&SamplePlayer2D::set_polyphony);
- ObjectTypeDB::bind_method(_MD("get_polyphony"),&SamplePlayer2D::get_polyphony);
+ ClassDB::bind_method(_MD("set_polyphony","max_voices"),&SamplePlayer2D::set_polyphony);
+ ClassDB::bind_method(_MD("get_polyphony"),&SamplePlayer2D::get_polyphony);
- ObjectTypeDB::bind_method(_MD("play","sample","voice"),&SamplePlayer2D::play,DEFVAL(NEXT_VOICE));
+ ClassDB::bind_method(_MD("play","sample","voice"),&SamplePlayer2D::play,DEFVAL(NEXT_VOICE));
//voices,DEV
- ObjectTypeDB::bind_method(_MD("voice_set_pitch_scale","voice","ratio"),&SamplePlayer2D::voice_set_pitch_scale);
- ObjectTypeDB::bind_method(_MD("voice_set_volume_scale_db","voice","db"),&SamplePlayer2D::voice_set_volume_scale_db);
+ ClassDB::bind_method(_MD("voice_set_pitch_scale","voice","ratio"),&SamplePlayer2D::voice_set_pitch_scale);
+ ClassDB::bind_method(_MD("voice_set_volume_scale_db","voice","db"),&SamplePlayer2D::voice_set_volume_scale_db);
- ObjectTypeDB::bind_method(_MD("is_voice_active","voice"),&SamplePlayer2D::is_voice_active);
- ObjectTypeDB::bind_method(_MD("stop_voice","voice"),&SamplePlayer2D::stop_voice);
- ObjectTypeDB::bind_method(_MD("stop_all"),&SamplePlayer2D::stop_all);
+ ClassDB::bind_method(_MD("is_voice_active","voice"),&SamplePlayer2D::is_voice_active);
+ ClassDB::bind_method(_MD("stop_voice","voice"),&SamplePlayer2D::stop_voice);
+ ClassDB::bind_method(_MD("stop_all"),&SamplePlayer2D::stop_all);
- ObjectTypeDB::bind_method(_MD("set_random_pitch_scale","val"),&SamplePlayer2D::set_random_pitch_scale);
- ObjectTypeDB::bind_method(_MD("get_random_pitch_scale"),&SamplePlayer2D::get_random_pitch_scale);
+ ClassDB::bind_method(_MD("set_random_pitch_scale","val"),&SamplePlayer2D::set_random_pitch_scale);
+ ClassDB::bind_method(_MD("get_random_pitch_scale"),&SamplePlayer2D::get_random_pitch_scale);
BIND_CONSTANT( INVALID_VOICE );
BIND_CONSTANT( NEXT_VOICE );
diff --git a/scene/2d/sample_player_2d.h b/scene/2d/sample_player_2d.h
index 7fc9ea427c..5cf598327b 100644
--- a/scene/2d/sample_player_2d.h
+++ b/scene/2d/sample_player_2d.h
@@ -34,7 +34,7 @@
class SamplePlayer2D : public SoundPlayer2D {
- OBJ_TYPE(SamplePlayer2D,SoundPlayer2D);
+ GDCLASS(SamplePlayer2D,SoundPlayer2D);
public:
enum {
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp
index 6485e46548..3aacd7091a 100644
--- a/scene/2d/screen_button.cpp
+++ b/scene/2d/screen_button.cpp
@@ -338,27 +338,27 @@ bool TouchScreenButton::is_passby_press_enabled() const{
void TouchScreenButton::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_texture","texture"),&TouchScreenButton::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture"),&TouchScreenButton::get_texture);
+ ClassDB::bind_method(_MD("set_texture","texture"),&TouchScreenButton::set_texture);
+ ClassDB::bind_method(_MD("get_texture"),&TouchScreenButton::get_texture);
- ObjectTypeDB::bind_method(_MD("set_texture_pressed","texture_pressed"),&TouchScreenButton::set_texture_pressed);
- ObjectTypeDB::bind_method(_MD("get_texture_pressed"),&TouchScreenButton::get_texture_pressed);
+ ClassDB::bind_method(_MD("set_texture_pressed","texture_pressed"),&TouchScreenButton::set_texture_pressed);
+ ClassDB::bind_method(_MD("get_texture_pressed"),&TouchScreenButton::get_texture_pressed);
- ObjectTypeDB::bind_method(_MD("set_bitmask","bitmask"),&TouchScreenButton::set_bitmask);
- ObjectTypeDB::bind_method(_MD("get_bitmask"),&TouchScreenButton::get_bitmask);
+ ClassDB::bind_method(_MD("set_bitmask","bitmask"),&TouchScreenButton::set_bitmask);
+ ClassDB::bind_method(_MD("get_bitmask"),&TouchScreenButton::get_bitmask);
- ObjectTypeDB::bind_method(_MD("set_action","action"),&TouchScreenButton::set_action);
- ObjectTypeDB::bind_method(_MD("get_action"),&TouchScreenButton::get_action);
+ ClassDB::bind_method(_MD("set_action","action"),&TouchScreenButton::set_action);
+ ClassDB::bind_method(_MD("get_action"),&TouchScreenButton::get_action);
- ObjectTypeDB::bind_method(_MD("set_visibility_mode","mode"),&TouchScreenButton::set_visibility_mode);
- ObjectTypeDB::bind_method(_MD("get_visibility_mode"),&TouchScreenButton::get_visibility_mode);
+ ClassDB::bind_method(_MD("set_visibility_mode","mode"),&TouchScreenButton::set_visibility_mode);
+ ClassDB::bind_method(_MD("get_visibility_mode"),&TouchScreenButton::get_visibility_mode);
- ObjectTypeDB::bind_method(_MD("set_passby_press","enabled"),&TouchScreenButton::set_passby_press);
- ObjectTypeDB::bind_method(_MD("is_passby_press_enabled"),&TouchScreenButton::is_passby_press_enabled);
+ ClassDB::bind_method(_MD("set_passby_press","enabled"),&TouchScreenButton::set_passby_press);
+ ClassDB::bind_method(_MD("is_passby_press_enabled"),&TouchScreenButton::is_passby_press_enabled);
- ObjectTypeDB::bind_method(_MD("is_pressed"),&TouchScreenButton::is_pressed);
+ ClassDB::bind_method(_MD("is_pressed"),&TouchScreenButton::is_pressed);
- ObjectTypeDB::bind_method(_MD("_input"),&TouchScreenButton::_input);
+ ClassDB::bind_method(_MD("_input"),&TouchScreenButton::_input);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture"),_SCS("get_texture"));
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"pressed",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_texture_pressed"),_SCS("get_texture_pressed"));
diff --git a/scene/2d/screen_button.h b/scene/2d/screen_button.h
index 72f590930a..34e02d644b 100644
--- a/scene/2d/screen_button.h
+++ b/scene/2d/screen_button.h
@@ -35,7 +35,7 @@
class TouchScreenButton : public Node2D {
- OBJ_TYPE(TouchScreenButton,Node2D);
+ GDCLASS(TouchScreenButton,Node2D);
public:
enum VisibilityMode {
diff --git a/scene/2d/sound_player_2d.cpp b/scene/2d/sound_player_2d.cpp
index 267ce682e3..09b415814d 100644
--- a/scene/2d/sound_player_2d.cpp
+++ b/scene/2d/sound_player_2d.cpp
@@ -87,8 +87,8 @@ float SoundPlayer2D::get_param( Param p_param) const {
void SoundPlayer2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_param","param","value"),&SoundPlayer2D::set_param);
- ObjectTypeDB::bind_method(_MD("get_param","param"),&SoundPlayer2D::get_param);
+ ClassDB::bind_method(_MD("set_param","param","value"),&SoundPlayer2D::set_param);
+ ClassDB::bind_method(_MD("get_param","param"),&SoundPlayer2D::get_param);
BIND_CONSTANT( PARAM_VOLUME_DB );
BIND_CONSTANT( PARAM_PITCH_SCALE );
diff --git a/scene/2d/sound_player_2d.h b/scene/2d/sound_player_2d.h
index f0d847daab..bfabda4ec9 100644
--- a/scene/2d/sound_player_2d.h
+++ b/scene/2d/sound_player_2d.h
@@ -37,7 +37,7 @@
class SoundPlayer2D : public Node2D {
- OBJ_TYPE(SoundPlayer2D,Node2D);
+ GDCLASS(SoundPlayer2D,Node2D);
public:
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 51329ff996..480991c71d 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -302,38 +302,38 @@ void Sprite::_validate_property(PropertyInfo& property) const {
void Sprite::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_texture","texture:Texture"),&Sprite::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture:Texture"),&Sprite::get_texture);
+ ClassDB::bind_method(_MD("set_texture","texture:Texture"),&Sprite::set_texture);
+ ClassDB::bind_method(_MD("get_texture:Texture"),&Sprite::get_texture);
- ObjectTypeDB::bind_method(_MD("set_centered","centered"),&Sprite::set_centered);
- ObjectTypeDB::bind_method(_MD("is_centered"),&Sprite::is_centered);
+ ClassDB::bind_method(_MD("set_centered","centered"),&Sprite::set_centered);
+ ClassDB::bind_method(_MD("is_centered"),&Sprite::is_centered);
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&Sprite::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&Sprite::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&Sprite::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&Sprite::get_offset);
- ObjectTypeDB::bind_method(_MD("set_flip_h","flip_h"),&Sprite::set_flip_h);
- ObjectTypeDB::bind_method(_MD("is_flipped_h"),&Sprite::is_flipped_h);
+ ClassDB::bind_method(_MD("set_flip_h","flip_h"),&Sprite::set_flip_h);
+ ClassDB::bind_method(_MD("is_flipped_h"),&Sprite::is_flipped_h);
- ObjectTypeDB::bind_method(_MD("set_flip_v","flip_v"),&Sprite::set_flip_v);
- ObjectTypeDB::bind_method(_MD("is_flipped_v"),&Sprite::is_flipped_v);
+ ClassDB::bind_method(_MD("set_flip_v","flip_v"),&Sprite::set_flip_v);
+ ClassDB::bind_method(_MD("is_flipped_v"),&Sprite::is_flipped_v);
- ObjectTypeDB::bind_method(_MD("set_region","enabled"),&Sprite::set_region);
- ObjectTypeDB::bind_method(_MD("is_region"),&Sprite::is_region);
+ ClassDB::bind_method(_MD("set_region","enabled"),&Sprite::set_region);
+ ClassDB::bind_method(_MD("is_region"),&Sprite::is_region);
- ObjectTypeDB::bind_method(_MD("set_region_rect","rect"),&Sprite::set_region_rect);
- ObjectTypeDB::bind_method(_MD("get_region_rect"),&Sprite::get_region_rect);
+ ClassDB::bind_method(_MD("set_region_rect","rect"),&Sprite::set_region_rect);
+ ClassDB::bind_method(_MD("get_region_rect"),&Sprite::get_region_rect);
- ObjectTypeDB::bind_method(_MD("set_frame","frame"),&Sprite::set_frame);
- ObjectTypeDB::bind_method(_MD("get_frame"),&Sprite::get_frame);
+ ClassDB::bind_method(_MD("set_frame","frame"),&Sprite::set_frame);
+ ClassDB::bind_method(_MD("get_frame"),&Sprite::get_frame);
- ObjectTypeDB::bind_method(_MD("set_vframes","vframes"),&Sprite::set_vframes);
- ObjectTypeDB::bind_method(_MD("get_vframes"),&Sprite::get_vframes);
+ ClassDB::bind_method(_MD("set_vframes","vframes"),&Sprite::set_vframes);
+ ClassDB::bind_method(_MD("get_vframes"),&Sprite::get_vframes);
- ObjectTypeDB::bind_method(_MD("set_hframes","hframes"),&Sprite::set_hframes);
- ObjectTypeDB::bind_method(_MD("get_hframes"),&Sprite::get_hframes);
+ ClassDB::bind_method(_MD("set_hframes","hframes"),&Sprite::set_hframes);
+ ClassDB::bind_method(_MD("get_hframes"),&Sprite::get_hframes);
- ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&Sprite::set_modulate);
- ObjectTypeDB::bind_method(_MD("get_modulate"),&Sprite::get_modulate);
+ ClassDB::bind_method(_MD("set_modulate","modulate"),&Sprite::set_modulate);
+ ClassDB::bind_method(_MD("get_modulate"),&Sprite::get_modulate);
ADD_SIGNAL(MethodInfo("frame_changed"));
ADD_SIGNAL(MethodInfo("texture_changed"));
@@ -565,17 +565,17 @@ String ViewportSprite::get_configuration_warning() const {
void ViewportSprite::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_viewport_path","path"),&ViewportSprite::set_viewport_path);
- ObjectTypeDB::bind_method(_MD("get_viewport_path"),&ViewportSprite::get_viewport_path);
+ ClassDB::bind_method(_MD("set_viewport_path","path"),&ViewportSprite::set_viewport_path);
+ ClassDB::bind_method(_MD("get_viewport_path"),&ViewportSprite::get_viewport_path);
- ObjectTypeDB::bind_method(_MD("set_centered","centered"),&ViewportSprite::set_centered);
- ObjectTypeDB::bind_method(_MD("is_centered"),&ViewportSprite::is_centered);
+ ClassDB::bind_method(_MD("set_centered","centered"),&ViewportSprite::set_centered);
+ ClassDB::bind_method(_MD("is_centered"),&ViewportSprite::is_centered);
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&ViewportSprite::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&ViewportSprite::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&ViewportSprite::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&ViewportSprite::get_offset);
- ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&ViewportSprite::set_modulate);
- ObjectTypeDB::bind_method(_MD("get_modulate"),&ViewportSprite::get_modulate);
+ ClassDB::bind_method(_MD("set_modulate","modulate"),&ViewportSprite::set_modulate);
+ ClassDB::bind_method(_MD("get_modulate"),&ViewportSprite::get_modulate);
ADD_PROPERTYNZ( PropertyInfo( Variant::NODE_PATH, "viewport"), _SCS("set_viewport_path"),_SCS("get_viewport_path"));
ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered"));
diff --git a/scene/2d/sprite.h b/scene/2d/sprite.h
index ce8478ff40..687d054297 100644
--- a/scene/2d/sprite.h
+++ b/scene/2d/sprite.h
@@ -35,7 +35,7 @@
class Sprite : public Node2D {
- OBJ_TYPE( Sprite, Node2D );
+ GDCLASS( Sprite, Node2D );
Ref<Texture> texture;
@@ -110,7 +110,7 @@ public:
#if 0
class ViewportSprite : public Node2D {
- OBJ_TYPE( ViewportSprite, Node2D );
+ GDCLASS( ViewportSprite, Node2D );
Ref<Texture> texture;
NodePath viewport_path;
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index c1116d4aaa..8226a0c2a0 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -1186,78 +1186,78 @@ void TileMap::set_light_mask(int p_light_mask) {
void TileMap::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_tileset","tileset:TileSet"),&TileMap::set_tileset);
- ObjectTypeDB::bind_method(_MD("get_tileset:TileSet"),&TileMap::get_tileset);
+ ClassDB::bind_method(_MD("set_tileset","tileset:TileSet"),&TileMap::set_tileset);
+ ClassDB::bind_method(_MD("get_tileset:TileSet"),&TileMap::get_tileset);
- ObjectTypeDB::bind_method(_MD("set_mode","mode"),&TileMap::set_mode);
- ObjectTypeDB::bind_method(_MD("get_mode"),&TileMap::get_mode);
+ ClassDB::bind_method(_MD("set_mode","mode"),&TileMap::set_mode);
+ ClassDB::bind_method(_MD("get_mode"),&TileMap::get_mode);
- ObjectTypeDB::bind_method(_MD("set_half_offset","half_offset"),&TileMap::set_half_offset);
- ObjectTypeDB::bind_method(_MD("get_half_offset"),&TileMap::get_half_offset);
+ ClassDB::bind_method(_MD("set_half_offset","half_offset"),&TileMap::set_half_offset);
+ ClassDB::bind_method(_MD("get_half_offset"),&TileMap::get_half_offset);
- ObjectTypeDB::bind_method(_MD("set_custom_transform","custom_transform"),&TileMap::set_custom_transform);
- ObjectTypeDB::bind_method(_MD("get_custom_transform"),&TileMap::get_custom_transform);
+ ClassDB::bind_method(_MD("set_custom_transform","custom_transform"),&TileMap::set_custom_transform);
+ ClassDB::bind_method(_MD("get_custom_transform"),&TileMap::get_custom_transform);
- ObjectTypeDB::bind_method(_MD("set_cell_size","size"),&TileMap::set_cell_size);
- ObjectTypeDB::bind_method(_MD("get_cell_size"),&TileMap::get_cell_size);
+ ClassDB::bind_method(_MD("set_cell_size","size"),&TileMap::set_cell_size);
+ ClassDB::bind_method(_MD("get_cell_size"),&TileMap::get_cell_size);
- ObjectTypeDB::bind_method(_MD("_set_old_cell_size","size"),&TileMap::_set_old_cell_size);
- ObjectTypeDB::bind_method(_MD("_get_old_cell_size"),&TileMap::_get_old_cell_size);
+ ClassDB::bind_method(_MD("_set_old_cell_size","size"),&TileMap::_set_old_cell_size);
+ ClassDB::bind_method(_MD("_get_old_cell_size"),&TileMap::_get_old_cell_size);
- ObjectTypeDB::bind_method(_MD("set_quadrant_size","size"),&TileMap::set_quadrant_size);
- ObjectTypeDB::bind_method(_MD("get_quadrant_size"),&TileMap::get_quadrant_size);
+ ClassDB::bind_method(_MD("set_quadrant_size","size"),&TileMap::set_quadrant_size);
+ ClassDB::bind_method(_MD("get_quadrant_size"),&TileMap::get_quadrant_size);
- ObjectTypeDB::bind_method(_MD("set_tile_origin","origin"),&TileMap::set_tile_origin);
- ObjectTypeDB::bind_method(_MD("get_tile_origin"),&TileMap::get_tile_origin);
+ ClassDB::bind_method(_MD("set_tile_origin","origin"),&TileMap::set_tile_origin);
+ ClassDB::bind_method(_MD("get_tile_origin"),&TileMap::get_tile_origin);
- ObjectTypeDB::bind_method(_MD("set_center_x","enable"),&TileMap::set_center_x);
- ObjectTypeDB::bind_method(_MD("get_center_x"),&TileMap::get_center_x);
+ ClassDB::bind_method(_MD("set_center_x","enable"),&TileMap::set_center_x);
+ ClassDB::bind_method(_MD("get_center_x"),&TileMap::get_center_x);
- ObjectTypeDB::bind_method(_MD("set_center_y","enable"),&TileMap::set_center_y);
- ObjectTypeDB::bind_method(_MD("get_center_y"),&TileMap::get_center_y);
+ ClassDB::bind_method(_MD("set_center_y","enable"),&TileMap::set_center_y);
+ ClassDB::bind_method(_MD("get_center_y"),&TileMap::get_center_y);
- ObjectTypeDB::bind_method(_MD("set_y_sort_mode","enable"),&TileMap::set_y_sort_mode);
- ObjectTypeDB::bind_method(_MD("is_y_sort_mode_enabled"),&TileMap::is_y_sort_mode_enabled);
+ ClassDB::bind_method(_MD("set_y_sort_mode","enable"),&TileMap::set_y_sort_mode);
+ ClassDB::bind_method(_MD("is_y_sort_mode_enabled"),&TileMap::is_y_sort_mode_enabled);
- ObjectTypeDB::bind_method(_MD("set_collision_use_kinematic","use_kinematic"),&TileMap::set_collision_use_kinematic);
- ObjectTypeDB::bind_method(_MD("get_collision_use_kinematic"),&TileMap::get_collision_use_kinematic);
+ ClassDB::bind_method(_MD("set_collision_use_kinematic","use_kinematic"),&TileMap::set_collision_use_kinematic);
+ ClassDB::bind_method(_MD("get_collision_use_kinematic"),&TileMap::get_collision_use_kinematic);
- ObjectTypeDB::bind_method(_MD("set_collision_layer","mask"),&TileMap::set_collision_layer);
- ObjectTypeDB::bind_method(_MD("get_collision_layer"),&TileMap::get_collision_layer);
+ ClassDB::bind_method(_MD("set_collision_layer","mask"),&TileMap::set_collision_layer);
+ ClassDB::bind_method(_MD("get_collision_layer"),&TileMap::get_collision_layer);
- ObjectTypeDB::bind_method(_MD("set_collision_mask","mask"),&TileMap::set_collision_mask);
- ObjectTypeDB::bind_method(_MD("get_collision_mask"),&TileMap::get_collision_mask);
+ ClassDB::bind_method(_MD("set_collision_mask","mask"),&TileMap::set_collision_mask);
+ ClassDB::bind_method(_MD("get_collision_mask"),&TileMap::get_collision_mask);
- ObjectTypeDB::bind_method(_MD("set_collision_friction","value"),&TileMap::set_collision_friction);
- ObjectTypeDB::bind_method(_MD("get_collision_friction"),&TileMap::get_collision_friction);
+ ClassDB::bind_method(_MD("set_collision_friction","value"),&TileMap::set_collision_friction);
+ ClassDB::bind_method(_MD("get_collision_friction"),&TileMap::get_collision_friction);
- ObjectTypeDB::bind_method(_MD("set_collision_bounce","value"),&TileMap::set_collision_bounce);
- ObjectTypeDB::bind_method(_MD("get_collision_bounce"),&TileMap::get_collision_bounce);
+ ClassDB::bind_method(_MD("set_collision_bounce","value"),&TileMap::set_collision_bounce);
+ ClassDB::bind_method(_MD("get_collision_bounce"),&TileMap::get_collision_bounce);
- ObjectTypeDB::bind_method(_MD("set_occluder_light_mask","mask"),&TileMap::set_occluder_light_mask);
- ObjectTypeDB::bind_method(_MD("get_occluder_light_mask"),&TileMap::get_occluder_light_mask);
+ ClassDB::bind_method(_MD("set_occluder_light_mask","mask"),&TileMap::set_occluder_light_mask);
+ ClassDB::bind_method(_MD("get_occluder_light_mask"),&TileMap::get_occluder_light_mask);
- ObjectTypeDB::bind_method(_MD("set_cell","x","y","tile","flip_x","flip_y","transpose"),&TileMap::set_cell,DEFVAL(false),DEFVAL(false),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("set_cellv","pos","tile","flip_x","flip_y","transpose"),&TileMap::set_cellv,DEFVAL(false),DEFVAL(false),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_cell","x","y"),&TileMap::get_cell);
- ObjectTypeDB::bind_method(_MD("get_cellv","pos"),&TileMap::get_cellv);
- ObjectTypeDB::bind_method(_MD("is_cell_x_flipped","x","y"),&TileMap::is_cell_x_flipped);
- ObjectTypeDB::bind_method(_MD("is_cell_y_flipped","x","y"),&TileMap::is_cell_y_flipped);
- ObjectTypeDB::bind_method(_MD("is_cell_transposed","x","y"),&TileMap::is_cell_transposed);
+ ClassDB::bind_method(_MD("set_cell","x","y","tile","flip_x","flip_y","transpose"),&TileMap::set_cell,DEFVAL(false),DEFVAL(false),DEFVAL(false));
+ ClassDB::bind_method(_MD("set_cellv","pos","tile","flip_x","flip_y","transpose"),&TileMap::set_cellv,DEFVAL(false),DEFVAL(false),DEFVAL(false));
+ ClassDB::bind_method(_MD("get_cell","x","y"),&TileMap::get_cell);
+ ClassDB::bind_method(_MD("get_cellv","pos"),&TileMap::get_cellv);
+ ClassDB::bind_method(_MD("is_cell_x_flipped","x","y"),&TileMap::is_cell_x_flipped);
+ ClassDB::bind_method(_MD("is_cell_y_flipped","x","y"),&TileMap::is_cell_y_flipped);
+ ClassDB::bind_method(_MD("is_cell_transposed","x","y"),&TileMap::is_cell_transposed);
- ObjectTypeDB::bind_method(_MD("clear"),&TileMap::clear);
+ ClassDB::bind_method(_MD("clear"),&TileMap::clear);
- ObjectTypeDB::bind_method(_MD("get_used_cells"),&TileMap::get_used_cells);
+ ClassDB::bind_method(_MD("get_used_cells"),&TileMap::get_used_cells);
- ObjectTypeDB::bind_method(_MD("map_to_world","mappos","ignore_half_ofs"),&TileMap::map_to_world,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("world_to_map","worldpos"),&TileMap::world_to_map);
+ ClassDB::bind_method(_MD("map_to_world","mappos","ignore_half_ofs"),&TileMap::map_to_world,DEFVAL(false));
+ ClassDB::bind_method(_MD("world_to_map","worldpos"),&TileMap::world_to_map);
- ObjectTypeDB::bind_method(_MD("_clear_quadrants"),&TileMap::_clear_quadrants);
- ObjectTypeDB::bind_method(_MD("_recreate_quadrants"),&TileMap::_recreate_quadrants);
- ObjectTypeDB::bind_method(_MD("_update_dirty_quadrants"),&TileMap::_update_dirty_quadrants);
+ ClassDB::bind_method(_MD("_clear_quadrants"),&TileMap::_clear_quadrants);
+ ClassDB::bind_method(_MD("_recreate_quadrants"),&TileMap::_recreate_quadrants);
+ ClassDB::bind_method(_MD("_update_dirty_quadrants"),&TileMap::_update_dirty_quadrants);
- ObjectTypeDB::bind_method(_MD("_set_tile_data"),&TileMap::_set_tile_data);
- ObjectTypeDB::bind_method(_MD("_get_tile_data"),&TileMap::_get_tile_data);
+ ClassDB::bind_method(_MD("_set_tile_data"),&TileMap::_set_tile_data);
+ ClassDB::bind_method(_MD("_get_tile_data"),&TileMap::_get_tile_data);
ADD_PROPERTY( PropertyInfo(Variant::INT,"mode",PROPERTY_HINT_ENUM,"Square,Isometric,Custom"),_SCS("set_mode"),_SCS("get_mode"));
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"tile_set",PROPERTY_HINT_RESOURCE_TYPE,"TileSet"),_SCS("set_tileset"),_SCS("get_tileset"));
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index c95d2cd048..8cc144b74d 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -37,7 +37,7 @@
class TileMap : public Node2D {
- OBJ_TYPE( TileMap, Node2D );
+ GDCLASS( TileMap, Node2D );
public:
enum Mode {
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 6522fe49c9..6c0dbcda29 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -129,9 +129,9 @@ bool VisibilityNotifier2D::is_on_screen() const {
void VisibilityNotifier2D::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_rect","rect"),&VisibilityNotifier2D::set_rect);
- ObjectTypeDB::bind_method(_MD("get_rect"),&VisibilityNotifier2D::get_rect);
- ObjectTypeDB::bind_method(_MD("is_on_screen"),&VisibilityNotifier2D::is_on_screen);
+ ClassDB::bind_method(_MD("set_rect","rect"),&VisibilityNotifier2D::set_rect);
+ ClassDB::bind_method(_MD("get_rect"),&VisibilityNotifier2D::get_rect);
+ ClassDB::bind_method(_MD("is_on_screen"),&VisibilityNotifier2D::is_on_screen);
ADD_PROPERTY( PropertyInfo(Variant::RECT2,"rect"),_SCS("set_rect"),_SCS("get_rect"));
@@ -354,9 +354,9 @@ String VisibilityEnabler2D::get_configuration_warning() const {
void VisibilityEnabler2D::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_enabler","enabler","enabled"),&VisibilityEnabler2D::set_enabler);
- ObjectTypeDB::bind_method(_MD("is_enabler_enabled","enabler"),&VisibilityEnabler2D::is_enabler_enabled);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&VisibilityEnabler2D::_node_removed);
+ ClassDB::bind_method(_MD("set_enabler","enabler","enabled"),&VisibilityEnabler2D::set_enabler);
+ ClassDB::bind_method(_MD("is_enabler_enabled","enabler"),&VisibilityEnabler2D::is_enabler_enabled);
+ ClassDB::bind_method(_MD("_node_removed"),&VisibilityEnabler2D::_node_removed);
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/pause_animations"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_PAUSE_ANIMATIONS );
ADD_PROPERTYI( PropertyInfo(Variant::BOOL,"enabler/freeze_bodies"),_SCS("set_enabler"),_SCS("is_enabler_enabled"), ENABLER_FREEZE_BODIES);
diff --git a/scene/2d/visibility_notifier_2d.h b/scene/2d/visibility_notifier_2d.h
index 3fe34270d8..a896e270fe 100644
--- a/scene/2d/visibility_notifier_2d.h
+++ b/scene/2d/visibility_notifier_2d.h
@@ -34,7 +34,7 @@
class Viewport;
class VisibilityNotifier2D : public Node2D {
- OBJ_TYPE(VisibilityNotifier2D,Node2D);
+ GDCLASS(VisibilityNotifier2D,Node2D);
Set<Viewport*> viewports;
@@ -67,7 +67,7 @@ public:
class VisibilityEnabler2D : public VisibilityNotifier2D {
- OBJ_TYPE(VisibilityEnabler2D,VisibilityNotifier2D);
+ GDCLASS(VisibilityEnabler2D,VisibilityNotifier2D);
public:
enum Enabler {
diff --git a/scene/2d/y_sort.cpp b/scene/2d/y_sort.cpp
index 9578e6786b..a02c451f5b 100644
--- a/scene/2d/y_sort.cpp
+++ b/scene/2d/y_sort.cpp
@@ -43,8 +43,8 @@ bool YSort::is_sort_enabled() const {
void YSort::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_sort_enabled","enabled"),&YSort::set_sort_enabled);
- ObjectTypeDB::bind_method(_MD("is_sort_enabled"),&YSort::is_sort_enabled);
+ ClassDB::bind_method(_MD("set_sort_enabled","enabled"),&YSort::set_sort_enabled);
+ ClassDB::bind_method(_MD("is_sort_enabled"),&YSort::is_sort_enabled);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"sort/enabled"),_SCS("set_sort_enabled"),_SCS("is_sort_enabled"));
}
diff --git a/scene/2d/y_sort.h b/scene/2d/y_sort.h
index 0cf8773b4d..ebfe695da1 100644
--- a/scene/2d/y_sort.h
+++ b/scene/2d/y_sort.h
@@ -32,7 +32,7 @@
#include "scene/2d/node_2d.h"
class YSort : public Node2D {
- OBJ_TYPE(YSort,Node2D);
+ GDCLASS(YSort,Node2D);
bool sort_enabled;
static void _bind_methods();
public: