summaryrefslogtreecommitdiffstats
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-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
-rw-r--r--scene/3d/area.cpp76
-rw-r--r--scene/3d/area.h2
-rw-r--r--scene/3d/baked_light_instance.cpp32
-rw-r--r--scene/3d/baked_light_instance.h4
-rw-r--r--scene/3d/body_shape.cpp26
-rw-r--r--scene/3d/body_shape.h2
-rw-r--r--scene/3d/bone_attachment.cpp4
-rw-r--r--scene/3d/bone_attachment.h2
-rw-r--r--scene/3d/camera.cpp56
-rw-r--r--scene/3d/camera.h2
-rw-r--r--scene/3d/character_camera.cpp48
-rw-r--r--scene/3d/character_camera.h2
-rw-r--r--scene/3d/collision_object.cpp32
-rw-r--r--scene/3d/collision_object.h2
-rw-r--r--scene/3d/collision_polygon.cpp22
-rw-r--r--scene/3d/collision_polygon.h2
-rw-r--r--scene/3d/gi_probe.cpp66
-rw-r--r--scene/3d/gi_probe.h4
-rw-r--r--scene/3d/immediate_geometry.cpp20
-rw-r--r--scene/3d/immediate_geometry.h2
-rw-r--r--scene/3d/interpolated_camera.cpp14
-rw-r--r--scene/3d/interpolated_camera.h2
-rw-r--r--scene/3d/light.cpp44
-rw-r--r--scene/3d/light.h8
-rw-r--r--scene/3d/listener.cpp8
-rw-r--r--scene/3d/listener.h2
-rw-r--r--scene/3d/mesh_instance.cpp20
-rw-r--r--scene/3d/mesh_instance.h2
-rw-r--r--scene/3d/multimesh_instance.cpp4
-rw-r--r--scene/3d/multimesh_instance.h2
-rw-r--r--scene/3d/navigation.cpp24
-rw-r--r--scene/3d/navigation.h2
-rw-r--r--scene/3d/navigation_mesh.cpp24
-rw-r--r--scene/3d/navigation_mesh.h4
-rw-r--r--scene/3d/particles.cpp66
-rw-r--r--scene/3d/particles.h2
-rw-r--r--scene/3d/path.cpp34
-rw-r--r--scene/3d/path.h4
-rw-r--r--scene/3d/physics_body.cpp158
-rw-r--r--scene/3d/physics_body.h8
-rw-r--r--scene/3d/physics_joint.cpp130
-rw-r--r--scene/3d/physics_joint.h16
-rw-r--r--scene/3d/portal.cpp20
-rw-r--r--scene/3d/portal.h2
-rw-r--r--scene/3d/position_3d.h2
-rw-r--r--scene/3d/proximity_group.cpp12
-rw-r--r--scene/3d/proximity_group.h2
-rw-r--r--scene/3d/quad.cpp16
-rw-r--r--scene/3d/quad.h2
-rw-r--r--scene/3d/ray_cast.cpp38
-rw-r--r--scene/3d/ray_cast.h2
-rw-r--r--scene/3d/reflection_probe.cpp48
-rw-r--r--scene/3d/reflection_probe.h2
-rw-r--r--scene/3d/remote_transform.cpp4
-rw-r--r--scene/3d/remote_transform.h2
-rw-r--r--scene/3d/room_instance.cpp8
-rw-r--r--scene/3d/room_instance.h2
-rw-r--r--scene/3d/scenario_fx.cpp4
-rw-r--r--scene/3d/scenario_fx.h2
-rw-r--r--scene/3d/skeleton.cpp44
-rw-r--r--scene/3d/skeleton.h2
-rw-r--r--scene/3d/spatial.cpp92
-rw-r--r--scene/3d/spatial.h4
-rw-r--r--scene/3d/spatial_indexer.cpp2
-rw-r--r--scene/3d/spatial_indexer.h2
-rw-r--r--scene/3d/spatial_player.cpp4
-rw-r--r--scene/3d/spatial_player.h2
-rw-r--r--scene/3d/spatial_sample_player.cpp20
-rw-r--r--scene/3d/spatial_sample_player.h2
-rw-r--r--scene/3d/spatial_stream_player.cpp52
-rw-r--r--scene/3d/spatial_stream_player.h2
-rw-r--r--scene/3d/sprite_3d.cpp102
-rw-r--r--scene/3d/sprite_3d.h8
-rw-r--r--scene/3d/test_cube.h2
-rw-r--r--scene/3d/vehicle_body.cpp64
-rw-r--r--scene/3d/vehicle_body.h4
-rw-r--r--scene/3d/visibility_notifier.cpp12
-rw-r--r--scene/3d/visibility_notifier.h4
-rw-r--r--scene/3d/visual_instance.cpp44
-rw-r--r--scene/3d/visual_instance.h4
-rw-r--r--scene/animation/animation_cache.cpp4
-rw-r--r--scene/animation/animation_cache.h2
-rw-r--r--scene/animation/animation_player.cpp80
-rw-r--r--scene/animation/animation_player.h2
-rw-r--r--scene/animation/animation_tree_player.cpp128
-rw-r--r--scene/animation/animation_tree_player.h2
-rw-r--r--scene/animation/tween.cpp68
-rw-r--r--scene/animation/tween.h2
-rw-r--r--scene/audio/event_player.cpp58
-rw-r--r--scene/audio/event_player.h2
-rw-r--r--scene/audio/sample_player.cpp116
-rw-r--r--scene/audio/sample_player.h2
-rw-r--r--scene/audio/sound_room_params.cpp12
-rw-r--r--scene/audio/sound_room_params.h2
-rw-r--r--scene/audio/stream_player.cpp54
-rw-r--r--scene/audio/stream_player.h2
-rw-r--r--scene/gui/base_button.cpp32
-rw-r--r--scene/gui/base_button.h2
-rw-r--r--scene/gui/box_container.cpp6
-rw-r--r--scene/gui/box_container.h6
-rw-r--r--scene/gui/button.cpp20
-rw-r--r--scene/gui/button.h2
-rw-r--r--scene/gui/button_array.cpp36
-rw-r--r--scene/gui/button_array.h6
-rw-r--r--scene/gui/button_group.cpp12
-rw-r--r--scene/gui/button_group.h2
-rw-r--r--scene/gui/center_container.cpp4
-rw-r--r--scene/gui/center_container.h2
-rw-r--r--scene/gui/check_box.h2
-rw-r--r--scene/gui/check_button.h2
-rw-r--r--scene/gui/color_picker.cpp48
-rw-r--r--scene/gui/color_picker.h4
-rw-r--r--scene/gui/color_ramp_edit.cpp4
-rw-r--r--scene/gui/color_ramp_edit.h4
-rw-r--r--scene/gui/color_rect.cpp4
-rw-r--r--scene/gui/color_rect.h2
-rw-r--r--scene/gui/container.cpp8
-rw-r--r--scene/gui/container.h2
-rw-r--r--scene/gui/control.cpp234
-rw-r--r--scene/gui/control.h2
-rw-r--r--scene/gui/dialogs.cpp38
-rw-r--r--scene/gui/dialogs.h8
-rw-r--r--scene/gui/file_dialog.cpp80
-rw-r--r--scene/gui/file_dialog.h4
-rw-r--r--scene/gui/graph_edit.cpp56
-rw-r--r--scene/gui/graph_edit.h4
-rw-r--r--scene/gui/graph_node.cpp88
-rw-r--r--scene/gui/graph_node.h2
-rw-r--r--scene/gui/grid_container.cpp4
-rw-r--r--scene/gui/grid_container.h2
-rw-r--r--scene/gui/input_action.cpp10
-rw-r--r--scene/gui/input_action.h2
-rw-r--r--scene/gui/item_list.cpp102
-rw-r--r--scene/gui/item_list.h2
-rw-r--r--scene/gui/label.cpp48
-rw-r--r--scene/gui/label.h2
-rw-r--r--scene/gui/line_edit.cpp64
-rw-r--r--scene/gui/line_edit.h2
-rw-r--r--scene/gui/link_button.cpp8
-rw-r--r--scene/gui/link_button.h2
-rw-r--r--scene/gui/margin_container.h2
-rw-r--r--scene/gui/menu_button.cpp8
-rw-r--r--scene/gui/menu_button.h2
-rw-r--r--scene/gui/option_button.cpp52
-rw-r--r--scene/gui/option_button.h2
-rw-r--r--scene/gui/panel.h2
-rw-r--r--scene/gui/panel_container.h2
-rw-r--r--scene/gui/patch_9_frame.cpp20
-rw-r--r--scene/gui/patch_9_frame.h2
-rw-r--r--scene/gui/popup.cpp12
-rw-r--r--scene/gui/popup.h4
-rw-r--r--scene/gui/popup_menu.cpp110
-rw-r--r--scene/gui/popup_menu.h2
-rw-r--r--scene/gui/progress_bar.cpp4
-rw-r--r--scene/gui/progress_bar.h2
-rw-r--r--scene/gui/range.cpp42
-rw-r--r--scene/gui/range.h2
-rw-r--r--scene/gui/reference_frame.h2
-rw-r--r--scene/gui/rich_text_label.cpp78
-rw-r--r--scene/gui/rich_text_label.h2
-rw-r--r--scene/gui/scroll_bar.cpp10
-rw-r--r--scene/gui/scroll_bar.h6
-rw-r--r--scene/gui/scroll_container.cpp22
-rw-r--r--scene/gui/scroll_container.h2
-rw-r--r--scene/gui/separator.h6
-rw-r--r--scene/gui/slider.cpp10
-rw-r--r--scene/gui/slider.h6
-rw-r--r--scene/gui/spin_box.cpp26
-rw-r--r--scene/gui/spin_box.h2
-rw-r--r--scene/gui/split_container.cpp14
-rw-r--r--scene/gui/split_container.h6
-rw-r--r--scene/gui/tab_container.cpp36
-rw-r--r--scene/gui/tab_container.h2
-rw-r--r--scene/gui/tabs.cpp26
-rw-r--r--scene/gui/tabs.h2
-rw-r--r--scene/gui/text_edit.cpp132
-rw-r--r--scene/gui/text_edit.h2
-rw-r--r--scene/gui/texture_button.cpp34
-rw-r--r--scene/gui/texture_button.h2
-rw-r--r--scene/gui/texture_frame.cpp16
-rw-r--r--scene/gui/texture_frame.h2
-rw-r--r--scene/gui/texture_progress.cpp28
-rw-r--r--scene/gui/texture_progress.h2
-rw-r--r--scene/gui/tool_button.h2
-rw-r--r--scene/gui/tree.cpp182
-rw-r--r--scene/gui/tree.h4
-rw-r--r--scene/gui/video_player.cpp44
-rw-r--r--scene/gui/video_player.h2
-rw-r--r--scene/gui/viewport_container.cpp4
-rw-r--r--scene/gui/viewport_container.h2
-rw-r--r--scene/io/resource_format_image.cpp2
-rw-r--r--scene/main/canvas_layer.cpp36
-rw-r--r--scene/main/canvas_layer.h2
-rw-r--r--scene/main/http_request.cpp32
-rw-r--r--scene/main/http_request.h2
-rw-r--r--scene/main/instance_placeholder.cpp6
-rw-r--r--scene/main/instance_placeholder.h2
-rw-r--r--scene/main/node.cpp190
-rw-r--r--scene/main/node.h2
-rw-r--r--scene/main/resource_preloader.cpp18
-rw-r--r--scene/main/resource_preloader.h2
-rw-r--r--scene/main/scene_main_loop.cpp92
-rw-r--r--scene/main/scene_main_loop.h4
-rw-r--r--scene/main/timer.cpp26
-rw-r--r--scene/main/timer.h2
-rw-r--r--scene/main/viewport.cpp142
-rw-r--r--scene/main/viewport.h4
-rw-r--r--scene/register_scene_types.cpp543
-rw-r--r--scene/resources/animation.cpp76
-rw-r--r--scene/resources/animation.h2
-rw-r--r--scene/resources/audio_stream.cpp24
-rw-r--r--scene/resources/audio_stream.h4
-rw-r--r--scene/resources/audio_stream_resampled.h2
-rw-r--r--scene/resources/bit_mask.cpp18
-rw-r--r--scene/resources/bit_mask.h2
-rw-r--r--scene/resources/bounds.cpp4
-rw-r--r--scene/resources/bounds.h2
-rw-r--r--scene/resources/box_shape.cpp4
-rw-r--r--scene/resources/box_shape.h2
-rw-r--r--scene/resources/canvas.h2
-rw-r--r--scene/resources/capsule_shape.cpp8
-rw-r--r--scene/resources/capsule_shape.h2
-rw-r--r--scene/resources/capsule_shape_2d.cpp8
-rw-r--r--scene/resources/capsule_shape_2d.h2
-rw-r--r--scene/resources/circle_shape_2d.cpp4
-rw-r--r--scene/resources/circle_shape_2d.h2
-rw-r--r--scene/resources/color_ramp.cpp24
-rw-r--r--scene/resources/color_ramp.h2
-rw-r--r--scene/resources/concave_polygon_shape.cpp4
-rw-r--r--scene/resources/concave_polygon_shape.h2
-rw-r--r--scene/resources/concave_polygon_shape_2d.cpp4
-rw-r--r--scene/resources/concave_polygon_shape_2d.h2
-rw-r--r--scene/resources/convex_polygon_shape.cpp4
-rw-r--r--scene/resources/convex_polygon_shape.h2
-rw-r--r--scene/resources/convex_polygon_shape_2d.cpp6
-rw-r--r--scene/resources/convex_polygon_shape_2d.h2
-rw-r--r--scene/resources/curve.cpp138
-rw-r--r--scene/resources/curve.h6
-rw-r--r--scene/resources/dynamic_font.cpp34
-rw-r--r--scene/resources/dynamic_font.h6
-rw-r--r--scene/resources/dynamic_font_stb.cpp8
-rw-r--r--scene/resources/dynamic_font_stb.h6
-rw-r--r--scene/resources/environment.cpp232
-rw-r--r--scene/resources/environment.h2
-rw-r--r--scene/resources/event_stream.h4
-rw-r--r--scene/resources/font.cpp56
-rw-r--r--scene/resources/font.h4
-rw-r--r--scene/resources/gibberish_stream.cpp16
-rw-r--r--scene/resources/gibberish_stream.h2
-rw-r--r--scene/resources/material.cpp128
-rw-r--r--scene/resources/material.h4
-rw-r--r--scene/resources/mesh.cpp50
-rw-r--r--scene/resources/mesh.h2
-rw-r--r--scene/resources/mesh_data_tool.cpp76
-rw-r--r--scene/resources/mesh_data_tool.h2
-rw-r--r--scene/resources/mesh_library.cpp26
-rw-r--r--scene/resources/mesh_library.h2
-rw-r--r--scene/resources/multimesh.cpp40
-rw-r--r--scene/resources/multimesh.h2
-rw-r--r--scene/resources/packed_scene.cpp56
-rw-r--r--scene/resources/packed_scene.h4
-rw-r--r--scene/resources/plane_shape.cpp4
-rw-r--r--scene/resources/plane_shape.h2
-rw-r--r--scene/resources/polygon_path_finder.cpp22
-rw-r--r--scene/resources/polygon_path_finder.h2
-rw-r--r--scene/resources/ray_shape.cpp4
-rw-r--r--scene/resources/ray_shape.h2
-rw-r--r--scene/resources/rectangle_shape_2d.cpp4
-rw-r--r--scene/resources/rectangle_shape_2d.h2
-rw-r--r--scene/resources/room.cpp4
-rw-r--r--scene/resources/room.h2
-rw-r--r--scene/resources/sample.cpp34
-rw-r--r--scene/resources/sample.h2
-rw-r--r--scene/resources/sample_library.cpp18
-rw-r--r--scene/resources/sample_library.h2
-rw-r--r--scene/resources/scene_format_text.cpp14
-rw-r--r--scene/resources/scene_preloader.cpp18
-rw-r--r--scene/resources/scene_preloader.h2
-rw-r--r--scene/resources/segment_shape_2d.cpp12
-rw-r--r--scene/resources/segment_shape_2d.h4
-rw-r--r--scene/resources/shader.cpp14
-rw-r--r--scene/resources/shader.h8
-rw-r--r--scene/resources/shader_graph.cpp152
-rw-r--r--scene/resources/shader_graph.h6
-rw-r--r--scene/resources/shape.h2
-rw-r--r--scene/resources/shape_2d.cpp12
-rw-r--r--scene/resources/shape_2d.h2
-rw-r--r--scene/resources/shape_line_2d.cpp8
-rw-r--r--scene/resources/shape_line_2d.h2
-rw-r--r--scene/resources/sky_box.cpp8
-rw-r--r--scene/resources/sky_box.h4
-rw-r--r--scene/resources/space_2d.cpp4
-rw-r--r--scene/resources/space_2d.h2
-rw-r--r--scene/resources/sphere_shape.cpp4
-rw-r--r--scene/resources/sphere_shape.h2
-rw-r--r--scene/resources/style_box.cpp68
-rw-r--r--scene/resources/style_box.h8
-rw-r--r--scene/resources/surface_tool.cpp38
-rw-r--r--scene/resources/surface_tool.h2
-rw-r--r--scene/resources/texture.cpp118
-rw-r--r--scene/resources/texture.h10
-rw-r--r--scene/resources/theme.cpp62
-rw-r--r--scene/resources/theme.h2
-rw-r--r--scene/resources/tile_set.cpp62
-rw-r--r--scene/resources/tile_set.h2
-rw-r--r--scene/resources/video_stream.h4
-rw-r--r--scene/resources/world.cpp12
-rw-r--r--scene/resources/world.h2
-rw-r--r--scene/resources/world_2d.cpp8
-rw-r--r--scene/resources/world_2d.h2
372 files changed, 4351 insertions, 4358 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:
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index 031e243676..c0c02219f7 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -576,63 +576,63 @@ bool Area::get_layer_mask_bit(int p_bit) const{
void Area::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_body_enter_tree","id"),&Area::_body_enter_tree);
- ObjectTypeDB::bind_method(_MD("_body_exit_tree","id"),&Area::_body_exit_tree);
+ ClassDB::bind_method(_MD("_body_enter_tree","id"),&Area::_body_enter_tree);
+ ClassDB::bind_method(_MD("_body_exit_tree","id"),&Area::_body_exit_tree);
- ObjectTypeDB::bind_method(_MD("_area_enter_tree","id"),&Area::_area_enter_tree);
- ObjectTypeDB::bind_method(_MD("_area_exit_tree","id"),&Area::_area_exit_tree);
+ ClassDB::bind_method(_MD("_area_enter_tree","id"),&Area::_area_enter_tree);
+ ClassDB::bind_method(_MD("_area_exit_tree","id"),&Area::_area_exit_tree);
- ObjectTypeDB::bind_method(_MD("set_space_override_mode","enable"),&Area::set_space_override_mode);
- ObjectTypeDB::bind_method(_MD("get_space_override_mode"),&Area::get_space_override_mode);
+ ClassDB::bind_method(_MD("set_space_override_mode","enable"),&Area::set_space_override_mode);
+ ClassDB::bind_method(_MD("get_space_override_mode"),&Area::get_space_override_mode);
- ObjectTypeDB::bind_method(_MD("set_gravity_is_point","enable"),&Area::set_gravity_is_point);
- ObjectTypeDB::bind_method(_MD("is_gravity_a_point"),&Area::is_gravity_a_point);
+ ClassDB::bind_method(_MD("set_gravity_is_point","enable"),&Area::set_gravity_is_point);
+ ClassDB::bind_method(_MD("is_gravity_a_point"),&Area::is_gravity_a_point);
- ObjectTypeDB::bind_method(_MD("set_gravity_distance_scale","distance_scale"),&Area::set_gravity_distance_scale);
- ObjectTypeDB::bind_method(_MD("get_gravity_distance_scale"),&Area::get_gravity_distance_scale);
+ ClassDB::bind_method(_MD("set_gravity_distance_scale","distance_scale"),&Area::set_gravity_distance_scale);
+ ClassDB::bind_method(_MD("get_gravity_distance_scale"),&Area::get_gravity_distance_scale);
- ObjectTypeDB::bind_method(_MD("set_gravity_vector","vector"),&Area::set_gravity_vector);
- ObjectTypeDB::bind_method(_MD("get_gravity_vector"),&Area::get_gravity_vector);
+ ClassDB::bind_method(_MD("set_gravity_vector","vector"),&Area::set_gravity_vector);
+ ClassDB::bind_method(_MD("get_gravity_vector"),&Area::get_gravity_vector);
- ObjectTypeDB::bind_method(_MD("set_gravity","gravity"),&Area::set_gravity);
- ObjectTypeDB::bind_method(_MD("get_gravity"),&Area::get_gravity);
+ ClassDB::bind_method(_MD("set_gravity","gravity"),&Area::set_gravity);
+ ClassDB::bind_method(_MD("get_gravity"),&Area::get_gravity);
- ObjectTypeDB::bind_method(_MD("set_angular_damp","angular_damp"),&Area::set_angular_damp);
- ObjectTypeDB::bind_method(_MD("get_angular_damp"),&Area::get_angular_damp);
+ ClassDB::bind_method(_MD("set_angular_damp","angular_damp"),&Area::set_angular_damp);
+ ClassDB::bind_method(_MD("get_angular_damp"),&Area::get_angular_damp);
- ObjectTypeDB::bind_method(_MD("set_linear_damp","linear_damp"),&Area::set_linear_damp);
- ObjectTypeDB::bind_method(_MD("get_linear_damp"),&Area::get_linear_damp);
+ ClassDB::bind_method(_MD("set_linear_damp","linear_damp"),&Area::set_linear_damp);
+ ClassDB::bind_method(_MD("get_linear_damp"),&Area::get_linear_damp);
- ObjectTypeDB::bind_method(_MD("set_priority","priority"),&Area::set_priority);
- ObjectTypeDB::bind_method(_MD("get_priority"),&Area::get_priority);
+ ClassDB::bind_method(_MD("set_priority","priority"),&Area::set_priority);
+ ClassDB::bind_method(_MD("get_priority"),&Area::get_priority);
- ObjectTypeDB::bind_method(_MD("set_collision_mask","collision_mask"),&Area::set_collision_mask);
- ObjectTypeDB::bind_method(_MD("get_collision_mask"),&Area::get_collision_mask);
+ ClassDB::bind_method(_MD("set_collision_mask","collision_mask"),&Area::set_collision_mask);
+ ClassDB::bind_method(_MD("get_collision_mask"),&Area::get_collision_mask);
- ObjectTypeDB::bind_method(_MD("set_layer_mask","layer_mask"),&Area::set_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_layer_mask"),&Area::get_layer_mask);
+ ClassDB::bind_method(_MD("set_layer_mask","layer_mask"),&Area::set_layer_mask);
+ ClassDB::bind_method(_MD("get_layer_mask"),&Area::get_layer_mask);
- ObjectTypeDB::bind_method(_MD("set_collision_mask_bit","bit","value"),&Area::set_collision_mask_bit);
- ObjectTypeDB::bind_method(_MD("get_collision_mask_bit","bit"),&Area::get_collision_mask_bit);
+ ClassDB::bind_method(_MD("set_collision_mask_bit","bit","value"),&Area::set_collision_mask_bit);
+ ClassDB::bind_method(_MD("get_collision_mask_bit","bit"),&Area::get_collision_mask_bit);
- ObjectTypeDB::bind_method(_MD("set_layer_mask_bit","bit","value"),&Area::set_layer_mask_bit);
- ObjectTypeDB::bind_method(_MD("get_layer_mask_bit","bit"),&Area::get_layer_mask_bit);
+ ClassDB::bind_method(_MD("set_layer_mask_bit","bit","value"),&Area::set_layer_mask_bit);
+ ClassDB::bind_method(_MD("get_layer_mask_bit","bit"),&Area::get_layer_mask_bit);
- ObjectTypeDB::bind_method(_MD("set_monitorable","enable"),&Area::set_monitorable);
- ObjectTypeDB::bind_method(_MD("is_monitorable"),&Area::is_monitorable);
+ ClassDB::bind_method(_MD("set_monitorable","enable"),&Area::set_monitorable);
+ ClassDB::bind_method(_MD("is_monitorable"),&Area::is_monitorable);
- ObjectTypeDB::bind_method(_MD("set_enable_monitoring","enable"),&Area::set_enable_monitoring);
- ObjectTypeDB::bind_method(_MD("is_monitoring_enabled"),&Area::is_monitoring_enabled);
+ ClassDB::bind_method(_MD("set_enable_monitoring","enable"),&Area::set_enable_monitoring);
+ ClassDB::bind_method(_MD("is_monitoring_enabled"),&Area::is_monitoring_enabled);
- ObjectTypeDB::bind_method(_MD("get_overlapping_bodies"),&Area::get_overlapping_bodies);
- ObjectTypeDB::bind_method(_MD("get_overlapping_areas"),&Area::get_overlapping_areas);
+ ClassDB::bind_method(_MD("get_overlapping_bodies"),&Area::get_overlapping_bodies);
+ ClassDB::bind_method(_MD("get_overlapping_areas"),&Area::get_overlapping_areas);
- ObjectTypeDB::bind_method(_MD("overlaps_body","body"),&Area::overlaps_body);
- ObjectTypeDB::bind_method(_MD("overlaps_area","area"),&Area::overlaps_area);
+ ClassDB::bind_method(_MD("overlaps_body","body"),&Area::overlaps_body);
+ ClassDB::bind_method(_MD("overlaps_area","area"),&Area::overlaps_area);
- ObjectTypeDB::bind_method(_MD("_body_inout"),&Area::_body_inout);
- ObjectTypeDB::bind_method(_MD("_area_inout"),&Area::_area_inout);
+ ClassDB::bind_method(_MD("_body_inout"),&Area::_body_inout);
+ ClassDB::bind_method(_MD("_area_inout"),&Area::_area_inout);
ADD_SIGNAL( MethodInfo("body_enter_shape",PropertyInfo(Variant::INT,"body_id"),PropertyInfo(Variant::OBJECT,"body"),PropertyInfo(Variant::INT,"body_shape"),PropertyInfo(Variant::INT,"area_shape")));
diff --git a/scene/3d/area.h b/scene/3d/area.h
index 7ff5755d99..3260bad0a4 100644
--- a/scene/3d/area.h
+++ b/scene/3d/area.h
@@ -34,7 +34,7 @@
class Area : public CollisionObject {
- OBJ_TYPE( Area, CollisionObject );
+ GDCLASS( Area, CollisionObject );
public:
enum SpaceOverride {
diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp
index 051256deb4..b5cc451835 100644
--- a/scene/3d/baked_light_instance.cpp
+++ b/scene/3d/baked_light_instance.cpp
@@ -1715,24 +1715,24 @@ void BakedLight::_debug_mesh_light() {
void BakedLight::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_cell_subdiv","steps"),&BakedLight::set_cell_subdiv);
- ObjectTypeDB::bind_method(_MD("get_cell_subdiv"),&BakedLight::get_cell_subdiv);
+ ClassDB::bind_method(_MD("set_cell_subdiv","steps"),&BakedLight::set_cell_subdiv);
+ ClassDB::bind_method(_MD("get_cell_subdiv"),&BakedLight::get_cell_subdiv);
- ObjectTypeDB::bind_method(_MD("bake"),&BakedLight::bake);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("bake"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(_MD("bake"),&BakedLight::bake);
+ ClassDB::set_method_flags(get_class_static(),_SCS("bake"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::bind_method(_MD("bake_lights"),&BakedLight::bake_lights);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("bake_lights"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(_MD("bake_lights"),&BakedLight::bake_lights);
+ ClassDB::set_method_flags(get_class_static(),_SCS("bake_lights"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::bind_method(_MD("bake_radiance"),&BakedLight::bake_radiance);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("bake_radiance"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(_MD("bake_radiance"),&BakedLight::bake_radiance);
+ ClassDB::set_method_flags(get_class_static(),_SCS("bake_radiance"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::bind_method(_MD("debug_mesh_albedo"),&BakedLight::_debug_mesh_albedo);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("debug_mesh_albedo"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(_MD("debug_mesh_albedo"),&BakedLight::_debug_mesh_albedo);
+ ClassDB::set_method_flags(get_class_static(),_SCS("debug_mesh_albedo"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::bind_method(_MD("debug_mesh_light"),&BakedLight::_debug_mesh_light);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("debug_mesh_light"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(_MD("debug_mesh_light"),&BakedLight::_debug_mesh_light);
+ ClassDB::set_method_flags(get_class_static(),_SCS("debug_mesh_light"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
ADD_PROPERTY(PropertyInfo(Variant::INT,"cell_subdiv"),_SCS("set_cell_subdiv"),_SCS("get_cell_subdiv"));
ADD_SIGNAL( MethodInfo("baked_light_changed"));
@@ -1794,11 +1794,11 @@ DVector<Face3> BakedLightSampler::get_faces(uint32_t p_usage_flags) const {
void BakedLightSampler::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_param","param","value"),&BakedLightSampler::set_param);
- ObjectTypeDB::bind_method(_MD("get_param","param"),&BakedLightSampler::get_param);
+ ClassDB::bind_method(_MD("set_param","param","value"),&BakedLightSampler::set_param);
+ ClassDB::bind_method(_MD("get_param","param"),&BakedLightSampler::get_param);
- ObjectTypeDB::bind_method(_MD("set_resolution","resolution"),&BakedLightSampler::set_resolution);
- ObjectTypeDB::bind_method(_MD("get_resolution"),&BakedLightSampler::get_resolution);
+ ClassDB::bind_method(_MD("set_resolution","resolution"),&BakedLightSampler::set_resolution);
+ ClassDB::bind_method(_MD("get_resolution"),&BakedLightSampler::get_resolution);
BIND_CONSTANT( PARAM_RADIUS );
diff --git a/scene/3d/baked_light_instance.h b/scene/3d/baked_light_instance.h
index 4913eae908..d097a9af60 100644
--- a/scene/3d/baked_light_instance.h
+++ b/scene/3d/baked_light_instance.h
@@ -38,7 +38,7 @@ class BakedLightBaker;
class Light;
class BakedLight : public VisualInstance {
- OBJ_TYPE(BakedLight,VisualInstance);
+ GDCLASS(BakedLight,VisualInstance);
public:
enum DebugMode {
@@ -168,7 +168,7 @@ public:
#if 0
class BakedLightSampler : public VisualInstance {
- OBJ_TYPE(BakedLightSampler,VisualInstance);
+ GDCLASS(BakedLightSampler,VisualInstance);
public:
diff --git a/scene/3d/body_shape.cpp b/scene/3d/body_shape.cpp
index 0dca5a9796..0f71933388 100644
--- a/scene/3d/body_shape.cpp
+++ b/scene/3d/body_shape.cpp
@@ -414,18 +414,18 @@ String CollisionShape::get_configuration_warning() const {
void CollisionShape::_bind_methods() {
//not sure if this should do anything
- ObjectTypeDB::bind_method(_MD("resource_changed","resource"),&CollisionShape::resource_changed);
- ObjectTypeDB::bind_method(_MD("set_shape","shape"),&CollisionShape::set_shape);
- ObjectTypeDB::bind_method(_MD("get_shape"),&CollisionShape::get_shape);
- ObjectTypeDB::bind_method(_MD("_add_to_collision_object"),&CollisionShape::_add_to_collision_object);
- ObjectTypeDB::bind_method(_MD("set_trigger","enable"),&CollisionShape::set_trigger);
- ObjectTypeDB::bind_method(_MD("is_trigger"),&CollisionShape::is_trigger);
- ObjectTypeDB::bind_method(_MD("make_convex_from_brothers"),&CollisionShape::make_convex_from_brothers);
- ObjectTypeDB::set_method_flags("CollisionShape","make_convex_from_brothers",METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::bind_method(_MD("_set_update_shape_index","index"),&CollisionShape::_set_update_shape_index);
- ObjectTypeDB::bind_method(_MD("_get_update_shape_index"),&CollisionShape::_get_update_shape_index);
-
- ObjectTypeDB::bind_method(_MD("get_collision_object_shape_index"),&CollisionShape::get_collision_object_shape_index);
+ ClassDB::bind_method(_MD("resource_changed","resource"),&CollisionShape::resource_changed);
+ ClassDB::bind_method(_MD("set_shape","shape"),&CollisionShape::set_shape);
+ ClassDB::bind_method(_MD("get_shape"),&CollisionShape::get_shape);
+ ClassDB::bind_method(_MD("_add_to_collision_object"),&CollisionShape::_add_to_collision_object);
+ ClassDB::bind_method(_MD("set_trigger","enable"),&CollisionShape::set_trigger);
+ ClassDB::bind_method(_MD("is_trigger"),&CollisionShape::is_trigger);
+ ClassDB::bind_method(_MD("make_convex_from_brothers"),&CollisionShape::make_convex_from_brothers);
+ ClassDB::set_method_flags("CollisionShape","make_convex_from_brothers",METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(_MD("_set_update_shape_index","index"),&CollisionShape::_set_update_shape_index);
+ ClassDB::bind_method(_MD("_get_update_shape_index"),&CollisionShape::_get_update_shape_index);
+
+ ClassDB::bind_method(_MD("get_collision_object_shape_index"),&CollisionShape::get_collision_object_shape_index);
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape"), _SCS("set_shape"), _SCS("get_shape"));
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"trigger"),_SCS("set_trigger"),_SCS("is_trigger"));
@@ -620,7 +620,7 @@ RID CollisionShape::_get_visual_instance_rid() const {
void CollisionShape::_bind_methods() {
- ObjectTypeDB::bind_method("_get_visual_instance_rid",&CollisionShape::_get_visual_instance_rid);
+ ClassDB::bind_method("_get_visual_instance_rid",&CollisionShape::_get_visual_instance_rid);
}
CollisionShape::CollisionShape() {
diff --git a/scene/3d/body_shape.h b/scene/3d/body_shape.h
index 82f03da822..a7c3678251 100644
--- a/scene/3d/body_shape.h
+++ b/scene/3d/body_shape.h
@@ -34,7 +34,7 @@
class CollisionShape : public Spatial {
- OBJ_TYPE( CollisionShape, Spatial );
+ GDCLASS( CollisionShape, Spatial );
OBJ_CATEGORY("3D Physics Nodes");
Ref<Shape> shape;
diff --git a/scene/3d/bone_attachment.cpp b/scene/3d/bone_attachment.cpp
index fb961c1fec..c3ab2df939 100644
--- a/scene/3d/bone_attachment.cpp
+++ b/scene/3d/bone_attachment.cpp
@@ -139,6 +139,6 @@ BoneAttachment::BoneAttachment()
}
void BoneAttachment::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_bone_name","bone_name"),&BoneAttachment::set_bone_name);
- ObjectTypeDB::bind_method(_MD("get_bone_name"),&BoneAttachment::get_bone_name);
+ ClassDB::bind_method(_MD("set_bone_name","bone_name"),&BoneAttachment::set_bone_name);
+ ClassDB::bind_method(_MD("get_bone_name"),&BoneAttachment::get_bone_name);
}
diff --git a/scene/3d/bone_attachment.h b/scene/3d/bone_attachment.h
index 26514acdf9..9bcbb82865 100644
--- a/scene/3d/bone_attachment.h
+++ b/scene/3d/bone_attachment.h
@@ -33,7 +33,7 @@
class BoneAttachment : public Spatial {
- OBJ_TYPE(BoneAttachment,Spatial);
+ GDCLASS(BoneAttachment,Spatial);
bool bound;
String bone_name;
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index a9a5ea7371..69a1f42a65 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -546,34 +546,34 @@ Camera::KeepAspect Camera::get_keep_aspect_mode() const{
void Camera::_bind_methods() {
- ObjectTypeDB::bind_method( _MD("project_ray_normal","screen_point"), &Camera::project_ray_normal);
- ObjectTypeDB::bind_method( _MD("project_local_ray_normal","screen_point"), &Camera::project_local_ray_normal);
- ObjectTypeDB::bind_method( _MD("project_ray_origin","screen_point"), &Camera::project_ray_origin);
- ObjectTypeDB::bind_method( _MD("unproject_position","world_point"), &Camera::unproject_position);
- ObjectTypeDB::bind_method( _MD("is_position_behind","world_point"), &Camera::is_position_behind);
- ObjectTypeDB::bind_method( _MD("project_position","screen_point"), &Camera::project_position);
- ObjectTypeDB::bind_method( _MD("set_perspective","fov","z_near","z_far"),&Camera::set_perspective );
- ObjectTypeDB::bind_method( _MD("set_orthogonal","size","z_near","z_far"),&Camera::set_orthogonal );
- ObjectTypeDB::bind_method( _MD("make_current"),&Camera::make_current );
- ObjectTypeDB::bind_method( _MD("clear_current"),&Camera::clear_current );
- ObjectTypeDB::bind_method( _MD("is_current"),&Camera::is_current );
- ObjectTypeDB::bind_method( _MD("get_camera_transform"),&Camera::get_camera_transform );
- ObjectTypeDB::bind_method( _MD("get_fov"),&Camera::get_fov );
- ObjectTypeDB::bind_method( _MD("get_size"),&Camera::get_size );
- ObjectTypeDB::bind_method( _MD("get_zfar"),&Camera::get_zfar );
- ObjectTypeDB::bind_method( _MD("get_znear"),&Camera::get_znear );
- ObjectTypeDB::bind_method( _MD("get_projection"),&Camera::get_projection );
- ObjectTypeDB::bind_method( _MD("set_h_offset","ofs"),&Camera::set_h_offset );
- ObjectTypeDB::bind_method( _MD("get_h_offset"),&Camera::get_h_offset );
- ObjectTypeDB::bind_method( _MD("set_v_offset","ofs"),&Camera::set_v_offset );
- ObjectTypeDB::bind_method( _MD("get_v_offset"),&Camera::get_v_offset );
- ObjectTypeDB::bind_method( _MD("set_cull_mask","mask"),&Camera::set_cull_mask );
- ObjectTypeDB::bind_method( _MD("get_cull_mask"),&Camera::get_cull_mask );
- ObjectTypeDB::bind_method( _MD("set_environment","env:Environment"),&Camera::set_environment );
- ObjectTypeDB::bind_method( _MD("get_environment:Environment"),&Camera::get_environment );
- ObjectTypeDB::bind_method( _MD("set_keep_aspect_mode","mode"),&Camera::set_keep_aspect_mode );
- ObjectTypeDB::bind_method( _MD("get_keep_aspect_mode"),&Camera::get_keep_aspect_mode );
- //ObjectTypeDB::bind_method( _MD("_camera_make_current"),&Camera::_camera_make_current );
+ ClassDB::bind_method( _MD("project_ray_normal","screen_point"), &Camera::project_ray_normal);
+ ClassDB::bind_method( _MD("project_local_ray_normal","screen_point"), &Camera::project_local_ray_normal);
+ ClassDB::bind_method( _MD("project_ray_origin","screen_point"), &Camera::project_ray_origin);
+ ClassDB::bind_method( _MD("unproject_position","world_point"), &Camera::unproject_position);
+ ClassDB::bind_method( _MD("is_position_behind","world_point"), &Camera::is_position_behind);
+ ClassDB::bind_method( _MD("project_position","screen_point"), &Camera::project_position);
+ ClassDB::bind_method( _MD("set_perspective","fov","z_near","z_far"),&Camera::set_perspective );
+ ClassDB::bind_method( _MD("set_orthogonal","size","z_near","z_far"),&Camera::set_orthogonal );
+ ClassDB::bind_method( _MD("make_current"),&Camera::make_current );
+ ClassDB::bind_method( _MD("clear_current"),&Camera::clear_current );
+ ClassDB::bind_method( _MD("is_current"),&Camera::is_current );
+ ClassDB::bind_method( _MD("get_camera_transform"),&Camera::get_camera_transform );
+ ClassDB::bind_method( _MD("get_fov"),&Camera::get_fov );
+ ClassDB::bind_method( _MD("get_size"),&Camera::get_size );
+ ClassDB::bind_method( _MD("get_zfar"),&Camera::get_zfar );
+ ClassDB::bind_method( _MD("get_znear"),&Camera::get_znear );
+ ClassDB::bind_method( _MD("get_projection"),&Camera::get_projection );
+ ClassDB::bind_method( _MD("set_h_offset","ofs"),&Camera::set_h_offset );
+ ClassDB::bind_method( _MD("get_h_offset"),&Camera::get_h_offset );
+ ClassDB::bind_method( _MD("set_v_offset","ofs"),&Camera::set_v_offset );
+ ClassDB::bind_method( _MD("get_v_offset"),&Camera::get_v_offset );
+ ClassDB::bind_method( _MD("set_cull_mask","mask"),&Camera::set_cull_mask );
+ ClassDB::bind_method( _MD("get_cull_mask"),&Camera::get_cull_mask );
+ ClassDB::bind_method( _MD("set_environment","env:Environment"),&Camera::set_environment );
+ ClassDB::bind_method( _MD("get_environment:Environment"),&Camera::get_environment );
+ ClassDB::bind_method( _MD("set_keep_aspect_mode","mode"),&Camera::set_keep_aspect_mode );
+ ClassDB::bind_method( _MD("get_keep_aspect_mode"),&Camera::get_keep_aspect_mode );
+ //ClassDB::bind_method( _MD("_camera_make_current"),&Camera::_camera_make_current );
BIND_CONSTANT( PROJECTION_PERSPECTIVE );
BIND_CONSTANT( PROJECTION_ORTHOGONAL );
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index 409cc29401..5301c06ee5 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -38,7 +38,7 @@
*/
class Camera : public Spatial {
- OBJ_TYPE( Camera, Spatial );
+ GDCLASS( Camera, Spatial );
public:
enum Projection {
diff --git a/scene/3d/character_camera.cpp b/scene/3d/character_camera.cpp
index afa49bedbe..e8b7759a98 100644
--- a/scene/3d/character_camera.cpp
+++ b/scene/3d/character_camera.cpp
@@ -634,30 +634,30 @@ float CharacterCamera::get_autoturn_speed() const {
void CharacterCamera::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_camera_type","type"),&CharacterCamera::set_camera_type);
- ObjectTypeDB::bind_method(_MD("get_camera_type"),&CharacterCamera::get_camera_type);
- ObjectTypeDB::bind_method(_MD("set_orbit","orbit"),&CharacterCamera::set_orbit);
- ObjectTypeDB::bind_method(_MD("get_orbit"),&CharacterCamera::get_orbit);
- ObjectTypeDB::bind_method(_MD("set_orbit_x","x"),&CharacterCamera::set_orbit_x);
- ObjectTypeDB::bind_method(_MD("set_orbit_y","y"),&CharacterCamera::set_orbit_y);
- ObjectTypeDB::bind_method(_MD("set_min_orbit_x","x"),&CharacterCamera::set_min_orbit_x);
- ObjectTypeDB::bind_method(_MD("get_min_orbit_x"),&CharacterCamera::get_min_orbit_x);
- ObjectTypeDB::bind_method(_MD("set_max_orbit_x","x"),&CharacterCamera::set_max_orbit_x);
- ObjectTypeDB::bind_method(_MD("get_max_orbit_x"),&CharacterCamera::get_max_orbit_x);
- ObjectTypeDB::bind_method(_MD("rotate_orbit"),&CharacterCamera::rotate_orbit);
- ObjectTypeDB::bind_method(_MD("set_distance","distance"),&CharacterCamera::set_distance);
- ObjectTypeDB::bind_method(_MD("get_distance"),&CharacterCamera::get_distance);
- ObjectTypeDB::bind_method(_MD("set_clip","enable"),&CharacterCamera::set_clip);
- ObjectTypeDB::bind_method(_MD("has_clip"),&CharacterCamera::has_clip);
- ObjectTypeDB::bind_method(_MD("set_autoturn","enable"),&CharacterCamera::set_autoturn);
- ObjectTypeDB::bind_method(_MD("has_autoturn"),&CharacterCamera::has_autoturn);
- ObjectTypeDB::bind_method(_MD("set_autoturn_tolerance","degrees"),&CharacterCamera::set_autoturn_tolerance);
- ObjectTypeDB::bind_method(_MD("get_autoturn_tolerance"),&CharacterCamera::get_autoturn_tolerance);
- ObjectTypeDB::bind_method(_MD("set_autoturn_speed","speed"),&CharacterCamera::set_autoturn_speed);
- ObjectTypeDB::bind_method(_MD("get_autoturn_speed"),&CharacterCamera::get_autoturn_speed);
- ObjectTypeDB::bind_method(_MD("set_use_lookat_target","use","lookat"),&CharacterCamera::set_use_lookat_target, DEFVAL(Vector3()));
-
- ObjectTypeDB::bind_method(_MD("_ray_collision"),&CharacterCamera::_ray_collision);
+ ClassDB::bind_method(_MD("set_camera_type","type"),&CharacterCamera::set_camera_type);
+ ClassDB::bind_method(_MD("get_camera_type"),&CharacterCamera::get_camera_type);
+ ClassDB::bind_method(_MD("set_orbit","orbit"),&CharacterCamera::set_orbit);
+ ClassDB::bind_method(_MD("get_orbit"),&CharacterCamera::get_orbit);
+ ClassDB::bind_method(_MD("set_orbit_x","x"),&CharacterCamera::set_orbit_x);
+ ClassDB::bind_method(_MD("set_orbit_y","y"),&CharacterCamera::set_orbit_y);
+ ClassDB::bind_method(_MD("set_min_orbit_x","x"),&CharacterCamera::set_min_orbit_x);
+ ClassDB::bind_method(_MD("get_min_orbit_x"),&CharacterCamera::get_min_orbit_x);
+ ClassDB::bind_method(_MD("set_max_orbit_x","x"),&CharacterCamera::set_max_orbit_x);
+ ClassDB::bind_method(_MD("get_max_orbit_x"),&CharacterCamera::get_max_orbit_x);
+ ClassDB::bind_method(_MD("rotate_orbit"),&CharacterCamera::rotate_orbit);
+ ClassDB::bind_method(_MD("set_distance","distance"),&CharacterCamera::set_distance);
+ ClassDB::bind_method(_MD("get_distance"),&CharacterCamera::get_distance);
+ ClassDB::bind_method(_MD("set_clip","enable"),&CharacterCamera::set_clip);
+ ClassDB::bind_method(_MD("has_clip"),&CharacterCamera::has_clip);
+ ClassDB::bind_method(_MD("set_autoturn","enable"),&CharacterCamera::set_autoturn);
+ ClassDB::bind_method(_MD("has_autoturn"),&CharacterCamera::has_autoturn);
+ ClassDB::bind_method(_MD("set_autoturn_tolerance","degrees"),&CharacterCamera::set_autoturn_tolerance);
+ ClassDB::bind_method(_MD("get_autoturn_tolerance"),&CharacterCamera::get_autoturn_tolerance);
+ ClassDB::bind_method(_MD("set_autoturn_speed","speed"),&CharacterCamera::set_autoturn_speed);
+ ClassDB::bind_method(_MD("get_autoturn_speed"),&CharacterCamera::get_autoturn_speed);
+ ClassDB::bind_method(_MD("set_use_lookat_target","use","lookat"),&CharacterCamera::set_use_lookat_target, DEFVAL(Vector3()));
+
+ ClassDB::bind_method(_MD("_ray_collision"),&CharacterCamera::_ray_collision);
BIND_CONSTANT( CAMERA_FIXED );
BIND_CONSTANT( CAMERA_FOLLOW );
diff --git a/scene/3d/character_camera.h b/scene/3d/character_camera.h
index b30ee4bef1..5fde8c342e 100644
--- a/scene/3d/character_camera.h
+++ b/scene/3d/character_camera.h
@@ -34,7 +34,7 @@
#if 0
class CharacterCamera : public Camera {
- OBJ_TYPE( CharacterCamera, Camera );
+ GDCLASS( CharacterCamera, Camera );
public:
enum CameraType {
diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp
index 6186c7e85a..1c5bd25919 100644
--- a/scene/3d/collision_object.cpp
+++ b/scene/3d/collision_object.cpp
@@ -228,22 +228,22 @@ bool CollisionObject::is_ray_pickable() const {
void CollisionObject::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_shape","shape:Shape","transform"),&CollisionObject::add_shape,DEFVAL(Transform()));
- ObjectTypeDB::bind_method(_MD("get_shape_count"),&CollisionObject::get_shape_count);
- ObjectTypeDB::bind_method(_MD("set_shape","shape_idx","shape:Shape"),&CollisionObject::set_shape);
- ObjectTypeDB::bind_method(_MD("set_shape_transform","shape_idx","transform"),&CollisionObject::set_shape_transform);
-// ObjectTypeDB::bind_method(_MD("set_shape_transform","shape_idx","transform"),&CollisionObject::set_shape_transform);
- ObjectTypeDB::bind_method(_MD("set_shape_as_trigger","shape_idx","enable"),&CollisionObject::set_shape_as_trigger);
- ObjectTypeDB::bind_method(_MD("is_shape_set_as_trigger","shape_idx"),&CollisionObject::is_shape_set_as_trigger);
- ObjectTypeDB::bind_method(_MD("get_shape:Shape","shape_idx"),&CollisionObject::get_shape);
- ObjectTypeDB::bind_method(_MD("get_shape_transform","shape_idx"),&CollisionObject::get_shape_transform);
- ObjectTypeDB::bind_method(_MD("remove_shape","shape_idx"),&CollisionObject::remove_shape);
- ObjectTypeDB::bind_method(_MD("clear_shapes"),&CollisionObject::clear_shapes);
- ObjectTypeDB::bind_method(_MD("set_ray_pickable","ray_pickable"),&CollisionObject::set_ray_pickable);
- ObjectTypeDB::bind_method(_MD("is_ray_pickable"),&CollisionObject::is_ray_pickable);
- ObjectTypeDB::bind_method(_MD("set_capture_input_on_drag","enable"),&CollisionObject::set_capture_input_on_drag);
- ObjectTypeDB::bind_method(_MD("get_capture_input_on_drag"),&CollisionObject::get_capture_input_on_drag);
- ObjectTypeDB::bind_method(_MD("get_rid"),&CollisionObject::get_rid);
+ ClassDB::bind_method(_MD("add_shape","shape:Shape","transform"),&CollisionObject::add_shape,DEFVAL(Transform()));
+ ClassDB::bind_method(_MD("get_shape_count"),&CollisionObject::get_shape_count);
+ ClassDB::bind_method(_MD("set_shape","shape_idx","shape:Shape"),&CollisionObject::set_shape);
+ ClassDB::bind_method(_MD("set_shape_transform","shape_idx","transform"),&CollisionObject::set_shape_transform);
+// ClassDB::bind_method(_MD("set_shape_transform","shape_idx","transform"),&CollisionObject::set_shape_transform);
+ ClassDB::bind_method(_MD("set_shape_as_trigger","shape_idx","enable"),&CollisionObject::set_shape_as_trigger);
+ ClassDB::bind_method(_MD("is_shape_set_as_trigger","shape_idx"),&CollisionObject::is_shape_set_as_trigger);
+ ClassDB::bind_method(_MD("get_shape:Shape","shape_idx"),&CollisionObject::get_shape);
+ ClassDB::bind_method(_MD("get_shape_transform","shape_idx"),&CollisionObject::get_shape_transform);
+ ClassDB::bind_method(_MD("remove_shape","shape_idx"),&CollisionObject::remove_shape);
+ ClassDB::bind_method(_MD("clear_shapes"),&CollisionObject::clear_shapes);
+ ClassDB::bind_method(_MD("set_ray_pickable","ray_pickable"),&CollisionObject::set_ray_pickable);
+ ClassDB::bind_method(_MD("is_ray_pickable"),&CollisionObject::is_ray_pickable);
+ ClassDB::bind_method(_MD("set_capture_input_on_drag","enable"),&CollisionObject::set_capture_input_on_drag);
+ ClassDB::bind_method(_MD("get_capture_input_on_drag"),&CollisionObject::get_capture_input_on_drag);
+ ClassDB::bind_method(_MD("get_rid"),&CollisionObject::get_rid);
BIND_VMETHOD( MethodInfo("_input_event",PropertyInfo(Variant::OBJECT,"camera"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::VECTOR3,"click_pos"),PropertyInfo(Variant::VECTOR3,"click_normal"),PropertyInfo(Variant::INT,"shape_idx")));
ADD_SIGNAL( MethodInfo("input_event",PropertyInfo(Variant::OBJECT,"camera"),PropertyInfo(Variant::INPUT_EVENT,"event"),PropertyInfo(Variant::VECTOR3,"click_pos"),PropertyInfo(Variant::VECTOR3,"click_normal"),PropertyInfo(Variant::INT,"shape_idx")));
diff --git a/scene/3d/collision_object.h b/scene/3d/collision_object.h
index c1d08bfc4a..b89b7e3361 100644
--- a/scene/3d/collision_object.h
+++ b/scene/3d/collision_object.h
@@ -34,7 +34,7 @@
class CollisionObject : public Spatial {
- OBJ_TYPE( CollisionObject, Spatial );
+ GDCLASS( CollisionObject, Spatial );
bool area;
RID rid;
diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp
index 2ee1978c38..8c34748191 100644
--- a/scene/3d/collision_polygon.cpp
+++ b/scene/3d/collision_polygon.cpp
@@ -275,22 +275,22 @@ String CollisionPolygon::get_configuration_warning() const {
void CollisionPolygon::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_add_to_collision_object"),&CollisionPolygon::_add_to_collision_object);
+ ClassDB::bind_method(_MD("_add_to_collision_object"),&CollisionPolygon::_add_to_collision_object);
- ObjectTypeDB::bind_method(_MD("set_build_mode","build_mode"),&CollisionPolygon::set_build_mode);
- ObjectTypeDB::bind_method(_MD("get_build_mode"),&CollisionPolygon::get_build_mode);
+ ClassDB::bind_method(_MD("set_build_mode","build_mode"),&CollisionPolygon::set_build_mode);
+ ClassDB::bind_method(_MD("get_build_mode"),&CollisionPolygon::get_build_mode);
- ObjectTypeDB::bind_method(_MD("set_depth","depth"),&CollisionPolygon::set_depth);
- ObjectTypeDB::bind_method(_MD("get_depth"),&CollisionPolygon::get_depth);
+ ClassDB::bind_method(_MD("set_depth","depth"),&CollisionPolygon::set_depth);
+ ClassDB::bind_method(_MD("get_depth"),&CollisionPolygon::get_depth);
- ObjectTypeDB::bind_method(_MD("set_polygon","polygon"),&CollisionPolygon::set_polygon);
- ObjectTypeDB::bind_method(_MD("get_polygon"),&CollisionPolygon::get_polygon);
+ ClassDB::bind_method(_MD("set_polygon","polygon"),&CollisionPolygon::set_polygon);
+ ClassDB::bind_method(_MD("get_polygon"),&CollisionPolygon::get_polygon);
- ObjectTypeDB::bind_method(_MD("_set_shape_range","shape_range"),&CollisionPolygon::_set_shape_range);
- ObjectTypeDB::bind_method(_MD("_get_shape_range"),&CollisionPolygon::_get_shape_range);
+ ClassDB::bind_method(_MD("_set_shape_range","shape_range"),&CollisionPolygon::_set_shape_range);
+ ClassDB::bind_method(_MD("_get_shape_range"),&CollisionPolygon::_get_shape_range);
- ObjectTypeDB::bind_method(_MD("get_collision_object_first_shape"),&CollisionPolygon::get_collision_object_first_shape);
- ObjectTypeDB::bind_method(_MD("get_collision_object_last_shape"),&CollisionPolygon::get_collision_object_last_shape);
+ ClassDB::bind_method(_MD("get_collision_object_first_shape"),&CollisionPolygon::get_collision_object_first_shape);
+ ClassDB::bind_method(_MD("get_collision_object_last_shape"),&CollisionPolygon::get_collision_object_last_shape);
ADD_PROPERTY( PropertyInfo(Variant::INT,"build_mode",PROPERTY_HINT_ENUM,"Solids,Triangles"),_SCS("set_build_mode"),_SCS("get_build_mode"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"depth"),_SCS("set_depth"),_SCS("get_depth"));
diff --git a/scene/3d/collision_polygon.h b/scene/3d/collision_polygon.h
index 54853b7c80..8373832699 100644
--- a/scene/3d/collision_polygon.h
+++ b/scene/3d/collision_polygon.h
@@ -36,7 +36,7 @@
class CollisionPolygon : public Spatial {
- OBJ_TYPE(CollisionPolygon,Spatial);
+ GDCLASS(CollisionPolygon,Spatial);
public:
enum BuildMode {
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index f8d8213b82..19c67faa39 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -103,29 +103,29 @@ RID GIProbeData::get_rid() const {
void GIProbeData::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_bounds","bounds"),&GIProbeData::set_bounds);
- ObjectTypeDB::bind_method(_MD("get_bounds"),&GIProbeData::get_bounds);
+ ClassDB::bind_method(_MD("set_bounds","bounds"),&GIProbeData::set_bounds);
+ ClassDB::bind_method(_MD("get_bounds"),&GIProbeData::get_bounds);
- ObjectTypeDB::bind_method(_MD("set_cell_size","cell_size"),&GIProbeData::set_cell_size);
- ObjectTypeDB::bind_method(_MD("get_cell_size"),&GIProbeData::get_cell_size);
+ ClassDB::bind_method(_MD("set_cell_size","cell_size"),&GIProbeData::set_cell_size);
+ ClassDB::bind_method(_MD("get_cell_size"),&GIProbeData::get_cell_size);
- ObjectTypeDB::bind_method(_MD("set_to_cell_xform","to_cell_xform"),&GIProbeData::set_to_cell_xform);
- ObjectTypeDB::bind_method(_MD("get_to_cell_xform"),&GIProbeData::get_to_cell_xform);
+ ClassDB::bind_method(_MD("set_to_cell_xform","to_cell_xform"),&GIProbeData::set_to_cell_xform);
+ ClassDB::bind_method(_MD("get_to_cell_xform"),&GIProbeData::get_to_cell_xform);
- ObjectTypeDB::bind_method(_MD("set_dynamic_data","dynamic_data"),&GIProbeData::set_dynamic_data);
- ObjectTypeDB::bind_method(_MD("get_dynamic_data"),&GIProbeData::get_dynamic_data);
+ ClassDB::bind_method(_MD("set_dynamic_data","dynamic_data"),&GIProbeData::set_dynamic_data);
+ ClassDB::bind_method(_MD("get_dynamic_data"),&GIProbeData::get_dynamic_data);
- ObjectTypeDB::bind_method(_MD("set_dynamic_range","dynamic_range"),&GIProbeData::set_dynamic_range);
- ObjectTypeDB::bind_method(_MD("get_dynamic_range"),&GIProbeData::get_dynamic_range);
+ ClassDB::bind_method(_MD("set_dynamic_range","dynamic_range"),&GIProbeData::set_dynamic_range);
+ ClassDB::bind_method(_MD("get_dynamic_range"),&GIProbeData::get_dynamic_range);
- ObjectTypeDB::bind_method(_MD("set_energy","energy"),&GIProbeData::set_energy);
- ObjectTypeDB::bind_method(_MD("get_energy"),&GIProbeData::get_energy);
+ ClassDB::bind_method(_MD("set_energy","energy"),&GIProbeData::set_energy);
+ ClassDB::bind_method(_MD("get_energy"),&GIProbeData::get_energy);
- ObjectTypeDB::bind_method(_MD("set_interior","interior"),&GIProbeData::set_interior);
- ObjectTypeDB::bind_method(_MD("is_interior"),&GIProbeData::is_interior);
+ ClassDB::bind_method(_MD("set_interior","interior"),&GIProbeData::set_interior);
+ ClassDB::bind_method(_MD("is_interior"),&GIProbeData::is_interior);
- ObjectTypeDB::bind_method(_MD("set_compress","compress"),&GIProbeData::set_compress);
- ObjectTypeDB::bind_method(_MD("is_compressed"),&GIProbeData::is_compressed);
+ ClassDB::bind_method(_MD("set_compress","compress"),&GIProbeData::set_compress);
+ ClassDB::bind_method(_MD("is_compressed"),&GIProbeData::is_compressed);
ADD_PROPERTY(PropertyInfo(Variant::_AABB,"bounds",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("set_bounds"),_SCS("get_bounds"));
ADD_PROPERTY(PropertyInfo(Variant::REAL,"cell_size",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("set_cell_size"),_SCS("get_cell_size"));
@@ -1340,30 +1340,30 @@ DVector<Face3> GIProbe::get_faces(uint32_t p_usage_flags) const {
void GIProbe::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_probe_data","data"),&GIProbe::set_probe_data);
- ObjectTypeDB::bind_method(_MD("get_probe_data"),&GIProbe::get_probe_data);
+ ClassDB::bind_method(_MD("set_probe_data","data"),&GIProbe::set_probe_data);
+ ClassDB::bind_method(_MD("get_probe_data"),&GIProbe::get_probe_data);
- ObjectTypeDB::bind_method(_MD("set_subdiv","subdiv"),&GIProbe::set_subdiv);
- ObjectTypeDB::bind_method(_MD("get_subdiv"),&GIProbe::get_subdiv);
+ ClassDB::bind_method(_MD("set_subdiv","subdiv"),&GIProbe::set_subdiv);
+ ClassDB::bind_method(_MD("get_subdiv"),&GIProbe::get_subdiv);
- ObjectTypeDB::bind_method(_MD("set_extents","extents"),&GIProbe::set_extents);
- ObjectTypeDB::bind_method(_MD("get_extents"),&GIProbe::get_extents);
+ ClassDB::bind_method(_MD("set_extents","extents"),&GIProbe::set_extents);
+ ClassDB::bind_method(_MD("get_extents"),&GIProbe::get_extents);
- ObjectTypeDB::bind_method(_MD("set_dynamic_range","max"),&GIProbe::set_dynamic_range);
- ObjectTypeDB::bind_method(_MD("get_dynamic_range"),&GIProbe::get_dynamic_range);
+ ClassDB::bind_method(_MD("set_dynamic_range","max"),&GIProbe::set_dynamic_range);
+ ClassDB::bind_method(_MD("get_dynamic_range"),&GIProbe::get_dynamic_range);
- ObjectTypeDB::bind_method(_MD("set_energy","max"),&GIProbe::set_energy);
- ObjectTypeDB::bind_method(_MD("get_energy"),&GIProbe::get_energy);
+ ClassDB::bind_method(_MD("set_energy","max"),&GIProbe::set_energy);
+ ClassDB::bind_method(_MD("get_energy"),&GIProbe::get_energy);
- ObjectTypeDB::bind_method(_MD("set_interior","enable"),&GIProbe::set_interior);
- ObjectTypeDB::bind_method(_MD("is_interior"),&GIProbe::is_interior);
+ ClassDB::bind_method(_MD("set_interior","enable"),&GIProbe::set_interior);
+ ClassDB::bind_method(_MD("is_interior"),&GIProbe::is_interior);
- ObjectTypeDB::bind_method(_MD("set_compress","enable"),&GIProbe::set_compress);
- ObjectTypeDB::bind_method(_MD("is_compressed"),&GIProbe::is_compressed);
+ ClassDB::bind_method(_MD("set_compress","enable"),&GIProbe::set_compress);
+ ClassDB::bind_method(_MD("is_compressed"),&GIProbe::is_compressed);
- ObjectTypeDB::bind_method(_MD("bake","from_node","create_visual_debug"),&GIProbe::bake,DEFVAL(Variant()),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("debug_bake"),&GIProbe::_debug_bake);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("debug_bake"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(_MD("bake","from_node","create_visual_debug"),&GIProbe::bake,DEFVAL(Variant()),DEFVAL(false));
+ ClassDB::bind_method(_MD("debug_bake"),&GIProbe::_debug_bake);
+ ClassDB::set_method_flags(get_class_static(),_SCS("debug_bake"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
ADD_PROPERTY( PropertyInfo(Variant::INT,"subdiv",PROPERTY_HINT_ENUM,"64,128,256,512"),_SCS("set_subdiv"),_SCS("get_subdiv"));
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"extents"),_SCS("set_extents"),_SCS("get_extents"));
diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h
index 59747761b8..4b06c13268 100644
--- a/scene/3d/gi_probe.h
+++ b/scene/3d/gi_probe.h
@@ -6,7 +6,7 @@
class GIProbeData : public Resource {
- OBJ_TYPE(GIProbeData,Resource);
+ GDCLASS(GIProbeData,Resource);
RID probe;
@@ -50,7 +50,7 @@ public:
class GIProbe : public VisualInstance {
- OBJ_TYPE(GIProbe,VisualInstance);
+ GDCLASS(GIProbe,VisualInstance);
public:
enum Subdiv{
SUBDIV_64,
diff --git a/scene/3d/immediate_geometry.cpp b/scene/3d/immediate_geometry.cpp
index d8ee1b8a61..4ee2e646e6 100644
--- a/scene/3d/immediate_geometry.cpp
+++ b/scene/3d/immediate_geometry.cpp
@@ -154,16 +154,16 @@ void ImmediateGeometry::add_sphere(int p_lats, int p_lons, float p_radius, bool
void ImmediateGeometry::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("begin","primitive","texture:Texture"),&ImmediateGeometry::begin,DEFVAL(Ref<Texture>()));
- ObjectTypeDB::bind_method(_MD("set_normal","normal"),&ImmediateGeometry::set_normal);
- ObjectTypeDB::bind_method(_MD("set_tangent","tangent"),&ImmediateGeometry::set_tangent);
- ObjectTypeDB::bind_method(_MD("set_color","color"),&ImmediateGeometry::set_color);
- ObjectTypeDB::bind_method(_MD("set_uv","uv"),&ImmediateGeometry::set_uv);
- ObjectTypeDB::bind_method(_MD("set_uv2","uv"),&ImmediateGeometry::set_uv2);
- ObjectTypeDB::bind_method(_MD("add_vertex","pos"),&ImmediateGeometry::add_vertex);
- ObjectTypeDB::bind_method(_MD("add_sphere","lats","lons","radius","add_uv"),&ImmediateGeometry::add_sphere,DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("end"),&ImmediateGeometry::end);
- ObjectTypeDB::bind_method(_MD("clear"),&ImmediateGeometry::clear);
+ ClassDB::bind_method(_MD("begin","primitive","texture:Texture"),&ImmediateGeometry::begin,DEFVAL(Ref<Texture>()));
+ ClassDB::bind_method(_MD("set_normal","normal"),&ImmediateGeometry::set_normal);
+ ClassDB::bind_method(_MD("set_tangent","tangent"),&ImmediateGeometry::set_tangent);
+ ClassDB::bind_method(_MD("set_color","color"),&ImmediateGeometry::set_color);
+ ClassDB::bind_method(_MD("set_uv","uv"),&ImmediateGeometry::set_uv);
+ ClassDB::bind_method(_MD("set_uv2","uv"),&ImmediateGeometry::set_uv2);
+ ClassDB::bind_method(_MD("add_vertex","pos"),&ImmediateGeometry::add_vertex);
+ ClassDB::bind_method(_MD("add_sphere","lats","lons","radius","add_uv"),&ImmediateGeometry::add_sphere,DEFVAL(true));
+ ClassDB::bind_method(_MD("end"),&ImmediateGeometry::end);
+ ClassDB::bind_method(_MD("clear"),&ImmediateGeometry::clear);
}
diff --git a/scene/3d/immediate_geometry.h b/scene/3d/immediate_geometry.h
index a58743e9cb..3c8a76fbc7 100644
--- a/scene/3d/immediate_geometry.h
+++ b/scene/3d/immediate_geometry.h
@@ -34,7 +34,7 @@
class ImmediateGeometry : public GeometryInstance {
- OBJ_TYPE(ImmediateGeometry,GeometryInstance);
+ GDCLASS(ImmediateGeometry,GeometryInstance);
RID im;
diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp
index 245aefd4d4..c7464d3c5d 100644
--- a/scene/3d/interpolated_camera.cpp
+++ b/scene/3d/interpolated_camera.cpp
@@ -134,15 +134,15 @@ real_t InterpolatedCamera::get_speed() const {
void InterpolatedCamera::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_target_path","target_path"),&InterpolatedCamera::set_target_path);
- ObjectTypeDB::bind_method(_MD("get_target_path"),&InterpolatedCamera::get_target_path);
- ObjectTypeDB::bind_method(_MD("set_target","target:Camera"),&InterpolatedCamera::_set_target);
+ ClassDB::bind_method(_MD("set_target_path","target_path"),&InterpolatedCamera::set_target_path);
+ ClassDB::bind_method(_MD("get_target_path"),&InterpolatedCamera::get_target_path);
+ ClassDB::bind_method(_MD("set_target","target:Camera"),&InterpolatedCamera::_set_target);
- ObjectTypeDB::bind_method(_MD("set_speed","speed"),&InterpolatedCamera::set_speed);
- ObjectTypeDB::bind_method(_MD("get_speed"),&InterpolatedCamera::get_speed);
+ ClassDB::bind_method(_MD("set_speed","speed"),&InterpolatedCamera::set_speed);
+ ClassDB::bind_method(_MD("get_speed"),&InterpolatedCamera::get_speed);
- ObjectTypeDB::bind_method(_MD("set_interpolation_enabled","target_path"),&InterpolatedCamera::set_interpolation_enabled);
- ObjectTypeDB::bind_method(_MD("is_interpolation_enabled"),&InterpolatedCamera::is_interpolation_enabled);
+ ClassDB::bind_method(_MD("set_interpolation_enabled","target_path"),&InterpolatedCamera::set_interpolation_enabled);
+ ClassDB::bind_method(_MD("is_interpolation_enabled"),&InterpolatedCamera::is_interpolation_enabled);
ADD_PROPERTY( PropertyInfo(Variant::NODE_PATH,"target"), _SCS("set_target_path"), _SCS("get_target_path") );
ADD_PROPERTY( PropertyInfo(Variant::REAL,"speed"), _SCS("set_speed"), _SCS("get_speed") );
diff --git a/scene/3d/interpolated_camera.h b/scene/3d/interpolated_camera.h
index 794a9b15cc..c78e6935da 100644
--- a/scene/3d/interpolated_camera.h
+++ b/scene/3d/interpolated_camera.h
@@ -33,7 +33,7 @@
class InterpolatedCamera : public Camera {
- OBJ_TYPE(InterpolatedCamera,Camera);
+ GDCLASS(InterpolatedCamera,Camera);
bool enabled;
real_t speed;
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 7a0db6c174..4711f6ab46 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -221,27 +221,27 @@ bool Light::is_editor_only() const{
void Light::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_editor_only","editor_only"), &Light::set_editor_only );
- ObjectTypeDB::bind_method(_MD("is_editor_only"), &Light::is_editor_only );
+ ClassDB::bind_method(_MD("set_editor_only","editor_only"), &Light::set_editor_only );
+ ClassDB::bind_method(_MD("is_editor_only"), &Light::is_editor_only );
- ObjectTypeDB::bind_method(_MD("set_param","param","value"), &Light::set_param );
- ObjectTypeDB::bind_method(_MD("get_param","param"), &Light::get_param );
+ ClassDB::bind_method(_MD("set_param","param","value"), &Light::set_param );
+ ClassDB::bind_method(_MD("get_param","param"), &Light::get_param );
- ObjectTypeDB::bind_method(_MD("set_shadow","enabled"), &Light::set_shadow );
- ObjectTypeDB::bind_method(_MD("has_shadow"), &Light::has_shadow );
+ ClassDB::bind_method(_MD("set_shadow","enabled"), &Light::set_shadow );
+ ClassDB::bind_method(_MD("has_shadow"), &Light::has_shadow );
- ObjectTypeDB::bind_method(_MD("set_negative","enabled"), &Light::set_negative );
- ObjectTypeDB::bind_method(_MD("is_negative"), &Light::is_negative );
+ ClassDB::bind_method(_MD("set_negative","enabled"), &Light::set_negative );
+ ClassDB::bind_method(_MD("is_negative"), &Light::is_negative );
- ObjectTypeDB::bind_method(_MD("set_cull_mask","cull_mask"), &Light::set_cull_mask );
- ObjectTypeDB::bind_method(_MD("get_cull_mask"), &Light::get_cull_mask );
+ ClassDB::bind_method(_MD("set_cull_mask","cull_mask"), &Light::set_cull_mask );
+ ClassDB::bind_method(_MD("get_cull_mask"), &Light::get_cull_mask );
- ObjectTypeDB::bind_method(_MD("set_color","color"), &Light::set_color );
- ObjectTypeDB::bind_method(_MD("get_color"), &Light::get_color );
+ ClassDB::bind_method(_MD("set_color","color"), &Light::set_color );
+ ClassDB::bind_method(_MD("get_color"), &Light::get_color );
- ObjectTypeDB::bind_method(_MD("set_shadow_color","shadow_color"), &Light::set_shadow_color );
- ObjectTypeDB::bind_method(_MD("get_shadow_color"), &Light::get_shadow_color );
+ ClassDB::bind_method(_MD("set_shadow_color","shadow_color"), &Light::set_shadow_color );
+ ClassDB::bind_method(_MD("get_shadow_color"), &Light::get_shadow_color );
ADD_PROPERTY( PropertyInfo( Variant::COLOR, "light/color",PROPERTY_HINT_COLOR_NO_ALPHA), _SCS("set_color"), _SCS("get_color"));
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "light/energy",PROPERTY_HINT_RANGE,"0,16,0.01"), _SCS("set_param"), _SCS("get_param"), PARAM_ENERGY);
@@ -345,11 +345,11 @@ bool DirectionalLight::is_blend_splits_enabled() const {
void DirectionalLight::_bind_methods() {
- ObjectTypeDB::bind_method( _MD("set_shadow_mode","mode"),&DirectionalLight::set_shadow_mode);
- ObjectTypeDB::bind_method( _MD("get_shadow_mode"),&DirectionalLight::get_shadow_mode);
+ ClassDB::bind_method( _MD("set_shadow_mode","mode"),&DirectionalLight::set_shadow_mode);
+ ClassDB::bind_method( _MD("get_shadow_mode"),&DirectionalLight::get_shadow_mode);
- ObjectTypeDB::bind_method( _MD("set_blend_splits","enabled"),&DirectionalLight::set_blend_splits);
- ObjectTypeDB::bind_method( _MD("is_blend_splits_enabled"),&DirectionalLight::is_blend_splits_enabled);
+ ClassDB::bind_method( _MD("set_blend_splits","enabled"),&DirectionalLight::set_blend_splits);
+ ClassDB::bind_method( _MD("is_blend_splits_enabled"),&DirectionalLight::is_blend_splits_enabled);
ADD_PROPERTY( PropertyInfo( Variant::INT, "directional_shadow/mode",PROPERTY_HINT_ENUM,"Orthogonal,PSSM 2 Splits,PSSM 4 Splits"), _SCS("set_shadow_mode"), _SCS("get_shadow_mode"));
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "directional_shadow/split_1",PROPERTY_HINT_RANGE,"0,1,0.001"), _SCS("set_param"), _SCS("get_param"), PARAM_SHADOW_SPLIT_1_OFFSET);
@@ -398,11 +398,11 @@ OmniLight::ShadowDetail OmniLight::get_shadow_detail() const{
void OmniLight::_bind_methods() {
- ObjectTypeDB::bind_method( _MD("set_shadow_mode","mode"),&OmniLight::set_shadow_mode);
- ObjectTypeDB::bind_method( _MD("get_shadow_mode"),&OmniLight::get_shadow_mode);
+ ClassDB::bind_method( _MD("set_shadow_mode","mode"),&OmniLight::set_shadow_mode);
+ ClassDB::bind_method( _MD("get_shadow_mode"),&OmniLight::get_shadow_mode);
- ObjectTypeDB::bind_method( _MD("set_shadow_detail","detail"),&OmniLight::set_shadow_detail);
- ObjectTypeDB::bind_method( _MD("get_shadow_detail"),&OmniLight::get_shadow_detail);
+ ClassDB::bind_method( _MD("set_shadow_detail","detail"),&OmniLight::set_shadow_detail);
+ ClassDB::bind_method( _MD("get_shadow_detail"),&OmniLight::get_shadow_detail);
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "omni/range",PROPERTY_HINT_RANGE,"0,65536,0.1"), _SCS("set_param"), _SCS("get_param"), PARAM_RANGE);
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "omni/attenuation",PROPERTY_HINT_EXP_EASING), _SCS("set_param"), _SCS("get_param"), PARAM_ATTENUATION);
diff --git a/scene/3d/light.h b/scene/3d/light.h
index 6818e4f014..d3585b5cf2 100644
--- a/scene/3d/light.h
+++ b/scene/3d/light.h
@@ -43,7 +43,7 @@ class BakedLight;
class Light : public VisualInstance {
- OBJ_TYPE( Light, VisualInstance );
+ GDCLASS( Light, VisualInstance );
OBJ_CATEGORY("3D Light Nodes");
public:
@@ -130,7 +130,7 @@ VARIANT_ENUM_CAST(Light::Param);
class DirectionalLight : public Light {
- OBJ_TYPE( DirectionalLight, Light );
+ GDCLASS( DirectionalLight, Light );
public:
@@ -162,7 +162,7 @@ VARIANT_ENUM_CAST(DirectionalLight::ShadowMode)
class OmniLight : public Light {
- OBJ_TYPE( OmniLight, Light );
+ GDCLASS( OmniLight, Light );
public:
// omni light
enum ShadowMode {
@@ -199,7 +199,7 @@ VARIANT_ENUM_CAST(OmniLight::ShadowDetail)
class SpotLight : public Light {
- OBJ_TYPE( SpotLight, Light );
+ GDCLASS( SpotLight, Light );
protected:
static void _bind_methods();
public:
diff --git a/scene/3d/listener.cpp b/scene/3d/listener.cpp
index bf42a5c92e..a227f5cd70 100644
--- a/scene/3d/listener.cpp
+++ b/scene/3d/listener.cpp
@@ -146,10 +146,10 @@ RES Listener::_get_gizmo_geometry() const {
void Listener::_bind_methods() {
- ObjectTypeDB::bind_method( _MD("make_current"),&Listener::make_current );
- ObjectTypeDB::bind_method( _MD("clear_current"),&Listener::clear_current );
- ObjectTypeDB::bind_method( _MD("is_current"),&Listener::is_current );
- ObjectTypeDB::bind_method( _MD("get_listener_transform"),&Listener::get_listener_transform );
+ ClassDB::bind_method( _MD("make_current"),&Listener::make_current );
+ ClassDB::bind_method( _MD("clear_current"),&Listener::clear_current );
+ ClassDB::bind_method( _MD("is_current"),&Listener::is_current );
+ ClassDB::bind_method( _MD("get_listener_transform"),&Listener::get_listener_transform );
}
Listener::Listener() {
diff --git a/scene/3d/listener.h b/scene/3d/listener.h
index bf0281a8e0..be1b793716 100644
--- a/scene/3d/listener.h
+++ b/scene/3d/listener.h
@@ -7,7 +7,7 @@
class Listener : public Spatial {
- OBJ_TYPE(Listener, Spatial);
+ GDCLASS(Listener, Spatial);
private:
bool force_change;
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp
index 7e7fdb6d16..d60dc799df 100644
--- a/scene/3d/mesh_instance.cpp
+++ b/scene/3d/mesh_instance.cpp
@@ -294,16 +294,16 @@ void MeshInstance::_mesh_changed() {
void MeshInstance::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_mesh","mesh:Mesh"),&MeshInstance::set_mesh);
- ObjectTypeDB::bind_method(_MD("get_mesh:Mesh"),&MeshInstance::get_mesh);
- ObjectTypeDB::bind_method(_MD("set_skeleton_path","skeleton_path:NodePath"),&MeshInstance::set_skeleton_path);
- ObjectTypeDB::bind_method(_MD("get_skeleton_path:NodePath"),&MeshInstance::get_skeleton_path);
- ObjectTypeDB::bind_method(_MD("get_aabb"),&MeshInstance::get_aabb);
- ObjectTypeDB::bind_method(_MD("create_trimesh_collision"),&MeshInstance::create_trimesh_collision);
- ObjectTypeDB::set_method_flags("MeshInstance","create_trimesh_collision",METHOD_FLAGS_DEFAULT);
- ObjectTypeDB::bind_method(_MD("create_convex_collision"),&MeshInstance::create_convex_collision);
- ObjectTypeDB::set_method_flags("MeshInstance","create_convex_collision",METHOD_FLAGS_DEFAULT);
- ObjectTypeDB::bind_method(_MD("_mesh_changed"),&MeshInstance::_mesh_changed);
+ ClassDB::bind_method(_MD("set_mesh","mesh:Mesh"),&MeshInstance::set_mesh);
+ ClassDB::bind_method(_MD("get_mesh:Mesh"),&MeshInstance::get_mesh);
+ ClassDB::bind_method(_MD("set_skeleton_path","skeleton_path:NodePath"),&MeshInstance::set_skeleton_path);
+ ClassDB::bind_method(_MD("get_skeleton_path:NodePath"),&MeshInstance::get_skeleton_path);
+ ClassDB::bind_method(_MD("get_aabb"),&MeshInstance::get_aabb);
+ ClassDB::bind_method(_MD("create_trimesh_collision"),&MeshInstance::create_trimesh_collision);
+ ClassDB::set_method_flags("MeshInstance","create_trimesh_collision",METHOD_FLAGS_DEFAULT);
+ ClassDB::bind_method(_MD("create_convex_collision"),&MeshInstance::create_convex_collision);
+ ClassDB::set_method_flags("MeshInstance","create_convex_collision",METHOD_FLAGS_DEFAULT);
+ ClassDB::bind_method(_MD("_mesh_changed"),&MeshInstance::_mesh_changed);
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "mesh/mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh" ), _SCS("set_mesh"), _SCS("get_mesh"));
ADD_PROPERTY( PropertyInfo (Variant::NODE_PATH, "mesh/skeleton"), _SCS("set_skeleton_path"), _SCS("get_skeleton_path"));
}
diff --git a/scene/3d/mesh_instance.h b/scene/3d/mesh_instance.h
index 2766fb4c43..92f181c24e 100644
--- a/scene/3d/mesh_instance.h
+++ b/scene/3d/mesh_instance.h
@@ -37,7 +37,7 @@
*/
class MeshInstance : public GeometryInstance {
- OBJ_TYPE( MeshInstance, GeometryInstance );
+ GDCLASS( MeshInstance, GeometryInstance );
Ref<Mesh> mesh;
NodePath skeleton_path;
diff --git a/scene/3d/multimesh_instance.cpp b/scene/3d/multimesh_instance.cpp
index a0400035d4..44cd7485ca 100644
--- a/scene/3d/multimesh_instance.cpp
+++ b/scene/3d/multimesh_instance.cpp
@@ -34,8 +34,8 @@
void MultiMeshInstance::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_multimesh","multimesh"),&MultiMeshInstance::set_multimesh);
- ObjectTypeDB::bind_method(_MD("get_multimesh"),&MultiMeshInstance::get_multimesh);
+ ClassDB::bind_method(_MD("set_multimesh","multimesh"),&MultiMeshInstance::set_multimesh);
+ ClassDB::bind_method(_MD("get_multimesh"),&MultiMeshInstance::get_multimesh);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"multimesh",PROPERTY_HINT_RESOURCE_TYPE,"MultiMesh"), _SCS("set_multimesh"), _SCS("get_multimesh"));
diff --git a/scene/3d/multimesh_instance.h b/scene/3d/multimesh_instance.h
index af21274b04..503f5e75fc 100644
--- a/scene/3d/multimesh_instance.h
+++ b/scene/3d/multimesh_instance.h
@@ -37,7 +37,7 @@
*/
class MultiMeshInstance : public GeometryInstance {
- OBJ_TYPE( MultiMeshInstance, GeometryInstance );
+ GDCLASS( MultiMeshInstance, GeometryInstance );
Ref<MultiMesh> multimesh;
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp
index c55fd04b10..598a935e4b 100644
--- a/scene/3d/navigation.cpp
+++ b/scene/3d/navigation.cpp
@@ -730,18 +730,18 @@ Vector3 Navigation::get_up_vector() const{
void Navigation::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("navmesh_create","mesh:NavigationMesh","xform","owner"),&Navigation::navmesh_create,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("navmesh_set_transform","id","xform"),&Navigation::navmesh_set_transform);
- ObjectTypeDB::bind_method(_MD("navmesh_remove","id"),&Navigation::navmesh_remove);
-
- ObjectTypeDB::bind_method(_MD("get_simple_path","start","end","optimize"),&Navigation::get_simple_path,DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("get_closest_point_to_segment","start","end","use_collision"),&Navigation::get_closest_point_to_segment,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_closest_point","to_point"),&Navigation::get_closest_point);
- ObjectTypeDB::bind_method(_MD("get_closest_point_normal","to_point"),&Navigation::get_closest_point_normal);
- ObjectTypeDB::bind_method(_MD("get_closest_point_owner","to_point"),&Navigation::get_closest_point_owner);
-
- ObjectTypeDB::bind_method(_MD("set_up_vector","up"),&Navigation::set_up_vector);
- ObjectTypeDB::bind_method(_MD("get_up_vector"),&Navigation::get_up_vector);
+ ClassDB::bind_method(_MD("navmesh_create","mesh:NavigationMesh","xform","owner"),&Navigation::navmesh_create,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("navmesh_set_transform","id","xform"),&Navigation::navmesh_set_transform);
+ ClassDB::bind_method(_MD("navmesh_remove","id"),&Navigation::navmesh_remove);
+
+ ClassDB::bind_method(_MD("get_simple_path","start","end","optimize"),&Navigation::get_simple_path,DEFVAL(true));
+ ClassDB::bind_method(_MD("get_closest_point_to_segment","start","end","use_collision"),&Navigation::get_closest_point_to_segment,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_closest_point","to_point"),&Navigation::get_closest_point);
+ ClassDB::bind_method(_MD("get_closest_point_normal","to_point"),&Navigation::get_closest_point_normal);
+ ClassDB::bind_method(_MD("get_closest_point_owner","to_point"),&Navigation::get_closest_point_owner);
+
+ ClassDB::bind_method(_MD("set_up_vector","up"),&Navigation::set_up_vector);
+ ClassDB::bind_method(_MD("get_up_vector"),&Navigation::get_up_vector);
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"up_vector"),_SCS("set_up_vector"),_SCS("get_up_vector"));
}
diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h
index 8bec170a0b..771e12466a 100644
--- a/scene/3d/navigation.h
+++ b/scene/3d/navigation.h
@@ -34,7 +34,7 @@
class Navigation : public Spatial {
- OBJ_TYPE( Navigation, Spatial);
+ GDCLASS( Navigation, Spatial);
union Point {
diff --git a/scene/3d/navigation_mesh.cpp b/scene/3d/navigation_mesh.cpp
index dfa8e5901f..9ed3b4147a 100644
--- a/scene/3d/navigation_mesh.cpp
+++ b/scene/3d/navigation_mesh.cpp
@@ -208,16 +208,16 @@ Ref<Mesh> NavigationMesh::get_debug_mesh() {
void NavigationMesh::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_vertices","vertices"),&NavigationMesh::set_vertices);
- ObjectTypeDB::bind_method(_MD("get_vertices"),&NavigationMesh::get_vertices);
+ ClassDB::bind_method(_MD("set_vertices","vertices"),&NavigationMesh::set_vertices);
+ ClassDB::bind_method(_MD("get_vertices"),&NavigationMesh::get_vertices);
- ObjectTypeDB::bind_method(_MD("add_polygon","polygon"),&NavigationMesh::add_polygon);
- ObjectTypeDB::bind_method(_MD("get_polygon_count"),&NavigationMesh::get_polygon_count);
- ObjectTypeDB::bind_method(_MD("get_polygon","idx"),&NavigationMesh::get_polygon);
- ObjectTypeDB::bind_method(_MD("clear_polygons"),&NavigationMesh::clear_polygons);
+ ClassDB::bind_method(_MD("add_polygon","polygon"),&NavigationMesh::add_polygon);
+ ClassDB::bind_method(_MD("get_polygon_count"),&NavigationMesh::get_polygon_count);
+ ClassDB::bind_method(_MD("get_polygon","idx"),&NavigationMesh::get_polygon);
+ ClassDB::bind_method(_MD("clear_polygons"),&NavigationMesh::clear_polygons);
- ObjectTypeDB::bind_method(_MD("_set_polygons","polygons"),&NavigationMesh::_set_polygons);
- ObjectTypeDB::bind_method(_MD("_get_polygons"),&NavigationMesh::_get_polygons);
+ ClassDB::bind_method(_MD("_set_polygons","polygons"),&NavigationMesh::_set_polygons);
+ ClassDB::bind_method(_MD("_get_polygons"),&NavigationMesh::_get_polygons);
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"));
@@ -394,11 +394,11 @@ String NavigationMeshInstance::get_configuration_warning() const {
void NavigationMeshInstance::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_navigation_mesh","navmesh"),&NavigationMeshInstance::set_navigation_mesh);
- ObjectTypeDB::bind_method(_MD("get_navigation_mesh"),&NavigationMeshInstance::get_navigation_mesh);
+ ClassDB::bind_method(_MD("set_navigation_mesh","navmesh"),&NavigationMeshInstance::set_navigation_mesh);
+ ClassDB::bind_method(_MD("get_navigation_mesh"),&NavigationMeshInstance::get_navigation_mesh);
- ObjectTypeDB::bind_method(_MD("set_enabled","enabled"),&NavigationMeshInstance::set_enabled);
- ObjectTypeDB::bind_method(_MD("is_enabled"),&NavigationMeshInstance::is_enabled);
+ ClassDB::bind_method(_MD("set_enabled","enabled"),&NavigationMeshInstance::set_enabled);
+ ClassDB::bind_method(_MD("is_enabled"),&NavigationMeshInstance::is_enabled);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"navmesh",PROPERTY_HINT_RESOURCE_TYPE,"NavigationMesh"),_SCS("set_navigation_mesh"),_SCS("get_navigation_mesh"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled"));
diff --git a/scene/3d/navigation_mesh.h b/scene/3d/navigation_mesh.h
index b26446b749..a0bdc5a516 100644
--- a/scene/3d/navigation_mesh.h
+++ b/scene/3d/navigation_mesh.h
@@ -36,7 +36,7 @@ class Mesh;
class NavigationMesh : public Resource {
- OBJ_TYPE( NavigationMesh, Resource );
+ GDCLASS( NavigationMesh, Resource );
DVector<Vector3> vertices;
struct Polygon {
@@ -83,7 +83,7 @@ class Navigation;
class NavigationMeshInstance : public Spatial {
- OBJ_TYPE(NavigationMeshInstance,Spatial);
+ GDCLASS(NavigationMeshInstance,Spatial);
bool enabled;
int nav_id;
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index 289dec534b..09be49d7d6 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -406,39 +406,39 @@ RES Particles::_get_gizmo_geometry() const {
void Particles::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_amount","amount"),&Particles::set_amount);
- ObjectTypeDB::bind_method(_MD("get_amount"),&Particles::get_amount);
- ObjectTypeDB::bind_method(_MD("set_emitting","enabled"),&Particles::set_emitting);
- ObjectTypeDB::bind_method(_MD("is_emitting"),&Particles::is_emitting);
- ObjectTypeDB::bind_method(_MD("set_visibility_aabb","aabb"),&Particles::set_visibility_aabb);
- ObjectTypeDB::bind_method(_MD("get_visibility_aabb"),&Particles::get_visibility_aabb);
- ObjectTypeDB::bind_method(_MD("set_emission_half_extents","half_extents"),&Particles::set_emission_half_extents);
- ObjectTypeDB::bind_method(_MD("get_emission_half_extents"),&Particles::get_emission_half_extents);
- ObjectTypeDB::bind_method(_MD("set_emission_base_velocity","base_velocity"),&Particles::set_emission_base_velocity);
- ObjectTypeDB::bind_method(_MD("get_emission_base_velocity"),&Particles::get_emission_base_velocity);
- ObjectTypeDB::bind_method(_MD("set_emission_points","points"),&Particles::set_emission_points);
- ObjectTypeDB::bind_method(_MD("get_emission_points"),&Particles::get_emission_points);
- ObjectTypeDB::bind_method(_MD("set_gravity_normal","normal"),&Particles::set_gravity_normal);
- ObjectTypeDB::bind_method(_MD("get_gravity_normal"),&Particles::get_gravity_normal);
- ObjectTypeDB::bind_method(_MD("set_variable","variable","value"),&Particles::set_variable);
- ObjectTypeDB::bind_method(_MD("get_variable","variable"),&Particles::get_variable);
- ObjectTypeDB::bind_method(_MD("set_randomness","variable","randomness"),&Particles::set_randomness);
- ObjectTypeDB::bind_method(_MD("get_randomness","variable"),&Particles::get_randomness);
- ObjectTypeDB::bind_method(_MD("set_color_phase_pos","phase","pos"),&Particles::set_color_phase_pos);
- ObjectTypeDB::bind_method(_MD("get_color_phase_pos","phase"),&Particles::get_color_phase_pos);
- ObjectTypeDB::bind_method(_MD("set_color_phase_color","phase","color"),&Particles::set_color_phase_color);
- ObjectTypeDB::bind_method(_MD("get_color_phase_color","phase"),&Particles::get_color_phase_color);
- ObjectTypeDB::bind_method(_MD("set_material","material:Material"),&Particles::set_material);
- ObjectTypeDB::bind_method(_MD("get_material:Material"),&Particles::get_material);
- ObjectTypeDB::bind_method(_MD("set_emit_timeout","timeout"),&Particles::set_emit_timeout);
- ObjectTypeDB::bind_method(_MD("get_emit_timeout"),&Particles::get_emit_timeout);
- ObjectTypeDB::bind_method(_MD("set_height_from_velocity","enable"),&Particles::set_height_from_velocity);
- ObjectTypeDB::bind_method(_MD("has_height_from_velocity"),&Particles::has_height_from_velocity);
- ObjectTypeDB::bind_method(_MD("set_use_local_coordinates","enable"),&Particles::set_use_local_coordinates);
- ObjectTypeDB::bind_method(_MD("is_using_local_coordinates"),&Particles::is_using_local_coordinates);
-
- ObjectTypeDB::bind_method(_MD("set_color_phases","count"),&Particles::set_color_phases);
- ObjectTypeDB::bind_method(_MD("get_color_phases"),&Particles::get_color_phases);
+ ClassDB::bind_method(_MD("set_amount","amount"),&Particles::set_amount);
+ ClassDB::bind_method(_MD("get_amount"),&Particles::get_amount);
+ ClassDB::bind_method(_MD("set_emitting","enabled"),&Particles::set_emitting);
+ ClassDB::bind_method(_MD("is_emitting"),&Particles::is_emitting);
+ ClassDB::bind_method(_MD("set_visibility_aabb","aabb"),&Particles::set_visibility_aabb);
+ ClassDB::bind_method(_MD("get_visibility_aabb"),&Particles::get_visibility_aabb);
+ ClassDB::bind_method(_MD("set_emission_half_extents","half_extents"),&Particles::set_emission_half_extents);
+ ClassDB::bind_method(_MD("get_emission_half_extents"),&Particles::get_emission_half_extents);
+ ClassDB::bind_method(_MD("set_emission_base_velocity","base_velocity"),&Particles::set_emission_base_velocity);
+ ClassDB::bind_method(_MD("get_emission_base_velocity"),&Particles::get_emission_base_velocity);
+ ClassDB::bind_method(_MD("set_emission_points","points"),&Particles::set_emission_points);
+ ClassDB::bind_method(_MD("get_emission_points"),&Particles::get_emission_points);
+ ClassDB::bind_method(_MD("set_gravity_normal","normal"),&Particles::set_gravity_normal);
+ ClassDB::bind_method(_MD("get_gravity_normal"),&Particles::get_gravity_normal);
+ ClassDB::bind_method(_MD("set_variable","variable","value"),&Particles::set_variable);
+ ClassDB::bind_method(_MD("get_variable","variable"),&Particles::get_variable);
+ ClassDB::bind_method(_MD("set_randomness","variable","randomness"),&Particles::set_randomness);
+ ClassDB::bind_method(_MD("get_randomness","variable"),&Particles::get_randomness);
+ ClassDB::bind_method(_MD("set_color_phase_pos","phase","pos"),&Particles::set_color_phase_pos);
+ ClassDB::bind_method(_MD("get_color_phase_pos","phase"),&Particles::get_color_phase_pos);
+ ClassDB::bind_method(_MD("set_color_phase_color","phase","color"),&Particles::set_color_phase_color);
+ ClassDB::bind_method(_MD("get_color_phase_color","phase"),&Particles::get_color_phase_color);
+ ClassDB::bind_method(_MD("set_material","material:Material"),&Particles::set_material);
+ ClassDB::bind_method(_MD("get_material:Material"),&Particles::get_material);
+ ClassDB::bind_method(_MD("set_emit_timeout","timeout"),&Particles::set_emit_timeout);
+ ClassDB::bind_method(_MD("get_emit_timeout"),&Particles::get_emit_timeout);
+ ClassDB::bind_method(_MD("set_height_from_velocity","enable"),&Particles::set_height_from_velocity);
+ ClassDB::bind_method(_MD("has_height_from_velocity"),&Particles::has_height_from_velocity);
+ ClassDB::bind_method(_MD("set_use_local_coordinates","enable"),&Particles::set_use_local_coordinates);
+ ClassDB::bind_method(_MD("is_using_local_coordinates"),&Particles::is_using_local_coordinates);
+
+ ClassDB::bind_method(_MD("set_color_phases","count"),&Particles::set_color_phases);
+ ClassDB::bind_method(_MD("get_color_phases"),&Particles::get_color_phases);
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "Material" ), _SCS("set_material"), _SCS("get_material") );
diff --git a/scene/3d/particles.h b/scene/3d/particles.h
index 7b42f5f26a..95cf44a033 100644
--- a/scene/3d/particles.h
+++ b/scene/3d/particles.h
@@ -60,7 +60,7 @@ public:
};
private:
- OBJ_TYPE( Particles, GeometryInstance );
+ GDCLASS( Particles, GeometryInstance );
RID particles;
diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp
index ea2678b2e9..98a81fc150 100644
--- a/scene/3d/path.cpp
+++ b/scene/3d/path.cpp
@@ -80,9 +80,9 @@ Ref<Curve3D> Path::get_curve() const{
void Path::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_curve","curve:Curve3D"),&Path::set_curve);
- ObjectTypeDB::bind_method(_MD("get_curve:Curve3D","curve"),&Path::get_curve);
- ObjectTypeDB::bind_method(_MD("_curve_changed"),&Path::_curve_changed);
+ ClassDB::bind_method(_MD("set_curve","curve:Curve3D"),&Path::set_curve);
+ ClassDB::bind_method(_MD("get_curve:Curve3D","curve"),&Path::get_curve);
+ ClassDB::bind_method(_MD("_curve_changed"),&Path::_curve_changed);
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve3D"), _SCS("set_curve"),_SCS("get_curve"));
}
@@ -257,26 +257,26 @@ void PathFollow::_get_property_list( List<PropertyInfo> *p_list) const{
void PathFollow::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&PathFollow::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&PathFollow::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&PathFollow::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&PathFollow::get_offset);
- ObjectTypeDB::bind_method(_MD("set_h_offset","h_offset"),&PathFollow::set_h_offset);
- ObjectTypeDB::bind_method(_MD("get_h_offset"),&PathFollow::get_h_offset);
+ ClassDB::bind_method(_MD("set_h_offset","h_offset"),&PathFollow::set_h_offset);
+ ClassDB::bind_method(_MD("get_h_offset"),&PathFollow::get_h_offset);
- ObjectTypeDB::bind_method(_MD("set_v_offset","v_offset"),&PathFollow::set_v_offset);
- ObjectTypeDB::bind_method(_MD("get_v_offset"),&PathFollow::get_v_offset);
+ ClassDB::bind_method(_MD("set_v_offset","v_offset"),&PathFollow::set_v_offset);
+ ClassDB::bind_method(_MD("get_v_offset"),&PathFollow::get_v_offset);
- ObjectTypeDB::bind_method(_MD("set_unit_offset","unit_offset"),&PathFollow::set_unit_offset);
- ObjectTypeDB::bind_method(_MD("get_unit_offset"),&PathFollow::get_unit_offset);
+ ClassDB::bind_method(_MD("set_unit_offset","unit_offset"),&PathFollow::set_unit_offset);
+ ClassDB::bind_method(_MD("get_unit_offset"),&PathFollow::get_unit_offset);
- ObjectTypeDB::bind_method(_MD("set_rotation_mode","rotation_mode"),&PathFollow::set_rotation_mode);
- ObjectTypeDB::bind_method(_MD("get_rotation_mode"),&PathFollow::get_rotation_mode);
+ ClassDB::bind_method(_MD("set_rotation_mode","rotation_mode"),&PathFollow::set_rotation_mode);
+ ClassDB::bind_method(_MD("get_rotation_mode"),&PathFollow::get_rotation_mode);
- ObjectTypeDB::bind_method(_MD("set_cubic_interpolation","enable"),&PathFollow::set_cubic_interpolation);
- ObjectTypeDB::bind_method(_MD("get_cubic_interpolation"),&PathFollow::get_cubic_interpolation);
+ ClassDB::bind_method(_MD("set_cubic_interpolation","enable"),&PathFollow::set_cubic_interpolation);
+ ClassDB::bind_method(_MD("get_cubic_interpolation"),&PathFollow::get_cubic_interpolation);
- ObjectTypeDB::bind_method(_MD("set_loop","loop"),&PathFollow::set_loop);
- ObjectTypeDB::bind_method(_MD("has_loop"),&PathFollow::has_loop);
+ ClassDB::bind_method(_MD("set_loop","loop"),&PathFollow::set_loop);
+ ClassDB::bind_method(_MD("has_loop"),&PathFollow::has_loop);
BIND_CONSTANT( ROTATION_NONE );
BIND_CONSTANT( ROTATION_Y );
diff --git a/scene/3d/path.h b/scene/3d/path.h
index 173ac50aac..ab6f459ba9 100644
--- a/scene/3d/path.h
+++ b/scene/3d/path.h
@@ -34,7 +34,7 @@
class Path : public Spatial {
- OBJ_TYPE( Path, Spatial );
+ GDCLASS( Path, Spatial );
Ref<Curve3D> curve;
@@ -56,7 +56,7 @@ public:
class PathFollow : public Spatial {
- OBJ_TYPE(PathFollow,Spatial);
+ GDCLASS(PathFollow,Spatial);
public:
enum RotationMode {
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index d68e58d9b3..5fc26231fb 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -147,20 +147,20 @@ uint32_t PhysicsBody::_get_layers() const{
}
void PhysicsBody::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&PhysicsBody::set_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_layer_mask"),&PhysicsBody::get_layer_mask);
+ ClassDB::bind_method(_MD("set_layer_mask","mask"),&PhysicsBody::set_layer_mask);
+ ClassDB::bind_method(_MD("get_layer_mask"),&PhysicsBody::get_layer_mask);
- ObjectTypeDB::bind_method(_MD("set_collision_mask","mask"),&PhysicsBody::set_collision_mask);
- ObjectTypeDB::bind_method(_MD("get_collision_mask"),&PhysicsBody::get_collision_mask);
+ ClassDB::bind_method(_MD("set_collision_mask","mask"),&PhysicsBody::set_collision_mask);
+ ClassDB::bind_method(_MD("get_collision_mask"),&PhysicsBody::get_collision_mask);
- ObjectTypeDB::bind_method(_MD("set_collision_mask_bit","bit","value"),&PhysicsBody::set_collision_mask_bit);
- ObjectTypeDB::bind_method(_MD("get_collision_mask_bit","bit"),&PhysicsBody::get_collision_mask_bit);
+ ClassDB::bind_method(_MD("set_collision_mask_bit","bit","value"),&PhysicsBody::set_collision_mask_bit);
+ ClassDB::bind_method(_MD("get_collision_mask_bit","bit"),&PhysicsBody::get_collision_mask_bit);
- ObjectTypeDB::bind_method(_MD("set_layer_mask_bit","bit","value"),&PhysicsBody::set_layer_mask_bit);
- ObjectTypeDB::bind_method(_MD("get_layer_mask_bit","bit"),&PhysicsBody::get_layer_mask_bit);
+ ClassDB::bind_method(_MD("set_layer_mask_bit","bit","value"),&PhysicsBody::set_layer_mask_bit);
+ ClassDB::bind_method(_MD("get_layer_mask_bit","bit"),&PhysicsBody::get_layer_mask_bit);
- ObjectTypeDB::bind_method(_MD("_set_layers","mask"),&PhysicsBody::_set_layers);
- ObjectTypeDB::bind_method(_MD("_get_layers"),&PhysicsBody::_get_layers);
+ ClassDB::bind_method(_MD("_set_layers","mask"),&PhysicsBody::_set_layers);
+ ClassDB::bind_method(_MD("_get_layers"),&PhysicsBody::_get_layers);
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"));
@@ -230,19 +230,19 @@ Vector3 StaticBody::get_constant_angular_velocity() const {
void StaticBody::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_constant_linear_velocity","vel"),&StaticBody::set_constant_linear_velocity);
- ObjectTypeDB::bind_method(_MD("set_constant_angular_velocity","vel"),&StaticBody::set_constant_angular_velocity);
- ObjectTypeDB::bind_method(_MD("get_constant_linear_velocity"),&StaticBody::get_constant_linear_velocity);
- ObjectTypeDB::bind_method(_MD("get_constant_angular_velocity"),&StaticBody::get_constant_angular_velocity);
+ ClassDB::bind_method(_MD("set_constant_linear_velocity","vel"),&StaticBody::set_constant_linear_velocity);
+ ClassDB::bind_method(_MD("set_constant_angular_velocity","vel"),&StaticBody::set_constant_angular_velocity);
+ ClassDB::bind_method(_MD("get_constant_linear_velocity"),&StaticBody::get_constant_linear_velocity);
+ ClassDB::bind_method(_MD("get_constant_angular_velocity"),&StaticBody::get_constant_angular_velocity);
- ObjectTypeDB::bind_method(_MD("set_friction","friction"),&StaticBody::set_friction);
- ObjectTypeDB::bind_method(_MD("get_friction"),&StaticBody::get_friction);
+ ClassDB::bind_method(_MD("set_friction","friction"),&StaticBody::set_friction);
+ ClassDB::bind_method(_MD("get_friction"),&StaticBody::get_friction);
- ObjectTypeDB::bind_method(_MD("set_bounce","bounce"),&StaticBody::set_bounce);
- ObjectTypeDB::bind_method(_MD("get_bounce"),&StaticBody::get_bounce);
+ ClassDB::bind_method(_MD("set_bounce","bounce"),&StaticBody::set_bounce);
+ ClassDB::bind_method(_MD("get_bounce"),&StaticBody::get_bounce);
- ObjectTypeDB::bind_method(_MD("add_collision_exception_with","body:PhysicsBody"),&PhysicsBody::add_collision_exception_with);
- ObjectTypeDB::bind_method(_MD("remove_collision_exception_with","body:PhysicsBody"),&PhysicsBody::remove_collision_exception_with);
+ ClassDB::bind_method(_MD("add_collision_exception_with","body:PhysicsBody"),&PhysicsBody::add_collision_exception_with);
+ ClassDB::bind_method(_MD("remove_collision_exception_with","body:PhysicsBody"),&PhysicsBody::remove_collision_exception_with);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"friction",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_friction"),_SCS("get_friction"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"bounce",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_bounce"),_SCS("get_bounce"));
@@ -800,66 +800,66 @@ Array RigidBody::get_colliding_bodies() const {
void RigidBody::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_mode","mode"),&RigidBody::set_mode);
- ObjectTypeDB::bind_method(_MD("get_mode"),&RigidBody::get_mode);
+ ClassDB::bind_method(_MD("set_mode","mode"),&RigidBody::set_mode);
+ ClassDB::bind_method(_MD("get_mode"),&RigidBody::get_mode);
- ObjectTypeDB::bind_method(_MD("set_mass","mass"),&RigidBody::set_mass);
- ObjectTypeDB::bind_method(_MD("get_mass"),&RigidBody::get_mass);
+ ClassDB::bind_method(_MD("set_mass","mass"),&RigidBody::set_mass);
+ ClassDB::bind_method(_MD("get_mass"),&RigidBody::get_mass);
- ObjectTypeDB::bind_method(_MD("set_weight","weight"),&RigidBody::set_weight);
- ObjectTypeDB::bind_method(_MD("get_weight"),&RigidBody::get_weight);
+ ClassDB::bind_method(_MD("set_weight","weight"),&RigidBody::set_weight);
+ ClassDB::bind_method(_MD("get_weight"),&RigidBody::get_weight);
- ObjectTypeDB::bind_method(_MD("set_friction","friction"),&RigidBody::set_friction);
- ObjectTypeDB::bind_method(_MD("get_friction"),&RigidBody::get_friction);
+ ClassDB::bind_method(_MD("set_friction","friction"),&RigidBody::set_friction);
+ ClassDB::bind_method(_MD("get_friction"),&RigidBody::get_friction);
- ObjectTypeDB::bind_method(_MD("set_bounce","bounce"),&RigidBody::set_bounce);
- ObjectTypeDB::bind_method(_MD("get_bounce"),&RigidBody::get_bounce);
+ ClassDB::bind_method(_MD("set_bounce","bounce"),&RigidBody::set_bounce);
+ ClassDB::bind_method(_MD("get_bounce"),&RigidBody::get_bounce);
- ObjectTypeDB::bind_method(_MD("set_linear_velocity","linear_velocity"),&RigidBody::set_linear_velocity);
- ObjectTypeDB::bind_method(_MD("get_linear_velocity"),&RigidBody::get_linear_velocity);
+ ClassDB::bind_method(_MD("set_linear_velocity","linear_velocity"),&RigidBody::set_linear_velocity);
+ ClassDB::bind_method(_MD("get_linear_velocity"),&RigidBody::get_linear_velocity);
- ObjectTypeDB::bind_method(_MD("set_angular_velocity","angular_velocity"),&RigidBody::set_angular_velocity);
- ObjectTypeDB::bind_method(_MD("get_angular_velocity"),&RigidBody::get_angular_velocity);
+ ClassDB::bind_method(_MD("set_angular_velocity","angular_velocity"),&RigidBody::set_angular_velocity);
+ ClassDB::bind_method(_MD("get_angular_velocity"),&RigidBody::get_angular_velocity);
- ObjectTypeDB::bind_method(_MD("set_gravity_scale","gravity_scale"),&RigidBody::set_gravity_scale);
- ObjectTypeDB::bind_method(_MD("get_gravity_scale"),&RigidBody::get_gravity_scale);
+ ClassDB::bind_method(_MD("set_gravity_scale","gravity_scale"),&RigidBody::set_gravity_scale);
+ ClassDB::bind_method(_MD("get_gravity_scale"),&RigidBody::get_gravity_scale);
- ObjectTypeDB::bind_method(_MD("set_linear_damp","linear_damp"),&RigidBody::set_linear_damp);
- ObjectTypeDB::bind_method(_MD("get_linear_damp"),&RigidBody::get_linear_damp);
+ ClassDB::bind_method(_MD("set_linear_damp","linear_damp"),&RigidBody::set_linear_damp);
+ ClassDB::bind_method(_MD("get_linear_damp"),&RigidBody::get_linear_damp);
- ObjectTypeDB::bind_method(_MD("set_angular_damp","angular_damp"),&RigidBody::set_angular_damp);
- ObjectTypeDB::bind_method(_MD("get_angular_damp"),&RigidBody::get_angular_damp);
+ ClassDB::bind_method(_MD("set_angular_damp","angular_damp"),&RigidBody::set_angular_damp);
+ ClassDB::bind_method(_MD("get_angular_damp"),&RigidBody::get_angular_damp);
- ObjectTypeDB::bind_method(_MD("set_max_contacts_reported","amount"),&RigidBody::set_max_contacts_reported);
- ObjectTypeDB::bind_method(_MD("get_max_contacts_reported"),&RigidBody::get_max_contacts_reported);
+ ClassDB::bind_method(_MD("set_max_contacts_reported","amount"),&RigidBody::set_max_contacts_reported);
+ ClassDB::bind_method(_MD("get_max_contacts_reported"),&RigidBody::get_max_contacts_reported);
- ObjectTypeDB::bind_method(_MD("set_use_custom_integrator","enable"),&RigidBody::set_use_custom_integrator);
- ObjectTypeDB::bind_method(_MD("is_using_custom_integrator"),&RigidBody::is_using_custom_integrator);
+ ClassDB::bind_method(_MD("set_use_custom_integrator","enable"),&RigidBody::set_use_custom_integrator);
+ ClassDB::bind_method(_MD("is_using_custom_integrator"),&RigidBody::is_using_custom_integrator);
- ObjectTypeDB::bind_method(_MD("set_contact_monitor","enabled"),&RigidBody::set_contact_monitor);
- ObjectTypeDB::bind_method(_MD("is_contact_monitor_enabled"),&RigidBody::is_contact_monitor_enabled);
+ ClassDB::bind_method(_MD("set_contact_monitor","enabled"),&RigidBody::set_contact_monitor);
+ ClassDB::bind_method(_MD("is_contact_monitor_enabled"),&RigidBody::is_contact_monitor_enabled);
- ObjectTypeDB::bind_method(_MD("set_use_continuous_collision_detection","enable"),&RigidBody::set_use_continuous_collision_detection);
- ObjectTypeDB::bind_method(_MD("is_using_continuous_collision_detection"),&RigidBody::is_using_continuous_collision_detection);
+ ClassDB::bind_method(_MD("set_use_continuous_collision_detection","enable"),&RigidBody::set_use_continuous_collision_detection);
+ ClassDB::bind_method(_MD("is_using_continuous_collision_detection"),&RigidBody::is_using_continuous_collision_detection);
- ObjectTypeDB::bind_method(_MD("set_axis_velocity","axis_velocity"),&RigidBody::set_axis_velocity);
- ObjectTypeDB::bind_method(_MD("apply_impulse","pos","impulse"),&RigidBody::apply_impulse);
+ ClassDB::bind_method(_MD("set_axis_velocity","axis_velocity"),&RigidBody::set_axis_velocity);
+ ClassDB::bind_method(_MD("apply_impulse","pos","impulse"),&RigidBody::apply_impulse);
- ObjectTypeDB::bind_method(_MD("set_sleeping","sleeping"),&RigidBody::set_sleeping);
- ObjectTypeDB::bind_method(_MD("is_sleeping"),&RigidBody::is_sleeping);
+ ClassDB::bind_method(_MD("set_sleeping","sleeping"),&RigidBody::set_sleeping);
+ ClassDB::bind_method(_MD("is_sleeping"),&RigidBody::is_sleeping);
- ObjectTypeDB::bind_method(_MD("set_can_sleep","able_to_sleep"),&RigidBody::set_can_sleep);
- ObjectTypeDB::bind_method(_MD("is_able_to_sleep"),&RigidBody::is_able_to_sleep);
+ ClassDB::bind_method(_MD("set_can_sleep","able_to_sleep"),&RigidBody::set_can_sleep);
+ ClassDB::bind_method(_MD("is_able_to_sleep"),&RigidBody::is_able_to_sleep);
- ObjectTypeDB::bind_method(_MD("_direct_state_changed"),&RigidBody::_direct_state_changed);
- ObjectTypeDB::bind_method(_MD("_body_enter_tree"),&RigidBody::_body_enter_tree);
- ObjectTypeDB::bind_method(_MD("_body_exit_tree"),&RigidBody::_body_exit_tree);
+ ClassDB::bind_method(_MD("_direct_state_changed"),&RigidBody::_direct_state_changed);
+ ClassDB::bind_method(_MD("_body_enter_tree"),&RigidBody::_body_enter_tree);
+ ClassDB::bind_method(_MD("_body_exit_tree"),&RigidBody::_body_exit_tree);
- ObjectTypeDB::bind_method(_MD("set_axis_lock","axis_lock"),&RigidBody::set_axis_lock);
- ObjectTypeDB::bind_method(_MD("get_axis_lock"),&RigidBody::get_axis_lock);
+ ClassDB::bind_method(_MD("set_axis_lock","axis_lock"),&RigidBody::set_axis_lock);
+ ClassDB::bind_method(_MD("get_axis_lock"),&RigidBody::get_axis_lock);
- ObjectTypeDB::bind_method(_MD("get_colliding_bodies"),&RigidBody::get_colliding_bodies);
+ ClassDB::bind_method(_MD("get_colliding_bodies"),&RigidBody::get_colliding_bodies);
BIND_VMETHOD(MethodInfo("_integrate_forces",PropertyInfo(Variant::OBJECT,"state:PhysicsDirectBodyState")));
@@ -1294,34 +1294,34 @@ float KinematicBody::get_collision_margin() const{
void KinematicBody::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("move","rel_vec"),&KinematicBody::move);
- ObjectTypeDB::bind_method(_MD("move_to","position"),&KinematicBody::move_to);
+ ClassDB::bind_method(_MD("move","rel_vec"),&KinematicBody::move);
+ ClassDB::bind_method(_MD("move_to","position"),&KinematicBody::move_to);
- ObjectTypeDB::bind_method(_MD("can_teleport_to","position"),&KinematicBody::can_teleport_to);
+ ClassDB::bind_method(_MD("can_teleport_to","position"),&KinematicBody::can_teleport_to);
- ObjectTypeDB::bind_method(_MD("is_colliding"),&KinematicBody::is_colliding);
+ ClassDB::bind_method(_MD("is_colliding"),&KinematicBody::is_colliding);
- ObjectTypeDB::bind_method(_MD("get_collision_pos"),&KinematicBody::get_collision_pos);
- ObjectTypeDB::bind_method(_MD("get_collision_normal"),&KinematicBody::get_collision_normal);
- ObjectTypeDB::bind_method(_MD("get_collider_velocity"),&KinematicBody::get_collider_velocity);
- ObjectTypeDB::bind_method(_MD("get_collider:Variant"),&KinematicBody::_get_collider);
- ObjectTypeDB::bind_method(_MD("get_collider_shape"),&KinematicBody::get_collider_shape);
+ ClassDB::bind_method(_MD("get_collision_pos"),&KinematicBody::get_collision_pos);
+ ClassDB::bind_method(_MD("get_collision_normal"),&KinematicBody::get_collision_normal);
+ ClassDB::bind_method(_MD("get_collider_velocity"),&KinematicBody::get_collider_velocity);
+ ClassDB::bind_method(_MD("get_collider:Variant"),&KinematicBody::_get_collider);
+ ClassDB::bind_method(_MD("get_collider_shape"),&KinematicBody::get_collider_shape);
- ObjectTypeDB::bind_method(_MD("set_collide_with_static_bodies","enable"),&KinematicBody::set_collide_with_static_bodies);
- ObjectTypeDB::bind_method(_MD("can_collide_with_static_bodies"),&KinematicBody::can_collide_with_static_bodies);
+ ClassDB::bind_method(_MD("set_collide_with_static_bodies","enable"),&KinematicBody::set_collide_with_static_bodies);
+ ClassDB::bind_method(_MD("can_collide_with_static_bodies"),&KinematicBody::can_collide_with_static_bodies);
- ObjectTypeDB::bind_method(_MD("set_collide_with_kinematic_bodies","enable"),&KinematicBody::set_collide_with_kinematic_bodies);
- ObjectTypeDB::bind_method(_MD("can_collide_with_kinematic_bodies"),&KinematicBody::can_collide_with_kinematic_bodies);
+ ClassDB::bind_method(_MD("set_collide_with_kinematic_bodies","enable"),&KinematicBody::set_collide_with_kinematic_bodies);
+ ClassDB::bind_method(_MD("can_collide_with_kinematic_bodies"),&KinematicBody::can_collide_with_kinematic_bodies);
- ObjectTypeDB::bind_method(_MD("set_collide_with_rigid_bodies","enable"),&KinematicBody::set_collide_with_rigid_bodies);
- ObjectTypeDB::bind_method(_MD("can_collide_with_rigid_bodies"),&KinematicBody::can_collide_with_rigid_bodies);
+ ClassDB::bind_method(_MD("set_collide_with_rigid_bodies","enable"),&KinematicBody::set_collide_with_rigid_bodies);
+ ClassDB::bind_method(_MD("can_collide_with_rigid_bodies"),&KinematicBody::can_collide_with_rigid_bodies);
- ObjectTypeDB::bind_method(_MD("set_collide_with_character_bodies","enable"),&KinematicBody::set_collide_with_character_bodies);
- ObjectTypeDB::bind_method(_MD("can_collide_with_character_bodies"),&KinematicBody::can_collide_with_character_bodies);
+ ClassDB::bind_method(_MD("set_collide_with_character_bodies","enable"),&KinematicBody::set_collide_with_character_bodies);
+ ClassDB::bind_method(_MD("can_collide_with_character_bodies"),&KinematicBody::can_collide_with_character_bodies);
- ObjectTypeDB::bind_method(_MD("set_collision_margin","pixels"),&KinematicBody::set_collision_margin);
- ObjectTypeDB::bind_method(_MD("get_collision_margin","pixels"),&KinematicBody::get_collision_margin);
+ ClassDB::bind_method(_MD("set_collision_margin","pixels"),&KinematicBody::set_collision_margin);
+ ClassDB::bind_method(_MD("get_collision_margin","pixels"),&KinematicBody::get_collision_margin);
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"collide_with/static"),_SCS("set_collide_with_static_bodies"),_SCS("can_collide_with_static_bodies"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"collide_with/kinematic"),_SCS("set_collide_with_kinematic_bodies"),_SCS("can_collide_with_kinematic_bodies"));
diff --git a/scene/3d/physics_body.h b/scene/3d/physics_body.h
index 1bb85929fd..9f317745b3 100644
--- a/scene/3d/physics_body.h
+++ b/scene/3d/physics_body.h
@@ -36,7 +36,7 @@
class PhysicsBody : public CollisionObject {
- OBJ_TYPE(PhysicsBody,CollisionObject);
+ GDCLASS(PhysicsBody,CollisionObject);
uint32_t layer_mask;
uint32_t collision_mask;
@@ -78,7 +78,7 @@ public:
class StaticBody : public PhysicsBody {
- OBJ_TYPE(StaticBody,PhysicsBody);
+ GDCLASS(StaticBody,PhysicsBody);
Vector3 constant_linear_velocity;
Vector3 constant_angular_velocity;
@@ -114,7 +114,7 @@ public:
class RigidBody : public PhysicsBody {
- OBJ_TYPE(RigidBody,PhysicsBody);
+ GDCLASS(RigidBody,PhysicsBody);
public:
enum Mode {
@@ -284,7 +284,7 @@ VARIANT_ENUM_CAST(RigidBody::AxisLock);
class KinematicBody : public PhysicsBody {
- OBJ_TYPE(KinematicBody,PhysicsBody);
+ GDCLASS(KinematicBody,PhysicsBody);
float margin;
bool collide_static;
diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp
index d9fed63e12..a27e558e45 100644
--- a/scene/3d/physics_joint.cpp
+++ b/scene/3d/physics_joint.cpp
@@ -167,17 +167,17 @@ bool Joint::get_exclude_nodes_from_collision() const{
void Joint::_bind_methods() {
- ObjectTypeDB::bind_method( _MD("set_node_a","node"), &Joint::set_node_a );
- ObjectTypeDB::bind_method( _MD("get_node_a"), &Joint::get_node_a );
+ ClassDB::bind_method( _MD("set_node_a","node"), &Joint::set_node_a );
+ ClassDB::bind_method( _MD("get_node_a"), &Joint::get_node_a );
- ObjectTypeDB::bind_method( _MD("set_node_b","node"), &Joint::set_node_b );
- ObjectTypeDB::bind_method( _MD("get_node_b"), &Joint::get_node_b );
+ ClassDB::bind_method( _MD("set_node_b","node"), &Joint::set_node_b );
+ ClassDB::bind_method( _MD("get_node_b"), &Joint::get_node_b );
- ObjectTypeDB::bind_method( _MD("set_solver_priority","priority"), &Joint::set_solver_priority );
- ObjectTypeDB::bind_method( _MD("get_solver_priority"), &Joint::get_solver_priority );
+ ClassDB::bind_method( _MD("set_solver_priority","priority"), &Joint::set_solver_priority );
+ ClassDB::bind_method( _MD("get_solver_priority"), &Joint::get_solver_priority );
- ObjectTypeDB::bind_method( _MD("set_exclude_nodes_from_collision","enable"), &Joint::set_exclude_nodes_from_collision );
- ObjectTypeDB::bind_method( _MD("get_exclude_nodes_from_collision"), &Joint::get_exclude_nodes_from_collision );
+ ClassDB::bind_method( _MD("set_exclude_nodes_from_collision","enable"), &Joint::set_exclude_nodes_from_collision );
+ ClassDB::bind_method( _MD("get_exclude_nodes_from_collision"), &Joint::get_exclude_nodes_from_collision );
ADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, "nodes/node_a"), _SCS("set_node_a"),_SCS("get_node_a") );
ADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, "nodes/node_b"), _SCS("set_node_b"),_SCS("get_node_b") );
@@ -202,8 +202,8 @@ Joint::Joint() {
void PinJoint::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_param","param","value"),&PinJoint::set_param);
- ObjectTypeDB::bind_method(_MD("get_param","param"),&PinJoint::get_param);
+ ClassDB::bind_method(_MD("set_param","param","value"),&PinJoint::set_param);
+ ClassDB::bind_method(_MD("get_param","param"),&PinJoint::get_param);
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/bias",PROPERTY_HINT_RANGE,"0.01,0.99,0.01"),_SCS("set_param"),_SCS("get_param"), PARAM_BIAS );
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/damping",PROPERTY_HINT_RANGE,"0.01,8.0,0.01"),_SCS("set_param"),_SCS("get_param"), PARAM_DAMPING );
@@ -291,17 +291,17 @@ float HingeJoint::_get_lower_limit() const {
void HingeJoint::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_param","param","value"),&HingeJoint::set_param);
- ObjectTypeDB::bind_method(_MD("get_param","param"),&HingeJoint::get_param);
+ ClassDB::bind_method(_MD("set_param","param","value"),&HingeJoint::set_param);
+ ClassDB::bind_method(_MD("get_param","param"),&HingeJoint::get_param);
- ObjectTypeDB::bind_method(_MD("set_flag","flag","enabled"),&HingeJoint::set_flag);
- ObjectTypeDB::bind_method(_MD("get_flag","flag"),&HingeJoint::get_flag);
+ ClassDB::bind_method(_MD("set_flag","flag","enabled"),&HingeJoint::set_flag);
+ ClassDB::bind_method(_MD("get_flag","flag"),&HingeJoint::get_flag);
- ObjectTypeDB::bind_method(_MD("_set_upper_limit","upper_limit"),&HingeJoint::_set_upper_limit);
- ObjectTypeDB::bind_method(_MD("_get_upper_limit"),&HingeJoint::_get_upper_limit);
+ ClassDB::bind_method(_MD("_set_upper_limit","upper_limit"),&HingeJoint::_set_upper_limit);
+ ClassDB::bind_method(_MD("_get_upper_limit"),&HingeJoint::_get_upper_limit);
- ObjectTypeDB::bind_method(_MD("_set_lower_limit","lower_limit"),&HingeJoint::_set_lower_limit);
- ObjectTypeDB::bind_method(_MD("_get_lower_limit"),&HingeJoint::_get_lower_limit);
+ ClassDB::bind_method(_MD("_set_lower_limit","lower_limit"),&HingeJoint::_set_lower_limit);
+ ClassDB::bind_method(_MD("_get_lower_limit"),&HingeJoint::_get_lower_limit);
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/bias",PROPERTY_HINT_RANGE,"0.01,0.99,0.01"),_SCS("set_param"),_SCS("get_param"), PARAM_BIAS );
@@ -446,15 +446,15 @@ float SliderJoint::_get_lower_limit_angular() const {
void SliderJoint::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_param","param","value"),&SliderJoint::set_param);
- ObjectTypeDB::bind_method(_MD("get_param","param"),&SliderJoint::get_param);
+ ClassDB::bind_method(_MD("set_param","param","value"),&SliderJoint::set_param);
+ ClassDB::bind_method(_MD("get_param","param"),&SliderJoint::get_param);
- ObjectTypeDB::bind_method(_MD("_set_upper_limit_angular","upper_limit_angular"),&SliderJoint::_set_upper_limit_angular);
- ObjectTypeDB::bind_method(_MD("_get_upper_limit_angular"),&SliderJoint::_get_upper_limit_angular);
+ ClassDB::bind_method(_MD("_set_upper_limit_angular","upper_limit_angular"),&SliderJoint::_set_upper_limit_angular);
+ ClassDB::bind_method(_MD("_get_upper_limit_angular"),&SliderJoint::_get_upper_limit_angular);
- ObjectTypeDB::bind_method(_MD("_set_lower_limit_angular","lower_limit_angular"),&SliderJoint::_set_lower_limit_angular);
- ObjectTypeDB::bind_method(_MD("_get_lower_limit_angular"),&SliderJoint::_get_lower_limit_angular);
+ ClassDB::bind_method(_MD("_set_lower_limit_angular","lower_limit_angular"),&SliderJoint::_set_lower_limit_angular);
+ ClassDB::bind_method(_MD("_get_lower_limit_angular"),&SliderJoint::_get_lower_limit_angular);
ADD_PROPERTYI( PropertyInfo(Variant::REAL,"linear_limit/upper_distance",PROPERTY_HINT_RANGE,"-1024,1024,0.01"),_SCS("set_param"),_SCS("get_param"), PARAM_LINEAR_LIMIT_UPPER);
@@ -611,15 +611,15 @@ float ConeTwistJoint::_get_twist_span() const {
void ConeTwistJoint::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_param","param","value"),&ConeTwistJoint::set_param);
- ObjectTypeDB::bind_method(_MD("get_param","param"),&ConeTwistJoint::get_param);
+ ClassDB::bind_method(_MD("set_param","param","value"),&ConeTwistJoint::set_param);
+ ClassDB::bind_method(_MD("get_param","param"),&ConeTwistJoint::get_param);
- ObjectTypeDB::bind_method(_MD("_set_swing_span","swing_span"),&ConeTwistJoint::_set_swing_span);
- ObjectTypeDB::bind_method(_MD("_get_swing_span"),&ConeTwistJoint::_get_swing_span);
+ ClassDB::bind_method(_MD("_set_swing_span","swing_span"),&ConeTwistJoint::_set_swing_span);
+ ClassDB::bind_method(_MD("_get_swing_span"),&ConeTwistJoint::_get_swing_span);
- ObjectTypeDB::bind_method(_MD("_set_twist_span","twist_span"),&ConeTwistJoint::_set_twist_span);
- ObjectTypeDB::bind_method(_MD("_get_twist_span"),&ConeTwistJoint::_get_twist_span);
+ ClassDB::bind_method(_MD("_set_twist_span","twist_span"),&ConeTwistJoint::_set_twist_span);
+ ClassDB::bind_method(_MD("_get_twist_span"),&ConeTwistJoint::_get_twist_span);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"swing_span",PROPERTY_HINT_RANGE,"-180,180,0.1"),_SCS("_set_swing_span"),_SCS("_get_swing_span") );
@@ -770,41 +770,41 @@ float Generic6DOFJoint::_get_angular_lo_limit_z() const{
void Generic6DOFJoint::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("_set_angular_hi_limit_x","angle"),&Generic6DOFJoint::_set_angular_hi_limit_x);
- ObjectTypeDB::bind_method(_MD("_get_angular_hi_limit_x"),&Generic6DOFJoint::_get_angular_hi_limit_x);
+ ClassDB::bind_method(_MD("_set_angular_hi_limit_x","angle"),&Generic6DOFJoint::_set_angular_hi_limit_x);
+ ClassDB::bind_method(_MD("_get_angular_hi_limit_x"),&Generic6DOFJoint::_get_angular_hi_limit_x);
- ObjectTypeDB::bind_method(_MD("_set_angular_lo_limit_x","angle"),&Generic6DOFJoint::_set_angular_lo_limit_x);
- ObjectTypeDB::bind_method(_MD("_get_angular_lo_limit_x"),&Generic6DOFJoint::_get_angular_lo_limit_x);
+ ClassDB::bind_method(_MD("_set_angular_lo_limit_x","angle"),&Generic6DOFJoint::_set_angular_lo_limit_x);
+ ClassDB::bind_method(_MD("_get_angular_lo_limit_x"),&Generic6DOFJoint::_get_angular_lo_limit_x);
- ObjectTypeDB::bind_method(_MD("_set_angular_hi_limit_y","angle"),&Generic6DOFJoint::_set_angular_hi_limit_y);
- ObjectTypeDB::bind_method(_MD("_get_angular_hi_limit_y"),&Generic6DOFJoint::_get_angular_hi_limit_y);
+ ClassDB::bind_method(_MD("_set_angular_hi_limit_y","angle"),&Generic6DOFJoint::_set_angular_hi_limit_y);
+ ClassDB::bind_method(_MD("_get_angular_hi_limit_y"),&Generic6DOFJoint::_get_angular_hi_limit_y);
- ObjectTypeDB::bind_method(_MD("_set_angular_lo_limit_y","angle"),&Generic6DOFJoint::_set_angular_lo_limit_y);
- ObjectTypeDB::bind_method(_MD("_get_angular_lo_limit_y"),&Generic6DOFJoint::_get_angular_lo_limit_y);
+ ClassDB::bind_method(_MD("_set_angular_lo_limit_y","angle"),&Generic6DOFJoint::_set_angular_lo_limit_y);
+ ClassDB::bind_method(_MD("_get_angular_lo_limit_y"),&Generic6DOFJoint::_get_angular_lo_limit_y);
- ObjectTypeDB::bind_method(_MD("_set_angular_hi_limit_z","angle"),&Generic6DOFJoint::_set_angular_hi_limit_z);
- ObjectTypeDB::bind_method(_MD("_get_angular_hi_limit_z"),&Generic6DOFJoint::_get_angular_hi_limit_z);
+ ClassDB::bind_method(_MD("_set_angular_hi_limit_z","angle"),&Generic6DOFJoint::_set_angular_hi_limit_z);
+ ClassDB::bind_method(_MD("_get_angular_hi_limit_z"),&Generic6DOFJoint::_get_angular_hi_limit_z);
- ObjectTypeDB::bind_method(_MD("_set_angular_lo_limit_z","angle"),&Generic6DOFJoint::_set_angular_lo_limit_z);
- ObjectTypeDB::bind_method(_MD("_get_angular_lo_limit_z"),&Generic6DOFJoint::_get_angular_lo_limit_z);
+ ClassDB::bind_method(_MD("_set_angular_lo_limit_z","angle"),&Generic6DOFJoint::_set_angular_lo_limit_z);
+ ClassDB::bind_method(_MD("_get_angular_lo_limit_z"),&Generic6DOFJoint::_get_angular_lo_limit_z);
- ObjectTypeDB::bind_method(_MD("set_param_x","param","value"),&Generic6DOFJoint::set_param_x);
- ObjectTypeDB::bind_method(_MD("get_param_x","param"),&Generic6DOFJoint::get_param_x);
+ ClassDB::bind_method(_MD("set_param_x","param","value"),&Generic6DOFJoint::set_param_x);
+ ClassDB::bind_method(_MD("get_param_x","param"),&Generic6DOFJoint::get_param_x);
- ObjectTypeDB::bind_method(_MD("set_param_y","param","value"),&Generic6DOFJoint::set_param_y);
- ObjectTypeDB::bind_method(_MD("get_param_y","param"),&Generic6DOFJoint::get_param_y);
+ ClassDB::bind_method(_MD("set_param_y","param","value"),&Generic6DOFJoint::set_param_y);
+ ClassDB::bind_method(_MD("get_param_y","param"),&Generic6DOFJoint::get_param_y);
- ObjectTypeDB::bind_method(_MD("set_param_z","param","value"),&Generic6DOFJoint::set_param_z);
- ObjectTypeDB::bind_method(_MD("get_param_z","param"),&Generic6DOFJoint::get_param_z);
+ ClassDB::bind_method(_MD("set_param_z","param","value"),&Generic6DOFJoint::set_param_z);
+ ClassDB::bind_method(_MD("get_param_z","param"),&Generic6DOFJoint::get_param_z);
- ObjectTypeDB::bind_method(_MD("set_flag_x","flag","value"),&Generic6DOFJoint::set_flag_x);
- ObjectTypeDB::bind_method(_MD("get_flag_x","flag"),&Generic6DOFJoint::get_flag_x);
+ ClassDB::bind_method(_MD("set_flag_x","flag","value"),&Generic6DOFJoint::set_flag_x);
+ ClassDB::bind_method(_MD("get_flag_x","flag"),&Generic6DOFJoint::get_flag_x);
- ObjectTypeDB::bind_method(_MD("set_flag_y","flag","value"),&Generic6DOFJoint::set_flag_y);
- ObjectTypeDB::bind_method(_MD("get_flag_y","flag"),&Generic6DOFJoint::get_flag_y);
+ ClassDB::bind_method(_MD("set_flag_y","flag","value"),&Generic6DOFJoint::set_flag_y);
+ ClassDB::bind_method(_MD("get_flag_y","flag"),&Generic6DOFJoint::get_flag_y);
- ObjectTypeDB::bind_method(_MD("set_flag_z","flag","value"),&Generic6DOFJoint::set_flag_z);
- ObjectTypeDB::bind_method(_MD("get_flag_z","flag"),&Generic6DOFJoint::get_flag_z);
+ ClassDB::bind_method(_MD("set_flag_z","flag","value"),&Generic6DOFJoint::set_flag_z);
+ ClassDB::bind_method(_MD("get_flag_z","flag"),&Generic6DOFJoint::get_flag_z);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"linear_limit_x/enabled"),_SCS("set_flag_x"),_SCS("get_flag_x"),FLAG_ENABLE_LINEAR_LIMIT);
@@ -1170,22 +1170,22 @@ RID PhysicsJoint::_get_visual_instance_rid() const {
void PhysicsJoint::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_get_visual_instance_rid"),&PhysicsJoint::_get_visual_instance_rid);
- ObjectTypeDB::bind_method(_MD("set_body_A","path"),&PhysicsJoint::set_body_A);
- ObjectTypeDB::bind_method(_MD("set_body_B"),&PhysicsJoint::set_body_B);
- ObjectTypeDB::bind_method(_MD("get_body_A","path"),&PhysicsJoint::get_body_A);
- ObjectTypeDB::bind_method(_MD("get_body_B"),&PhysicsJoint::get_body_B);
+ ClassDB::bind_method(_MD("_get_visual_instance_rid"),&PhysicsJoint::_get_visual_instance_rid);
+ ClassDB::bind_method(_MD("set_body_A","path"),&PhysicsJoint::set_body_A);
+ ClassDB::bind_method(_MD("set_body_B"),&PhysicsJoint::set_body_B);
+ ClassDB::bind_method(_MD("get_body_A","path"),&PhysicsJoint::get_body_A);
+ ClassDB::bind_method(_MD("get_body_B"),&PhysicsJoint::get_body_B);
- ObjectTypeDB::bind_method(_MD("set_active","active"),&PhysicsJoint::set_active);
- ObjectTypeDB::bind_method(_MD("is_active"),&PhysicsJoint::is_active);
+ ClassDB::bind_method(_MD("set_active","active"),&PhysicsJoint::set_active);
+ ClassDB::bind_method(_MD("is_active"),&PhysicsJoint::is_active);
- ObjectTypeDB::bind_method(_MD("set_disable_collision","disable"),&PhysicsJoint::set_disable_collision);
- ObjectTypeDB::bind_method(_MD("has_disable_collision"),&PhysicsJoint::has_disable_collision);
+ ClassDB::bind_method(_MD("set_disable_collision","disable"),&PhysicsJoint::set_disable_collision);
+ ClassDB::bind_method(_MD("has_disable_collision"),&PhysicsJoint::has_disable_collision);
- ObjectTypeDB::bind_method("reconnect",&PhysicsJoint::reconnect);
+ ClassDB::bind_method("reconnect",&PhysicsJoint::reconnect);
- ObjectTypeDB::bind_method(_MD("get_rid"),&PhysicsJoint::get_rid);
+ ClassDB::bind_method(_MD("get_rid"),&PhysicsJoint::get_rid);
}
diff --git a/scene/3d/physics_joint.h b/scene/3d/physics_joint.h
index a66d8bda4a..5debe87d38 100644
--- a/scene/3d/physics_joint.h
+++ b/scene/3d/physics_joint.h
@@ -35,7 +35,7 @@
class Joint : public Spatial {
- OBJ_TYPE(Joint,Spatial);
+ GDCLASS(Joint,Spatial);
RID ba,bb;
@@ -81,7 +81,7 @@ public:
class PinJoint : public Joint {
- OBJ_TYPE(PinJoint,Joint);
+ GDCLASS(PinJoint,Joint);
public:
enum Param {
@@ -108,7 +108,7 @@ VARIANT_ENUM_CAST(PinJoint::Param);
class HingeJoint : public Joint {
- OBJ_TYPE(HingeJoint,Joint);
+ GDCLASS(HingeJoint,Joint);
public:
enum Param {
@@ -161,7 +161,7 @@ VARIANT_ENUM_CAST(HingeJoint::Flag);
class SliderJoint : public Joint {
- OBJ_TYPE(SliderJoint,Joint);
+ GDCLASS(SliderJoint,Joint);
public:
enum Param {
@@ -221,7 +221,7 @@ VARIANT_ENUM_CAST(SliderJoint::Param);
class ConeTwistJoint : public Joint {
- OBJ_TYPE(ConeTwistJoint,Joint);
+ GDCLASS(ConeTwistJoint,Joint);
public:
enum Param {
@@ -260,7 +260,7 @@ VARIANT_ENUM_CAST(ConeTwistJoint::Param);
class Generic6DOFJoint : public Joint {
- OBJ_TYPE(Generic6DOFJoint,Joint);
+ GDCLASS(Generic6DOFJoint,Joint);
public:
enum Param {
@@ -351,7 +351,7 @@ VARIANT_ENUM_CAST(Generic6DOFJoint::Flag);
#if 0
class PhysicsJoint : public Spatial {
- OBJ_TYPE(PhysicsJoint,Spatial);
+ GDCLASS(PhysicsJoint,Spatial);
OBJ_CATEGORY("3D Physics Nodes");
NodePath body_A;
@@ -404,7 +404,7 @@ public:
class PhysicsJointPin : public PhysicsJoint {
- OBJ_TYPE( PhysicsJointPin, PhysicsJoint );
+ GDCLASS( PhysicsJointPin, PhysicsJoint );
protected:
diff --git a/scene/3d/portal.cpp b/scene/3d/portal.cpp
index 421cfcc787..1de9188e82 100644
--- a/scene/3d/portal.cpp
+++ b/scene/3d/portal.cpp
@@ -197,20 +197,20 @@ Color Portal::get_disabled_color() const {
void Portal::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_shape","points"),&Portal::set_shape);
- ObjectTypeDB::bind_method(_MD("get_shape"),&Portal::get_shape);
+ ClassDB::bind_method(_MD("set_shape","points"),&Portal::set_shape);
+ ClassDB::bind_method(_MD("get_shape"),&Portal::get_shape);
- ObjectTypeDB::bind_method(_MD("set_enabled","enable"),&Portal::set_enabled);
- ObjectTypeDB::bind_method(_MD("is_enabled"),&Portal::is_enabled);
+ ClassDB::bind_method(_MD("set_enabled","enable"),&Portal::set_enabled);
+ ClassDB::bind_method(_MD("is_enabled"),&Portal::is_enabled);
- ObjectTypeDB::bind_method(_MD("set_disable_distance","distance"),&Portal::set_disable_distance);
- ObjectTypeDB::bind_method(_MD("get_disable_distance"),&Portal::get_disable_distance);
+ ClassDB::bind_method(_MD("set_disable_distance","distance"),&Portal::set_disable_distance);
+ ClassDB::bind_method(_MD("get_disable_distance"),&Portal::get_disable_distance);
- ObjectTypeDB::bind_method(_MD("set_disabled_color","color"),&Portal::set_disabled_color);
- ObjectTypeDB::bind_method(_MD("get_disabled_color"),&Portal::get_disabled_color);
+ ClassDB::bind_method(_MD("set_disabled_color","color"),&Portal::set_disabled_color);
+ ClassDB::bind_method(_MD("get_disabled_color"),&Portal::get_disabled_color);
- ObjectTypeDB::bind_method(_MD("set_connect_range","range"),&Portal::set_connect_range);
- ObjectTypeDB::bind_method(_MD("get_connect_range"),&Portal::get_connect_range);
+ ClassDB::bind_method(_MD("set_connect_range","range"),&Portal::set_connect_range);
+ ClassDB::bind_method(_MD("get_connect_range"),&Portal::get_connect_range);
}
diff --git a/scene/3d/portal.h b/scene/3d/portal.h
index e69e973146..d154c18b3d 100644
--- a/scene/3d/portal.h
+++ b/scene/3d/portal.h
@@ -44,7 +44,7 @@
class Portal : public VisualInstance {
- OBJ_TYPE(Portal, VisualInstance);
+ GDCLASS(Portal, VisualInstance);
RID portal;
Vector<Point2> shape;
diff --git a/scene/3d/position_3d.h b/scene/3d/position_3d.h
index 47f71845f0..e732c5321e 100644
--- a/scene/3d/position_3d.h
+++ b/scene/3d/position_3d.h
@@ -33,7 +33,7 @@
class Position3D : public Spatial {
- OBJ_TYPE(Position3D,Spatial);
+ GDCLASS(Position3D,Spatial);
public:
diff --git a/scene/3d/proximity_group.cpp b/scene/3d/proximity_group.cpp
index 0553d2eaae..c3cb20bfdd 100644
--- a/scene/3d/proximity_group.cpp
+++ b/scene/3d/proximity_group.cpp
@@ -171,12 +171,12 @@ Vector3 ProximityGroup::get_grid_radius() const {
void ProximityGroup::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_group_name","name"), &ProximityGroup::set_group_name);
- ObjectTypeDB::bind_method(_MD("broadcast","name", "parameters"), &ProximityGroup::broadcast);
- ObjectTypeDB::bind_method(_MD("set_dispatch_mode","mode"), &ProximityGroup::set_dispatch_mode);
- ObjectTypeDB::bind_method(_MD("_proximity_group_broadcast","name","params"), &ProximityGroup::_proximity_group_broadcast);
- ObjectTypeDB::bind_method(_MD("set_grid_radius","radius"), &ProximityGroup::set_grid_radius);
- ObjectTypeDB::bind_method(_MD("get_grid_radius"), &ProximityGroup::get_grid_radius);
+ ClassDB::bind_method(_MD("set_group_name","name"), &ProximityGroup::set_group_name);
+ ClassDB::bind_method(_MD("broadcast","name", "parameters"), &ProximityGroup::broadcast);
+ ClassDB::bind_method(_MD("set_dispatch_mode","mode"), &ProximityGroup::set_dispatch_mode);
+ ClassDB::bind_method(_MD("_proximity_group_broadcast","name","params"), &ProximityGroup::_proximity_group_broadcast);
+ ClassDB::bind_method(_MD("set_grid_radius","radius"), &ProximityGroup::set_grid_radius);
+ ClassDB::bind_method(_MD("get_grid_radius"), &ProximityGroup::get_grid_radius);
ADD_PROPERTY( PropertyInfo( Variant::VECTOR3, "grid_radius"), _SCS("set_grid_radius"), _SCS("get_grid_radius"));
diff --git a/scene/3d/proximity_group.h b/scene/3d/proximity_group.h
index 9a6cbd5de8..58d2436975 100644
--- a/scene/3d/proximity_group.h
+++ b/scene/3d/proximity_group.h
@@ -33,7 +33,7 @@
class ProximityGroup : public Spatial {
- OBJ_TYPE( ProximityGroup, Spatial );
+ GDCLASS( ProximityGroup, Spatial );
OBJ_CATEGORY("3D");
public:
diff --git a/scene/3d/quad.cpp b/scene/3d/quad.cpp
index 2d433fbb8c..4f219376a4 100644
--- a/scene/3d/quad.cpp
+++ b/scene/3d/quad.cpp
@@ -199,17 +199,17 @@ AABB Quad::get_aabb() const {
void Quad::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_axis","axis"),&Quad::set_axis);
- ObjectTypeDB::bind_method(_MD("get_axis"),&Quad::get_axis);
+ ClassDB::bind_method(_MD("set_axis","axis"),&Quad::set_axis);
+ ClassDB::bind_method(_MD("get_axis"),&Quad::get_axis);
- ObjectTypeDB::bind_method(_MD("set_size","size"),&Quad::set_size);
- ObjectTypeDB::bind_method(_MD("get_size"),&Quad::get_size);
+ ClassDB::bind_method(_MD("set_size","size"),&Quad::set_size);
+ ClassDB::bind_method(_MD("get_size"),&Quad::get_size);
- ObjectTypeDB::bind_method(_MD("set_centered","centered"),&Quad::set_centered);
- ObjectTypeDB::bind_method(_MD("is_centered"),&Quad::is_centered);
+ ClassDB::bind_method(_MD("set_centered","centered"),&Quad::set_centered);
+ ClassDB::bind_method(_MD("is_centered"),&Quad::is_centered);
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&Quad::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&Quad::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&Quad::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&Quad::get_offset);
ADD_PROPERTY( PropertyInfo( Variant::INT, "quad/axis", PROPERTY_HINT_ENUM,"X,Y,Z" ), _SCS("set_axis"), _SCS("get_axis"));
ADD_PROPERTY( PropertyInfo( Variant::VECTOR2, "quad/size" ), _SCS("set_size"), _SCS("get_size"));
diff --git a/scene/3d/quad.h b/scene/3d/quad.h
index 92f0009140..bdb2cb3088 100644
--- a/scene/3d/quad.h
+++ b/scene/3d/quad.h
@@ -35,7 +35,7 @@
class Quad : public GeometryInstance {
- OBJ_TYPE(Quad,GeometryInstance);
+ GDCLASS(Quad,GeometryInstance);
Vector3::Axis axis;
bool centered;
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp
index bcc8b001d3..edf337a5b2 100644
--- a/scene/3d/ray_cast.cpp
+++ b/scene/3d/ray_cast.cpp
@@ -210,33 +210,33 @@ void RayCast::clear_exceptions(){
void RayCast::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_enabled","enabled"),&RayCast::set_enabled);
- ObjectTypeDB::bind_method(_MD("is_enabled"),&RayCast::is_enabled);
+ ClassDB::bind_method(_MD("set_enabled","enabled"),&RayCast::set_enabled);
+ ClassDB::bind_method(_MD("is_enabled"),&RayCast::is_enabled);
- ObjectTypeDB::bind_method(_MD("set_cast_to","local_point"),&RayCast::set_cast_to);
- ObjectTypeDB::bind_method(_MD("get_cast_to"),&RayCast::get_cast_to);
+ ClassDB::bind_method(_MD("set_cast_to","local_point"),&RayCast::set_cast_to);
+ ClassDB::bind_method(_MD("get_cast_to"),&RayCast::get_cast_to);
- ObjectTypeDB::bind_method(_MD("is_colliding"),&RayCast::is_colliding);
- ObjectTypeDB::bind_method(_MD("force_raycast_update"),&RayCast::force_raycast_update);
+ ClassDB::bind_method(_MD("is_colliding"),&RayCast::is_colliding);
+ ClassDB::bind_method(_MD("force_raycast_update"),&RayCast::force_raycast_update);
- ObjectTypeDB::bind_method(_MD("get_collider"),&RayCast::get_collider);
- ObjectTypeDB::bind_method(_MD("get_collider_shape"),&RayCast::get_collider_shape);
- ObjectTypeDB::bind_method(_MD("get_collision_point"),&RayCast::get_collision_point);
- ObjectTypeDB::bind_method(_MD("get_collision_normal"),&RayCast::get_collision_normal);
+ ClassDB::bind_method(_MD("get_collider"),&RayCast::get_collider);
+ ClassDB::bind_method(_MD("get_collider_shape"),&RayCast::get_collider_shape);
+ ClassDB::bind_method(_MD("get_collision_point"),&RayCast::get_collision_point);
+ ClassDB::bind_method(_MD("get_collision_normal"),&RayCast::get_collision_normal);
- ObjectTypeDB::bind_method(_MD("add_exception_rid","rid"),&RayCast::add_exception_rid);
- ObjectTypeDB::bind_method(_MD("add_exception","node"),&RayCast::add_exception);
+ ClassDB::bind_method(_MD("add_exception_rid","rid"),&RayCast::add_exception_rid);
+ ClassDB::bind_method(_MD("add_exception","node"),&RayCast::add_exception);
- ObjectTypeDB::bind_method(_MD("remove_exception_rid","rid"),&RayCast::remove_exception_rid);
- ObjectTypeDB::bind_method(_MD("remove_exception","node"),&RayCast::remove_exception);
+ ClassDB::bind_method(_MD("remove_exception_rid","rid"),&RayCast::remove_exception_rid);
+ ClassDB::bind_method(_MD("remove_exception","node"),&RayCast::remove_exception);
- ObjectTypeDB::bind_method(_MD("clear_exceptions"),&RayCast::clear_exceptions);
+ ClassDB::bind_method(_MD("clear_exceptions"),&RayCast::clear_exceptions);
- ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&RayCast::set_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_layer_mask"),&RayCast::get_layer_mask);
+ ClassDB::bind_method(_MD("set_layer_mask","mask"),&RayCast::set_layer_mask);
+ ClassDB::bind_method(_MD("get_layer_mask"),&RayCast::get_layer_mask);
- ObjectTypeDB::bind_method(_MD("set_type_mask","mask"),&RayCast::set_type_mask);
- ObjectTypeDB::bind_method(_MD("get_type_mask"),&RayCast::get_type_mask);
+ ClassDB::bind_method(_MD("set_type_mask","mask"),&RayCast::set_type_mask);
+ ClassDB::bind_method(_MD("get_type_mask"),&RayCast::get_type_mask);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"enabled"),_SCS("set_enabled"),_SCS("is_enabled"));
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3,"cast_to"),_SCS("set_cast_to"),_SCS("get_cast_to"));
diff --git a/scene/3d/ray_cast.h b/scene/3d/ray_cast.h
index 83f2d3a182..32d24cc962 100644
--- a/scene/3d/ray_cast.h
+++ b/scene/3d/ray_cast.h
@@ -33,7 +33,7 @@
class RayCast : public Spatial {
- OBJ_TYPE(RayCast,Spatial);
+ GDCLASS(RayCast,Spatial);
bool enabled;
diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp
index 09082b0f28..421487a2e6 100644
--- a/scene/3d/reflection_probe.cpp
+++ b/scene/3d/reflection_probe.cpp
@@ -185,42 +185,42 @@ void ReflectionProbe::_validate_property(PropertyInfo& property) const {
void ReflectionProbe::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_intensity","intensity"),&ReflectionProbe::set_intensity);
- ObjectTypeDB::bind_method(_MD("get_intensity"),&ReflectionProbe::get_intensity);
+ ClassDB::bind_method(_MD("set_intensity","intensity"),&ReflectionProbe::set_intensity);
+ ClassDB::bind_method(_MD("get_intensity"),&ReflectionProbe::get_intensity);
- ObjectTypeDB::bind_method(_MD("set_interior_ambient","ambient"),&ReflectionProbe::set_interior_ambient);
- ObjectTypeDB::bind_method(_MD("get_interior_ambient"),&ReflectionProbe::get_interior_ambient);
+ ClassDB::bind_method(_MD("set_interior_ambient","ambient"),&ReflectionProbe::set_interior_ambient);
+ ClassDB::bind_method(_MD("get_interior_ambient"),&ReflectionProbe::get_interior_ambient);
- ObjectTypeDB::bind_method(_MD("set_interior_ambient_energy","ambient_energy"),&ReflectionProbe::set_interior_ambient_energy);
- ObjectTypeDB::bind_method(_MD("get_interior_ambient_energy"),&ReflectionProbe::get_interior_ambient_energy);
+ ClassDB::bind_method(_MD("set_interior_ambient_energy","ambient_energy"),&ReflectionProbe::set_interior_ambient_energy);
+ ClassDB::bind_method(_MD("get_interior_ambient_energy"),&ReflectionProbe::get_interior_ambient_energy);
- ObjectTypeDB::bind_method(_MD("set_interior_ambient_probe_contribution","ambient_probe_contribution"),&ReflectionProbe::set_interior_ambient_probe_contribution);
- ObjectTypeDB::bind_method(_MD("get_interior_ambient_probe_contribution"),&ReflectionProbe::get_interior_ambient_probe_contribution);
+ ClassDB::bind_method(_MD("set_interior_ambient_probe_contribution","ambient_probe_contribution"),&ReflectionProbe::set_interior_ambient_probe_contribution);
+ ClassDB::bind_method(_MD("get_interior_ambient_probe_contribution"),&ReflectionProbe::get_interior_ambient_probe_contribution);
- ObjectTypeDB::bind_method(_MD("set_max_distance","max_distance"),&ReflectionProbe::set_max_distance);
- ObjectTypeDB::bind_method(_MD("get_max_distance"),&ReflectionProbe::get_max_distance);
+ ClassDB::bind_method(_MD("set_max_distance","max_distance"),&ReflectionProbe::set_max_distance);
+ ClassDB::bind_method(_MD("get_max_distance"),&ReflectionProbe::get_max_distance);
- ObjectTypeDB::bind_method(_MD("set_extents","extents"),&ReflectionProbe::set_extents);
- ObjectTypeDB::bind_method(_MD("get_extents"),&ReflectionProbe::get_extents);
+ ClassDB::bind_method(_MD("set_extents","extents"),&ReflectionProbe::set_extents);
+ ClassDB::bind_method(_MD("get_extents"),&ReflectionProbe::get_extents);
- ObjectTypeDB::bind_method(_MD("set_origin_offset","origin_offset"),&ReflectionProbe::set_origin_offset);
- ObjectTypeDB::bind_method(_MD("get_origin_offset"),&ReflectionProbe::get_origin_offset);
+ ClassDB::bind_method(_MD("set_origin_offset","origin_offset"),&ReflectionProbe::set_origin_offset);
+ ClassDB::bind_method(_MD("get_origin_offset"),&ReflectionProbe::get_origin_offset);
- ObjectTypeDB::bind_method(_MD("set_as_interior","enable"),&ReflectionProbe::set_as_interior);
- ObjectTypeDB::bind_method(_MD("is_set_as_interior"),&ReflectionProbe::is_set_as_interior);
+ ClassDB::bind_method(_MD("set_as_interior","enable"),&ReflectionProbe::set_as_interior);
+ ClassDB::bind_method(_MD("is_set_as_interior"),&ReflectionProbe::is_set_as_interior);
- ObjectTypeDB::bind_method(_MD("set_enable_box_projection","enable"),&ReflectionProbe::set_enable_box_projection);
- ObjectTypeDB::bind_method(_MD("is_box_projection_enabled"),&ReflectionProbe::is_box_projection_enabled);
+ ClassDB::bind_method(_MD("set_enable_box_projection","enable"),&ReflectionProbe::set_enable_box_projection);
+ ClassDB::bind_method(_MD("is_box_projection_enabled"),&ReflectionProbe::is_box_projection_enabled);
- ObjectTypeDB::bind_method(_MD("set_enable_shadows","enable"),&ReflectionProbe::set_enable_shadows);
- ObjectTypeDB::bind_method(_MD("are_shadows_enabled"),&ReflectionProbe::are_shadows_enabled);
+ ClassDB::bind_method(_MD("set_enable_shadows","enable"),&ReflectionProbe::set_enable_shadows);
+ ClassDB::bind_method(_MD("are_shadows_enabled"),&ReflectionProbe::are_shadows_enabled);
- ObjectTypeDB::bind_method(_MD("set_cull_mask","layers"),&ReflectionProbe::set_cull_mask);
- ObjectTypeDB::bind_method(_MD("get_cull_mask"),&ReflectionProbe::get_cull_mask);
+ ClassDB::bind_method(_MD("set_cull_mask","layers"),&ReflectionProbe::set_cull_mask);
+ ClassDB::bind_method(_MD("get_cull_mask"),&ReflectionProbe::get_cull_mask);
- ObjectTypeDB::bind_method(_MD("set_update_mode","mode"),&ReflectionProbe::set_update_mode);
- ObjectTypeDB::bind_method(_MD("get_update_mode"),&ReflectionProbe::get_update_mode);
+ ClassDB::bind_method(_MD("set_update_mode","mode"),&ReflectionProbe::set_update_mode);
+ ClassDB::bind_method(_MD("get_update_mode"),&ReflectionProbe::get_update_mode);
ADD_PROPERTY( PropertyInfo(Variant::INT,"update_mode",PROPERTY_HINT_ENUM,"Once,Always"),_SCS("set_update_mode"),_SCS("get_update_mode"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"intensity",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_intensity"),_SCS("get_intensity"));
diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h
index 5ea41a91c9..2de02ebbfa 100644
--- a/scene/3d/reflection_probe.h
+++ b/scene/3d/reflection_probe.h
@@ -7,7 +7,7 @@
#include "servers/visual_server.h"
class ReflectionProbe : public VisualInstance {
- OBJ_TYPE(ReflectionProbe,VisualInstance);
+ GDCLASS(ReflectionProbe,VisualInstance);
public:
diff --git a/scene/3d/remote_transform.cpp b/scene/3d/remote_transform.cpp
index d56517aff6..931f075a84 100644
--- a/scene/3d/remote_transform.cpp
+++ b/scene/3d/remote_transform.cpp
@@ -118,8 +118,8 @@ String RemoteTransform::get_configuration_warning() const {
void RemoteTransform::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_remote_node","path"),&RemoteTransform::set_remote_node);
- ObjectTypeDB::bind_method(_MD("get_remote_node"),&RemoteTransform::get_remote_node);
+ ClassDB::bind_method(_MD("set_remote_node","path"),&RemoteTransform::set_remote_node);
+ ClassDB::bind_method(_MD("get_remote_node"),&RemoteTransform::get_remote_node);
ADD_PROPERTY( PropertyInfo(Variant::NODE_PATH,"remote_path"),_SCS("set_remote_node"),_SCS("get_remote_node"));
}
diff --git a/scene/3d/remote_transform.h b/scene/3d/remote_transform.h
index 78f0fec1e9..e7aa95ad6e 100644
--- a/scene/3d/remote_transform.h
+++ b/scene/3d/remote_transform.h
@@ -5,7 +5,7 @@
class RemoteTransform : public Spatial
{
- OBJ_TYPE(RemoteTransform,Spatial);
+ GDCLASS(RemoteTransform,Spatial);
NodePath remote_node;
diff --git a/scene/3d/room_instance.cpp b/scene/3d/room_instance.cpp
index ea3200622e..1423f56786 100644
--- a/scene/3d/room_instance.cpp
+++ b/scene/3d/room_instance.cpp
@@ -194,13 +194,13 @@ RID Room::get_sound_room() const {
void Room::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_room","room:Room"),&Room::set_room );
- ObjectTypeDB::bind_method(_MD("get_room:Room"),&Room::get_room );
+ ClassDB::bind_method(_MD("set_room","room:Room"),&Room::set_room );
+ ClassDB::bind_method(_MD("get_room:Room"),&Room::get_room );
- ObjectTypeDB::bind_method(_MD("set_simulate_acoustics","enable"),&Room::set_simulate_acoustics );
- ObjectTypeDB::bind_method(_MD("is_simulating_acoustics"),&Room::is_simulating_acoustics );
+ ClassDB::bind_method(_MD("set_simulate_acoustics","enable"),&Room::set_simulate_acoustics );
+ ClassDB::bind_method(_MD("is_simulating_acoustics"),&Room::is_simulating_acoustics );
diff --git a/scene/3d/room_instance.h b/scene/3d/room_instance.h
index b40665b498..8c2bb76a38 100644
--- a/scene/3d/room_instance.h
+++ b/scene/3d/room_instance.h
@@ -49,7 +49,7 @@
class Room : public VisualInstance {
- OBJ_TYPE( Room, VisualInstance );
+ GDCLASS( Room, VisualInstance );
public:
diff --git a/scene/3d/scenario_fx.cpp b/scene/3d/scenario_fx.cpp
index 51d8865e14..95ba2c990a 100644
--- a/scene/3d/scenario_fx.cpp
+++ b/scene/3d/scenario_fx.cpp
@@ -99,8 +99,8 @@ String WorldEnvironment::get_configuration_warning() const {
void WorldEnvironment::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_environment","env:Environment"),&WorldEnvironment::set_environment);
- ObjectTypeDB::bind_method(_MD("get_environment:Environment"),&WorldEnvironment::get_environment);
+ ClassDB::bind_method(_MD("set_environment","env:Environment"),&WorldEnvironment::set_environment);
+ ClassDB::bind_method(_MD("get_environment:Environment"),&WorldEnvironment::get_environment);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"environment",PROPERTY_HINT_RESOURCE_TYPE,"Environment"),_SCS("set_environment"),_SCS("get_environment"));
}
diff --git a/scene/3d/scenario_fx.h b/scene/3d/scenario_fx.h
index a11f1acabf..ef5b70039c 100644
--- a/scene/3d/scenario_fx.h
+++ b/scene/3d/scenario_fx.h
@@ -39,7 +39,7 @@
class WorldEnvironment : public Spatial {
- OBJ_TYPE(WorldEnvironment,Spatial );
+ GDCLASS(WorldEnvironment,Spatial );
Ref<Environment> environment;
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index dfc58dc4c3..5e576b4960 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -530,39 +530,39 @@ void Skeleton::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_bone","name"),&Skeleton::add_bone);
- ObjectTypeDB::bind_method(_MD("find_bone","name"),&Skeleton::find_bone);
- ObjectTypeDB::bind_method(_MD("get_bone_name","bone_idx"),&Skeleton::get_bone_name);
+ ClassDB::bind_method(_MD("add_bone","name"),&Skeleton::add_bone);
+ ClassDB::bind_method(_MD("find_bone","name"),&Skeleton::find_bone);
+ ClassDB::bind_method(_MD("get_bone_name","bone_idx"),&Skeleton::get_bone_name);
- ObjectTypeDB::bind_method(_MD("get_bone_parent","bone_idx"),&Skeleton::get_bone_parent);
- ObjectTypeDB::bind_method(_MD("set_bone_parent","bone_idx","parent_idx"),&Skeleton::set_bone_parent);
+ ClassDB::bind_method(_MD("get_bone_parent","bone_idx"),&Skeleton::get_bone_parent);
+ ClassDB::bind_method(_MD("set_bone_parent","bone_idx","parent_idx"),&Skeleton::set_bone_parent);
- ObjectTypeDB::bind_method(_MD("get_bone_count"),&Skeleton::get_bone_count);
+ ClassDB::bind_method(_MD("get_bone_count"),&Skeleton::get_bone_count);
- ObjectTypeDB::bind_method(_MD("unparent_bone_and_rest","bone_idx"),&Skeleton::unparent_bone_and_rest);
+ ClassDB::bind_method(_MD("unparent_bone_and_rest","bone_idx"),&Skeleton::unparent_bone_and_rest);
- ObjectTypeDB::bind_method(_MD("get_bone_rest","bone_idx"),&Skeleton::get_bone_rest);
- ObjectTypeDB::bind_method(_MD("set_bone_rest","bone_idx","rest"),&Skeleton::set_bone_rest);
+ ClassDB::bind_method(_MD("get_bone_rest","bone_idx"),&Skeleton::get_bone_rest);
+ ClassDB::bind_method(_MD("set_bone_rest","bone_idx","rest"),&Skeleton::set_bone_rest);
- ObjectTypeDB::bind_method(_MD("set_bone_disable_rest","bone_idx","disable"),&Skeleton::set_bone_disable_rest);
- ObjectTypeDB::bind_method(_MD("is_bone_rest_disabled","bone_idx"),&Skeleton::is_bone_rest_disabled);
+ ClassDB::bind_method(_MD("set_bone_disable_rest","bone_idx","disable"),&Skeleton::set_bone_disable_rest);
+ ClassDB::bind_method(_MD("is_bone_rest_disabled","bone_idx"),&Skeleton::is_bone_rest_disabled);
- ObjectTypeDB::bind_method(_MD("bind_child_node_to_bone","bone_idx","node:Node"),&Skeleton::bind_child_node_to_bone);
- ObjectTypeDB::bind_method(_MD("unbind_child_node_from_bone","bone_idx","node:Node"),&Skeleton::unbind_child_node_from_bone);
- ObjectTypeDB::bind_method(_MD("get_bound_child_nodes_to_bone","bone_idx"),&Skeleton::_get_bound_child_nodes_to_bone);
+ ClassDB::bind_method(_MD("bind_child_node_to_bone","bone_idx","node:Node"),&Skeleton::bind_child_node_to_bone);
+ ClassDB::bind_method(_MD("unbind_child_node_from_bone","bone_idx","node:Node"),&Skeleton::unbind_child_node_from_bone);
+ ClassDB::bind_method(_MD("get_bound_child_nodes_to_bone","bone_idx"),&Skeleton::_get_bound_child_nodes_to_bone);
- ObjectTypeDB::bind_method(_MD("clear_bones"),&Skeleton::clear_bones);
+ ClassDB::bind_method(_MD("clear_bones"),&Skeleton::clear_bones);
- ObjectTypeDB::bind_method(_MD("get_bone_pose","bone_idx"),&Skeleton::get_bone_pose);
- ObjectTypeDB::bind_method(_MD("set_bone_pose","bone_idx","pose"),&Skeleton::set_bone_pose);
+ ClassDB::bind_method(_MD("get_bone_pose","bone_idx"),&Skeleton::get_bone_pose);
+ ClassDB::bind_method(_MD("set_bone_pose","bone_idx","pose"),&Skeleton::set_bone_pose);
- ObjectTypeDB::bind_method(_MD("set_bone_global_pose","bone_idx","pose"),&Skeleton::set_bone_global_pose);
- ObjectTypeDB::bind_method(_MD("get_bone_global_pose","bone_idx"),&Skeleton::get_bone_global_pose);
+ ClassDB::bind_method(_MD("set_bone_global_pose","bone_idx","pose"),&Skeleton::set_bone_global_pose);
+ ClassDB::bind_method(_MD("get_bone_global_pose","bone_idx"),&Skeleton::get_bone_global_pose);
- ObjectTypeDB::bind_method(_MD("get_bone_custom_pose","bone_idx"),&Skeleton::get_bone_custom_pose);
- ObjectTypeDB::bind_method(_MD("set_bone_custom_pose","bone_idx","custom_pose"),&Skeleton::set_bone_custom_pose);
+ ClassDB::bind_method(_MD("get_bone_custom_pose","bone_idx"),&Skeleton::get_bone_custom_pose);
+ ClassDB::bind_method(_MD("set_bone_custom_pose","bone_idx","custom_pose"),&Skeleton::set_bone_custom_pose);
- ObjectTypeDB::bind_method(_MD("get_bone_transform","bone_idx"),&Skeleton::get_bone_transform);
+ ClassDB::bind_method(_MD("get_bone_transform","bone_idx"),&Skeleton::get_bone_transform);
BIND_CONSTANT( NOTIFICATION_UPDATE_SKELETON );
}
diff --git a/scene/3d/skeleton.h b/scene/3d/skeleton.h
index 37810e5466..04eb3e9009 100644
--- a/scene/3d/skeleton.h
+++ b/scene/3d/skeleton.h
@@ -37,7 +37,7 @@
*/
class Skeleton : public Spatial {
- OBJ_TYPE( Skeleton, Spatial );
+ GDCLASS( Skeleton, Spatial );
struct Bone {
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index 09c0e77047..730bb0bab0 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -744,50 +744,50 @@ bool Spatial::is_local_transform_notification_enabled() const {
void Spatial::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_transform","local"), &Spatial::set_transform);
- ObjectTypeDB::bind_method(_MD("get_transform"), &Spatial::get_transform);
- ObjectTypeDB::bind_method(_MD("set_translation","translation"), &Spatial::set_translation);
- ObjectTypeDB::bind_method(_MD("get_translation"), &Spatial::get_translation);
- ObjectTypeDB::bind_method(_MD("set_rotation","rotation_rad"), &Spatial::set_rotation);
- ObjectTypeDB::bind_method(_MD("get_rotation"), &Spatial::get_rotation);
- ObjectTypeDB::bind_method(_MD("set_rotation_deg","rotation_deg"), &Spatial::set_rotation_deg);
- ObjectTypeDB::bind_method(_MD("get_rotation_deg"), &Spatial::get_rotation_deg);
- ObjectTypeDB::bind_method(_MD("set_scale","scale"), &Spatial::set_scale);
- ObjectTypeDB::bind_method(_MD("get_scale"), &Spatial::get_scale);
- ObjectTypeDB::bind_method(_MD("set_global_transform","global"), &Spatial::set_global_transform);
- ObjectTypeDB::bind_method(_MD("get_global_transform"), &Spatial::get_global_transform);
- ObjectTypeDB::bind_method(_MD("get_parent_spatial"), &Spatial::get_parent_spatial);
- ObjectTypeDB::bind_method(_MD("set_ignore_transform_notification","enabled"), &Spatial::set_ignore_transform_notification);
- ObjectTypeDB::bind_method(_MD("set_as_toplevel","enable"), &Spatial::set_as_toplevel);
- ObjectTypeDB::bind_method(_MD("is_set_as_toplevel"), &Spatial::is_set_as_toplevel);
- ObjectTypeDB::bind_method(_MD("get_world:World"), &Spatial::get_world);
+ ClassDB::bind_method(_MD("set_transform","local"), &Spatial::set_transform);
+ ClassDB::bind_method(_MD("get_transform"), &Spatial::get_transform);
+ ClassDB::bind_method(_MD("set_translation","translation"), &Spatial::set_translation);
+ ClassDB::bind_method(_MD("get_translation"), &Spatial::get_translation);
+ ClassDB::bind_method(_MD("set_rotation","rotation_rad"), &Spatial::set_rotation);
+ ClassDB::bind_method(_MD("get_rotation"), &Spatial::get_rotation);
+ ClassDB::bind_method(_MD("set_rotation_deg","rotation_deg"), &Spatial::set_rotation_deg);
+ ClassDB::bind_method(_MD("get_rotation_deg"), &Spatial::get_rotation_deg);
+ ClassDB::bind_method(_MD("set_scale","scale"), &Spatial::set_scale);
+ ClassDB::bind_method(_MD("get_scale"), &Spatial::get_scale);
+ ClassDB::bind_method(_MD("set_global_transform","global"), &Spatial::set_global_transform);
+ ClassDB::bind_method(_MD("get_global_transform"), &Spatial::get_global_transform);
+ ClassDB::bind_method(_MD("get_parent_spatial"), &Spatial::get_parent_spatial);
+ ClassDB::bind_method(_MD("set_ignore_transform_notification","enabled"), &Spatial::set_ignore_transform_notification);
+ ClassDB::bind_method(_MD("set_as_toplevel","enable"), &Spatial::set_as_toplevel);
+ ClassDB::bind_method(_MD("is_set_as_toplevel"), &Spatial::is_set_as_toplevel);
+ ClassDB::bind_method(_MD("get_world:World"), &Spatial::get_world);
// TODO: Obsolete those two methods (old name) properly (GH-4397)
- ObjectTypeDB::bind_method(_MD("_set_rotation_deg","rotation_deg"), &Spatial::_set_rotation_deg);
- ObjectTypeDB::bind_method(_MD("_get_rotation_deg"), &Spatial::_get_rotation_deg);
+ ClassDB::bind_method(_MD("_set_rotation_deg","rotation_deg"), &Spatial::_set_rotation_deg);
+ ClassDB::bind_method(_MD("_get_rotation_deg"), &Spatial::_get_rotation_deg);
#ifdef TOOLS_ENABLED
- ObjectTypeDB::bind_method(_MD("_update_gizmo"), &Spatial::_update_gizmo);
- ObjectTypeDB::bind_method(_MD("_set_import_transform"), &Spatial::set_import_transform);
- ObjectTypeDB::bind_method(_MD("_get_import_transform"), &Spatial::get_import_transform);
+ ClassDB::bind_method(_MD("_update_gizmo"), &Spatial::_update_gizmo);
+ ClassDB::bind_method(_MD("_set_import_transform"), &Spatial::set_import_transform);
+ ClassDB::bind_method(_MD("_get_import_transform"), &Spatial::get_import_transform);
ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"_import_transform",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_import_transform"),_SCS("_get_import_transform"));
#endif
- ObjectTypeDB::bind_method(_MD("update_gizmo"), &Spatial::update_gizmo);
- ObjectTypeDB::bind_method(_MD("set_gizmo","gizmo:SpatialGizmo"), &Spatial::set_gizmo);
- ObjectTypeDB::bind_method(_MD("get_gizmo:SpatialGizmo"), &Spatial::get_gizmo);
+ ClassDB::bind_method(_MD("update_gizmo"), &Spatial::update_gizmo);
+ ClassDB::bind_method(_MD("set_gizmo","gizmo:SpatialGizmo"), &Spatial::set_gizmo);
+ ClassDB::bind_method(_MD("get_gizmo:SpatialGizmo"), &Spatial::get_gizmo);
- ObjectTypeDB::bind_method(_MD("show"), &Spatial::show);
- ObjectTypeDB::bind_method(_MD("hide"), &Spatial::hide);
- ObjectTypeDB::bind_method(_MD("is_visible"), &Spatial::is_visible);
- ObjectTypeDB::bind_method(_MD("is_hidden"), &Spatial::is_hidden);
- ObjectTypeDB::bind_method(_MD("set_hidden","hidden"), &Spatial::set_hidden);
+ ClassDB::bind_method(_MD("show"), &Spatial::show);
+ ClassDB::bind_method(_MD("hide"), &Spatial::hide);
+ ClassDB::bind_method(_MD("is_visible"), &Spatial::is_visible);
+ ClassDB::bind_method(_MD("is_hidden"), &Spatial::is_hidden);
+ ClassDB::bind_method(_MD("set_hidden","hidden"), &Spatial::set_hidden);
- ObjectTypeDB::bind_method(_MD("_set_visible_"), &Spatial::_set_visible_);
- ObjectTypeDB::bind_method(_MD("_is_visible_"), &Spatial::_is_visible_);
+ ClassDB::bind_method(_MD("_set_visible_"), &Spatial::_set_visible_);
+ ClassDB::bind_method(_MD("_is_visible_"), &Spatial::_is_visible_);
- ObjectTypeDB::bind_method(_MD("set_notify_local_transform","enable"), &Spatial::set_notify_local_transform);
- ObjectTypeDB::bind_method(_MD("is_local_transform_notification_enabled"), &Spatial::is_local_transform_notification_enabled);
+ ClassDB::bind_method(_MD("set_notify_local_transform","enable"), &Spatial::set_notify_local_transform);
+ ClassDB::bind_method(_MD("is_local_transform_notification_enabled"), &Spatial::is_local_transform_notification_enabled);
void rotate(const Vector3& p_normal,float p_radians);
void rotate_x(float p_radians);
@@ -798,18 +798,18 @@ void Spatial::_bind_methods() {
void global_rotate(const Vector3& p_normal,float p_radians);
void global_translate(const Vector3& p_offset);
- ObjectTypeDB::bind_method( _MD("rotate","normal","radians"),&Spatial::rotate );
- ObjectTypeDB::bind_method( _MD("global_rotate","normal","radians"),&Spatial::global_rotate );
- ObjectTypeDB::bind_method( _MD("rotate_x","radians"),&Spatial::rotate_x );
- ObjectTypeDB::bind_method( _MD("rotate_y","radians"),&Spatial::rotate_y );
- ObjectTypeDB::bind_method( _MD("rotate_z","radians"),&Spatial::rotate_z );
- ObjectTypeDB::bind_method( _MD("translate","offset"),&Spatial::translate );
- ObjectTypeDB::bind_method( _MD("global_translate","offset"),&Spatial::global_translate );
- ObjectTypeDB::bind_method( _MD("orthonormalize"),&Spatial::orthonormalize );
- ObjectTypeDB::bind_method( _MD("set_identity"),&Spatial::set_identity );
-
- ObjectTypeDB::bind_method( _MD("look_at","target","up"),&Spatial::look_at );
- ObjectTypeDB::bind_method( _MD("look_at_from_pos","pos","target","up"),&Spatial::look_at_from_pos );
+ ClassDB::bind_method( _MD("rotate","normal","radians"),&Spatial::rotate );
+ ClassDB::bind_method( _MD("global_rotate","normal","radians"),&Spatial::global_rotate );
+ ClassDB::bind_method( _MD("rotate_x","radians"),&Spatial::rotate_x );
+ ClassDB::bind_method( _MD("rotate_y","radians"),&Spatial::rotate_y );
+ ClassDB::bind_method( _MD("rotate_z","radians"),&Spatial::rotate_z );
+ ClassDB::bind_method( _MD("translate","offset"),&Spatial::translate );
+ ClassDB::bind_method( _MD("global_translate","offset"),&Spatial::global_translate );
+ ClassDB::bind_method( _MD("orthonormalize"),&Spatial::orthonormalize );
+ ClassDB::bind_method( _MD("set_identity"),&Spatial::set_identity );
+
+ ClassDB::bind_method( _MD("look_at","target","up"),&Spatial::look_at );
+ ClassDB::bind_method( _MD("look_at_from_pos","pos","target","up"),&Spatial::look_at_from_pos );
BIND_CONSTANT( NOTIFICATION_TRANSFORM_CHANGED );
BIND_CONSTANT( NOTIFICATION_ENTER_WORLD );
diff --git a/scene/3d/spatial.h b/scene/3d/spatial.h
index aeffddce45..de18f78bc4 100644
--- a/scene/3d/spatial.h
+++ b/scene/3d/spatial.h
@@ -38,7 +38,7 @@
class SpatialGizmo : public Reference {
- OBJ_TYPE(SpatialGizmo,Reference);
+ GDCLASS(SpatialGizmo,Reference);
public:
@@ -55,7 +55,7 @@ public:
class Spatial : public Node {
- OBJ_TYPE( Spatial, Node );
+ GDCLASS( Spatial, Node );
OBJ_CATEGORY("3D");
enum TransformDirty {
diff --git a/scene/3d/spatial_indexer.cpp b/scene/3d/spatial_indexer.cpp
index 963fbca5ef..0cc6d1abd0 100644
--- a/scene/3d/spatial_indexer.cpp
+++ b/scene/3d/spatial_indexer.cpp
@@ -112,7 +112,7 @@ void SpatialIndexer::_update_pairs() {
void SpatialIndexer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_update_pairs"),&SpatialIndexer::_update_pairs);
+ ClassDB::bind_method(_MD("_update_pairs"),&SpatialIndexer::_update_pairs);
}
diff --git a/scene/3d/spatial_indexer.h b/scene/3d/spatial_indexer.h
index 43202a8f54..94c579ba23 100644
--- a/scene/3d/spatial_indexer.h
+++ b/scene/3d/spatial_indexer.h
@@ -37,7 +37,7 @@ class ProximityArea;
class SpatialIndexer : public Object {
- OBJ_TYPE( SpatialIndexer, Object );
+ GDCLASS( SpatialIndexer, Object );
template<class T>
struct TK {
diff --git a/scene/3d/spatial_player.cpp b/scene/3d/spatial_player.cpp
index 017f17226f..4648730586 100644
--- a/scene/3d/spatial_player.cpp
+++ b/scene/3d/spatial_player.cpp
@@ -91,8 +91,8 @@ bool SpatialPlayer::_can_gizmo_scale() const {
void SpatialPlayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_param","param","value"),&SpatialPlayer::set_param);
- ObjectTypeDB::bind_method(_MD("get_param","param"),&SpatialPlayer::get_param);
+ ClassDB::bind_method(_MD("set_param","param","value"),&SpatialPlayer::set_param);
+ ClassDB::bind_method(_MD("get_param","param"),&SpatialPlayer::get_param);
BIND_CONSTANT( PARAM_VOLUME_DB );
BIND_CONSTANT( PARAM_PITCH_SCALE );
diff --git a/scene/3d/spatial_player.h b/scene/3d/spatial_player.h
index 73a19eee4d..16671a0cb5 100644
--- a/scene/3d/spatial_player.h
+++ b/scene/3d/spatial_player.h
@@ -38,7 +38,7 @@
class SpatialPlayer : public Spatial {
- OBJ_TYPE(SpatialPlayer,Spatial);
+ GDCLASS(SpatialPlayer,Spatial);
public:
diff --git a/scene/3d/spatial_sample_player.cpp b/scene/3d/spatial_sample_player.cpp
index 5a9ee097fc..f930dce5be 100644
--- a/scene/3d/spatial_sample_player.cpp
+++ b/scene/3d/spatial_sample_player.cpp
@@ -204,20 +204,20 @@ String SpatialSamplePlayer::get_configuration_warning() const {
void SpatialSamplePlayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_sample_library","library:SampleLibrary"),&SpatialSamplePlayer::set_sample_library);
- ObjectTypeDB::bind_method(_MD("get_sample_library:SampleLibrary"),&SpatialSamplePlayer::get_sample_library);
+ ClassDB::bind_method(_MD("set_sample_library","library:SampleLibrary"),&SpatialSamplePlayer::set_sample_library);
+ ClassDB::bind_method(_MD("get_sample_library:SampleLibrary"),&SpatialSamplePlayer::get_sample_library);
- ObjectTypeDB::bind_method(_MD("set_polyphony","voices"),&SpatialSamplePlayer::set_polyphony);
- ObjectTypeDB::bind_method(_MD("get_polyphony"),&SpatialSamplePlayer::get_polyphony);
+ ClassDB::bind_method(_MD("set_polyphony","voices"),&SpatialSamplePlayer::set_polyphony);
+ ClassDB::bind_method(_MD("get_polyphony"),&SpatialSamplePlayer::get_polyphony);
- ObjectTypeDB::bind_method(_MD("play","sample","voice"),&SpatialSamplePlayer::play,DEFVAL(NEXT_VOICE));
+ ClassDB::bind_method(_MD("play","sample","voice"),&SpatialSamplePlayer::play,DEFVAL(NEXT_VOICE));
//voices,DEV
- ObjectTypeDB::bind_method(_MD("voice_set_pitch_scale","voice","ratio"),&SpatialSamplePlayer::voice_set_pitch_scale);
- ObjectTypeDB::bind_method(_MD("voice_set_volume_scale_db","voice","db"),&SpatialSamplePlayer::voice_set_volume_scale_db);
+ ClassDB::bind_method(_MD("voice_set_pitch_scale","voice","ratio"),&SpatialSamplePlayer::voice_set_pitch_scale);
+ ClassDB::bind_method(_MD("voice_set_volume_scale_db","voice","db"),&SpatialSamplePlayer::voice_set_volume_scale_db);
- ObjectTypeDB::bind_method(_MD("is_voice_active","voice"),&SpatialSamplePlayer::is_voice_active);
- ObjectTypeDB::bind_method(_MD("stop_voice","voice"),&SpatialSamplePlayer::stop_voice);
- ObjectTypeDB::bind_method(_MD("stop_all"),&SpatialSamplePlayer::stop_all);
+ ClassDB::bind_method(_MD("is_voice_active","voice"),&SpatialSamplePlayer::is_voice_active);
+ ClassDB::bind_method(_MD("stop_voice","voice"),&SpatialSamplePlayer::stop_voice);
+ ClassDB::bind_method(_MD("stop_all"),&SpatialSamplePlayer::stop_all);
BIND_CONSTANT( INVALID_VOICE );
BIND_CONSTANT( NEXT_VOICE );
diff --git a/scene/3d/spatial_sample_player.h b/scene/3d/spatial_sample_player.h
index 772256bc17..d30ff6e908 100644
--- a/scene/3d/spatial_sample_player.h
+++ b/scene/3d/spatial_sample_player.h
@@ -35,7 +35,7 @@
class SpatialSamplePlayer : public SpatialPlayer {
- OBJ_TYPE(SpatialSamplePlayer,SpatialPlayer);
+ GDCLASS(SpatialSamplePlayer,SpatialPlayer);
public:
enum {
diff --git a/scene/3d/spatial_stream_player.cpp b/scene/3d/spatial_stream_player.cpp
index 3027a76414..181631a173 100644
--- a/scene/3d/spatial_stream_player.cpp
+++ b/scene/3d/spatial_stream_player.cpp
@@ -329,45 +329,45 @@ int SpatialStreamPlayer::get_buffering_msec() const{
void SpatialStreamPlayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_stream","stream:AudioStream"),&SpatialStreamPlayer::set_stream);
- ObjectTypeDB::bind_method(_MD("get_stream:AudioStream"),&SpatialStreamPlayer::get_stream);
+ ClassDB::bind_method(_MD("set_stream","stream:AudioStream"),&SpatialStreamPlayer::set_stream);
+ ClassDB::bind_method(_MD("get_stream:AudioStream"),&SpatialStreamPlayer::get_stream);
- ObjectTypeDB::bind_method(_MD("play","offset"),&SpatialStreamPlayer::play,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("stop"),&SpatialStreamPlayer::stop);
+ ClassDB::bind_method(_MD("play","offset"),&SpatialStreamPlayer::play,DEFVAL(0));
+ ClassDB::bind_method(_MD("stop"),&SpatialStreamPlayer::stop);
- ObjectTypeDB::bind_method(_MD("is_playing"),&SpatialStreamPlayer::is_playing);
+ ClassDB::bind_method(_MD("is_playing"),&SpatialStreamPlayer::is_playing);
- ObjectTypeDB::bind_method(_MD("set_paused","paused"),&SpatialStreamPlayer::set_paused);
- ObjectTypeDB::bind_method(_MD("is_paused"),&SpatialStreamPlayer::is_paused);
+ ClassDB::bind_method(_MD("set_paused","paused"),&SpatialStreamPlayer::set_paused);
+ ClassDB::bind_method(_MD("is_paused"),&SpatialStreamPlayer::is_paused);
- ObjectTypeDB::bind_method(_MD("set_loop","enabled"),&SpatialStreamPlayer::set_loop);
- ObjectTypeDB::bind_method(_MD("has_loop"),&SpatialStreamPlayer::has_loop);
+ ClassDB::bind_method(_MD("set_loop","enabled"),&SpatialStreamPlayer::set_loop);
+ ClassDB::bind_method(_MD("has_loop"),&SpatialStreamPlayer::has_loop);
- ObjectTypeDB::bind_method(_MD("set_volume","volume"),&SpatialStreamPlayer::set_volume);
- ObjectTypeDB::bind_method(_MD("get_volume"),&SpatialStreamPlayer::get_volume);
+ ClassDB::bind_method(_MD("set_volume","volume"),&SpatialStreamPlayer::set_volume);
+ ClassDB::bind_method(_MD("get_volume"),&SpatialStreamPlayer::get_volume);
- ObjectTypeDB::bind_method(_MD("set_volume_db","db"),&SpatialStreamPlayer::set_volume_db);
- ObjectTypeDB::bind_method(_MD("get_volume_db"),&SpatialStreamPlayer::get_volume_db);
+ ClassDB::bind_method(_MD("set_volume_db","db"),&SpatialStreamPlayer::set_volume_db);
+ ClassDB::bind_method(_MD("get_volume_db"),&SpatialStreamPlayer::get_volume_db);
- ObjectTypeDB::bind_method(_MD("set_buffering_msec","msec"),&SpatialStreamPlayer::set_buffering_msec);
- ObjectTypeDB::bind_method(_MD("get_buffering_msec"),&SpatialStreamPlayer::get_buffering_msec);
+ ClassDB::bind_method(_MD("set_buffering_msec","msec"),&SpatialStreamPlayer::set_buffering_msec);
+ ClassDB::bind_method(_MD("get_buffering_msec"),&SpatialStreamPlayer::get_buffering_msec);
- ObjectTypeDB::bind_method(_MD("set_loop_restart_time","secs"),&SpatialStreamPlayer::set_loop_restart_time);
- ObjectTypeDB::bind_method(_MD("get_loop_restart_time"),&SpatialStreamPlayer::get_loop_restart_time);
+ ClassDB::bind_method(_MD("set_loop_restart_time","secs"),&SpatialStreamPlayer::set_loop_restart_time);
+ ClassDB::bind_method(_MD("get_loop_restart_time"),&SpatialStreamPlayer::get_loop_restart_time);
- ObjectTypeDB::bind_method(_MD("get_stream_name"),&SpatialStreamPlayer::get_stream_name);
- ObjectTypeDB::bind_method(_MD("get_loop_count"),&SpatialStreamPlayer::get_loop_count);
+ ClassDB::bind_method(_MD("get_stream_name"),&SpatialStreamPlayer::get_stream_name);
+ ClassDB::bind_method(_MD("get_loop_count"),&SpatialStreamPlayer::get_loop_count);
- ObjectTypeDB::bind_method(_MD("get_pos"),&SpatialStreamPlayer::get_pos);
- ObjectTypeDB::bind_method(_MD("seek_pos","time"),&SpatialStreamPlayer::seek_pos);
+ ClassDB::bind_method(_MD("get_pos"),&SpatialStreamPlayer::get_pos);
+ ClassDB::bind_method(_MD("seek_pos","time"),&SpatialStreamPlayer::seek_pos);
- ObjectTypeDB::bind_method(_MD("set_autoplay","enabled"),&SpatialStreamPlayer::set_autoplay);
- ObjectTypeDB::bind_method(_MD("has_autoplay"),&SpatialStreamPlayer::has_autoplay);
+ ClassDB::bind_method(_MD("set_autoplay","enabled"),&SpatialStreamPlayer::set_autoplay);
+ ClassDB::bind_method(_MD("has_autoplay"),&SpatialStreamPlayer::has_autoplay);
- ObjectTypeDB::bind_method(_MD("get_length"),&SpatialStreamPlayer::get_length);
+ ClassDB::bind_method(_MD("get_length"),&SpatialStreamPlayer::get_length);
- ObjectTypeDB::bind_method(_MD("_set_play","play"),&SpatialStreamPlayer::_set_play);
- ObjectTypeDB::bind_method(_MD("_get_play"),&SpatialStreamPlayer::_get_play);
+ ClassDB::bind_method(_MD("_set_play","play"),&SpatialStreamPlayer::_set_play);
+ ClassDB::bind_method(_MD("_get_play"),&SpatialStreamPlayer::_get_play);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"AudioStream"), _SCS("set_stream"), _SCS("get_stream") );
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/play"), _SCS("_set_play"), _SCS("_get_play") );
diff --git a/scene/3d/spatial_stream_player.h b/scene/3d/spatial_stream_player.h
index d89f0006d4..27533d3f6e 100644
--- a/scene/3d/spatial_stream_player.h
+++ b/scene/3d/spatial_stream_player.h
@@ -35,7 +35,7 @@
class SpatialStreamPlayer : public SpatialPlayer {
- OBJ_TYPE(SpatialStreamPlayer,SpatialPlayer);
+ GDCLASS(SpatialStreamPlayer,SpatialPlayer);
_THREAD_SAFE_CLASS_
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index a46ca7c132..82bec9e512 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -246,41 +246,41 @@ SpriteBase3D::AlphaCutMode SpriteBase3D::get_alpha_cut_mode() const{
void SpriteBase3D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_centered","centered"),&SpriteBase3D::set_centered);
- ObjectTypeDB::bind_method(_MD("is_centered"),&SpriteBase3D::is_centered);
+ ClassDB::bind_method(_MD("set_centered","centered"),&SpriteBase3D::set_centered);
+ ClassDB::bind_method(_MD("is_centered"),&SpriteBase3D::is_centered);
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&SpriteBase3D::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&SpriteBase3D::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&SpriteBase3D::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&SpriteBase3D::get_offset);
- ObjectTypeDB::bind_method(_MD("set_flip_h","flip_h"),&SpriteBase3D::set_flip_h);
- ObjectTypeDB::bind_method(_MD("is_flipped_h"),&SpriteBase3D::is_flipped_h);
+ ClassDB::bind_method(_MD("set_flip_h","flip_h"),&SpriteBase3D::set_flip_h);
+ ClassDB::bind_method(_MD("is_flipped_h"),&SpriteBase3D::is_flipped_h);
- ObjectTypeDB::bind_method(_MD("set_flip_v","flip_v"),&SpriteBase3D::set_flip_v);
- ObjectTypeDB::bind_method(_MD("is_flipped_v"),&SpriteBase3D::is_flipped_v);
+ ClassDB::bind_method(_MD("set_flip_v","flip_v"),&SpriteBase3D::set_flip_v);
+ ClassDB::bind_method(_MD("is_flipped_v"),&SpriteBase3D::is_flipped_v);
- ObjectTypeDB::bind_method(_MD("set_modulate","modulate"),&SpriteBase3D::set_modulate);
- ObjectTypeDB::bind_method(_MD("get_modulate"),&SpriteBase3D::get_modulate);
+ ClassDB::bind_method(_MD("set_modulate","modulate"),&SpriteBase3D::set_modulate);
+ ClassDB::bind_method(_MD("get_modulate"),&SpriteBase3D::get_modulate);
- ObjectTypeDB::bind_method(_MD("set_opacity","opacity"),&SpriteBase3D::set_opacity);
- ObjectTypeDB::bind_method(_MD("get_opacity"),&SpriteBase3D::get_opacity);
+ ClassDB::bind_method(_MD("set_opacity","opacity"),&SpriteBase3D::set_opacity);
+ ClassDB::bind_method(_MD("get_opacity"),&SpriteBase3D::get_opacity);
- ObjectTypeDB::bind_method(_MD("set_pixel_size","pixel_size"),&SpriteBase3D::set_pixel_size);
- ObjectTypeDB::bind_method(_MD("get_pixel_size"),&SpriteBase3D::get_pixel_size);
+ ClassDB::bind_method(_MD("set_pixel_size","pixel_size"),&SpriteBase3D::set_pixel_size);
+ ClassDB::bind_method(_MD("get_pixel_size"),&SpriteBase3D::get_pixel_size);
- ObjectTypeDB::bind_method(_MD("set_axis","axis"),&SpriteBase3D::set_axis);
- ObjectTypeDB::bind_method(_MD("get_axis"),&SpriteBase3D::get_axis);
+ ClassDB::bind_method(_MD("set_axis","axis"),&SpriteBase3D::set_axis);
+ ClassDB::bind_method(_MD("get_axis"),&SpriteBase3D::get_axis);
- ObjectTypeDB::bind_method(_MD("set_draw_flag","flag","enabled"),&SpriteBase3D::set_draw_flag);
- ObjectTypeDB::bind_method(_MD("get_draw_flag","flag"),&SpriteBase3D::get_draw_flag);
+ ClassDB::bind_method(_MD("set_draw_flag","flag","enabled"),&SpriteBase3D::set_draw_flag);
+ ClassDB::bind_method(_MD("get_draw_flag","flag"),&SpriteBase3D::get_draw_flag);
- ObjectTypeDB::bind_method(_MD("set_alpha_cut_mode","mode"),&SpriteBase3D::set_alpha_cut_mode);
- ObjectTypeDB::bind_method(_MD("get_alpha_cut_mode"),&SpriteBase3D::get_alpha_cut_mode);
+ ClassDB::bind_method(_MD("set_alpha_cut_mode","mode"),&SpriteBase3D::set_alpha_cut_mode);
+ ClassDB::bind_method(_MD("get_alpha_cut_mode"),&SpriteBase3D::get_alpha_cut_mode);
- ObjectTypeDB::bind_method(_MD("get_item_rect"),&SpriteBase3D::get_item_rect);
+ ClassDB::bind_method(_MD("get_item_rect"),&SpriteBase3D::get_item_rect);
- ObjectTypeDB::bind_method(_MD("_queue_update"),&SpriteBase3D::_queue_update);
- ObjectTypeDB::bind_method(_MD("_im_update"),&SpriteBase3D::_im_update);
+ ClassDB::bind_method(_MD("_queue_update"),&SpriteBase3D::_queue_update);
+ ClassDB::bind_method(_MD("_im_update"),&SpriteBase3D::_im_update);
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "centered"), _SCS("set_centered"),_SCS("is_centered"));
@@ -598,23 +598,23 @@ void Sprite3D::_validate_property(PropertyInfo& property) const {
void Sprite3D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_texture","texture:Texture"),&Sprite3D::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture:Texture"),&Sprite3D::get_texture);
+ ClassDB::bind_method(_MD("set_texture","texture:Texture"),&Sprite3D::set_texture);
+ ClassDB::bind_method(_MD("get_texture:Texture"),&Sprite3D::get_texture);
- ObjectTypeDB::bind_method(_MD("set_region","enabled"),&Sprite3D::set_region);
- ObjectTypeDB::bind_method(_MD("is_region"),&Sprite3D::is_region);
+ ClassDB::bind_method(_MD("set_region","enabled"),&Sprite3D::set_region);
+ ClassDB::bind_method(_MD("is_region"),&Sprite3D::is_region);
- ObjectTypeDB::bind_method(_MD("set_region_rect","rect"),&Sprite3D::set_region_rect);
- ObjectTypeDB::bind_method(_MD("get_region_rect"),&Sprite3D::get_region_rect);
+ ClassDB::bind_method(_MD("set_region_rect","rect"),&Sprite3D::set_region_rect);
+ ClassDB::bind_method(_MD("get_region_rect"),&Sprite3D::get_region_rect);
- ObjectTypeDB::bind_method(_MD("set_frame","frame"),&Sprite3D::set_frame);
- ObjectTypeDB::bind_method(_MD("get_frame"),&Sprite3D::get_frame);
+ ClassDB::bind_method(_MD("set_frame","frame"),&Sprite3D::set_frame);
+ ClassDB::bind_method(_MD("get_frame"),&Sprite3D::get_frame);
- ObjectTypeDB::bind_method(_MD("set_vframes","vframes"),&Sprite3D::set_vframes);
- ObjectTypeDB::bind_method(_MD("get_vframes"),&Sprite3D::get_vframes);
+ ClassDB::bind_method(_MD("set_vframes","vframes"),&Sprite3D::set_vframes);
+ ClassDB::bind_method(_MD("get_vframes"),&Sprite3D::get_vframes);
- ObjectTypeDB::bind_method(_MD("set_hframes","hframes"),&Sprite3D::set_hframes);
- ObjectTypeDB::bind_method(_MD("get_hframes"),&Sprite3D::get_hframes);
+ ClassDB::bind_method(_MD("set_hframes","hframes"),&Sprite3D::set_hframes);
+ ClassDB::bind_method(_MD("get_hframes"),&Sprite3D::get_hframes);
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_texture"),_SCS("get_texture"));
ADD_PROPERTY( PropertyInfo( Variant::INT, "vframes",PROPERTY_HINT_RANGE,"1,16384,1"), _SCS("set_vframes"),_SCS("get_vframes"));
@@ -761,10 +761,10 @@ void AnimatedSprite3D::_draw() {
void AnimatedSprite3D::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_sprite_frames","sprite_frames:SpriteFrames"),&AnimatedSprite3D::set_sprite_frames);
- ObjectTypeDB::bind_method(_MD("get_sprite_frames:Texture"),&AnimatedSprite3D::get_sprite_frames);
- ObjectTypeDB::bind_method(_MD("set_frame","frame"),&AnimatedSprite3D::set_frame);
- ObjectTypeDB::bind_method(_MD("get_frame"),&AnimatedSprite3D::get_frame);
+ ClassDB::bind_method(_MD("set_sprite_frames","sprite_frames:SpriteFrames"),&AnimatedSprite3D::set_sprite_frames);
+ ClassDB::bind_method(_MD("get_sprite_frames:Texture"),&AnimatedSprite3D::get_sprite_frames);
+ ClassDB::bind_method(_MD("set_frame","frame"),&AnimatedSprite3D::set_frame);
+ ClassDB::bind_method(_MD("get_frame"),&AnimatedSprite3D::get_frame);
ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE,"SpriteFrames"), _SCS("set_sprite_frames"),_SCS("get_sprite_frames"));
ADD_PROPERTY( PropertyInfo( Variant::INT, "frame",PROPERTY_HINT_SPRITE_FRAME), _SCS("set_frame"),_SCS("get_frame"));
@@ -1309,24 +1309,24 @@ String AnimatedSprite3D::get_configuration_warning() const {
void AnimatedSprite3D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_sprite_frames","sprite_frames:SpriteFrames"),&AnimatedSprite3D::set_sprite_frames);
- ObjectTypeDB::bind_method(_MD("get_sprite_frames:SpriteFrames"),&AnimatedSprite3D::get_sprite_frames);
+ ClassDB::bind_method(_MD("set_sprite_frames","sprite_frames:SpriteFrames"),&AnimatedSprite3D::set_sprite_frames);
+ ClassDB::bind_method(_MD("get_sprite_frames:SpriteFrames"),&AnimatedSprite3D::get_sprite_frames);
- ObjectTypeDB::bind_method(_MD("set_animation","animation"),&AnimatedSprite3D::set_animation);
- ObjectTypeDB::bind_method(_MD("get_animation"),&AnimatedSprite3D::get_animation);
+ ClassDB::bind_method(_MD("set_animation","animation"),&AnimatedSprite3D::set_animation);
+ ClassDB::bind_method(_MD("get_animation"),&AnimatedSprite3D::get_animation);
- ObjectTypeDB::bind_method(_MD("_set_playing","playing"),&AnimatedSprite3D::_set_playing);
- ObjectTypeDB::bind_method(_MD("_is_playing"),&AnimatedSprite3D::_is_playing);
+ ClassDB::bind_method(_MD("_set_playing","playing"),&AnimatedSprite3D::_set_playing);
+ ClassDB::bind_method(_MD("_is_playing"),&AnimatedSprite3D::_is_playing);
- ObjectTypeDB::bind_method(_MD("play","anim"),&AnimatedSprite3D::play,DEFVAL(StringName()));
- ObjectTypeDB::bind_method(_MD("stop"),&AnimatedSprite3D::stop);
- ObjectTypeDB::bind_method(_MD("is_playing"),&AnimatedSprite3D::is_playing);
+ ClassDB::bind_method(_MD("play","anim"),&AnimatedSprite3D::play,DEFVAL(StringName()));
+ ClassDB::bind_method(_MD("stop"),&AnimatedSprite3D::stop);
+ ClassDB::bind_method(_MD("is_playing"),&AnimatedSprite3D::is_playing);
- ObjectTypeDB::bind_method(_MD("set_frame","frame"),&AnimatedSprite3D::set_frame);
- ObjectTypeDB::bind_method(_MD("get_frame"),&AnimatedSprite3D::get_frame);
+ ClassDB::bind_method(_MD("set_frame","frame"),&AnimatedSprite3D::set_frame);
+ ClassDB::bind_method(_MD("get_frame"),&AnimatedSprite3D::get_frame);
- ObjectTypeDB::bind_method(_MD("_res_changed"),&AnimatedSprite3D::_res_changed);
+ ClassDB::bind_method(_MD("_res_changed"),&AnimatedSprite3D::_res_changed);
ADD_SIGNAL(MethodInfo("frame_changed"));
diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h
index 15f35ebe52..58d70fa2f7 100644
--- a/scene/3d/sprite_3d.h
+++ b/scene/3d/sprite_3d.h
@@ -35,7 +35,7 @@
class SpriteBase3D : public GeometryInstance {
- OBJ_TYPE(SpriteBase3D,GeometryInstance);
+ GDCLASS(SpriteBase3D,GeometryInstance);
public:
enum DrawFlags {
@@ -144,7 +144,7 @@ public:
class Sprite3D : public SpriteBase3D {
- OBJ_TYPE(Sprite3D,SpriteBase3D);
+ GDCLASS(Sprite3D,SpriteBase3D);
Ref<Texture> texture;
@@ -191,7 +191,7 @@ public:
#if 0
class AnimatedSprite3D : public SpriteBase3D {
- OBJ_TYPE(AnimatedSprite3D,SpriteBase3D);
+ GDCLASS(AnimatedSprite3D,SpriteBase3D);
Ref<SpriteFrames> frames;
@@ -224,7 +224,7 @@ public:
class AnimatedSprite3D : public SpriteBase3D {
- OBJ_TYPE(AnimatedSprite3D,SpriteBase3D);
+ GDCLASS(AnimatedSprite3D,SpriteBase3D);
Ref<SpriteFrames> frames;
bool playing;
diff --git a/scene/3d/test_cube.h b/scene/3d/test_cube.h
index 177882dc4d..cbd9918b13 100644
--- a/scene/3d/test_cube.h
+++ b/scene/3d/test_cube.h
@@ -39,7 +39,7 @@
*/
class TestCube : public GeometryInstance {
- OBJ_TYPE( TestCube, GeometryInstance );
+ GDCLASS( TestCube, GeometryInstance );
RID instance;
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index f66ad03f62..23feac0150 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -232,36 +232,36 @@ float VehicleWheel::get_friction_slip() const{
void VehicleWheel::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_radius","length"),&VehicleWheel::set_radius);
- ObjectTypeDB::bind_method(_MD("get_radius"),&VehicleWheel::get_radius);
+ ClassDB::bind_method(_MD("set_radius","length"),&VehicleWheel::set_radius);
+ ClassDB::bind_method(_MD("get_radius"),&VehicleWheel::get_radius);
- ObjectTypeDB::bind_method(_MD("set_suspension_rest_length","length"),&VehicleWheel::set_suspension_rest_length);
- ObjectTypeDB::bind_method(_MD("get_suspension_rest_length"),&VehicleWheel::get_suspension_rest_length);
+ ClassDB::bind_method(_MD("set_suspension_rest_length","length"),&VehicleWheel::set_suspension_rest_length);
+ ClassDB::bind_method(_MD("get_suspension_rest_length"),&VehicleWheel::get_suspension_rest_length);
- ObjectTypeDB::bind_method(_MD("set_suspension_travel","length"),&VehicleWheel::set_suspension_travel);
- ObjectTypeDB::bind_method(_MD("get_suspension_travel"),&VehicleWheel::get_suspension_travel);
+ ClassDB::bind_method(_MD("set_suspension_travel","length"),&VehicleWheel::set_suspension_travel);
+ ClassDB::bind_method(_MD("get_suspension_travel"),&VehicleWheel::get_suspension_travel);
- ObjectTypeDB::bind_method(_MD("set_suspension_stiffness","length"),&VehicleWheel::set_suspension_stiffness);
- ObjectTypeDB::bind_method(_MD("get_suspension_stiffness"),&VehicleWheel::get_suspension_stiffness);
+ ClassDB::bind_method(_MD("set_suspension_stiffness","length"),&VehicleWheel::set_suspension_stiffness);
+ ClassDB::bind_method(_MD("get_suspension_stiffness"),&VehicleWheel::get_suspension_stiffness);
- ObjectTypeDB::bind_method(_MD("set_suspension_max_force","length"),&VehicleWheel::set_suspension_max_force);
- ObjectTypeDB::bind_method(_MD("get_suspension_max_force"),&VehicleWheel::get_suspension_max_force);
+ ClassDB::bind_method(_MD("set_suspension_max_force","length"),&VehicleWheel::set_suspension_max_force);
+ ClassDB::bind_method(_MD("get_suspension_max_force"),&VehicleWheel::get_suspension_max_force);
- ObjectTypeDB::bind_method(_MD("set_damping_compression","length"),&VehicleWheel::set_damping_compression);
- ObjectTypeDB::bind_method(_MD("get_damping_compression"),&VehicleWheel::get_damping_compression);
+ ClassDB::bind_method(_MD("set_damping_compression","length"),&VehicleWheel::set_damping_compression);
+ ClassDB::bind_method(_MD("get_damping_compression"),&VehicleWheel::get_damping_compression);
- ObjectTypeDB::bind_method(_MD("set_damping_relaxation","length"),&VehicleWheel::set_damping_relaxation);
- ObjectTypeDB::bind_method(_MD("get_damping_relaxation"),&VehicleWheel::get_damping_relaxation);
+ ClassDB::bind_method(_MD("set_damping_relaxation","length"),&VehicleWheel::set_damping_relaxation);
+ ClassDB::bind_method(_MD("get_damping_relaxation"),&VehicleWheel::get_damping_relaxation);
- ObjectTypeDB::bind_method(_MD("set_use_as_traction","enable"),&VehicleWheel::set_use_as_traction);
- ObjectTypeDB::bind_method(_MD("is_used_as_traction"),&VehicleWheel::is_used_as_traction);
+ ClassDB::bind_method(_MD("set_use_as_traction","enable"),&VehicleWheel::set_use_as_traction);
+ ClassDB::bind_method(_MD("is_used_as_traction"),&VehicleWheel::is_used_as_traction);
- ObjectTypeDB::bind_method(_MD("set_use_as_steering","enable"),&VehicleWheel::set_use_as_steering);
- ObjectTypeDB::bind_method(_MD("is_used_as_steering"),&VehicleWheel::is_used_as_steering);
+ ClassDB::bind_method(_MD("set_use_as_steering","enable"),&VehicleWheel::set_use_as_steering);
+ ClassDB::bind_method(_MD("is_used_as_steering"),&VehicleWheel::is_used_as_steering);
- ObjectTypeDB::bind_method(_MD("set_friction_slip","length"),&VehicleWheel::set_friction_slip);
- ObjectTypeDB::bind_method(_MD("get_friction_slip"),&VehicleWheel::get_friction_slip);
+ ClassDB::bind_method(_MD("set_friction_slip","length"),&VehicleWheel::set_friction_slip);
+ ClassDB::bind_method(_MD("get_friction_slip"),&VehicleWheel::get_friction_slip);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"type/traction"),_SCS("set_use_as_traction"),_SCS("is_used_as_traction"));
@@ -1019,24 +1019,24 @@ Vector3 VehicleBody::get_linear_velocity() const
void VehicleBody::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_mass","mass"),&VehicleBody::set_mass);
- ObjectTypeDB::bind_method(_MD("get_mass"),&VehicleBody::get_mass);
+ ClassDB::bind_method(_MD("set_mass","mass"),&VehicleBody::set_mass);
+ ClassDB::bind_method(_MD("get_mass"),&VehicleBody::get_mass);
- ObjectTypeDB::bind_method(_MD("set_friction","friction"),&VehicleBody::set_friction);
- ObjectTypeDB::bind_method(_MD("get_friction"),&VehicleBody::get_friction);
+ ClassDB::bind_method(_MD("set_friction","friction"),&VehicleBody::set_friction);
+ ClassDB::bind_method(_MD("get_friction"),&VehicleBody::get_friction);
- ObjectTypeDB::bind_method(_MD("set_engine_force","engine_force"),&VehicleBody::set_engine_force);
- ObjectTypeDB::bind_method(_MD("get_engine_force"),&VehicleBody::get_engine_force);
+ ClassDB::bind_method(_MD("set_engine_force","engine_force"),&VehicleBody::set_engine_force);
+ ClassDB::bind_method(_MD("get_engine_force"),&VehicleBody::get_engine_force);
- ObjectTypeDB::bind_method(_MD("set_brake","brake"),&VehicleBody::set_brake);
- ObjectTypeDB::bind_method(_MD("get_brake"),&VehicleBody::get_brake);
+ ClassDB::bind_method(_MD("set_brake","brake"),&VehicleBody::set_brake);
+ ClassDB::bind_method(_MD("get_brake"),&VehicleBody::get_brake);
- ObjectTypeDB::bind_method(_MD("set_steering","steering"),&VehicleBody::set_steering);
- ObjectTypeDB::bind_method(_MD("get_steering"),&VehicleBody::get_steering);
+ ClassDB::bind_method(_MD("set_steering","steering"),&VehicleBody::set_steering);
+ ClassDB::bind_method(_MD("get_steering"),&VehicleBody::get_steering);
- ObjectTypeDB::bind_method(_MD("get_linear_velocity"),&VehicleBody::get_linear_velocity);
+ ClassDB::bind_method(_MD("get_linear_velocity"),&VehicleBody::get_linear_velocity);
- ObjectTypeDB::bind_method(_MD("_direct_state_changed"),&VehicleBody::_direct_state_changed);
+ ClassDB::bind_method(_MD("_direct_state_changed"),&VehicleBody::_direct_state_changed);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"motion/engine_force",PROPERTY_HINT_RANGE,"0.00,1024.0,0.01"),_SCS("set_engine_force"),_SCS("get_engine_force"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"motion/brake",PROPERTY_HINT_RANGE,"0.0,1.0,0.01"),_SCS("set_brake"),_SCS("get_brake"));
diff --git a/scene/3d/vehicle_body.h b/scene/3d/vehicle_body.h
index f87a24c449..cd627f8998 100644
--- a/scene/3d/vehicle_body.h
+++ b/scene/3d/vehicle_body.h
@@ -35,7 +35,7 @@ class VehicleBody;
class VehicleWheel : public Spatial {
- OBJ_TYPE(VehicleWheel,Spatial);
+ GDCLASS(VehicleWheel,Spatial);
friend class VehicleBody;
@@ -136,7 +136,7 @@ public:
class VehicleBody : public PhysicsBody {
- OBJ_TYPE(VehicleBody,PhysicsBody);
+ GDCLASS(VehicleBody,PhysicsBody);
real_t mass;
real_t friction;
diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp
index 4ff3a55afd..ce98cb5692 100644
--- a/scene/3d/visibility_notifier.cpp
+++ b/scene/3d/visibility_notifier.cpp
@@ -109,9 +109,9 @@ bool VisibilityNotifier::is_on_screen() const {
void VisibilityNotifier::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_aabb","rect"),&VisibilityNotifier::set_aabb);
- ObjectTypeDB::bind_method(_MD("get_aabb"),&VisibilityNotifier::get_aabb);
- ObjectTypeDB::bind_method(_MD("is_on_screen"),&VisibilityNotifier::is_on_screen);
+ ClassDB::bind_method(_MD("set_aabb","rect"),&VisibilityNotifier::set_aabb);
+ ClassDB::bind_method(_MD("get_aabb"),&VisibilityNotifier::get_aabb);
+ ClassDB::bind_method(_MD("is_on_screen"),&VisibilityNotifier::is_on_screen);
ADD_PROPERTY( PropertyInfo(Variant::_AABB,"aabb"),_SCS("set_aabb"),_SCS("get_aabb"));
@@ -267,9 +267,9 @@ void VisibilityEnabler::_node_removed(Node* p_node) {
void VisibilityEnabler::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_enabler","enabler","enabled"),&VisibilityEnabler::set_enabler);
- ObjectTypeDB::bind_method(_MD("is_enabler_enabled","enabler"),&VisibilityEnabler::is_enabler_enabled);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&VisibilityEnabler::_node_removed);
+ ClassDB::bind_method(_MD("set_enabler","enabler","enabled"),&VisibilityEnabler::set_enabler);
+ ClassDB::bind_method(_MD("is_enabler_enabled","enabler"),&VisibilityEnabler::is_enabler_enabled);
+ ClassDB::bind_method(_MD("_node_removed"),&VisibilityEnabler::_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/3d/visibility_notifier.h b/scene/3d/visibility_notifier.h
index 6efc492b4f..ca01a9ec18 100644
--- a/scene/3d/visibility_notifier.h
+++ b/scene/3d/visibility_notifier.h
@@ -34,7 +34,7 @@
class Camera;
class VisibilityNotifier : public Spatial {
- OBJ_TYPE(VisibilityNotifier,Spatial);
+ GDCLASS(VisibilityNotifier,Spatial);
Set<Camera*> cameras;
@@ -64,7 +64,7 @@ public:
class VisibilityEnabler : public VisibilityNotifier {
- OBJ_TYPE(VisibilityEnabler,VisibilityNotifier);
+ GDCLASS(VisibilityEnabler,VisibilityNotifier);
public:
enum Enabler {
diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp
index 5386680200..5c71bc2ab4 100644
--- a/scene/3d/visual_instance.cpp
+++ b/scene/3d/visual_instance.cpp
@@ -122,12 +122,12 @@ uint32_t VisualInstance::get_layer_mask() const {
void VisualInstance::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_get_visual_instance_rid"),&VisualInstance::_get_visual_instance_rid);
- ObjectTypeDB::bind_method(_MD("set_base","base"), &VisualInstance::set_base);
- ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"), &VisualInstance::set_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_layer_mask"), &VisualInstance::get_layer_mask);
+ ClassDB::bind_method(_MD("_get_visual_instance_rid"),&VisualInstance::_get_visual_instance_rid);
+ ClassDB::bind_method(_MD("set_base","base"), &VisualInstance::set_base);
+ ClassDB::bind_method(_MD("set_layer_mask","mask"), &VisualInstance::set_layer_mask);
+ ClassDB::bind_method(_MD("get_layer_mask"), &VisualInstance::get_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_transformed_aabb"), &VisualInstance::get_transformed_aabb);
+ ClassDB::bind_method(_MD("get_transformed_aabb"), &VisualInstance::get_transformed_aabb);
ADD_PROPERTY( PropertyInfo( Variant::INT, "layers",PROPERTY_HINT_ALL_FLAGS), _SCS("set_layer_mask"), _SCS("get_layer_mask"));
@@ -325,32 +325,32 @@ float GeometryInstance::get_extra_cull_margin() const{
void GeometryInstance::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_material_override","material"), &GeometryInstance::set_material_override);
- ObjectTypeDB::bind_method(_MD("get_material_override"), &GeometryInstance::get_material_override);
+ ClassDB::bind_method(_MD("set_material_override","material"), &GeometryInstance::set_material_override);
+ ClassDB::bind_method(_MD("get_material_override"), &GeometryInstance::get_material_override);
- ObjectTypeDB::bind_method(_MD("set_flag","flag","value"), &GeometryInstance::set_flag);
- ObjectTypeDB::bind_method(_MD("get_flag","flag"), &GeometryInstance::get_flag);
+ ClassDB::bind_method(_MD("set_flag","flag","value"), &GeometryInstance::set_flag);
+ ClassDB::bind_method(_MD("get_flag","flag"), &GeometryInstance::get_flag);
- ObjectTypeDB::bind_method(_MD("set_cast_shadows_setting", "shadow_casting_setting"), &GeometryInstance::set_cast_shadows_setting);
- ObjectTypeDB::bind_method(_MD("get_cast_shadows_setting"), &GeometryInstance::get_cast_shadows_setting);
+ ClassDB::bind_method(_MD("set_cast_shadows_setting", "shadow_casting_setting"), &GeometryInstance::set_cast_shadows_setting);
+ ClassDB::bind_method(_MD("get_cast_shadows_setting"), &GeometryInstance::get_cast_shadows_setting);
- ObjectTypeDB::bind_method(_MD("set_lod_max_hysteresis","mode"), &GeometryInstance::set_lod_max_hysteresis);
- ObjectTypeDB::bind_method(_MD("get_lod_max_hysteresis"), &GeometryInstance::get_lod_max_hysteresis);
+ ClassDB::bind_method(_MD("set_lod_max_hysteresis","mode"), &GeometryInstance::set_lod_max_hysteresis);
+ ClassDB::bind_method(_MD("get_lod_max_hysteresis"), &GeometryInstance::get_lod_max_hysteresis);
- ObjectTypeDB::bind_method(_MD("set_lod_max_distance","mode"), &GeometryInstance::set_lod_max_distance);
- ObjectTypeDB::bind_method(_MD("get_lod_max_distance"), &GeometryInstance::get_lod_max_distance);
+ ClassDB::bind_method(_MD("set_lod_max_distance","mode"), &GeometryInstance::set_lod_max_distance);
+ ClassDB::bind_method(_MD("get_lod_max_distance"), &GeometryInstance::get_lod_max_distance);
- ObjectTypeDB::bind_method(_MD("set_lod_min_hysteresis","mode"), &GeometryInstance::set_lod_min_hysteresis);
- ObjectTypeDB::bind_method(_MD("get_lod_min_hysteresis"), &GeometryInstance::get_lod_min_hysteresis);
+ ClassDB::bind_method(_MD("set_lod_min_hysteresis","mode"), &GeometryInstance::set_lod_min_hysteresis);
+ ClassDB::bind_method(_MD("get_lod_min_hysteresis"), &GeometryInstance::get_lod_min_hysteresis);
- ObjectTypeDB::bind_method(_MD("set_lod_min_distance","mode"), &GeometryInstance::set_lod_min_distance);
- ObjectTypeDB::bind_method(_MD("get_lod_min_distance"), &GeometryInstance::get_lod_min_distance);
+ ClassDB::bind_method(_MD("set_lod_min_distance","mode"), &GeometryInstance::set_lod_min_distance);
+ ClassDB::bind_method(_MD("get_lod_min_distance"), &GeometryInstance::get_lod_min_distance);
- ObjectTypeDB::bind_method(_MD("set_extra_cull_margin","margin"), &GeometryInstance::set_extra_cull_margin);
- ObjectTypeDB::bind_method(_MD("get_extra_cull_margin"), &GeometryInstance::get_extra_cull_margin);
+ ClassDB::bind_method(_MD("set_extra_cull_margin","margin"), &GeometryInstance::set_extra_cull_margin);
+ ClassDB::bind_method(_MD("get_extra_cull_margin"), &GeometryInstance::get_extra_cull_margin);
- ObjectTypeDB::bind_method(_MD("get_aabb"),&GeometryInstance::get_aabb);
+ ClassDB::bind_method(_MD("get_aabb"),&GeometryInstance::get_aabb);
ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/visible"), _SCS("set_flag"), _SCS("get_flag"),FLAG_VISIBLE);
diff --git a/scene/3d/visual_instance.h b/scene/3d/visual_instance.h
index 5fa2eeeeda..59b9aef292 100644
--- a/scene/3d/visual_instance.h
+++ b/scene/3d/visual_instance.h
@@ -38,7 +38,7 @@
*/
class VisualInstance : public Spatial {
- OBJ_TYPE( VisualInstance, Spatial );
+ GDCLASS( VisualInstance, Spatial );
OBJ_CATEGORY("3D Visual Nodes");
RID instance;
@@ -83,7 +83,7 @@ class BakedLight;
class GeometryInstance : public VisualInstance {
- OBJ_TYPE( GeometryInstance, VisualInstance );
+ GDCLASS( GeometryInstance, VisualInstance );
public:
enum Flags {
diff --git a/scene/animation/animation_cache.cpp b/scene/animation/animation_cache.cpp
index 2fb5d6fb80..b9ed08326d 100644
--- a/scene/animation/animation_cache.cpp
+++ b/scene/animation/animation_cache.cpp
@@ -368,8 +368,8 @@ void AnimationCache::set_animation(const Ref<Animation>& p_animation) {
void AnimationCache::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_node_exit_tree"),&AnimationCache::_node_exit_tree);
- ObjectTypeDB::bind_method(_MD("_animation_changed"),&AnimationCache::_animation_changed);
+ ClassDB::bind_method(_MD("_node_exit_tree"),&AnimationCache::_node_exit_tree);
+ ClassDB::bind_method(_MD("_animation_changed"),&AnimationCache::_animation_changed);
}
void AnimationCache::set_root(Node* p_root) {
diff --git a/scene/animation/animation_cache.h b/scene/animation/animation_cache.h
index d08228f9c9..75e004c811 100644
--- a/scene/animation/animation_cache.h
+++ b/scene/animation/animation_cache.h
@@ -34,7 +34,7 @@
class AnimationCache : public Object {
- OBJ_TYPE(AnimationCache,Object);
+ GDCLASS(AnimationCache,Object);
struct Path {
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 7d661fc79f..03f8b2d5bc 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1291,61 +1291,61 @@ void AnimationPlayer::get_argument_options(const StringName& p_function,int p_id
void AnimationPlayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_node_removed"),&AnimationPlayer::_node_removed);
- ObjectTypeDB::bind_method(_MD("_animation_changed"),&AnimationPlayer::_animation_changed);
+ ClassDB::bind_method(_MD("_node_removed"),&AnimationPlayer::_node_removed);
+ ClassDB::bind_method(_MD("_animation_changed"),&AnimationPlayer::_animation_changed);
- ObjectTypeDB::bind_method(_MD("add_animation","name","animation:Animation"),&AnimationPlayer::add_animation);
- ObjectTypeDB::bind_method(_MD("remove_animation","name"),&AnimationPlayer::remove_animation);
- ObjectTypeDB::bind_method(_MD("rename_animation","name","newname"),&AnimationPlayer::rename_animation);
- ObjectTypeDB::bind_method(_MD("has_animation","name"),&AnimationPlayer::has_animation);
- ObjectTypeDB::bind_method(_MD("get_animation:Animation","name"),&AnimationPlayer::get_animation);
- ObjectTypeDB::bind_method(_MD("get_animation_list"),&AnimationPlayer::_get_animation_list);
+ ClassDB::bind_method(_MD("add_animation","name","animation:Animation"),&AnimationPlayer::add_animation);
+ ClassDB::bind_method(_MD("remove_animation","name"),&AnimationPlayer::remove_animation);
+ ClassDB::bind_method(_MD("rename_animation","name","newname"),&AnimationPlayer::rename_animation);
+ ClassDB::bind_method(_MD("has_animation","name"),&AnimationPlayer::has_animation);
+ ClassDB::bind_method(_MD("get_animation:Animation","name"),&AnimationPlayer::get_animation);
+ ClassDB::bind_method(_MD("get_animation_list"),&AnimationPlayer::_get_animation_list);
- ObjectTypeDB::bind_method(_MD("animation_set_next", "anim_from", "anim_to"), &AnimationPlayer::animation_set_next);
- ObjectTypeDB::bind_method(_MD("animation_get_next", "anim_from"), &AnimationPlayer::animation_get_next);
+ ClassDB::bind_method(_MD("animation_set_next", "anim_from", "anim_to"), &AnimationPlayer::animation_set_next);
+ ClassDB::bind_method(_MD("animation_get_next", "anim_from"), &AnimationPlayer::animation_get_next);
- ObjectTypeDB::bind_method(_MD("set_blend_time","anim_from","anim_to","sec"),&AnimationPlayer::set_blend_time);
- ObjectTypeDB::bind_method(_MD("get_blend_time","anim_from","anim_to"),&AnimationPlayer::get_blend_time);
+ ClassDB::bind_method(_MD("set_blend_time","anim_from","anim_to","sec"),&AnimationPlayer::set_blend_time);
+ ClassDB::bind_method(_MD("get_blend_time","anim_from","anim_to"),&AnimationPlayer::get_blend_time);
- ObjectTypeDB::bind_method(_MD("set_default_blend_time","sec"),&AnimationPlayer::set_default_blend_time);
- ObjectTypeDB::bind_method(_MD("get_default_blend_time"),&AnimationPlayer::get_default_blend_time);
+ ClassDB::bind_method(_MD("set_default_blend_time","sec"),&AnimationPlayer::set_default_blend_time);
+ ClassDB::bind_method(_MD("get_default_blend_time"),&AnimationPlayer::get_default_blend_time);
- ObjectTypeDB::bind_method(_MD("play","name","custom_blend","custom_speed","from_end"),&AnimationPlayer::play,DEFVAL(""),DEFVAL(-1),DEFVAL(1.0),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("play_backwards","name","custom_blend"),&AnimationPlayer::play_backwards,DEFVAL(""),DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("stop","reset"),&AnimationPlayer::stop,DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("stop_all"),&AnimationPlayer::stop_all);
- ObjectTypeDB::bind_method(_MD("is_playing"),&AnimationPlayer::is_playing);
- ObjectTypeDB::bind_method(_MD("set_current_animation","anim"),&AnimationPlayer::set_current_animation);
- ObjectTypeDB::bind_method(_MD("get_current_animation"),&AnimationPlayer::get_current_animation);
- ObjectTypeDB::bind_method(_MD("queue","name"),&AnimationPlayer::queue);
- ObjectTypeDB::bind_method(_MD("clear_queue"),&AnimationPlayer::clear_queue);
+ ClassDB::bind_method(_MD("play","name","custom_blend","custom_speed","from_end"),&AnimationPlayer::play,DEFVAL(""),DEFVAL(-1),DEFVAL(1.0),DEFVAL(false));
+ ClassDB::bind_method(_MD("play_backwards","name","custom_blend"),&AnimationPlayer::play_backwards,DEFVAL(""),DEFVAL(-1));
+ ClassDB::bind_method(_MD("stop","reset"),&AnimationPlayer::stop,DEFVAL(true));
+ ClassDB::bind_method(_MD("stop_all"),&AnimationPlayer::stop_all);
+ ClassDB::bind_method(_MD("is_playing"),&AnimationPlayer::is_playing);
+ ClassDB::bind_method(_MD("set_current_animation","anim"),&AnimationPlayer::set_current_animation);
+ ClassDB::bind_method(_MD("get_current_animation"),&AnimationPlayer::get_current_animation);
+ ClassDB::bind_method(_MD("queue","name"),&AnimationPlayer::queue);
+ ClassDB::bind_method(_MD("clear_queue"),&AnimationPlayer::clear_queue);
- ObjectTypeDB::bind_method(_MD("set_active","active"),&AnimationPlayer::set_active);
- ObjectTypeDB::bind_method(_MD("is_active"),&AnimationPlayer::is_active);
+ ClassDB::bind_method(_MD("set_active","active"),&AnimationPlayer::set_active);
+ ClassDB::bind_method(_MD("is_active"),&AnimationPlayer::is_active);
- ObjectTypeDB::bind_method(_MD("set_speed","speed"),&AnimationPlayer::set_speed);
- ObjectTypeDB::bind_method(_MD("get_speed"),&AnimationPlayer::get_speed);
+ ClassDB::bind_method(_MD("set_speed","speed"),&AnimationPlayer::set_speed);
+ ClassDB::bind_method(_MD("get_speed"),&AnimationPlayer::get_speed);
- ObjectTypeDB::bind_method(_MD("set_autoplay","name"),&AnimationPlayer::set_autoplay);
- ObjectTypeDB::bind_method(_MD("get_autoplay"),&AnimationPlayer::get_autoplay);
+ ClassDB::bind_method(_MD("set_autoplay","name"),&AnimationPlayer::set_autoplay);
+ ClassDB::bind_method(_MD("get_autoplay"),&AnimationPlayer::get_autoplay);
- ObjectTypeDB::bind_method(_MD("set_root","path"),&AnimationPlayer::set_root);
- ObjectTypeDB::bind_method(_MD("get_root"),&AnimationPlayer::get_root);
+ ClassDB::bind_method(_MD("set_root","path"),&AnimationPlayer::set_root);
+ ClassDB::bind_method(_MD("get_root"),&AnimationPlayer::get_root);
- ObjectTypeDB::bind_method(_MD("seek","pos_sec","update"),&AnimationPlayer::seek,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_pos"),&AnimationPlayer::get_current_animation_pos);
+ ClassDB::bind_method(_MD("seek","pos_sec","update"),&AnimationPlayer::seek,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_pos"),&AnimationPlayer::get_current_animation_pos);
- ObjectTypeDB::bind_method(_MD("find_animation","animation:Animation"),&AnimationPlayer::find_animation);
+ ClassDB::bind_method(_MD("find_animation","animation:Animation"),&AnimationPlayer::find_animation);
- ObjectTypeDB::bind_method(_MD("clear_caches"),&AnimationPlayer::clear_caches);
+ ClassDB::bind_method(_MD("clear_caches"),&AnimationPlayer::clear_caches);
- ObjectTypeDB::bind_method(_MD("set_animation_process_mode","mode"),&AnimationPlayer::set_animation_process_mode);
- ObjectTypeDB::bind_method(_MD("get_animation_process_mode"),&AnimationPlayer::get_animation_process_mode);
+ ClassDB::bind_method(_MD("set_animation_process_mode","mode"),&AnimationPlayer::set_animation_process_mode);
+ ClassDB::bind_method(_MD("get_animation_process_mode"),&AnimationPlayer::get_animation_process_mode);
- ObjectTypeDB::bind_method(_MD("get_current_animation_pos"),&AnimationPlayer::get_current_animation_pos);
- ObjectTypeDB::bind_method(_MD("get_current_animation_length"),&AnimationPlayer::get_current_animation_length);
+ ClassDB::bind_method(_MD("get_current_animation_pos"),&AnimationPlayer::get_current_animation_pos);
+ ClassDB::bind_method(_MD("get_current_animation_length"),&AnimationPlayer::get_current_animation_length);
- ObjectTypeDB::bind_method(_MD("advance","delta"),&AnimationPlayer::advance);
+ ClassDB::bind_method(_MD("advance","delta"),&AnimationPlayer::advance);
ADD_PROPERTY( PropertyInfo( Variant::INT, "playback/process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_animation_process_mode"), _SCS("get_animation_process_mode"));
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index 9b2bcc277f..c03762549b 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -39,7 +39,7 @@
*/
class AnimationPlayer : public Node {
- OBJ_TYPE( AnimationPlayer, Node );
+ GDCLASS( AnimationPlayer, Node );
OBJ_CATEGORY("Animation Nodes");
public:
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index de14daa570..6f32e6781f 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -1828,103 +1828,103 @@ Error AnimationTreePlayer::node_rename(const StringName& p_node,const StringName
void AnimationTreePlayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_node","type","id"),&AnimationTreePlayer::add_node);
+ ClassDB::bind_method(_MD("add_node","type","id"),&AnimationTreePlayer::add_node);
- ObjectTypeDB::bind_method(_MD("node_exists","node"),&AnimationTreePlayer::node_exists);
- ObjectTypeDB::bind_method(_MD("node_rename","node","new_name"),&AnimationTreePlayer::node_rename);
+ ClassDB::bind_method(_MD("node_exists","node"),&AnimationTreePlayer::node_exists);
+ ClassDB::bind_method(_MD("node_rename","node","new_name"),&AnimationTreePlayer::node_rename);
- ObjectTypeDB::bind_method(_MD("node_get_type","id"),&AnimationTreePlayer::node_get_type);
- ObjectTypeDB::bind_method(_MD("node_get_input_count","id"),&AnimationTreePlayer::node_get_input_count);
- ObjectTypeDB::bind_method(_MD("node_get_input_source","id","idx"),&AnimationTreePlayer::node_get_input_source);
+ ClassDB::bind_method(_MD("node_get_type","id"),&AnimationTreePlayer::node_get_type);
+ ClassDB::bind_method(_MD("node_get_input_count","id"),&AnimationTreePlayer::node_get_input_count);
+ ClassDB::bind_method(_MD("node_get_input_source","id","idx"),&AnimationTreePlayer::node_get_input_source);
- ObjectTypeDB::bind_method(_MD("animation_node_set_animation","id","animation:Animation"),&AnimationTreePlayer::animation_node_set_animation);
- ObjectTypeDB::bind_method(_MD("animation_node_get_animation:Animation","id"),&AnimationTreePlayer::animation_node_get_animation);
+ ClassDB::bind_method(_MD("animation_node_set_animation","id","animation:Animation"),&AnimationTreePlayer::animation_node_set_animation);
+ ClassDB::bind_method(_MD("animation_node_get_animation:Animation","id"),&AnimationTreePlayer::animation_node_get_animation);
- ObjectTypeDB::bind_method(_MD("animation_node_set_master_animation","id","source"),&AnimationTreePlayer::animation_node_set_master_animation);
- ObjectTypeDB::bind_method(_MD("animation_node_get_master_animation","id"),&AnimationTreePlayer::animation_node_get_master_animation);
- ObjectTypeDB::bind_method(_MD("animation_node_set_filter_path","id","path","enable"),&AnimationTreePlayer::animation_node_set_filter_path);
+ ClassDB::bind_method(_MD("animation_node_set_master_animation","id","source"),&AnimationTreePlayer::animation_node_set_master_animation);
+ ClassDB::bind_method(_MD("animation_node_get_master_animation","id"),&AnimationTreePlayer::animation_node_get_master_animation);
+ ClassDB::bind_method(_MD("animation_node_set_filter_path","id","path","enable"),&AnimationTreePlayer::animation_node_set_filter_path);
- ObjectTypeDB::bind_method(_MD("oneshot_node_set_fadein_time","id","time_sec"),&AnimationTreePlayer::oneshot_node_set_fadein_time);
- ObjectTypeDB::bind_method(_MD("oneshot_node_get_fadein_time","id"),&AnimationTreePlayer::oneshot_node_get_fadein_time);
+ ClassDB::bind_method(_MD("oneshot_node_set_fadein_time","id","time_sec"),&AnimationTreePlayer::oneshot_node_set_fadein_time);
+ ClassDB::bind_method(_MD("oneshot_node_get_fadein_time","id"),&AnimationTreePlayer::oneshot_node_get_fadein_time);
- ObjectTypeDB::bind_method(_MD("oneshot_node_set_fadeout_time","id","time_sec"),&AnimationTreePlayer::oneshot_node_set_fadeout_time);
- ObjectTypeDB::bind_method(_MD("oneshot_node_get_fadeout_time","id"),&AnimationTreePlayer::oneshot_node_get_fadeout_time);
+ ClassDB::bind_method(_MD("oneshot_node_set_fadeout_time","id","time_sec"),&AnimationTreePlayer::oneshot_node_set_fadeout_time);
+ ClassDB::bind_method(_MD("oneshot_node_get_fadeout_time","id"),&AnimationTreePlayer::oneshot_node_get_fadeout_time);
- ObjectTypeDB::bind_method(_MD("oneshot_node_set_autorestart","id","enable"),&AnimationTreePlayer::oneshot_node_set_autorestart);
- ObjectTypeDB::bind_method(_MD("oneshot_node_set_autorestart_delay","id","delay_sec"),&AnimationTreePlayer::oneshot_node_set_autorestart_delay);
- ObjectTypeDB::bind_method(_MD("oneshot_node_set_autorestart_random_delay","id","rand_sec"),&AnimationTreePlayer::oneshot_node_set_autorestart_random_delay);
+ ClassDB::bind_method(_MD("oneshot_node_set_autorestart","id","enable"),&AnimationTreePlayer::oneshot_node_set_autorestart);
+ ClassDB::bind_method(_MD("oneshot_node_set_autorestart_delay","id","delay_sec"),&AnimationTreePlayer::oneshot_node_set_autorestart_delay);
+ ClassDB::bind_method(_MD("oneshot_node_set_autorestart_random_delay","id","rand_sec"),&AnimationTreePlayer::oneshot_node_set_autorestart_random_delay);
- ObjectTypeDB::bind_method(_MD("oneshot_node_has_autorestart","id"),&AnimationTreePlayer::oneshot_node_has_autorestart);
- ObjectTypeDB::bind_method(_MD("oneshot_node_get_autorestart_delay","id"),&AnimationTreePlayer::oneshot_node_get_autorestart_delay);
- ObjectTypeDB::bind_method(_MD("oneshot_node_get_autorestart_random_delay","id"),&AnimationTreePlayer::oneshot_node_get_autorestart_random_delay);
+ ClassDB::bind_method(_MD("oneshot_node_has_autorestart","id"),&AnimationTreePlayer::oneshot_node_has_autorestart);
+ ClassDB::bind_method(_MD("oneshot_node_get_autorestart_delay","id"),&AnimationTreePlayer::oneshot_node_get_autorestart_delay);
+ ClassDB::bind_method(_MD("oneshot_node_get_autorestart_random_delay","id"),&AnimationTreePlayer::oneshot_node_get_autorestart_random_delay);
- ObjectTypeDB::bind_method(_MD("oneshot_node_start","id"),&AnimationTreePlayer::oneshot_node_start);
- ObjectTypeDB::bind_method(_MD("oneshot_node_stop","id"),&AnimationTreePlayer::oneshot_node_stop);
- ObjectTypeDB::bind_method(_MD("oneshot_node_is_active","id"),&AnimationTreePlayer::oneshot_node_is_active);
- ObjectTypeDB::bind_method(_MD("oneshot_node_set_filter_path","id","path","enable"),&AnimationTreePlayer::oneshot_node_set_filter_path);
+ ClassDB::bind_method(_MD("oneshot_node_start","id"),&AnimationTreePlayer::oneshot_node_start);
+ ClassDB::bind_method(_MD("oneshot_node_stop","id"),&AnimationTreePlayer::oneshot_node_stop);
+ ClassDB::bind_method(_MD("oneshot_node_is_active","id"),&AnimationTreePlayer::oneshot_node_is_active);
+ ClassDB::bind_method(_MD("oneshot_node_set_filter_path","id","path","enable"),&AnimationTreePlayer::oneshot_node_set_filter_path);
- ObjectTypeDB::bind_method(_MD("mix_node_set_amount","id","ratio"),&AnimationTreePlayer::mix_node_set_amount);
- ObjectTypeDB::bind_method(_MD("mix_node_get_amount","id"),&AnimationTreePlayer::mix_node_get_amount);
+ ClassDB::bind_method(_MD("mix_node_set_amount","id","ratio"),&AnimationTreePlayer::mix_node_set_amount);
+ ClassDB::bind_method(_MD("mix_node_get_amount","id"),&AnimationTreePlayer::mix_node_get_amount);
- ObjectTypeDB::bind_method(_MD("blend2_node_set_amount","id","blend"),&AnimationTreePlayer::blend2_node_set_amount);
- ObjectTypeDB::bind_method(_MD("blend2_node_get_amount","id"),&AnimationTreePlayer::blend2_node_get_amount);
- ObjectTypeDB::bind_method(_MD("blend2_node_set_filter_path","id","path","enable"),&AnimationTreePlayer::blend2_node_set_filter_path);
+ ClassDB::bind_method(_MD("blend2_node_set_amount","id","blend"),&AnimationTreePlayer::blend2_node_set_amount);
+ ClassDB::bind_method(_MD("blend2_node_get_amount","id"),&AnimationTreePlayer::blend2_node_get_amount);
+ ClassDB::bind_method(_MD("blend2_node_set_filter_path","id","path","enable"),&AnimationTreePlayer::blend2_node_set_filter_path);
- ObjectTypeDB::bind_method(_MD("blend3_node_set_amount","id","blend"),&AnimationTreePlayer::blend3_node_set_amount);
- ObjectTypeDB::bind_method(_MD("blend3_node_get_amount","id"),&AnimationTreePlayer::blend3_node_get_amount);
+ ClassDB::bind_method(_MD("blend3_node_set_amount","id","blend"),&AnimationTreePlayer::blend3_node_set_amount);
+ ClassDB::bind_method(_MD("blend3_node_get_amount","id"),&AnimationTreePlayer::blend3_node_get_amount);
- ObjectTypeDB::bind_method(_MD("blend4_node_set_amount","id","blend"),&AnimationTreePlayer::blend4_node_set_amount);
- ObjectTypeDB::bind_method(_MD("blend4_node_get_amount","id"),&AnimationTreePlayer::blend4_node_get_amount);
+ ClassDB::bind_method(_MD("blend4_node_set_amount","id","blend"),&AnimationTreePlayer::blend4_node_set_amount);
+ ClassDB::bind_method(_MD("blend4_node_get_amount","id"),&AnimationTreePlayer::blend4_node_get_amount);
- ObjectTypeDB::bind_method(_MD("timescale_node_set_scale","id","scale"),&AnimationTreePlayer::timescale_node_set_scale);
- ObjectTypeDB::bind_method(_MD("timescale_node_get_scale","id"),&AnimationTreePlayer::timescale_node_get_scale);
+ ClassDB::bind_method(_MD("timescale_node_set_scale","id","scale"),&AnimationTreePlayer::timescale_node_set_scale);
+ ClassDB::bind_method(_MD("timescale_node_get_scale","id"),&AnimationTreePlayer::timescale_node_get_scale);
- ObjectTypeDB::bind_method(_MD("timeseek_node_seek","id","pos_sec"),&AnimationTreePlayer::timeseek_node_seek);
+ ClassDB::bind_method(_MD("timeseek_node_seek","id","pos_sec"),&AnimationTreePlayer::timeseek_node_seek);
- ObjectTypeDB::bind_method(_MD("transition_node_set_input_count","id","count"),&AnimationTreePlayer::transition_node_set_input_count);
- ObjectTypeDB::bind_method(_MD("transition_node_get_input_count","id"),&AnimationTreePlayer::transition_node_get_input_count);
- ObjectTypeDB::bind_method(_MD("transition_node_delete_input","id","input_idx"),&AnimationTreePlayer::transition_node_delete_input);
+ ClassDB::bind_method(_MD("transition_node_set_input_count","id","count"),&AnimationTreePlayer::transition_node_set_input_count);
+ ClassDB::bind_method(_MD("transition_node_get_input_count","id"),&AnimationTreePlayer::transition_node_get_input_count);
+ ClassDB::bind_method(_MD("transition_node_delete_input","id","input_idx"),&AnimationTreePlayer::transition_node_delete_input);
- ObjectTypeDB::bind_method(_MD("transition_node_set_input_auto_advance","id","input_idx","enable"),&AnimationTreePlayer::transition_node_set_input_auto_advance);
- ObjectTypeDB::bind_method(_MD("transition_node_has_input_auto_advance","id","input_idx"),&AnimationTreePlayer::transition_node_has_input_auto_advance);
+ ClassDB::bind_method(_MD("transition_node_set_input_auto_advance","id","input_idx","enable"),&AnimationTreePlayer::transition_node_set_input_auto_advance);
+ ClassDB::bind_method(_MD("transition_node_has_input_auto_advance","id","input_idx"),&AnimationTreePlayer::transition_node_has_input_auto_advance);
- ObjectTypeDB::bind_method(_MD("transition_node_set_xfade_time","id","time_sec"),&AnimationTreePlayer::transition_node_set_xfade_time);
- ObjectTypeDB::bind_method(_MD("transition_node_get_xfade_time","id"),&AnimationTreePlayer::transition_node_get_xfade_time);
+ ClassDB::bind_method(_MD("transition_node_set_xfade_time","id","time_sec"),&AnimationTreePlayer::transition_node_set_xfade_time);
+ ClassDB::bind_method(_MD("transition_node_get_xfade_time","id"),&AnimationTreePlayer::transition_node_get_xfade_time);
- ObjectTypeDB::bind_method(_MD("transition_node_set_current","id","input_idx"),&AnimationTreePlayer::transition_node_set_current);
- ObjectTypeDB::bind_method(_MD("transition_node_get_current","id"),&AnimationTreePlayer::transition_node_get_current);
+ ClassDB::bind_method(_MD("transition_node_set_current","id","input_idx"),&AnimationTreePlayer::transition_node_set_current);
+ ClassDB::bind_method(_MD("transition_node_get_current","id"),&AnimationTreePlayer::transition_node_get_current);
- ObjectTypeDB::bind_method(_MD("node_set_pos","id","screen_pos"),&AnimationTreePlayer::node_set_pos);
- ObjectTypeDB::bind_method(_MD("node_get_pos","id"),&AnimationTreePlayer::node_get_pos);
+ ClassDB::bind_method(_MD("node_set_pos","id","screen_pos"),&AnimationTreePlayer::node_set_pos);
+ ClassDB::bind_method(_MD("node_get_pos","id"),&AnimationTreePlayer::node_get_pos);
- ObjectTypeDB::bind_method(_MD("remove_node","id"),&AnimationTreePlayer::remove_node);
- ObjectTypeDB::bind_method(_MD("connect","id","dst_id","dst_input_idx"),&AnimationTreePlayer::connect);
- ObjectTypeDB::bind_method(_MD("is_connected","id","dst_id","dst_input_idx"),&AnimationTreePlayer::is_connected);
- ObjectTypeDB::bind_method(_MD("disconnect","id","dst_input_idx"),&AnimationTreePlayer::disconnect);
+ ClassDB::bind_method(_MD("remove_node","id"),&AnimationTreePlayer::remove_node);
+ ClassDB::bind_method(_MD("connect","id","dst_id","dst_input_idx"),&AnimationTreePlayer::connect);
+ ClassDB::bind_method(_MD("is_connected","id","dst_id","dst_input_idx"),&AnimationTreePlayer::is_connected);
+ ClassDB::bind_method(_MD("disconnect","id","dst_input_idx"),&AnimationTreePlayer::disconnect);
- ObjectTypeDB::bind_method(_MD("set_active","enabled"),&AnimationTreePlayer::set_active);
- ObjectTypeDB::bind_method(_MD("is_active"),&AnimationTreePlayer::is_active);
+ ClassDB::bind_method(_MD("set_active","enabled"),&AnimationTreePlayer::set_active);
+ ClassDB::bind_method(_MD("is_active"),&AnimationTreePlayer::is_active);
- ObjectTypeDB::bind_method(_MD("set_base_path","path"),&AnimationTreePlayer::set_base_path);
- ObjectTypeDB::bind_method(_MD("get_base_path"),&AnimationTreePlayer::get_base_path);
+ ClassDB::bind_method(_MD("set_base_path","path"),&AnimationTreePlayer::set_base_path);
+ ClassDB::bind_method(_MD("get_base_path"),&AnimationTreePlayer::get_base_path);
- ObjectTypeDB::bind_method(_MD("set_master_player","nodepath"),&AnimationTreePlayer::set_master_player);
- ObjectTypeDB::bind_method(_MD("get_master_player"),&AnimationTreePlayer::get_master_player);
+ ClassDB::bind_method(_MD("set_master_player","nodepath"),&AnimationTreePlayer::set_master_player);
+ ClassDB::bind_method(_MD("get_master_player"),&AnimationTreePlayer::get_master_player);
- ObjectTypeDB::bind_method(_MD("get_node_list"),&AnimationTreePlayer::_get_node_list);
+ ClassDB::bind_method(_MD("get_node_list"),&AnimationTreePlayer::_get_node_list);
- ObjectTypeDB::bind_method(_MD("set_animation_process_mode","mode"),&AnimationTreePlayer::set_animation_process_mode);
- ObjectTypeDB::bind_method(_MD("get_animation_process_mode"),&AnimationTreePlayer::get_animation_process_mode);
+ ClassDB::bind_method(_MD("set_animation_process_mode","mode"),&AnimationTreePlayer::set_animation_process_mode);
+ ClassDB::bind_method(_MD("get_animation_process_mode"),&AnimationTreePlayer::get_animation_process_mode);
- ObjectTypeDB::bind_method(_MD("advance", "delta"), &AnimationTreePlayer::advance);
+ ClassDB::bind_method(_MD("advance", "delta"), &AnimationTreePlayer::advance);
- ObjectTypeDB::bind_method(_MD("reset"),&AnimationTreePlayer::reset);
+ ClassDB::bind_method(_MD("reset"),&AnimationTreePlayer::reset);
- ObjectTypeDB::bind_method(_MD("recompute_caches"),&AnimationTreePlayer::recompute_caches);
+ ClassDB::bind_method(_MD("recompute_caches"),&AnimationTreePlayer::recompute_caches);
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback/process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), _SCS("set_animation_process_mode"), _SCS("get_animation_process_mode"));
diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h
index 247ac52b8a..6d9db5dc63 100644
--- a/scene/animation/animation_tree_player.h
+++ b/scene/animation/animation_tree_player.h
@@ -38,7 +38,7 @@
class AnimationTreePlayer : public Node {
- OBJ_TYPE( AnimationTreePlayer, Node );
+ GDCLASS( AnimationTreePlayer, Node );
OBJ_CATEGORY("Animation Nodes");
public:
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 2d8712347b..83575276d5 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -186,40 +186,40 @@ void Tween::_notification(int p_what) {
void Tween::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("is_active"),&Tween::is_active );
- ObjectTypeDB::bind_method(_MD("set_active","active"),&Tween::set_active );
-
- ObjectTypeDB::bind_method(_MD("is_repeat"),&Tween::is_repeat );
- ObjectTypeDB::bind_method(_MD("set_repeat","repeat"),&Tween::set_repeat );
-
- ObjectTypeDB::bind_method(_MD("set_speed","speed"),&Tween::set_speed);
- ObjectTypeDB::bind_method(_MD("get_speed"),&Tween::get_speed);
-
- ObjectTypeDB::bind_method(_MD("set_tween_process_mode","mode"),&Tween::set_tween_process_mode);
- ObjectTypeDB::bind_method(_MD("get_tween_process_mode"),&Tween::get_tween_process_mode);
-
- ObjectTypeDB::bind_method(_MD("start"),&Tween::start );
- ObjectTypeDB::bind_method(_MD("reset","object","key"),&Tween::reset, DEFVAL("") );
- ObjectTypeDB::bind_method(_MD("reset_all"),&Tween::reset_all );
- ObjectTypeDB::bind_method(_MD("stop","object","key"),&Tween::stop, DEFVAL("") );
- ObjectTypeDB::bind_method(_MD("stop_all"),&Tween::stop_all );
- ObjectTypeDB::bind_method(_MD("resume","object","key"),&Tween::resume, DEFVAL("") );
- ObjectTypeDB::bind_method(_MD("resume_all"),&Tween::resume_all );
- ObjectTypeDB::bind_method(_MD("remove","object","key"),&Tween::remove, DEFVAL("") );
- ObjectTypeDB::bind_method(_MD("_remove","object","key","first_only"),&Tween::_remove );
- ObjectTypeDB::bind_method(_MD("remove_all"),&Tween::remove_all );
- ObjectTypeDB::bind_method(_MD("seek","time"),&Tween::seek );
- ObjectTypeDB::bind_method(_MD("tell"),&Tween::tell );
- ObjectTypeDB::bind_method(_MD("get_runtime"),&Tween::get_runtime );
-
- ObjectTypeDB::bind_method(_MD("interpolate_property","object","property","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::interpolate_property, DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("interpolate_method","object","method","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::interpolate_method, DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("interpolate_callback","object","times_in_sec","callback","arg1", "arg2","arg3","arg4","arg5"),&Tween::interpolate_callback, DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()) );
- ObjectTypeDB::bind_method(_MD("interpolate_deferred_callback","object","times_in_sec","callback","arg1","arg2","arg3","arg4","arg5"),&Tween::interpolate_deferred_callback, DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()) );
- ObjectTypeDB::bind_method(_MD("follow_property","object","property","initial_val","target","target_property","times_in_sec","trans_type","ease_type","delay"),&Tween::follow_property, DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("follow_method","object","method","initial_val","target","target_method","times_in_sec","trans_type","ease_type","delay"),&Tween::follow_method, DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("targeting_property","object","property","initial","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::targeting_property, DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("targeting_method","object","method","initial","initial_method","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::targeting_method, DEFVAL(0) );
+ ClassDB::bind_method(_MD("is_active"),&Tween::is_active );
+ ClassDB::bind_method(_MD("set_active","active"),&Tween::set_active );
+
+ ClassDB::bind_method(_MD("is_repeat"),&Tween::is_repeat );
+ ClassDB::bind_method(_MD("set_repeat","repeat"),&Tween::set_repeat );
+
+ ClassDB::bind_method(_MD("set_speed","speed"),&Tween::set_speed);
+ ClassDB::bind_method(_MD("get_speed"),&Tween::get_speed);
+
+ ClassDB::bind_method(_MD("set_tween_process_mode","mode"),&Tween::set_tween_process_mode);
+ ClassDB::bind_method(_MD("get_tween_process_mode"),&Tween::get_tween_process_mode);
+
+ ClassDB::bind_method(_MD("start"),&Tween::start );
+ ClassDB::bind_method(_MD("reset","object","key"),&Tween::reset, DEFVAL("") );
+ ClassDB::bind_method(_MD("reset_all"),&Tween::reset_all );
+ ClassDB::bind_method(_MD("stop","object","key"),&Tween::stop, DEFVAL("") );
+ ClassDB::bind_method(_MD("stop_all"),&Tween::stop_all );
+ ClassDB::bind_method(_MD("resume","object","key"),&Tween::resume, DEFVAL("") );
+ ClassDB::bind_method(_MD("resume_all"),&Tween::resume_all );
+ ClassDB::bind_method(_MD("remove","object","key"),&Tween::remove, DEFVAL("") );
+ ClassDB::bind_method(_MD("_remove","object","key","first_only"),&Tween::_remove );
+ ClassDB::bind_method(_MD("remove_all"),&Tween::remove_all );
+ ClassDB::bind_method(_MD("seek","time"),&Tween::seek );
+ ClassDB::bind_method(_MD("tell"),&Tween::tell );
+ ClassDB::bind_method(_MD("get_runtime"),&Tween::get_runtime );
+
+ ClassDB::bind_method(_MD("interpolate_property","object","property","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::interpolate_property, DEFVAL(0) );
+ ClassDB::bind_method(_MD("interpolate_method","object","method","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::interpolate_method, DEFVAL(0) );
+ ClassDB::bind_method(_MD("interpolate_callback","object","times_in_sec","callback","arg1", "arg2","arg3","arg4","arg5"),&Tween::interpolate_callback, DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()) );
+ ClassDB::bind_method(_MD("interpolate_deferred_callback","object","times_in_sec","callback","arg1","arg2","arg3","arg4","arg5"),&Tween::interpolate_deferred_callback, DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Variant()) );
+ ClassDB::bind_method(_MD("follow_property","object","property","initial_val","target","target_property","times_in_sec","trans_type","ease_type","delay"),&Tween::follow_property, DEFVAL(0) );
+ ClassDB::bind_method(_MD("follow_method","object","method","initial_val","target","target_method","times_in_sec","trans_type","ease_type","delay"),&Tween::follow_method, DEFVAL(0) );
+ ClassDB::bind_method(_MD("targeting_property","object","property","initial","initial_val","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::targeting_property, DEFVAL(0) );
+ ClassDB::bind_method(_MD("targeting_method","object","method","initial","initial_method","final_val","times_in_sec","trans_type","ease_type","delay"),&Tween::targeting_method, DEFVAL(0) );
ADD_SIGNAL( MethodInfo("tween_start", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key")) );
ADD_SIGNAL( MethodInfo("tween_step", PropertyInfo( Variant::OBJECT,"object"), PropertyInfo( Variant::STRING,"key"), PropertyInfo( Variant::REAL,"elapsed"), PropertyInfo( Variant::OBJECT,"value")) );
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index 189309bccc..01c5b5680e 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -34,7 +34,7 @@
class Tween : public Node {
- OBJ_TYPE( Tween, Node );
+ GDCLASS( Tween, Node );
public:
enum TweenProcessMode {
diff --git a/scene/audio/event_player.cpp b/scene/audio/event_player.cpp
index fb83b82521..153a8a27ba 100644
--- a/scene/audio/event_player.cpp
+++ b/scene/audio/event_player.cpp
@@ -282,49 +282,49 @@ float EventPlayer::get_channel_last_note_time(int p_channel) const {
void EventPlayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_stream","stream:EventStream"),&EventPlayer::set_stream);
- ObjectTypeDB::bind_method(_MD("get_stream:EventStream"),&EventPlayer::get_stream);
+ ClassDB::bind_method(_MD("set_stream","stream:EventStream"),&EventPlayer::set_stream);
+ ClassDB::bind_method(_MD("get_stream:EventStream"),&EventPlayer::get_stream);
- ObjectTypeDB::bind_method(_MD("play"),&EventPlayer::play);
- ObjectTypeDB::bind_method(_MD("stop"),&EventPlayer::stop);
+ ClassDB::bind_method(_MD("play"),&EventPlayer::play);
+ ClassDB::bind_method(_MD("stop"),&EventPlayer::stop);
- ObjectTypeDB::bind_method(_MD("is_playing"),&EventPlayer::is_playing);
+ ClassDB::bind_method(_MD("is_playing"),&EventPlayer::is_playing);
- ObjectTypeDB::bind_method(_MD("set_paused","paused"),&EventPlayer::set_paused);
- ObjectTypeDB::bind_method(_MD("is_paused"),&EventPlayer::is_paused);
+ ClassDB::bind_method(_MD("set_paused","paused"),&EventPlayer::set_paused);
+ ClassDB::bind_method(_MD("is_paused"),&EventPlayer::is_paused);
- ObjectTypeDB::bind_method(_MD("set_loop","enabled"),&EventPlayer::set_loop);
- ObjectTypeDB::bind_method(_MD("has_loop"),&EventPlayer::has_loop);
+ ClassDB::bind_method(_MD("set_loop","enabled"),&EventPlayer::set_loop);
+ ClassDB::bind_method(_MD("has_loop"),&EventPlayer::has_loop);
- ObjectTypeDB::bind_method(_MD("set_volume","volume"),&EventPlayer::set_volume);
- ObjectTypeDB::bind_method(_MD("get_volume"),&EventPlayer::get_volume);
+ ClassDB::bind_method(_MD("set_volume","volume"),&EventPlayer::set_volume);
+ ClassDB::bind_method(_MD("get_volume"),&EventPlayer::get_volume);
- ObjectTypeDB::bind_method(_MD("set_pitch_scale","pitch_scale"),&EventPlayer::set_pitch_scale);
- ObjectTypeDB::bind_method(_MD("get_pitch_scale"),&EventPlayer::get_pitch_scale);
+ ClassDB::bind_method(_MD("set_pitch_scale","pitch_scale"),&EventPlayer::set_pitch_scale);
+ ClassDB::bind_method(_MD("get_pitch_scale"),&EventPlayer::get_pitch_scale);
- ObjectTypeDB::bind_method(_MD("set_tempo_scale","tempo_scale"),&EventPlayer::set_tempo_scale);
- ObjectTypeDB::bind_method(_MD("get_tempo_scale"),&EventPlayer::get_tempo_scale);
+ ClassDB::bind_method(_MD("set_tempo_scale","tempo_scale"),&EventPlayer::set_tempo_scale);
+ ClassDB::bind_method(_MD("get_tempo_scale"),&EventPlayer::get_tempo_scale);
- ObjectTypeDB::bind_method(_MD("set_volume_db","db"),&EventPlayer::set_volume_db);
- ObjectTypeDB::bind_method(_MD("get_volume_db"),&EventPlayer::get_volume_db);
+ ClassDB::bind_method(_MD("set_volume_db","db"),&EventPlayer::set_volume_db);
+ ClassDB::bind_method(_MD("get_volume_db"),&EventPlayer::get_volume_db);
- ObjectTypeDB::bind_method(_MD("get_stream_name"),&EventPlayer::get_stream_name);
- ObjectTypeDB::bind_method(_MD("get_loop_count"),&EventPlayer::get_loop_count);
+ ClassDB::bind_method(_MD("get_stream_name"),&EventPlayer::get_stream_name);
+ ClassDB::bind_method(_MD("get_loop_count"),&EventPlayer::get_loop_count);
- ObjectTypeDB::bind_method(_MD("get_pos"),&EventPlayer::get_pos);
- ObjectTypeDB::bind_method(_MD("seek_pos","time"),&EventPlayer::seek_pos);
+ ClassDB::bind_method(_MD("get_pos"),&EventPlayer::get_pos);
+ ClassDB::bind_method(_MD("seek_pos","time"),&EventPlayer::seek_pos);
- ObjectTypeDB::bind_method(_MD("get_length"),&EventPlayer::get_length);
+ ClassDB::bind_method(_MD("get_length"),&EventPlayer::get_length);
- ObjectTypeDB::bind_method(_MD("set_autoplay","enabled"),&EventPlayer::set_autoplay);
- ObjectTypeDB::bind_method(_MD("has_autoplay"),&EventPlayer::has_autoplay);
+ ClassDB::bind_method(_MD("set_autoplay","enabled"),&EventPlayer::set_autoplay);
+ ClassDB::bind_method(_MD("has_autoplay"),&EventPlayer::has_autoplay);
- ObjectTypeDB::bind_method(_MD("set_channel_volume","channel","channel_volume"),&EventPlayer::set_channel_volume);
- ObjectTypeDB::bind_method(_MD("get_channel_volume","channel"),&EventPlayer::get_channel_volume);
- ObjectTypeDB::bind_method(_MD("get_channel_last_note_time","channel"),&EventPlayer::get_channel_last_note_time);
+ ClassDB::bind_method(_MD("set_channel_volume","channel","channel_volume"),&EventPlayer::set_channel_volume);
+ ClassDB::bind_method(_MD("get_channel_volume","channel"),&EventPlayer::get_channel_volume);
+ ClassDB::bind_method(_MD("get_channel_last_note_time","channel"),&EventPlayer::get_channel_last_note_time);
- ObjectTypeDB::bind_method(_MD("_set_play","play"),&EventPlayer::_set_play);
- ObjectTypeDB::bind_method(_MD("_get_play"),&EventPlayer::_get_play);
+ ClassDB::bind_method(_MD("_set_play","play"),&EventPlayer::_set_play);
+ ClassDB::bind_method(_MD("_get_play"),&EventPlayer::_get_play);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"EventStream"), _SCS("set_stream"), _SCS("get_stream") );
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/play"), _SCS("_set_play"), _SCS("_get_play") );
diff --git a/scene/audio/event_player.h b/scene/audio/event_player.h
index 2d1402fc86..715017e0d6 100644
--- a/scene/audio/event_player.h
+++ b/scene/audio/event_player.h
@@ -34,7 +34,7 @@
#include "scene/resources/event_stream.h"
class EventPlayer : public Node {
- OBJ_TYPE(EventPlayer,Node);
+ GDCLASS(EventPlayer,Node);
enum {
diff --git a/scene/audio/sample_player.cpp b/scene/audio/sample_player.cpp
index 64992081f3..ba2d379311 100644
--- a/scene/audio/sample_player.cpp
+++ b/scene/audio/sample_player.cpp
@@ -611,64 +611,64 @@ String SamplePlayer::get_configuration_warning() const {
void SamplePlayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_sample_library","library:SampleLibrary"),&SamplePlayer::set_sample_library );
- ObjectTypeDB::bind_method(_MD("get_sample_library:SampleLibrary"),&SamplePlayer::get_sample_library );
-
- ObjectTypeDB::bind_method(_MD("set_polyphony","max_voices"),&SamplePlayer::set_polyphony );
- ObjectTypeDB::bind_method(_MD("get_polyphony"),&SamplePlayer::get_polyphony );
-
- ObjectTypeDB::bind_method(_MD("play","name","unique"),&SamplePlayer::play, DEFVAL(false) );
- ObjectTypeDB::bind_method(_MD("stop","voice"),&SamplePlayer::stop );
- ObjectTypeDB::bind_method(_MD("stop_all"),&SamplePlayer::stop_all );
-
- ObjectTypeDB::bind_method(_MD("set_mix_rate","voice","hz"),&SamplePlayer::set_mix_rate );
- ObjectTypeDB::bind_method(_MD("set_pitch_scale","voice","ratio"),&SamplePlayer::set_pitch_scale );
- ObjectTypeDB::bind_method(_MD("set_volume","voice","volume"),&SamplePlayer::set_volume );
- ObjectTypeDB::bind_method(_MD("set_volume_db","voice","db"),&SamplePlayer::set_volume_db );
- ObjectTypeDB::bind_method(_MD("set_pan","voice","pan","depth","height"),&SamplePlayer::set_pan,DEFVAL(0),DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("set_filter","voice","type","cutoff_hz","resonance","gain"),&SamplePlayer::set_filter,DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("set_chorus","voice","send"),&SamplePlayer::set_chorus );
- ObjectTypeDB::bind_method(_MD("set_reverb","voice","room_type","send"),&SamplePlayer::set_reverb );
-
- ObjectTypeDB::bind_method(_MD("get_mix_rate","voice"),&SamplePlayer::get_mix_rate );
- ObjectTypeDB::bind_method(_MD("get_pitch_scale","voice"),&SamplePlayer::get_pitch_scale );
- ObjectTypeDB::bind_method(_MD("get_volume","voice"),&SamplePlayer::get_volume );
- ObjectTypeDB::bind_method(_MD("get_volume_db","voice"),&SamplePlayer::get_volume_db );
- ObjectTypeDB::bind_method(_MD("get_pan","voice"),&SamplePlayer::get_pan );
- ObjectTypeDB::bind_method(_MD("get_pan_depth","voice"),&SamplePlayer::get_pan_depth );
- ObjectTypeDB::bind_method(_MD("get_pan_height","voice"),&SamplePlayer::get_pan_height );
- ObjectTypeDB::bind_method(_MD("get_filter_type","voice"),&SamplePlayer::get_filter_type );
- ObjectTypeDB::bind_method(_MD("get_filter_cutoff","voice"),&SamplePlayer::get_filter_cutoff );
- ObjectTypeDB::bind_method(_MD("get_filter_resonance","voice"),&SamplePlayer::get_filter_resonance );
- ObjectTypeDB::bind_method(_MD("get_filter_gain","voice"),&SamplePlayer::get_filter_gain );
- ObjectTypeDB::bind_method(_MD("get_chorus","voice"),&SamplePlayer::get_chorus );
- ObjectTypeDB::bind_method(_MD("get_reverb_room","voice"),&SamplePlayer::get_reverb_room );
- ObjectTypeDB::bind_method(_MD("get_reverb","voice"),&SamplePlayer::get_reverb );
-
- ObjectTypeDB::bind_method(_MD("set_default_pitch_scale","ratio"),&SamplePlayer::set_default_pitch_scale );
- ObjectTypeDB::bind_method(_MD("set_default_volume","volume"),&SamplePlayer::set_default_volume );
- ObjectTypeDB::bind_method(_MD("set_default_volume_db","db"),&SamplePlayer::set_default_volume_db );
- ObjectTypeDB::bind_method(_MD("set_default_pan","pan","depth","height"),&SamplePlayer::set_default_pan,DEFVAL(0),DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("set_default_filter","type","cutoff_hz","resonance","gain"),&SamplePlayer::set_default_filter,DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("set_default_chorus","send"),&SamplePlayer::set_default_chorus );
- ObjectTypeDB::bind_method(_MD("set_default_reverb","room_type","send"),&SamplePlayer::set_default_reverb );
-
- ObjectTypeDB::bind_method(_MD("get_default_pitch_scale"),&SamplePlayer::get_default_pitch_scale );
- ObjectTypeDB::bind_method(_MD("get_default_volume"),&SamplePlayer::get_default_volume );
- ObjectTypeDB::bind_method(_MD("get_default_volume_db"),&SamplePlayer::get_default_volume_db );
- ObjectTypeDB::bind_method(_MD("get_default_pan"),&SamplePlayer::get_default_pan );
- ObjectTypeDB::bind_method(_MD("get_default_pan_depth"),&SamplePlayer::get_default_pan_depth );
- ObjectTypeDB::bind_method(_MD("get_default_pan_height"),&SamplePlayer::get_default_pan_height );
- ObjectTypeDB::bind_method(_MD("get_default_filter_type"),&SamplePlayer::get_default_filter_type );
- ObjectTypeDB::bind_method(_MD("get_default_filter_cutoff"),&SamplePlayer::get_default_filter_cutoff );
- ObjectTypeDB::bind_method(_MD("get_default_filter_resonance"),&SamplePlayer::get_default_filter_resonance );
- ObjectTypeDB::bind_method(_MD("get_default_filter_gain"),&SamplePlayer::get_default_filter_gain );
- ObjectTypeDB::bind_method(_MD("get_default_chorus"),&SamplePlayer::get_default_chorus );
- ObjectTypeDB::bind_method(_MD("get_default_reverb_room"),&SamplePlayer::get_default_reverb_room );
- ObjectTypeDB::bind_method(_MD("get_default_reverb"),&SamplePlayer::get_default_reverb );
-
- ObjectTypeDB::bind_method(_MD("is_active"),&SamplePlayer::is_active );
- ObjectTypeDB::bind_method(_MD("is_voice_active","voice"),&SamplePlayer::is_voice_active );
+ ClassDB::bind_method(_MD("set_sample_library","library:SampleLibrary"),&SamplePlayer::set_sample_library );
+ ClassDB::bind_method(_MD("get_sample_library:SampleLibrary"),&SamplePlayer::get_sample_library );
+
+ ClassDB::bind_method(_MD("set_polyphony","max_voices"),&SamplePlayer::set_polyphony );
+ ClassDB::bind_method(_MD("get_polyphony"),&SamplePlayer::get_polyphony );
+
+ ClassDB::bind_method(_MD("play","name","unique"),&SamplePlayer::play, DEFVAL(false) );
+ ClassDB::bind_method(_MD("stop","voice"),&SamplePlayer::stop );
+ ClassDB::bind_method(_MD("stop_all"),&SamplePlayer::stop_all );
+
+ ClassDB::bind_method(_MD("set_mix_rate","voice","hz"),&SamplePlayer::set_mix_rate );
+ ClassDB::bind_method(_MD("set_pitch_scale","voice","ratio"),&SamplePlayer::set_pitch_scale );
+ ClassDB::bind_method(_MD("set_volume","voice","volume"),&SamplePlayer::set_volume );
+ ClassDB::bind_method(_MD("set_volume_db","voice","db"),&SamplePlayer::set_volume_db );
+ ClassDB::bind_method(_MD("set_pan","voice","pan","depth","height"),&SamplePlayer::set_pan,DEFVAL(0),DEFVAL(0) );
+ ClassDB::bind_method(_MD("set_filter","voice","type","cutoff_hz","resonance","gain"),&SamplePlayer::set_filter,DEFVAL(0) );
+ ClassDB::bind_method(_MD("set_chorus","voice","send"),&SamplePlayer::set_chorus );
+ ClassDB::bind_method(_MD("set_reverb","voice","room_type","send"),&SamplePlayer::set_reverb );
+
+ ClassDB::bind_method(_MD("get_mix_rate","voice"),&SamplePlayer::get_mix_rate );
+ ClassDB::bind_method(_MD("get_pitch_scale","voice"),&SamplePlayer::get_pitch_scale );
+ ClassDB::bind_method(_MD("get_volume","voice"),&SamplePlayer::get_volume );
+ ClassDB::bind_method(_MD("get_volume_db","voice"),&SamplePlayer::get_volume_db );
+ ClassDB::bind_method(_MD("get_pan","voice"),&SamplePlayer::get_pan );
+ ClassDB::bind_method(_MD("get_pan_depth","voice"),&SamplePlayer::get_pan_depth );
+ ClassDB::bind_method(_MD("get_pan_height","voice"),&SamplePlayer::get_pan_height );
+ ClassDB::bind_method(_MD("get_filter_type","voice"),&SamplePlayer::get_filter_type );
+ ClassDB::bind_method(_MD("get_filter_cutoff","voice"),&SamplePlayer::get_filter_cutoff );
+ ClassDB::bind_method(_MD("get_filter_resonance","voice"),&SamplePlayer::get_filter_resonance );
+ ClassDB::bind_method(_MD("get_filter_gain","voice"),&SamplePlayer::get_filter_gain );
+ ClassDB::bind_method(_MD("get_chorus","voice"),&SamplePlayer::get_chorus );
+ ClassDB::bind_method(_MD("get_reverb_room","voice"),&SamplePlayer::get_reverb_room );
+ ClassDB::bind_method(_MD("get_reverb","voice"),&SamplePlayer::get_reverb );
+
+ ClassDB::bind_method(_MD("set_default_pitch_scale","ratio"),&SamplePlayer::set_default_pitch_scale );
+ ClassDB::bind_method(_MD("set_default_volume","volume"),&SamplePlayer::set_default_volume );
+ ClassDB::bind_method(_MD("set_default_volume_db","db"),&SamplePlayer::set_default_volume_db );
+ ClassDB::bind_method(_MD("set_default_pan","pan","depth","height"),&SamplePlayer::set_default_pan,DEFVAL(0),DEFVAL(0) );
+ ClassDB::bind_method(_MD("set_default_filter","type","cutoff_hz","resonance","gain"),&SamplePlayer::set_default_filter,DEFVAL(0) );
+ ClassDB::bind_method(_MD("set_default_chorus","send"),&SamplePlayer::set_default_chorus );
+ ClassDB::bind_method(_MD("set_default_reverb","room_type","send"),&SamplePlayer::set_default_reverb );
+
+ ClassDB::bind_method(_MD("get_default_pitch_scale"),&SamplePlayer::get_default_pitch_scale );
+ ClassDB::bind_method(_MD("get_default_volume"),&SamplePlayer::get_default_volume );
+ ClassDB::bind_method(_MD("get_default_volume_db"),&SamplePlayer::get_default_volume_db );
+ ClassDB::bind_method(_MD("get_default_pan"),&SamplePlayer::get_default_pan );
+ ClassDB::bind_method(_MD("get_default_pan_depth"),&SamplePlayer::get_default_pan_depth );
+ ClassDB::bind_method(_MD("get_default_pan_height"),&SamplePlayer::get_default_pan_height );
+ ClassDB::bind_method(_MD("get_default_filter_type"),&SamplePlayer::get_default_filter_type );
+ ClassDB::bind_method(_MD("get_default_filter_cutoff"),&SamplePlayer::get_default_filter_cutoff );
+ ClassDB::bind_method(_MD("get_default_filter_resonance"),&SamplePlayer::get_default_filter_resonance );
+ ClassDB::bind_method(_MD("get_default_filter_gain"),&SamplePlayer::get_default_filter_gain );
+ ClassDB::bind_method(_MD("get_default_chorus"),&SamplePlayer::get_default_chorus );
+ ClassDB::bind_method(_MD("get_default_reverb_room"),&SamplePlayer::get_default_reverb_room );
+ ClassDB::bind_method(_MD("get_default_reverb"),&SamplePlayer::get_default_reverb );
+
+ ClassDB::bind_method(_MD("is_active"),&SamplePlayer::is_active );
+ ClassDB::bind_method(_MD("is_voice_active","voice"),&SamplePlayer::is_voice_active );
BIND_CONSTANT( FILTER_NONE);
BIND_CONSTANT( FILTER_LOWPASS);
diff --git a/scene/audio/sample_player.h b/scene/audio/sample_player.h
index 19c373e8b6..8c4e6418aa 100644
--- a/scene/audio/sample_player.h
+++ b/scene/audio/sample_player.h
@@ -34,7 +34,7 @@
class SamplePlayer : public Node {
- OBJ_TYPE( SamplePlayer, Node );
+ GDCLASS( SamplePlayer, Node );
OBJ_CATEGORY("Audio Nodes");
public:
diff --git a/scene/audio/sound_room_params.cpp b/scene/audio/sound_room_params.cpp
index 5b410bf03a..d08bc5d6b8 100644
--- a/scene/audio/sound_room_params.cpp
+++ b/scene/audio/sound_room_params.cpp
@@ -134,14 +134,14 @@ bool SoundRoomParams::is_forcing_params_to_all_sources() {
void SoundRoomParams::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_param","param","value"),&SoundRoomParams::set_param );
- ObjectTypeDB::bind_method(_MD("get_param","param"),&SoundRoomParams::get_param );
+ ClassDB::bind_method(_MD("set_param","param","value"),&SoundRoomParams::set_param );
+ ClassDB::bind_method(_MD("get_param","param"),&SoundRoomParams::get_param );
- ObjectTypeDB::bind_method(_MD("set_reverb_mode","reverb_mode","value"),&SoundRoomParams::set_reverb_mode );
- ObjectTypeDB::bind_method(_MD("get_reverb_mode","reverb_mode"),&SoundRoomParams::get_reverb_mode );
+ ClassDB::bind_method(_MD("set_reverb_mode","reverb_mode","value"),&SoundRoomParams::set_reverb_mode );
+ ClassDB::bind_method(_MD("get_reverb_mode","reverb_mode"),&SoundRoomParams::get_reverb_mode );
- ObjectTypeDB::bind_method(_MD("set_force_params_to_all_sources","enabled"),&SoundRoomParams::set_force_params_to_all_sources );
- ObjectTypeDB::bind_method(_MD("is_forcing_params_to_all_sources"),&SoundRoomParams::is_forcing_params_to_all_sources );
+ ClassDB::bind_method(_MD("set_force_params_to_all_sources","enabled"),&SoundRoomParams::set_force_params_to_all_sources );
+ ClassDB::bind_method(_MD("is_forcing_params_to_all_sources"),&SoundRoomParams::is_forcing_params_to_all_sources );
ADD_PROPERTY( PropertyInfo( Variant::INT, "reverb/mode", PROPERTY_HINT_ENUM, "Small,Medium,Large,Hall"), _SCS("set_reverb_mode"), _SCS("get_reverb_mode") );
diff --git a/scene/audio/sound_room_params.h b/scene/audio/sound_room_params.h
index be4e6c8c8c..3cdffda652 100644
--- a/scene/audio/sound_room_params.h
+++ b/scene/audio/sound_room_params.h
@@ -38,7 +38,7 @@
#include "scene/3d/room_instance.h"
class SoundRoomParams : public Node {
- OBJ_TYPE( SoundRoomParams, Node );
+ GDCLASS( SoundRoomParams, Node );
public:
enum Params {
diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp
index d2f1a9fd09..21d7fcb085 100644
--- a/scene/audio/stream_player.cpp
+++ b/scene/audio/stream_player.cpp
@@ -345,46 +345,46 @@ int StreamPlayer::get_buffering_msec() const{
void StreamPlayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_stream","stream:AudioStream"),&StreamPlayer::set_stream);
- ObjectTypeDB::bind_method(_MD("get_stream:AudioStream"),&StreamPlayer::get_stream);
+ ClassDB::bind_method(_MD("set_stream","stream:AudioStream"),&StreamPlayer::set_stream);
+ ClassDB::bind_method(_MD("get_stream:AudioStream"),&StreamPlayer::get_stream);
- ObjectTypeDB::bind_method(_MD("play","offset"),&StreamPlayer::play,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("stop"),&StreamPlayer::stop);
+ ClassDB::bind_method(_MD("play","offset"),&StreamPlayer::play,DEFVAL(0));
+ ClassDB::bind_method(_MD("stop"),&StreamPlayer::stop);
- ObjectTypeDB::bind_method(_MD("is_playing"),&StreamPlayer::is_playing);
+ ClassDB::bind_method(_MD("is_playing"),&StreamPlayer::is_playing);
- ObjectTypeDB::bind_method(_MD("set_paused","paused"),&StreamPlayer::set_paused);
- ObjectTypeDB::bind_method(_MD("is_paused"),&StreamPlayer::is_paused);
+ ClassDB::bind_method(_MD("set_paused","paused"),&StreamPlayer::set_paused);
+ ClassDB::bind_method(_MD("is_paused"),&StreamPlayer::is_paused);
- ObjectTypeDB::bind_method(_MD("set_loop","enabled"),&StreamPlayer::set_loop);
- ObjectTypeDB::bind_method(_MD("has_loop"),&StreamPlayer::has_loop);
+ ClassDB::bind_method(_MD("set_loop","enabled"),&StreamPlayer::set_loop);
+ ClassDB::bind_method(_MD("has_loop"),&StreamPlayer::has_loop);
- ObjectTypeDB::bind_method(_MD("set_volume","volume"),&StreamPlayer::set_volume);
- ObjectTypeDB::bind_method(_MD("get_volume"),&StreamPlayer::get_volume);
+ ClassDB::bind_method(_MD("set_volume","volume"),&StreamPlayer::set_volume);
+ ClassDB::bind_method(_MD("get_volume"),&StreamPlayer::get_volume);
- ObjectTypeDB::bind_method(_MD("set_volume_db","db"),&StreamPlayer::set_volume_db);
- ObjectTypeDB::bind_method(_MD("get_volume_db"),&StreamPlayer::get_volume_db);
+ ClassDB::bind_method(_MD("set_volume_db","db"),&StreamPlayer::set_volume_db);
+ ClassDB::bind_method(_MD("get_volume_db"),&StreamPlayer::get_volume_db);
- ObjectTypeDB::bind_method(_MD("set_buffering_msec","msec"),&StreamPlayer::set_buffering_msec);
- ObjectTypeDB::bind_method(_MD("get_buffering_msec"),&StreamPlayer::get_buffering_msec);
+ ClassDB::bind_method(_MD("set_buffering_msec","msec"),&StreamPlayer::set_buffering_msec);
+ ClassDB::bind_method(_MD("get_buffering_msec"),&StreamPlayer::get_buffering_msec);
- ObjectTypeDB::bind_method(_MD("set_loop_restart_time","secs"),&StreamPlayer::set_loop_restart_time);
- ObjectTypeDB::bind_method(_MD("get_loop_restart_time"),&StreamPlayer::get_loop_restart_time);
+ ClassDB::bind_method(_MD("set_loop_restart_time","secs"),&StreamPlayer::set_loop_restart_time);
+ ClassDB::bind_method(_MD("get_loop_restart_time"),&StreamPlayer::get_loop_restart_time);
- ObjectTypeDB::bind_method(_MD("get_stream_name"),&StreamPlayer::get_stream_name);
- ObjectTypeDB::bind_method(_MD("get_loop_count"),&StreamPlayer::get_loop_count);
+ ClassDB::bind_method(_MD("get_stream_name"),&StreamPlayer::get_stream_name);
+ ClassDB::bind_method(_MD("get_loop_count"),&StreamPlayer::get_loop_count);
- ObjectTypeDB::bind_method(_MD("get_pos"),&StreamPlayer::get_pos);
- ObjectTypeDB::bind_method(_MD("seek_pos","time"),&StreamPlayer::seek_pos);
+ ClassDB::bind_method(_MD("get_pos"),&StreamPlayer::get_pos);
+ ClassDB::bind_method(_MD("seek_pos","time"),&StreamPlayer::seek_pos);
- ObjectTypeDB::bind_method(_MD("set_autoplay","enabled"),&StreamPlayer::set_autoplay);
- ObjectTypeDB::bind_method(_MD("has_autoplay"),&StreamPlayer::has_autoplay);
+ ClassDB::bind_method(_MD("set_autoplay","enabled"),&StreamPlayer::set_autoplay);
+ ClassDB::bind_method(_MD("has_autoplay"),&StreamPlayer::has_autoplay);
- ObjectTypeDB::bind_method(_MD("get_length"),&StreamPlayer::get_length);
+ ClassDB::bind_method(_MD("get_length"),&StreamPlayer::get_length);
- ObjectTypeDB::bind_method(_MD("_set_play","play"),&StreamPlayer::_set_play);
- ObjectTypeDB::bind_method(_MD("_get_play"),&StreamPlayer::_get_play);
- ObjectTypeDB::bind_method(_MD("_do_stop"),&StreamPlayer::_do_stop);
+ ClassDB::bind_method(_MD("_set_play","play"),&StreamPlayer::_set_play);
+ ClassDB::bind_method(_MD("_get_play"),&StreamPlayer::_get_play);
+ ClassDB::bind_method(_MD("_do_stop"),&StreamPlayer::_do_stop);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"AudioStream"), _SCS("set_stream"), _SCS("get_stream") );
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/play"), _SCS("_set_play"), _SCS("_get_play") );
diff --git a/scene/audio/stream_player.h b/scene/audio/stream_player.h
index 4e64d2b27e..6031d86aa2 100644
--- a/scene/audio/stream_player.h
+++ b/scene/audio/stream_player.h
@@ -35,7 +35,7 @@
class StreamPlayer : public Node {
- OBJ_TYPE(StreamPlayer,Node);
+ GDCLASS(StreamPlayer,Node);
//_THREAD_SAFE_CLASS_
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 2dfc89dfd3..646bc70585 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -464,22 +464,22 @@ String BaseButton::get_tooltip(const Point2& p_pos) const {
void BaseButton::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&BaseButton::_input_event);
- ObjectTypeDB::bind_method(_MD("_unhandled_input"),&BaseButton::_unhandled_input);
- ObjectTypeDB::bind_method(_MD("set_pressed","pressed"),&BaseButton::set_pressed);
- ObjectTypeDB::bind_method(_MD("is_pressed"),&BaseButton::is_pressed);
- ObjectTypeDB::bind_method(_MD("is_hovered"),&BaseButton::is_hovered);
- ObjectTypeDB::bind_method(_MD("set_toggle_mode","enabled"),&BaseButton::set_toggle_mode);
- ObjectTypeDB::bind_method(_MD("is_toggle_mode"),&BaseButton::is_toggle_mode);
- ObjectTypeDB::bind_method(_MD("set_disabled","disabled"),&BaseButton::set_disabled);
- ObjectTypeDB::bind_method(_MD("is_disabled"),&BaseButton::is_disabled);
- ObjectTypeDB::bind_method(_MD("set_click_on_press","enable"),&BaseButton::set_click_on_press);
- ObjectTypeDB::bind_method(_MD("get_click_on_press"),&BaseButton::get_click_on_press);
- ObjectTypeDB::bind_method(_MD("get_draw_mode"),&BaseButton::get_draw_mode);
- ObjectTypeDB::bind_method(_MD("set_enabled_focus_mode","mode"),&BaseButton::set_enabled_focus_mode);
- ObjectTypeDB::bind_method(_MD("get_enabled_focus_mode"),&BaseButton::get_enabled_focus_mode);
- ObjectTypeDB::bind_method(_MD("set_shortcut","shortcut"),&BaseButton::set_shortcut);
- ObjectTypeDB::bind_method(_MD("get_shortcut"),&BaseButton::get_shortcut);
+ ClassDB::bind_method(_MD("_input_event"),&BaseButton::_input_event);
+ ClassDB::bind_method(_MD("_unhandled_input"),&BaseButton::_unhandled_input);
+ ClassDB::bind_method(_MD("set_pressed","pressed"),&BaseButton::set_pressed);
+ ClassDB::bind_method(_MD("is_pressed"),&BaseButton::is_pressed);
+ ClassDB::bind_method(_MD("is_hovered"),&BaseButton::is_hovered);
+ ClassDB::bind_method(_MD("set_toggle_mode","enabled"),&BaseButton::set_toggle_mode);
+ ClassDB::bind_method(_MD("is_toggle_mode"),&BaseButton::is_toggle_mode);
+ ClassDB::bind_method(_MD("set_disabled","disabled"),&BaseButton::set_disabled);
+ ClassDB::bind_method(_MD("is_disabled"),&BaseButton::is_disabled);
+ ClassDB::bind_method(_MD("set_click_on_press","enable"),&BaseButton::set_click_on_press);
+ ClassDB::bind_method(_MD("get_click_on_press"),&BaseButton::get_click_on_press);
+ ClassDB::bind_method(_MD("get_draw_mode"),&BaseButton::get_draw_mode);
+ ClassDB::bind_method(_MD("set_enabled_focus_mode","mode"),&BaseButton::set_enabled_focus_mode);
+ ClassDB::bind_method(_MD("get_enabled_focus_mode"),&BaseButton::get_enabled_focus_mode);
+ ClassDB::bind_method(_MD("set_shortcut","shortcut"),&BaseButton::set_shortcut);
+ ClassDB::bind_method(_MD("get_shortcut"),&BaseButton::get_shortcut);
BIND_VMETHOD(MethodInfo("_pressed"));
BIND_VMETHOD(MethodInfo("_toggled",PropertyInfo(Variant::BOOL,"pressed")));
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index 1d97023856..6fbf11dedd 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -39,7 +39,7 @@ class ButtonGroup;
class BaseButton : public Control {
- OBJ_TYPE( BaseButton, Control );
+ GDCLASS( BaseButton, Control );
bool toggle_mode;
FocusMode enabled_focus_mode;
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp
index 3547414799..531c3b0a00 100644
--- a/scene/gui/box_container.cpp
+++ b/scene/gui/box_container.cpp
@@ -301,9 +301,9 @@ BoxContainer::BoxContainer(bool p_vertical) {
void BoxContainer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_spacer","begin"),&BoxContainer::add_spacer);
- ObjectTypeDB::bind_method(_MD("get_alignment"),&BoxContainer::get_alignment);
- ObjectTypeDB::bind_method(_MD("set_alignment","alignment"),&BoxContainer::set_alignment);
+ ClassDB::bind_method(_MD("add_spacer","begin"),&BoxContainer::add_spacer);
+ ClassDB::bind_method(_MD("get_alignment"),&BoxContainer::get_alignment);
+ ClassDB::bind_method(_MD("set_alignment","alignment"),&BoxContainer::set_alignment);
BIND_CONSTANT( ALIGN_BEGIN );
BIND_CONSTANT( ALIGN_CENTER );
diff --git a/scene/gui/box_container.h b/scene/gui/box_container.h
index b137a5faaa..c428ec132c 100644
--- a/scene/gui/box_container.h
+++ b/scene/gui/box_container.h
@@ -33,7 +33,7 @@
class BoxContainer : public Container {
- OBJ_TYPE(BoxContainer,Container);
+ GDCLASS(BoxContainer,Container);
public:
@@ -68,7 +68,7 @@ public:
class HBoxContainer : public BoxContainer {
- OBJ_TYPE(HBoxContainer,BoxContainer);
+ GDCLASS(HBoxContainer,BoxContainer);
public:
@@ -79,7 +79,7 @@ public:
class MarginContainer;
class VBoxContainer : public BoxContainer {
- OBJ_TYPE(VBoxContainer,BoxContainer);
+ GDCLASS(VBoxContainer,BoxContainer);
public:
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 6c0bcc7947..9c96adcbf2 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -215,16 +215,16 @@ Button::TextAlign Button::get_text_align() const {
void Button::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_text","text"),&Button::set_text);
- ObjectTypeDB::bind_method(_MD("get_text"),&Button::get_text);
- ObjectTypeDB::bind_method(_MD("set_button_icon","texture:Texture"),&Button::set_icon);
- ObjectTypeDB::bind_method(_MD("get_button_icon:Texture"),&Button::get_icon);
- ObjectTypeDB::bind_method(_MD("set_flat","enabled"),&Button::set_flat);
- ObjectTypeDB::bind_method(_MD("set_clip_text","enabled"),&Button::set_clip_text);
- ObjectTypeDB::bind_method(_MD("get_clip_text"),&Button::get_clip_text);
- ObjectTypeDB::bind_method(_MD("set_text_align","align"),&Button::set_text_align);
- ObjectTypeDB::bind_method(_MD("get_text_align"),&Button::get_text_align);
- ObjectTypeDB::bind_method(_MD("is_flat"),&Button::is_flat);
+ ClassDB::bind_method(_MD("set_text","text"),&Button::set_text);
+ ClassDB::bind_method(_MD("get_text"),&Button::get_text);
+ ClassDB::bind_method(_MD("set_button_icon","texture:Texture"),&Button::set_icon);
+ ClassDB::bind_method(_MD("get_button_icon:Texture"),&Button::get_icon);
+ ClassDB::bind_method(_MD("set_flat","enabled"),&Button::set_flat);
+ ClassDB::bind_method(_MD("set_clip_text","enabled"),&Button::set_clip_text);
+ ClassDB::bind_method(_MD("get_clip_text"),&Button::get_clip_text);
+ ClassDB::bind_method(_MD("set_text_align","align"),&Button::set_text_align);
+ ClassDB::bind_method(_MD("get_text_align"),&Button::get_text_align);
+ ClassDB::bind_method(_MD("is_flat"),&Button::is_flat);
BIND_CONSTANT( ALIGN_LEFT );
BIND_CONSTANT( ALIGN_CENTER );
diff --git a/scene/gui/button.h b/scene/gui/button.h
index 261ed0849c..408e31e111 100644
--- a/scene/gui/button.h
+++ b/scene/gui/button.h
@@ -35,7 +35,7 @@
*/
class Button : public BaseButton {
- OBJ_TYPE( Button, BaseButton );
+ GDCLASS( Button, BaseButton );
public:
diff --git a/scene/gui/button_array.cpp b/scene/gui/button_array.cpp
index 1c8e216c39..d6b2c12a3a 100644
--- a/scene/gui/button_array.cpp
+++ b/scene/gui/button_array.cpp
@@ -527,24 +527,24 @@ void ButtonArray::get_translatable_strings(List<String> *p_strings) const {
void ButtonArray::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_button","text","tooltip"),&ButtonArray::add_button,DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("add_icon_button","icon:Texture","text","tooltip"),&ButtonArray::add_icon_button,DEFVAL(""),DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("set_button_text","button_idx","text"),&ButtonArray::set_button_text);
- ObjectTypeDB::bind_method(_MD("set_button_tooltip","button_idx","text"),&ButtonArray::set_button_tooltip);
- ObjectTypeDB::bind_method(_MD("set_button_icon","button_idx","icon:Texture"),&ButtonArray::set_button_icon);
- ObjectTypeDB::bind_method(_MD("get_button_text","button_idx"),&ButtonArray::get_button_text);
- ObjectTypeDB::bind_method(_MD("get_button_tooltip","button_idx"),&ButtonArray::get_button_tooltip);
- ObjectTypeDB::bind_method(_MD("get_button_icon:Texture","button_idx"),&ButtonArray::get_button_icon);
- ObjectTypeDB::bind_method(_MD("get_button_count"),&ButtonArray::get_button_count);
- ObjectTypeDB::bind_method(_MD("set_flat","enabled"),&ButtonArray::set_flat);
- ObjectTypeDB::bind_method(_MD("is_flat"),&ButtonArray::is_flat);
- ObjectTypeDB::bind_method(_MD("get_selected"),&ButtonArray::get_selected);
- ObjectTypeDB::bind_method(_MD("get_hovered"),&ButtonArray::get_hovered);
- ObjectTypeDB::bind_method(_MD("set_selected","button_idx"),&ButtonArray::set_selected);
- ObjectTypeDB::bind_method(_MD("erase_button","button_idx"),&ButtonArray::erase_button);
- ObjectTypeDB::bind_method(_MD("clear"),&ButtonArray::clear);
-
- ObjectTypeDB::bind_method(_MD("_input_event"),&ButtonArray::_input_event);
+ ClassDB::bind_method(_MD("add_button","text","tooltip"),&ButtonArray::add_button,DEFVAL(""));
+ ClassDB::bind_method(_MD("add_icon_button","icon:Texture","text","tooltip"),&ButtonArray::add_icon_button,DEFVAL(""),DEFVAL(""));
+ ClassDB::bind_method(_MD("set_button_text","button_idx","text"),&ButtonArray::set_button_text);
+ ClassDB::bind_method(_MD("set_button_tooltip","button_idx","text"),&ButtonArray::set_button_tooltip);
+ ClassDB::bind_method(_MD("set_button_icon","button_idx","icon:Texture"),&ButtonArray::set_button_icon);
+ ClassDB::bind_method(_MD("get_button_text","button_idx"),&ButtonArray::get_button_text);
+ ClassDB::bind_method(_MD("get_button_tooltip","button_idx"),&ButtonArray::get_button_tooltip);
+ ClassDB::bind_method(_MD("get_button_icon:Texture","button_idx"),&ButtonArray::get_button_icon);
+ ClassDB::bind_method(_MD("get_button_count"),&ButtonArray::get_button_count);
+ ClassDB::bind_method(_MD("set_flat","enabled"),&ButtonArray::set_flat);
+ ClassDB::bind_method(_MD("is_flat"),&ButtonArray::is_flat);
+ ClassDB::bind_method(_MD("get_selected"),&ButtonArray::get_selected);
+ ClassDB::bind_method(_MD("get_hovered"),&ButtonArray::get_hovered);
+ ClassDB::bind_method(_MD("set_selected","button_idx"),&ButtonArray::set_selected);
+ ClassDB::bind_method(_MD("erase_button","button_idx"),&ButtonArray::erase_button);
+ ClassDB::bind_method(_MD("clear"),&ButtonArray::clear);
+
+ ClassDB::bind_method(_MD("_input_event"),&ButtonArray::_input_event);
BIND_CONSTANT( ALIGN_BEGIN );
BIND_CONSTANT( ALIGN_CENTER );
diff --git a/scene/gui/button_array.h b/scene/gui/button_array.h
index 7bd8929192..6df0f3b6a4 100644
--- a/scene/gui/button_array.h
+++ b/scene/gui/button_array.h
@@ -33,7 +33,7 @@
class ButtonArray : public Control {
- OBJ_TYPE(ButtonArray, Control);
+ GDCLASS(ButtonArray, Control);
public:
enum Align {
ALIGN_BEGIN,
@@ -114,14 +114,14 @@ public:
};
class HButtonArray : public ButtonArray {
- OBJ_TYPE(HButtonArray,ButtonArray);
+ GDCLASS(HButtonArray,ButtonArray);
public:
HButtonArray() : ButtonArray(HORIZONTAL) {};
};
class VButtonArray : public ButtonArray {
- OBJ_TYPE(VButtonArray,ButtonArray);
+ GDCLASS(VButtonArray,ButtonArray);
public:
VButtonArray() : ButtonArray(VERTICAL) {};
diff --git a/scene/gui/button_group.cpp b/scene/gui/button_group.cpp
index 1c8192d585..8586296ba6 100644
--- a/scene/gui/button_group.cpp
+++ b/scene/gui/button_group.cpp
@@ -149,12 +149,12 @@ int ButtonGroup::get_pressed_button_index() const {
void ButtonGroup::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_pressed_button:BaseButton"),&ButtonGroup::get_pressed_button);
- ObjectTypeDB::bind_method(_MD("get_pressed_button_index"),&ButtonGroup::get_pressed_button_index);
- ObjectTypeDB::bind_method(_MD("get_focused_button:BaseButton"),&ButtonGroup::get_focused_button);
- ObjectTypeDB::bind_method(_MD("get_button_list"),&ButtonGroup::_get_button_list);
- ObjectTypeDB::bind_method(_MD("_pressed"),&ButtonGroup::_pressed);
- ObjectTypeDB::bind_method(_MD("set_pressed_button","button:BaseButton"),&ButtonGroup::_pressed);
+ ClassDB::bind_method(_MD("get_pressed_button:BaseButton"),&ButtonGroup::get_pressed_button);
+ ClassDB::bind_method(_MD("get_pressed_button_index"),&ButtonGroup::get_pressed_button_index);
+ ClassDB::bind_method(_MD("get_focused_button:BaseButton"),&ButtonGroup::get_focused_button);
+ ClassDB::bind_method(_MD("get_button_list"),&ButtonGroup::_get_button_list);
+ ClassDB::bind_method(_MD("_pressed"),&ButtonGroup::_pressed);
+ ClassDB::bind_method(_MD("set_pressed_button","button:BaseButton"),&ButtonGroup::_pressed);
ADD_SIGNAL( MethodInfo("button_selected",PropertyInfo(Variant::OBJECT,"button",PROPERTY_HINT_RESOURCE_TYPE,"BaseButton")));
}
diff --git a/scene/gui/button_group.h b/scene/gui/button_group.h
index 3ec53247e1..e3380295e7 100644
--- a/scene/gui/button_group.h
+++ b/scene/gui/button_group.h
@@ -36,7 +36,7 @@ class BaseButton;
class ButtonGroup : public BoxContainer {
- OBJ_TYPE(ButtonGroup,BoxContainer);
+ GDCLASS(ButtonGroup,BoxContainer);
Set<BaseButton*> buttons;
diff --git a/scene/gui/center_container.cpp b/scene/gui/center_container.cpp
index 14721cbc23..4a42695c3a 100644
--- a/scene/gui/center_container.cpp
+++ b/scene/gui/center_container.cpp
@@ -92,8 +92,8 @@ void CenterContainer::_notification(int p_what) {
void CenterContainer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_use_top_left","enable"),&CenterContainer::set_use_top_left);
- ObjectTypeDB::bind_method(_MD("is_using_top_left"),&CenterContainer::is_using_top_left);
+ ClassDB::bind_method(_MD("set_use_top_left","enable"),&CenterContainer::set_use_top_left);
+ ClassDB::bind_method(_MD("is_using_top_left"),&CenterContainer::is_using_top_left);
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"use_top_left"),_SCS("set_use_top_left"),_SCS("is_using_top_left"));
}
diff --git a/scene/gui/center_container.h b/scene/gui/center_container.h
index 58ea9e5870..7acc14de19 100644
--- a/scene/gui/center_container.h
+++ b/scene/gui/center_container.h
@@ -34,7 +34,7 @@
class CenterContainer : public Container {
- OBJ_TYPE( CenterContainer, Container );
+ GDCLASS( CenterContainer, Container );
bool use_top_left;
protected:
diff --git a/scene/gui/check_box.h b/scene/gui/check_box.h
index 631d46a9e7..6a4893936f 100644
--- a/scene/gui/check_box.h
+++ b/scene/gui/check_box.h
@@ -36,7 +36,7 @@
*/
class CheckBox : public Button {
- OBJ_TYPE( CheckBox, Button );
+ GDCLASS( CheckBox, Button );
protected:
diff --git a/scene/gui/check_button.h b/scene/gui/check_button.h
index aa7190a371..1c5440a25d 100644
--- a/scene/gui/check_button.h
+++ b/scene/gui/check_button.h
@@ -36,7 +36,7 @@
*/
class CheckButton : public Button {
- OBJ_TYPE( CheckButton, Button );
+ GDCLASS( CheckButton, Button );
protected:
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 6c212f60f0..05d455be2a 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -430,24 +430,24 @@ void ColorPicker::_screen_pick_pressed()
void ColorPicker::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_color","color"),&ColorPicker::set_color);
- ObjectTypeDB::bind_method(_MD("get_color"),&ColorPicker::get_color);
- ObjectTypeDB::bind_method(_MD("set_raw_mode","mode"),&ColorPicker::set_raw_mode);
- ObjectTypeDB::bind_method(_MD("is_raw_mode"),&ColorPicker::is_raw_mode);
- ObjectTypeDB::bind_method(_MD("set_edit_alpha","show"),&ColorPicker::set_edit_alpha);
- ObjectTypeDB::bind_method(_MD("is_editing_alpha"),&ColorPicker::is_editing_alpha);
- ObjectTypeDB::bind_method(_MD("add_preset"), &ColorPicker::add_preset);
- ObjectTypeDB::bind_method(_MD("_value_changed"),&ColorPicker::_value_changed);
- ObjectTypeDB::bind_method(_MD("_html_entered"),&ColorPicker::_html_entered);
- ObjectTypeDB::bind_method(_MD("_text_type_toggled"),&ColorPicker::_text_type_toggled);
- ObjectTypeDB::bind_method(_MD("_add_preset_pressed"), &ColorPicker::_add_preset_pressed);
- ObjectTypeDB::bind_method(_MD("_screen_pick_pressed"), &ColorPicker::_screen_pick_pressed);
- ObjectTypeDB::bind_method(_MD("_sample_draw"),&ColorPicker::_sample_draw);
- ObjectTypeDB::bind_method(_MD("_hsv_draw"),&ColorPicker::_hsv_draw);
- ObjectTypeDB::bind_method(_MD("_uv_input"),&ColorPicker::_uv_input);
- ObjectTypeDB::bind_method(_MD("_w_input"),&ColorPicker::_w_input);
- ObjectTypeDB::bind_method(_MD("_preset_input"),&ColorPicker::_preset_input);
- ObjectTypeDB::bind_method(_MD("_screen_input"),&ColorPicker::_screen_input);
+ ClassDB::bind_method(_MD("set_color","color"),&ColorPicker::set_color);
+ ClassDB::bind_method(_MD("get_color"),&ColorPicker::get_color);
+ ClassDB::bind_method(_MD("set_raw_mode","mode"),&ColorPicker::set_raw_mode);
+ ClassDB::bind_method(_MD("is_raw_mode"),&ColorPicker::is_raw_mode);
+ ClassDB::bind_method(_MD("set_edit_alpha","show"),&ColorPicker::set_edit_alpha);
+ ClassDB::bind_method(_MD("is_editing_alpha"),&ColorPicker::is_editing_alpha);
+ ClassDB::bind_method(_MD("add_preset"), &ColorPicker::add_preset);
+ ClassDB::bind_method(_MD("_value_changed"),&ColorPicker::_value_changed);
+ ClassDB::bind_method(_MD("_html_entered"),&ColorPicker::_html_entered);
+ ClassDB::bind_method(_MD("_text_type_toggled"),&ColorPicker::_text_type_toggled);
+ ClassDB::bind_method(_MD("_add_preset_pressed"), &ColorPicker::_add_preset_pressed);
+ ClassDB::bind_method(_MD("_screen_pick_pressed"), &ColorPicker::_screen_pick_pressed);
+ ClassDB::bind_method(_MD("_sample_draw"),&ColorPicker::_sample_draw);
+ ClassDB::bind_method(_MD("_hsv_draw"),&ColorPicker::_hsv_draw);
+ ClassDB::bind_method(_MD("_uv_input"),&ColorPicker::_uv_input);
+ ClassDB::bind_method(_MD("_w_input"),&ColorPicker::_w_input);
+ ClassDB::bind_method(_MD("_preset_input"),&ColorPicker::_preset_input);
+ ClassDB::bind_method(_MD("_screen_input"),&ColorPicker::_screen_input);
ADD_SIGNAL( MethodInfo("color_changed",PropertyInfo(Variant::COLOR,"color")));
}
@@ -649,12 +649,12 @@ ColorPicker *ColorPickerButton::get_picker() {
void ColorPickerButton::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_color","color"),&ColorPickerButton::set_color);
- ObjectTypeDB::bind_method(_MD("get_color"),&ColorPickerButton::get_color);
- ObjectTypeDB::bind_method(_MD("get_picker:ColorPicker"),&ColorPickerButton::get_picker);
- ObjectTypeDB::bind_method(_MD("set_edit_alpha","show"),&ColorPickerButton::set_edit_alpha);
- ObjectTypeDB::bind_method(_MD("is_editing_alpha"),&ColorPickerButton::is_editing_alpha);
- ObjectTypeDB::bind_method(_MD("_color_changed"),&ColorPickerButton::_color_changed);
+ ClassDB::bind_method(_MD("set_color","color"),&ColorPickerButton::set_color);
+ ClassDB::bind_method(_MD("get_color"),&ColorPickerButton::get_color);
+ ClassDB::bind_method(_MD("get_picker:ColorPicker"),&ColorPickerButton::get_picker);
+ ClassDB::bind_method(_MD("set_edit_alpha","show"),&ColorPickerButton::set_edit_alpha);
+ ClassDB::bind_method(_MD("is_editing_alpha"),&ColorPickerButton::is_editing_alpha);
+ ClassDB::bind_method(_MD("_color_changed"),&ColorPickerButton::_color_changed);
ADD_SIGNAL( MethodInfo("color_changed",PropertyInfo(Variant::COLOR,"color")));
ADD_PROPERTY( PropertyInfo(Variant::COLOR,"color"),_SCS("set_color"),_SCS("get_color") );
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index 1b7f96acf5..557635ec4a 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -43,7 +43,7 @@
class ColorPicker : public BoxContainer {
- OBJ_TYPE(ColorPicker,BoxContainer);
+ GDCLASS(ColorPicker,BoxContainer);
private:
@@ -113,7 +113,7 @@ public:
class ColorPickerButton : public Button {
- OBJ_TYPE(ColorPickerButton,Button);
+ GDCLASS(ColorPickerButton,Button);
PopupPanel *popup;
ColorPicker *picker;
diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp
index 7415aad0fd..195acebdfd 100644
--- a/scene/gui/color_ramp_edit.cpp
+++ b/scene/gui/color_ramp_edit.cpp
@@ -446,7 +446,7 @@ Vector<ColorRamp::Point>& ColorRampEdit::get_points() {
}
void ColorRampEdit::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&ColorRampEdit::_input_event);
- ObjectTypeDB::bind_method(_MD("_color_changed"),&ColorRampEdit::_color_changed);
+ ClassDB::bind_method(_MD("_input_event"),&ColorRampEdit::_input_event);
+ ClassDB::bind_method(_MD("_color_changed"),&ColorRampEdit::_color_changed);
ADD_SIGNAL(MethodInfo("ramp_changed"));
}
diff --git a/scene/gui/color_ramp_edit.h b/scene/gui/color_ramp_edit.h
index bbe8e2e6c3..c67a75e152 100644
--- a/scene/gui/color_ramp_edit.h
+++ b/scene/gui/color_ramp_edit.h
@@ -38,7 +38,7 @@
class ColorRampEdit : public Control {
- OBJ_TYPE(ColorRampEdit,Control);
+ GDCLASS(ColorRampEdit,Control);
PopupPanel *popup;
ColorPicker *picker;
@@ -73,7 +73,7 @@ public:
/*class ColorRampEditPanel : public Panel
{
- OBJ_TYPE(ColorRampEditPanel, Panel );
+ GDCLASS(ColorRampEditPanel, Panel );
};*/
diff --git a/scene/gui/color_rect.cpp b/scene/gui/color_rect.cpp
index a0e4df66b5..fee96d1ca9 100644
--- a/scene/gui/color_rect.cpp
+++ b/scene/gui/color_rect.cpp
@@ -23,8 +23,8 @@ void ColorFrame::_notification(int p_what) {
void ColorFrame::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_frame_color","color"),&ColorFrame::set_frame_color);
- ObjectTypeDB::bind_method(_MD("get_frame_color"),&ColorFrame::get_frame_color);
+ ClassDB::bind_method(_MD("set_frame_color","color"),&ColorFrame::set_frame_color);
+ ClassDB::bind_method(_MD("get_frame_color"),&ColorFrame::get_frame_color);
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"color"),_SCS("set_frame_color"),_SCS("get_frame_color") );
}
diff --git a/scene/gui/color_rect.h b/scene/gui/color_rect.h
index 3816d44052..f313bbc4f9 100644
--- a/scene/gui/color_rect.h
+++ b/scene/gui/color_rect.h
@@ -4,7 +4,7 @@
#include "scene/gui/control.h"
class ColorFrame : public Control {
- OBJ_TYPE(ColorFrame,Control)
+ GDCLASS(ColorFrame,Control)
Color color;
protected:
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index 05523a3cb6..a5a5c61082 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -156,11 +156,11 @@ void Container::_notification(int p_what) {
void Container::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_sort_children"),&Container::_sort_children);
- ObjectTypeDB::bind_method(_MD("_child_minsize_changed"),&Container::_child_minsize_changed);
+ ClassDB::bind_method(_MD("_sort_children"),&Container::_sort_children);
+ ClassDB::bind_method(_MD("_child_minsize_changed"),&Container::_child_minsize_changed);
- ObjectTypeDB::bind_method(_MD("queue_sort"),&Container::queue_sort);
- ObjectTypeDB::bind_method(_MD("fit_child_in_rect","child:Control","rect"),&Container::fit_child_in_rect);
+ ClassDB::bind_method(_MD("queue_sort"),&Container::queue_sort);
+ ClassDB::bind_method(_MD("fit_child_in_rect","child:Control","rect"),&Container::fit_child_in_rect);
BIND_CONSTANT( NOTIFICATION_SORT_CHILDREN );
ADD_SIGNAL(MethodInfo("sort_children"));
diff --git a/scene/gui/container.h b/scene/gui/container.h
index 23693a7fdf..bb47524972 100644
--- a/scene/gui/container.h
+++ b/scene/gui/container.h
@@ -33,7 +33,7 @@
class Container : public Control {
- OBJ_TYPE(Container,Control);
+ GDCLASS(Container,Control);
bool pending_sort;
void _sort_children();
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 69e3c0a214..d9e3faeb9a 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -336,7 +336,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const {
{
List<StringName> names;
- theme->get_icon_list(get_type_name(),&names);
+ theme->get_icon_list(get_class_name(),&names);
for(List<StringName>::Element *E=names.front();E;E=E->next()) {
uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE;
@@ -348,7 +348,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const {
}
{
List<StringName> names;
- theme->get_shader_list(get_type_name(),&names);
+ theme->get_shader_list(get_class_name(),&names);
for(List<StringName>::Element *E=names.front();E;E=E->next()) {
uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE;
@@ -360,7 +360,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const {
}
{
List<StringName> names;
- theme->get_stylebox_list(get_type_name(),&names);
+ theme->get_stylebox_list(get_class_name(),&names);
for(List<StringName>::Element *E=names.front();E;E=E->next()) {
uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE;
@@ -372,7 +372,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const {
}
{
List<StringName> names;
- theme->get_font_list(get_type_name(),&names);
+ theme->get_font_list(get_class_name(),&names);
for(List<StringName>::Element *E=names.front();E;E=E->next()) {
uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE;
@@ -384,7 +384,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const {
}
{
List<StringName> names;
- theme->get_color_list(get_type_name(),&names);
+ theme->get_color_list(get_class_name(),&names);
for(List<StringName>::Element *E=names.front();E;E=E->next()) {
uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE;
@@ -396,7 +396,7 @@ void Control::_get_property_list( List<PropertyInfo> *p_list) const {
}
{
List<StringName> names;
- theme->get_constant_list(get_type_name(),&names);
+ theme->get_constant_list(get_class_name(),&names);
for(List<StringName>::Element *E=names.front();E;E=E->next()) {
uint32_t hint= PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_CHECKABLE;
@@ -822,7 +822,7 @@ Ref<Texture> Control::get_icon(const StringName& p_name,const StringName& p_type
return *tex;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -852,7 +852,7 @@ Ref<Shader> Control::get_shader(const StringName& p_name,const StringName& p_typ
return *sdr;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -881,7 +881,7 @@ Ref<StyleBox> Control::get_stylebox(const StringName& p_name,const StringName& p
return *style;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -910,7 +910,7 @@ Ref<Font> Control::get_font(const StringName& p_name,const StringName& p_type) c
return *font;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -941,7 +941,7 @@ Color Control::get_color(const StringName& p_name,const StringName& p_type) cons
return *color;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -970,7 +970,7 @@ int Control::get_constant(const StringName& p_name,const StringName& p_type) con
return *constant;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -1053,7 +1053,7 @@ bool Control::has_icon(const StringName& p_name,const StringName& p_type) const
return true;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -1082,7 +1082,7 @@ bool Control::has_shader(const StringName &p_name, const StringName &p_type) con
return true;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -1110,7 +1110,7 @@ bool Control::has_stylebox(const StringName& p_name,const StringName& p_type) co
return true;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -1139,7 +1139,7 @@ bool Control::has_font(const StringName& p_name,const StringName& p_type) const
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -1168,7 +1168,7 @@ bool Control::has_color(const StringName& p_name, const StringName& p_type) cons
return true;
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -1198,7 +1198,7 @@ bool Control::has_constant(const StringName& p_name,const StringName& p_type) co
}
- StringName type = p_type?p_type:get_type_name();
+ StringName type = p_type?p_type:get_class_name();
// try with custom themes
Control *theme_owner = data.theme_owner;
@@ -2414,15 +2414,15 @@ void Control::get_argument_options(const StringName& p_function,int p_idx,List<S
List<StringName> sn;
String pf = p_function;
if (pf=="add_color_override" || pf=="has_color" || pf=="has_color_override" || pf=="get_color") {
- Theme::get_default()->get_color_list(get_type(),&sn);
+ Theme::get_default()->get_color_list(get_class(),&sn);
} else if (pf=="add_style_override" || pf=="has_style" || pf=="has_style_override" || pf=="get_style") {
- Theme::get_default()->get_stylebox_list(get_type(),&sn);
+ Theme::get_default()->get_stylebox_list(get_class(),&sn);
} else if (pf=="add_font_override" || pf=="has_font" || pf=="has_font_override" || pf=="get_font") {
- Theme::get_default()->get_font_list(get_type(),&sn);
+ Theme::get_default()->get_font_list(get_class(),&sn);
} else if (pf=="add_constant_override" || pf=="has_constant" || pf=="has_constant_override" || pf=="get_constant") {
- Theme::get_default()->get_constant_list(get_type(),&sn);
+ Theme::get_default()->get_constant_list(get_class(),&sn);
} else if (pf=="add_color_override" || pf=="has_color" || pf=="has_color_override" || pf=="get_color") {
- Theme::get_default()->get_color_list(get_type(),&sn);
+ Theme::get_default()->get_color_list(get_class(),&sn);
}
sn.sort_custom<StringName::AlphCompare>();
@@ -2438,125 +2438,125 @@ void Control::get_argument_options(const StringName& p_function,int p_idx,List<S
void Control::_bind_methods() {
-// ObjectTypeDB::bind_method(_MD("_window_resize_event"),&Control::_window_resize_event);
- ObjectTypeDB::bind_method(_MD("_size_changed"),&Control::_size_changed);
- ObjectTypeDB::bind_method(_MD("_update_minimum_size"),&Control::_update_minimum_size);
-
- ObjectTypeDB::bind_method(_MD("accept_event"),&Control::accept_event);
- ObjectTypeDB::bind_method(_MD("get_minimum_size"),&Control::get_minimum_size);
- ObjectTypeDB::bind_method(_MD("get_combined_minimum_size"),&Control::get_combined_minimum_size);
- ObjectTypeDB::bind_method(_MD("set_anchor","margin","anchor_mode","keep_margin"),&Control::set_anchor,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("_set_anchor","margin","anchor_mode"),&Control::_set_anchor);
- ObjectTypeDB::bind_method(_MD("get_anchor","margin"),&Control::get_anchor);
- ObjectTypeDB::bind_method(_MD("set_margin","margin","offset"),&Control::set_margin);
- ObjectTypeDB::bind_method(_MD("set_anchor_and_margin","margin","anchor_mode","offset"),&Control::set_anchor_and_margin);
- ObjectTypeDB::bind_method(_MD("set_begin","pos"),&Control::set_begin);
- ObjectTypeDB::bind_method(_MD("set_end","pos"),&Control::set_end);
- ObjectTypeDB::bind_method(_MD("set_pos","pos"),&Control::set_pos);
- ObjectTypeDB::bind_method(_MD("set_size","size"),&Control::set_size);
- ObjectTypeDB::bind_method(_MD("set_custom_minimum_size","size"),&Control::set_custom_minimum_size);
- ObjectTypeDB::bind_method(_MD("set_global_pos","pos"),&Control::set_global_pos);
- ObjectTypeDB::bind_method(_MD("set_rotation","radians"),&Control::set_rotation);
- ObjectTypeDB::bind_method(_MD("set_rotation_deg","degrees"),&Control::set_rotation_deg);
+// ClassDB::bind_method(_MD("_window_resize_event"),&Control::_window_resize_event);
+ ClassDB::bind_method(_MD("_size_changed"),&Control::_size_changed);
+ ClassDB::bind_method(_MD("_update_minimum_size"),&Control::_update_minimum_size);
+
+ ClassDB::bind_method(_MD("accept_event"),&Control::accept_event);
+ ClassDB::bind_method(_MD("get_minimum_size"),&Control::get_minimum_size);
+ ClassDB::bind_method(_MD("get_combined_minimum_size"),&Control::get_combined_minimum_size);
+ ClassDB::bind_method(_MD("set_anchor","margin","anchor_mode","keep_margin"),&Control::set_anchor,DEFVAL(false));
+ ClassDB::bind_method(_MD("_set_anchor","margin","anchor_mode"),&Control::_set_anchor);
+ ClassDB::bind_method(_MD("get_anchor","margin"),&Control::get_anchor);
+ ClassDB::bind_method(_MD("set_margin","margin","offset"),&Control::set_margin);
+ ClassDB::bind_method(_MD("set_anchor_and_margin","margin","anchor_mode","offset"),&Control::set_anchor_and_margin);
+ ClassDB::bind_method(_MD("set_begin","pos"),&Control::set_begin);
+ ClassDB::bind_method(_MD("set_end","pos"),&Control::set_end);
+ ClassDB::bind_method(_MD("set_pos","pos"),&Control::set_pos);
+ ClassDB::bind_method(_MD("set_size","size"),&Control::set_size);
+ ClassDB::bind_method(_MD("set_custom_minimum_size","size"),&Control::set_custom_minimum_size);
+ ClassDB::bind_method(_MD("set_global_pos","pos"),&Control::set_global_pos);
+ ClassDB::bind_method(_MD("set_rotation","radians"),&Control::set_rotation);
+ ClassDB::bind_method(_MD("set_rotation_deg","degrees"),&Control::set_rotation_deg);
// TODO: Obsolete this method (old name) properly (GH-4397)
- ObjectTypeDB::bind_method(_MD("_set_rotation_deg","degrees"),&Control::_set_rotation_deg);
- ObjectTypeDB::bind_method(_MD("set_scale","scale"),&Control::set_scale);
- ObjectTypeDB::bind_method(_MD("get_margin","margin"),&Control::get_margin);
- ObjectTypeDB::bind_method(_MD("get_begin"),&Control::get_begin);
- ObjectTypeDB::bind_method(_MD("get_end"),&Control::get_end);
- ObjectTypeDB::bind_method(_MD("get_pos"),&Control::get_pos);
- ObjectTypeDB::bind_method(_MD("get_size"),&Control::get_size);
- ObjectTypeDB::bind_method(_MD("get_rotation"),&Control::get_rotation);
- ObjectTypeDB::bind_method(_MD("get_rotation_deg"),&Control::get_rotation_deg);
+ ClassDB::bind_method(_MD("_set_rotation_deg","degrees"),&Control::_set_rotation_deg);
+ ClassDB::bind_method(_MD("set_scale","scale"),&Control::set_scale);
+ ClassDB::bind_method(_MD("get_margin","margin"),&Control::get_margin);
+ ClassDB::bind_method(_MD("get_begin"),&Control::get_begin);
+ ClassDB::bind_method(_MD("get_end"),&Control::get_end);
+ ClassDB::bind_method(_MD("get_pos"),&Control::get_pos);
+ ClassDB::bind_method(_MD("get_size"),&Control::get_size);
+ ClassDB::bind_method(_MD("get_rotation"),&Control::get_rotation);
+ ClassDB::bind_method(_MD("get_rotation_deg"),&Control::get_rotation_deg);
// TODO: Obsolete this method (old name) properly (GH-4397)
- ObjectTypeDB::bind_method(_MD("_get_rotation_deg"),&Control::_get_rotation_deg);
- ObjectTypeDB::bind_method(_MD("get_scale"),&Control::get_scale);
- ObjectTypeDB::bind_method(_MD("get_custom_minimum_size"),&Control::get_custom_minimum_size);
- ObjectTypeDB::bind_method(_MD("get_parent_area_size"),&Control::get_size);
- ObjectTypeDB::bind_method(_MD("get_global_pos"),&Control::get_global_pos);
- ObjectTypeDB::bind_method(_MD("get_rect"),&Control::get_rect);
- ObjectTypeDB::bind_method(_MD("get_global_rect"),&Control::get_global_rect);
- ObjectTypeDB::bind_method(_MD("set_area_as_parent_rect","margin"),&Control::set_area_as_parent_rect,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("show_modal","exclusive"),&Control::show_modal,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("set_focus_mode","mode"),&Control::set_focus_mode);
- ObjectTypeDB::bind_method(_MD("get_focus_mode"),&Control::get_focus_mode);
- ObjectTypeDB::bind_method(_MD("has_focus"),&Control::has_focus);
- ObjectTypeDB::bind_method(_MD("grab_focus"),&Control::grab_focus);
- ObjectTypeDB::bind_method(_MD("release_focus"),&Control::release_focus);
- ObjectTypeDB::bind_method(_MD("get_focus_owner:Control"),&Control::get_focus_owner);
+ ClassDB::bind_method(_MD("_get_rotation_deg"),&Control::_get_rotation_deg);
+ ClassDB::bind_method(_MD("get_scale"),&Control::get_scale);
+ ClassDB::bind_method(_MD("get_custom_minimum_size"),&Control::get_custom_minimum_size);
+ ClassDB::bind_method(_MD("get_parent_area_size"),&Control::get_size);
+ ClassDB::bind_method(_MD("get_global_pos"),&Control::get_global_pos);
+ ClassDB::bind_method(_MD("get_rect"),&Control::get_rect);
+ ClassDB::bind_method(_MD("get_global_rect"),&Control::get_global_rect);
+ ClassDB::bind_method(_MD("set_area_as_parent_rect","margin"),&Control::set_area_as_parent_rect,DEFVAL(0));
+ ClassDB::bind_method(_MD("show_modal","exclusive"),&Control::show_modal,DEFVAL(false));
+ ClassDB::bind_method(_MD("set_focus_mode","mode"),&Control::set_focus_mode);
+ ClassDB::bind_method(_MD("get_focus_mode"),&Control::get_focus_mode);
+ ClassDB::bind_method(_MD("has_focus"),&Control::has_focus);
+ ClassDB::bind_method(_MD("grab_focus"),&Control::grab_focus);
+ ClassDB::bind_method(_MD("release_focus"),&Control::release_focus);
+ ClassDB::bind_method(_MD("get_focus_owner:Control"),&Control::get_focus_owner);
- ObjectTypeDB::bind_method(_MD("set_h_size_flags","flags"),&Control::set_h_size_flags);
- ObjectTypeDB::bind_method(_MD("get_h_size_flags"),&Control::get_h_size_flags);
+ ClassDB::bind_method(_MD("set_h_size_flags","flags"),&Control::set_h_size_flags);
+ ClassDB::bind_method(_MD("get_h_size_flags"),&Control::get_h_size_flags);
- ObjectTypeDB::bind_method(_MD("set_stretch_ratio","ratio"),&Control::set_stretch_ratio);
- ObjectTypeDB::bind_method(_MD("get_stretch_ratio"),&Control::get_stretch_ratio);
+ ClassDB::bind_method(_MD("set_stretch_ratio","ratio"),&Control::set_stretch_ratio);
+ ClassDB::bind_method(_MD("get_stretch_ratio"),&Control::get_stretch_ratio);
- ObjectTypeDB::bind_method(_MD("set_v_size_flags","flags"),&Control::set_v_size_flags);
- ObjectTypeDB::bind_method(_MD("get_v_size_flags"),&Control::get_v_size_flags);
+ ClassDB::bind_method(_MD("set_v_size_flags","flags"),&Control::set_v_size_flags);
+ ClassDB::bind_method(_MD("get_v_size_flags"),&Control::get_v_size_flags);
- ObjectTypeDB::bind_method(_MD("set_theme","theme:Theme"),&Control::set_theme);
- ObjectTypeDB::bind_method(_MD("get_theme:Theme"),&Control::get_theme);
+ ClassDB::bind_method(_MD("set_theme","theme:Theme"),&Control::set_theme);
+ ClassDB::bind_method(_MD("get_theme:Theme"),&Control::get_theme);
- ObjectTypeDB::bind_method(_MD("add_icon_override","name","texture:Texture"),&Control::add_icon_override);
- ObjectTypeDB::bind_method(_MD("add_shader_override","name","shader:Shader"),&Control::add_shader_override);
- ObjectTypeDB::bind_method(_MD("add_style_override","name","stylebox:StyleBox"),&Control::add_style_override);
- ObjectTypeDB::bind_method(_MD("add_font_override","name","font:Font"),&Control::add_font_override);
- ObjectTypeDB::bind_method(_MD("add_color_override","name","color"),&Control::add_color_override);
- ObjectTypeDB::bind_method(_MD("add_constant_override","name","constant"),&Control::add_constant_override);
+ ClassDB::bind_method(_MD("add_icon_override","name","texture:Texture"),&Control::add_icon_override);
+ ClassDB::bind_method(_MD("add_shader_override","name","shader:Shader"),&Control::add_shader_override);
+ ClassDB::bind_method(_MD("add_style_override","name","stylebox:StyleBox"),&Control::add_style_override);
+ ClassDB::bind_method(_MD("add_font_override","name","font:Font"),&Control::add_font_override);
+ ClassDB::bind_method(_MD("add_color_override","name","color"),&Control::add_color_override);
+ ClassDB::bind_method(_MD("add_constant_override","name","constant"),&Control::add_constant_override);
- ObjectTypeDB::bind_method(_MD("get_icon:Texture","name","type"),&Control::get_icon,DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("get_stylebox:StyleBox","name","type"),&Control::get_stylebox,DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("get_font:Font","name","type"),&Control::get_font,DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("get_color","name","type"),&Control::get_color,DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("get_constant","name","type"),&Control::get_constant,DEFVAL(""));
+ ClassDB::bind_method(_MD("get_icon:Texture","name","type"),&Control::get_icon,DEFVAL(""));
+ ClassDB::bind_method(_MD("get_stylebox:StyleBox","name","type"),&Control::get_stylebox,DEFVAL(""));
+ ClassDB::bind_method(_MD("get_font:Font","name","type"),&Control::get_font,DEFVAL(""));
+ ClassDB::bind_method(_MD("get_color","name","type"),&Control::get_color,DEFVAL(""));
+ ClassDB::bind_method(_MD("get_constant","name","type"),&Control::get_constant,DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("has_icon_override", "name"), &Control::has_icon_override);
- ObjectTypeDB::bind_method(_MD("has_stylebox_override", "name"), &Control::has_stylebox_override);
- ObjectTypeDB::bind_method(_MD("has_font_override", "name"), &Control::has_font_override);
- ObjectTypeDB::bind_method(_MD("has_color_override", "name"), &Control::has_color_override);
- ObjectTypeDB::bind_method(_MD("has_constant_override", "name"), &Control::has_constant_override);
+ ClassDB::bind_method(_MD("has_icon_override", "name"), &Control::has_icon_override);
+ ClassDB::bind_method(_MD("has_stylebox_override", "name"), &Control::has_stylebox_override);
+ ClassDB::bind_method(_MD("has_font_override", "name"), &Control::has_font_override);
+ ClassDB::bind_method(_MD("has_color_override", "name"), &Control::has_color_override);
+ ClassDB::bind_method(_MD("has_constant_override", "name"), &Control::has_constant_override);
- ObjectTypeDB::bind_method(_MD("has_icon", "name", "type"), &Control::has_icon, DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("has_stylebox", "name", "type"), &Control::has_stylebox, DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("has_font", "name", "type"), &Control::has_font, DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("has_color", "name", "type"), &Control::has_color, DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("has_constant", "name", "type"), &Control::has_constant, DEFVAL(""));
+ ClassDB::bind_method(_MD("has_icon", "name", "type"), &Control::has_icon, DEFVAL(""));
+ ClassDB::bind_method(_MD("has_stylebox", "name", "type"), &Control::has_stylebox, DEFVAL(""));
+ ClassDB::bind_method(_MD("has_font", "name", "type"), &Control::has_font, DEFVAL(""));
+ ClassDB::bind_method(_MD("has_color", "name", "type"), &Control::has_color, DEFVAL(""));
+ ClassDB::bind_method(_MD("has_constant", "name", "type"), &Control::has_constant, DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("get_parent_control:Control"),&Control::get_parent_control);
+ ClassDB::bind_method(_MD("get_parent_control:Control"),&Control::get_parent_control);
- ObjectTypeDB::bind_method(_MD("set_tooltip","tooltip"),&Control::set_tooltip);
- ObjectTypeDB::bind_method(_MD("get_tooltip","atpos"),&Control::get_tooltip,DEFVAL(Point2()));
- ObjectTypeDB::bind_method(_MD("_get_tooltip"),&Control::_get_tooltip);
+ ClassDB::bind_method(_MD("set_tooltip","tooltip"),&Control::set_tooltip);
+ ClassDB::bind_method(_MD("get_tooltip","atpos"),&Control::get_tooltip,DEFVAL(Point2()));
+ ClassDB::bind_method(_MD("_get_tooltip"),&Control::_get_tooltip);
- ObjectTypeDB::bind_method(_MD("set_default_cursor_shape","shape"),&Control::set_default_cursor_shape);
- ObjectTypeDB::bind_method(_MD("get_default_cursor_shape"),&Control::get_default_cursor_shape);
- ObjectTypeDB::bind_method(_MD("get_cursor_shape","pos"),&Control::get_cursor_shape,DEFVAL(Point2()));
+ ClassDB::bind_method(_MD("set_default_cursor_shape","shape"),&Control::set_default_cursor_shape);
+ ClassDB::bind_method(_MD("get_default_cursor_shape"),&Control::get_default_cursor_shape);
+ ClassDB::bind_method(_MD("get_cursor_shape","pos"),&Control::get_cursor_shape,DEFVAL(Point2()));
- ObjectTypeDB::bind_method(_MD("set_focus_neighbour","margin","neighbour"),&Control::set_focus_neighbour);
- ObjectTypeDB::bind_method(_MD("get_focus_neighbour","margin"),&Control::get_focus_neighbour);
+ ClassDB::bind_method(_MD("set_focus_neighbour","margin","neighbour"),&Control::set_focus_neighbour);
+ ClassDB::bind_method(_MD("get_focus_neighbour","margin"),&Control::get_focus_neighbour);
- ObjectTypeDB::bind_method(_MD("set_ignore_mouse","ignore"),&Control::set_ignore_mouse);
- ObjectTypeDB::bind_method(_MD("is_ignoring_mouse"),&Control::is_ignoring_mouse);
+ ClassDB::bind_method(_MD("set_ignore_mouse","ignore"),&Control::set_ignore_mouse);
+ ClassDB::bind_method(_MD("is_ignoring_mouse"),&Control::is_ignoring_mouse);
- ObjectTypeDB::bind_method(_MD("force_drag","data","preview"),&Control::force_drag);
+ ClassDB::bind_method(_MD("force_drag","data","preview"),&Control::force_drag);
- ObjectTypeDB::bind_method(_MD("set_stop_mouse","stop"),&Control::set_stop_mouse);
- ObjectTypeDB::bind_method(_MD("is_stopping_mouse"),&Control::is_stopping_mouse);
+ ClassDB::bind_method(_MD("set_stop_mouse","stop"),&Control::set_stop_mouse);
+ ClassDB::bind_method(_MD("is_stopping_mouse"),&Control::is_stopping_mouse);
- ObjectTypeDB::bind_method(_MD("grab_click_focus"),&Control::grab_click_focus);
+ ClassDB::bind_method(_MD("grab_click_focus"),&Control::grab_click_focus);
- ObjectTypeDB::bind_method(_MD("set_drag_forwarding","target:Control"),&Control::set_drag_forwarding);
- ObjectTypeDB::bind_method(_MD("set_drag_preview","control:Control"),&Control::set_drag_preview);
+ ClassDB::bind_method(_MD("set_drag_forwarding","target:Control"),&Control::set_drag_forwarding);
+ ClassDB::bind_method(_MD("set_drag_preview","control:Control"),&Control::set_drag_preview);
- ObjectTypeDB::bind_method(_MD("warp_mouse","to_pos"),&Control::warp_mouse);
+ ClassDB::bind_method(_MD("warp_mouse","to_pos"),&Control::warp_mouse);
- ObjectTypeDB::bind_method(_MD("minimum_size_changed"), &Control::minimum_size_changed);
+ ClassDB::bind_method(_MD("minimum_size_changed"), &Control::minimum_size_changed);
- ObjectTypeDB::bind_method(_MD("_theme_changed"), &Control::_theme_changed);
+ ClassDB::bind_method(_MD("_theme_changed"), &Control::_theme_changed);
- ObjectTypeDB::bind_method(_MD("_font_changed"), &Control::_font_changed);
+ ClassDB::bind_method(_MD("_font_changed"), &Control::_font_changed);
BIND_VMETHOD(MethodInfo("_input_event",PropertyInfo(Variant::INPUT_EVENT,"event")));
BIND_VMETHOD(MethodInfo(Variant::VECTOR2,"get_minimum_size"));
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 58aaa6d4f8..e19523a05b 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -46,7 +46,7 @@ class Panel;
class Control : public CanvasItem {
- OBJ_TYPE( Control, CanvasItem );
+ GDCLASS( Control, CanvasItem );
OBJ_CATEGORY("GUI Nodes");
public:
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index ae5a51c3c5..01e2f352dd 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -141,11 +141,11 @@ TextureButton *WindowDialog::get_close_button() {
void WindowDialog::_bind_methods() {
- ObjectTypeDB::bind_method( _MD("_input_event"),&WindowDialog::_input_event);
- ObjectTypeDB::bind_method( _MD("set_title","title"),&WindowDialog::set_title);
- ObjectTypeDB::bind_method( _MD("get_title"),&WindowDialog::get_title);
- ObjectTypeDB::bind_method( _MD("_closed"),&WindowDialog::_closed);
- ObjectTypeDB::bind_method( _MD("get_close_button:TextureButton"),&WindowDialog::get_close_button);
+ ClassDB::bind_method( _MD("_input_event"),&WindowDialog::_input_event);
+ ClassDB::bind_method( _MD("set_title","title"),&WindowDialog::set_title);
+ ClassDB::bind_method( _MD("get_title"),&WindowDialog::get_title);
+ ClassDB::bind_method( _MD("_closed"),&WindowDialog::_closed);
+ ClassDB::bind_method( _MD("get_close_button:TextureButton"),&WindowDialog::get_close_button);
ADD_PROPERTY( PropertyInfo(Variant::STRING,"window/title",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_DEFAULT_INTL),_SCS("set_title"),_SCS("get_title"));
}
@@ -359,19 +359,19 @@ Button* AcceptDialog::add_cancel(const String &p_cancel) {
void AcceptDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_ok"),&AcceptDialog::_ok_pressed);
- ObjectTypeDB::bind_method(_MD("get_ok"),&AcceptDialog::get_ok);
- ObjectTypeDB::bind_method(_MD("get_label"),&AcceptDialog::get_label);
- ObjectTypeDB::bind_method(_MD("set_hide_on_ok","enabled"),&AcceptDialog::set_hide_on_ok);
- ObjectTypeDB::bind_method(_MD("get_hide_on_ok"),&AcceptDialog::get_hide_on_ok);
- ObjectTypeDB::bind_method(_MD("add_button:Button","text","right","action"),&AcceptDialog::add_button,DEFVAL(false),DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("add_cancel:Button","name"),&AcceptDialog::add_cancel);
- ObjectTypeDB::bind_method(_MD("_builtin_text_entered"),&AcceptDialog::_builtin_text_entered);
- ObjectTypeDB::bind_method(_MD("register_text_enter:LineEdit","line_edit"),&AcceptDialog::register_text_enter);
- ObjectTypeDB::bind_method(_MD("_custom_action"),&AcceptDialog::_custom_action);
- ObjectTypeDB::bind_method(_MD("set_text","text"),&AcceptDialog::set_text);
- ObjectTypeDB::bind_method(_MD("get_text"),&AcceptDialog::get_text);
- ObjectTypeDB::bind_method(_MD("set_child_rect","child:Control"),&AcceptDialog::set_child_rect);
+ ClassDB::bind_method(_MD("_ok"),&AcceptDialog::_ok_pressed);
+ ClassDB::bind_method(_MD("get_ok"),&AcceptDialog::get_ok);
+ ClassDB::bind_method(_MD("get_label"),&AcceptDialog::get_label);
+ ClassDB::bind_method(_MD("set_hide_on_ok","enabled"),&AcceptDialog::set_hide_on_ok);
+ ClassDB::bind_method(_MD("get_hide_on_ok"),&AcceptDialog::get_hide_on_ok);
+ ClassDB::bind_method(_MD("add_button:Button","text","right","action"),&AcceptDialog::add_button,DEFVAL(false),DEFVAL(""));
+ ClassDB::bind_method(_MD("add_cancel:Button","name"),&AcceptDialog::add_cancel);
+ ClassDB::bind_method(_MD("_builtin_text_entered"),&AcceptDialog::_builtin_text_entered);
+ ClassDB::bind_method(_MD("register_text_enter:LineEdit","line_edit"),&AcceptDialog::register_text_enter);
+ ClassDB::bind_method(_MD("_custom_action"),&AcceptDialog::_custom_action);
+ ClassDB::bind_method(_MD("set_text","text"),&AcceptDialog::set_text);
+ ClassDB::bind_method(_MD("get_text"),&AcceptDialog::get_text);
+ ClassDB::bind_method(_MD("set_child_rect","child:Control"),&AcceptDialog::set_child_rect);
ADD_SIGNAL( MethodInfo("confirmed") );
ADD_SIGNAL( MethodInfo("custom_action",PropertyInfo(Variant::STRING,"action")) );
@@ -429,7 +429,7 @@ AcceptDialog::~AcceptDialog()
void ConfirmationDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_cancel:Button"),&ConfirmationDialog::get_cancel);
+ ClassDB::bind_method(_MD("get_cancel:Button"),&ConfirmationDialog::get_cancel);
}
Button *ConfirmationDialog::get_cancel() {
diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h
index 2278ce0266..30a69634f3 100644
--- a/scene/gui/dialogs.h
+++ b/scene/gui/dialogs.h
@@ -42,7 +42,7 @@
class WindowDialog : public Popup {
- OBJ_TYPE(WindowDialog,Popup);
+ GDCLASS(WindowDialog,Popup);
TextureButton *close_button;
String title;
@@ -73,7 +73,7 @@ public:
class PopupDialog : public Popup {
- OBJ_TYPE(PopupDialog,Popup);
+ GDCLASS(PopupDialog,Popup);
protected:
void _notification(int p_what);
@@ -89,7 +89,7 @@ class LineEdit;
class AcceptDialog : public WindowDialog {
- OBJ_TYPE(AcceptDialog,WindowDialog);
+ GDCLASS(AcceptDialog,WindowDialog);
Control *child;
HBoxContainer *hbc;
@@ -150,7 +150,7 @@ public:
class ConfirmationDialog : public AcceptDialog {
- OBJ_TYPE(ConfirmationDialog,AcceptDialog);
+ GDCLASS(ConfirmationDialog,AcceptDialog);
Button *cancel;
protected:
static void _bind_methods();
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index fefac47830..4fe65fad75 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -686,41 +686,41 @@ bool FileDialog::default_show_hidden_files=false;
void FileDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_unhandled_input"),&FileDialog::_unhandled_input);
-
- ObjectTypeDB::bind_method(_MD("_tree_selected"),&FileDialog::_tree_selected);
- ObjectTypeDB::bind_method(_MD("_tree_db_selected"),&FileDialog::_tree_dc_selected);
- ObjectTypeDB::bind_method(_MD("_dir_entered"),&FileDialog::_dir_entered);
- ObjectTypeDB::bind_method(_MD("_file_entered"),&FileDialog::_file_entered);
- ObjectTypeDB::bind_method(_MD("_action_pressed"),&FileDialog::_action_pressed);
- ObjectTypeDB::bind_method(_MD("_cancel_pressed"),&FileDialog::_cancel_pressed);
- ObjectTypeDB::bind_method(_MD("_filter_selected"),&FileDialog::_filter_selected);
- ObjectTypeDB::bind_method(_MD("_save_confirm_pressed"),&FileDialog::_save_confirm_pressed);
-
- ObjectTypeDB::bind_method(_MD("clear_filters"),&FileDialog::clear_filters);
- ObjectTypeDB::bind_method(_MD("add_filter","filter"),&FileDialog::add_filter);
- ObjectTypeDB::bind_method(_MD("set_filters","filters"),&FileDialog::set_filters);
- ObjectTypeDB::bind_method(_MD("get_filters"),&FileDialog::get_filters);
- ObjectTypeDB::bind_method(_MD("get_current_dir"),&FileDialog::get_current_dir);
- ObjectTypeDB::bind_method(_MD("get_current_file"),&FileDialog::get_current_file);
- ObjectTypeDB::bind_method(_MD("get_current_path"),&FileDialog::get_current_path);
- ObjectTypeDB::bind_method(_MD("set_current_dir","dir"),&FileDialog::set_current_dir);
- ObjectTypeDB::bind_method(_MD("set_current_file","file"),&FileDialog::set_current_file);
- ObjectTypeDB::bind_method(_MD("set_current_path","path"),&FileDialog::set_current_path);
- ObjectTypeDB::bind_method(_MD("set_mode","mode"),&FileDialog::set_mode);
- ObjectTypeDB::bind_method(_MD("get_mode"),&FileDialog::get_mode);
- ObjectTypeDB::bind_method(_MD("get_vbox:VBoxContainer"),&FileDialog::get_vbox);
- ObjectTypeDB::bind_method(_MD("set_access","access"),&FileDialog::set_access);
- ObjectTypeDB::bind_method(_MD("get_access"),&FileDialog::get_access);
- ObjectTypeDB::bind_method(_MD("set_show_hidden_files","show"),&FileDialog::set_show_hidden_files);
- ObjectTypeDB::bind_method(_MD("is_showing_hidden_files"),&FileDialog::is_showing_hidden_files);
- ObjectTypeDB::bind_method(_MD("_select_drive"),&FileDialog::_select_drive);
- ObjectTypeDB::bind_method(_MD("_make_dir"),&FileDialog::_make_dir);
- ObjectTypeDB::bind_method(_MD("_make_dir_confirm"),&FileDialog::_make_dir_confirm);
- ObjectTypeDB::bind_method(_MD("_update_file_list"),&FileDialog::update_file_list);
- ObjectTypeDB::bind_method(_MD("_update_dir"),&FileDialog::update_dir);
-
- ObjectTypeDB::bind_method(_MD("invalidate"),&FileDialog::invalidate);
+ ClassDB::bind_method(_MD("_unhandled_input"),&FileDialog::_unhandled_input);
+
+ ClassDB::bind_method(_MD("_tree_selected"),&FileDialog::_tree_selected);
+ ClassDB::bind_method(_MD("_tree_db_selected"),&FileDialog::_tree_dc_selected);
+ ClassDB::bind_method(_MD("_dir_entered"),&FileDialog::_dir_entered);
+ ClassDB::bind_method(_MD("_file_entered"),&FileDialog::_file_entered);
+ ClassDB::bind_method(_MD("_action_pressed"),&FileDialog::_action_pressed);
+ ClassDB::bind_method(_MD("_cancel_pressed"),&FileDialog::_cancel_pressed);
+ ClassDB::bind_method(_MD("_filter_selected"),&FileDialog::_filter_selected);
+ ClassDB::bind_method(_MD("_save_confirm_pressed"),&FileDialog::_save_confirm_pressed);
+
+ ClassDB::bind_method(_MD("clear_filters"),&FileDialog::clear_filters);
+ ClassDB::bind_method(_MD("add_filter","filter"),&FileDialog::add_filter);
+ ClassDB::bind_method(_MD("set_filters","filters"),&FileDialog::set_filters);
+ ClassDB::bind_method(_MD("get_filters"),&FileDialog::get_filters);
+ ClassDB::bind_method(_MD("get_current_dir"),&FileDialog::get_current_dir);
+ ClassDB::bind_method(_MD("get_current_file"),&FileDialog::get_current_file);
+ ClassDB::bind_method(_MD("get_current_path"),&FileDialog::get_current_path);
+ ClassDB::bind_method(_MD("set_current_dir","dir"),&FileDialog::set_current_dir);
+ ClassDB::bind_method(_MD("set_current_file","file"),&FileDialog::set_current_file);
+ ClassDB::bind_method(_MD("set_current_path","path"),&FileDialog::set_current_path);
+ ClassDB::bind_method(_MD("set_mode","mode"),&FileDialog::set_mode);
+ ClassDB::bind_method(_MD("get_mode"),&FileDialog::get_mode);
+ ClassDB::bind_method(_MD("get_vbox:VBoxContainer"),&FileDialog::get_vbox);
+ ClassDB::bind_method(_MD("set_access","access"),&FileDialog::set_access);
+ ClassDB::bind_method(_MD("get_access"),&FileDialog::get_access);
+ ClassDB::bind_method(_MD("set_show_hidden_files","show"),&FileDialog::set_show_hidden_files);
+ ClassDB::bind_method(_MD("is_showing_hidden_files"),&FileDialog::is_showing_hidden_files);
+ ClassDB::bind_method(_MD("_select_drive"),&FileDialog::_select_drive);
+ ClassDB::bind_method(_MD("_make_dir"),&FileDialog::_make_dir);
+ ClassDB::bind_method(_MD("_make_dir_confirm"),&FileDialog::_make_dir_confirm);
+ ClassDB::bind_method(_MD("_update_file_list"),&FileDialog::update_file_list);
+ ClassDB::bind_method(_MD("_update_dir"),&FileDialog::update_dir);
+
+ ClassDB::bind_method(_MD("invalidate"),&FileDialog::invalidate);
ADD_SIGNAL(MethodInfo("file_selected",PropertyInfo( Variant::STRING,"path")));
ADD_SIGNAL(MethodInfo("files_selected",PropertyInfo( Variant::STRING_ARRAY,"paths")));
@@ -868,11 +868,11 @@ FileDialog::~FileDialog() {
void LineEditFileChooser::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_browse"),&LineEditFileChooser::_browse);
- ObjectTypeDB::bind_method(_MD("_chosen"),&LineEditFileChooser::_chosen);
- ObjectTypeDB::bind_method(_MD("get_button:Button"),&LineEditFileChooser::get_button);
- ObjectTypeDB::bind_method(_MD("get_line_edit:LineEdit"),&LineEditFileChooser::get_line_edit);
- ObjectTypeDB::bind_method(_MD("get_file_dialog:FileDialog"),&LineEditFileChooser::get_file_dialog);
+ ClassDB::bind_method(_MD("_browse"),&LineEditFileChooser::_browse);
+ ClassDB::bind_method(_MD("_chosen"),&LineEditFileChooser::_chosen);
+ ClassDB::bind_method(_MD("get_button:Button"),&LineEditFileChooser::get_button);
+ ClassDB::bind_method(_MD("get_line_edit:LineEdit"),&LineEditFileChooser::get_line_edit);
+ ClassDB::bind_method(_MD("get_file_dialog:FileDialog"),&LineEditFileChooser::get_file_dialog);
}
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h
index 2f57771a84..653b38e40d 100644
--- a/scene/gui/file_dialog.h
+++ b/scene/gui/file_dialog.h
@@ -42,7 +42,7 @@
*/
class FileDialog : public ConfirmationDialog {
- OBJ_TYPE( FileDialog, ConfirmationDialog );
+ GDCLASS( FileDialog, ConfirmationDialog );
public:
@@ -167,7 +167,7 @@ public:
class LineEditFileChooser : public HBoxContainer {
- OBJ_TYPE( LineEditFileChooser, HBoxContainer );
+ GDCLASS( LineEditFileChooser, HBoxContainer );
Button *button;
LineEdit *line_edit;
FileDialog *dialog;
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 30a56662f6..b7fb64b400 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -1202,44 +1202,44 @@ void GraphEdit::_snap_value_changed(double) {
void GraphEdit::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("connect_node:Error","from","from_port","to","to_port"),&GraphEdit::connect_node);
- ObjectTypeDB::bind_method(_MD("is_node_connected","from","from_port","to","to_port"),&GraphEdit::is_node_connected);
- ObjectTypeDB::bind_method(_MD("disconnect_node","from","from_port","to","to_port"),&GraphEdit::disconnect_node);
- ObjectTypeDB::bind_method(_MD("get_connection_list"),&GraphEdit::_get_connection_list);
- ObjectTypeDB::bind_method(_MD("get_scroll_ofs"),&GraphEdit::get_scroll_ofs);
- ObjectTypeDB::bind_method(_MD("set_scroll_ofs","ofs"),&GraphEdit::set_scroll_ofs);
+ ClassDB::bind_method(_MD("connect_node:Error","from","from_port","to","to_port"),&GraphEdit::connect_node);
+ ClassDB::bind_method(_MD("is_node_connected","from","from_port","to","to_port"),&GraphEdit::is_node_connected);
+ ClassDB::bind_method(_MD("disconnect_node","from","from_port","to","to_port"),&GraphEdit::disconnect_node);
+ ClassDB::bind_method(_MD("get_connection_list"),&GraphEdit::_get_connection_list);
+ ClassDB::bind_method(_MD("get_scroll_ofs"),&GraphEdit::get_scroll_ofs);
+ ClassDB::bind_method(_MD("set_scroll_ofs","ofs"),&GraphEdit::set_scroll_ofs);
- ObjectTypeDB::bind_method(_MD("set_zoom","p_zoom"),&GraphEdit::set_zoom);
- ObjectTypeDB::bind_method(_MD("get_zoom"),&GraphEdit::get_zoom);
+ ClassDB::bind_method(_MD("set_zoom","p_zoom"),&GraphEdit::set_zoom);
+ ClassDB::bind_method(_MD("get_zoom"),&GraphEdit::get_zoom);
- ObjectTypeDB::bind_method(_MD("set_snap","pixels"),&GraphEdit::set_snap);
- ObjectTypeDB::bind_method(_MD("get_snap"),&GraphEdit::get_snap);
+ ClassDB::bind_method(_MD("set_snap","pixels"),&GraphEdit::set_snap);
+ ClassDB::bind_method(_MD("get_snap"),&GraphEdit::get_snap);
- ObjectTypeDB::bind_method(_MD("set_use_snap","enable"),&GraphEdit::set_use_snap);
- ObjectTypeDB::bind_method(_MD("is_using_snap"),&GraphEdit::is_using_snap);
+ ClassDB::bind_method(_MD("set_use_snap","enable"),&GraphEdit::set_use_snap);
+ ClassDB::bind_method(_MD("is_using_snap"),&GraphEdit::is_using_snap);
- ObjectTypeDB::bind_method(_MD("set_right_disconnects","enable"),&GraphEdit::set_right_disconnects);
- ObjectTypeDB::bind_method(_MD("is_right_disconnects_enabled"),&GraphEdit::is_right_disconnects_enabled);
+ ClassDB::bind_method(_MD("set_right_disconnects","enable"),&GraphEdit::set_right_disconnects);
+ ClassDB::bind_method(_MD("is_right_disconnects_enabled"),&GraphEdit::is_right_disconnects_enabled);
- ObjectTypeDB::bind_method(_MD("_graph_node_moved"),&GraphEdit::_graph_node_moved);
- ObjectTypeDB::bind_method(_MD("_graph_node_raised"),&GraphEdit::_graph_node_raised);
+ ClassDB::bind_method(_MD("_graph_node_moved"),&GraphEdit::_graph_node_moved);
+ ClassDB::bind_method(_MD("_graph_node_raised"),&GraphEdit::_graph_node_raised);
- ObjectTypeDB::bind_method(_MD("_top_layer_input"),&GraphEdit::_top_layer_input);
- ObjectTypeDB::bind_method(_MD("_top_layer_draw"),&GraphEdit::_top_layer_draw);
- ObjectTypeDB::bind_method(_MD("_scroll_moved"),&GraphEdit::_scroll_moved);
- ObjectTypeDB::bind_method(_MD("_zoom_minus"),&GraphEdit::_zoom_minus);
- ObjectTypeDB::bind_method(_MD("_zoom_reset"),&GraphEdit::_zoom_reset);
- ObjectTypeDB::bind_method(_MD("_zoom_plus"),&GraphEdit::_zoom_plus);
- ObjectTypeDB::bind_method(_MD("_snap_toggled"),&GraphEdit::_snap_toggled);
- ObjectTypeDB::bind_method(_MD("_snap_value_changed"),&GraphEdit::_snap_value_changed);
+ ClassDB::bind_method(_MD("_top_layer_input"),&GraphEdit::_top_layer_input);
+ ClassDB::bind_method(_MD("_top_layer_draw"),&GraphEdit::_top_layer_draw);
+ ClassDB::bind_method(_MD("_scroll_moved"),&GraphEdit::_scroll_moved);
+ ClassDB::bind_method(_MD("_zoom_minus"),&GraphEdit::_zoom_minus);
+ ClassDB::bind_method(_MD("_zoom_reset"),&GraphEdit::_zoom_reset);
+ ClassDB::bind_method(_MD("_zoom_plus"),&GraphEdit::_zoom_plus);
+ ClassDB::bind_method(_MD("_snap_toggled"),&GraphEdit::_snap_toggled);
+ ClassDB::bind_method(_MD("_snap_value_changed"),&GraphEdit::_snap_value_changed);
- ObjectTypeDB::bind_method(_MD("_input_event"),&GraphEdit::_input_event);
- ObjectTypeDB::bind_method(_MD("_update_scroll_offset"),&GraphEdit::_update_scroll_offset);
- ObjectTypeDB::bind_method(_MD("_connections_layer_draw"),&GraphEdit::_connections_layer_draw);
+ ClassDB::bind_method(_MD("_input_event"),&GraphEdit::_input_event);
+ ClassDB::bind_method(_MD("_update_scroll_offset"),&GraphEdit::_update_scroll_offset);
+ ClassDB::bind_method(_MD("_connections_layer_draw"),&GraphEdit::_connections_layer_draw);
- ObjectTypeDB::bind_method(_MD("set_selected","node"),&GraphEdit::set_selected);
+ ClassDB::bind_method(_MD("set_selected","node"),&GraphEdit::set_selected);
ADD_SIGNAL(MethodInfo("connection_request",PropertyInfo(Variant::STRING,"from"),PropertyInfo(Variant::INT,"from_slot"),PropertyInfo(Variant::STRING,"to"),PropertyInfo(Variant::INT,"to_slot")));
ADD_SIGNAL(MethodInfo("disconnection_request",PropertyInfo(Variant::STRING,"from"),PropertyInfo(Variant::INT,"from_slot"),PropertyInfo(Variant::STRING,"to"),PropertyInfo(Variant::INT,"to_slot")));
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index 335fa7f952..9b2774590f 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -40,7 +40,7 @@ class GraphEdit;
class GraphEditFilter : public Control {
- OBJ_TYPE(GraphEditFilter,Control);
+ GDCLASS(GraphEditFilter,Control);
friend class GraphEdit;
GraphEdit *ge;
@@ -54,7 +54,7 @@ public:
class GraphEdit : public Control {
- OBJ_TYPE(GraphEdit,Control);
+ GDCLASS(GraphEdit,Control);
public:
struct Connection {
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 441676f47a..e0f786e755 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -722,50 +722,50 @@ bool GraphNode::is_resizeable() const{
void GraphNode::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_title","title"),&GraphNode::set_title);
- ObjectTypeDB::bind_method(_MD("get_title"),&GraphNode::get_title);
- ObjectTypeDB::bind_method(_MD("_input_event"),&GraphNode::_input_event);
-
- ObjectTypeDB::bind_method(_MD("set_slot","idx","enable_left","type_left","color_left","enable_right","type_right","color_right","custom_left","custom_right"),&GraphNode::set_slot,DEFVAL(Ref<Texture>()),DEFVAL(Ref<Texture>()));
- ObjectTypeDB::bind_method(_MD("clear_slot","idx"),&GraphNode::clear_slot);
- ObjectTypeDB::bind_method(_MD("clear_all_slots","idx"),&GraphNode::clear_all_slots);
- ObjectTypeDB::bind_method(_MD("is_slot_enabled_left","idx"),&GraphNode::is_slot_enabled_left);
- ObjectTypeDB::bind_method(_MD("get_slot_type_left","idx"),&GraphNode::get_slot_type_left);
- ObjectTypeDB::bind_method(_MD("get_slot_color_left","idx"),&GraphNode::get_slot_color_left);
- ObjectTypeDB::bind_method(_MD("is_slot_enabled_right","idx"),&GraphNode::is_slot_enabled_right);
- ObjectTypeDB::bind_method(_MD("get_slot_type_right","idx"),&GraphNode::get_slot_type_right);
- ObjectTypeDB::bind_method(_MD("get_slot_color_right","idx"),&GraphNode::get_slot_color_right);
-
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&GraphNode::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&GraphNode::get_offset);
-
- ObjectTypeDB::bind_method(_MD("set_comment","comment"),&GraphNode::set_comment);
- ObjectTypeDB::bind_method(_MD("is_comment"),&GraphNode::is_comment);
-
- ObjectTypeDB::bind_method(_MD("set_resizeable","resizeable"),&GraphNode::set_resizeable);
- ObjectTypeDB::bind_method(_MD("is_resizeable"),&GraphNode::is_resizeable);
-
- ObjectTypeDB::bind_method(_MD("set_selected","selected"),&GraphNode::set_selected);
- ObjectTypeDB::bind_method(_MD("is_selected"),&GraphNode::is_selected);
-
- ObjectTypeDB::bind_method(_MD("get_connection_output_count"),&GraphNode::get_connection_output_count);
- ObjectTypeDB::bind_method(_MD("get_connection_input_count"),&GraphNode::get_connection_input_count);
-
- ObjectTypeDB::bind_method(_MD("get_connection_output_pos","idx"),&GraphNode::get_connection_output_pos);
- ObjectTypeDB::bind_method(_MD("get_connection_output_type","idx"),&GraphNode::get_connection_output_type);
- ObjectTypeDB::bind_method(_MD("get_connection_output_color","idx"),&GraphNode::get_connection_output_color);
- ObjectTypeDB::bind_method(_MD("get_connection_input_pos","idx"),&GraphNode::get_connection_input_pos);
- ObjectTypeDB::bind_method(_MD("get_connection_input_type","idx"),&GraphNode::get_connection_input_type);
- ObjectTypeDB::bind_method(_MD("get_connection_input_color","idx"),&GraphNode::get_connection_input_color);
-
- ObjectTypeDB::bind_method(_MD("set_modulate","color"),&GraphNode::set_modulate);
- ObjectTypeDB::bind_method(_MD("get_modulate"),&GraphNode::get_modulate);
-
- ObjectTypeDB::bind_method(_MD("set_show_close_button","show"),&GraphNode::set_show_close_button);
- ObjectTypeDB::bind_method(_MD("is_close_button_visible"),&GraphNode::is_close_button_visible);
-
- ObjectTypeDB::bind_method(_MD("set_overlay","overlay"),&GraphNode::set_overlay);
- ObjectTypeDB::bind_method(_MD("get_overlay"),&GraphNode::get_overlay);
+ ClassDB::bind_method(_MD("set_title","title"),&GraphNode::set_title);
+ ClassDB::bind_method(_MD("get_title"),&GraphNode::get_title);
+ ClassDB::bind_method(_MD("_input_event"),&GraphNode::_input_event);
+
+ ClassDB::bind_method(_MD("set_slot","idx","enable_left","type_left","color_left","enable_right","type_right","color_right","custom_left","custom_right"),&GraphNode::set_slot,DEFVAL(Ref<Texture>()),DEFVAL(Ref<Texture>()));
+ ClassDB::bind_method(_MD("clear_slot","idx"),&GraphNode::clear_slot);
+ ClassDB::bind_method(_MD("clear_all_slots","idx"),&GraphNode::clear_all_slots);
+ ClassDB::bind_method(_MD("is_slot_enabled_left","idx"),&GraphNode::is_slot_enabled_left);
+ ClassDB::bind_method(_MD("get_slot_type_left","idx"),&GraphNode::get_slot_type_left);
+ ClassDB::bind_method(_MD("get_slot_color_left","idx"),&GraphNode::get_slot_color_left);
+ ClassDB::bind_method(_MD("is_slot_enabled_right","idx"),&GraphNode::is_slot_enabled_right);
+ ClassDB::bind_method(_MD("get_slot_type_right","idx"),&GraphNode::get_slot_type_right);
+ ClassDB::bind_method(_MD("get_slot_color_right","idx"),&GraphNode::get_slot_color_right);
+
+ ClassDB::bind_method(_MD("set_offset","offset"),&GraphNode::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&GraphNode::get_offset);
+
+ ClassDB::bind_method(_MD("set_comment","comment"),&GraphNode::set_comment);
+ ClassDB::bind_method(_MD("is_comment"),&GraphNode::is_comment);
+
+ ClassDB::bind_method(_MD("set_resizeable","resizeable"),&GraphNode::set_resizeable);
+ ClassDB::bind_method(_MD("is_resizeable"),&GraphNode::is_resizeable);
+
+ ClassDB::bind_method(_MD("set_selected","selected"),&GraphNode::set_selected);
+ ClassDB::bind_method(_MD("is_selected"),&GraphNode::is_selected);
+
+ ClassDB::bind_method(_MD("get_connection_output_count"),&GraphNode::get_connection_output_count);
+ ClassDB::bind_method(_MD("get_connection_input_count"),&GraphNode::get_connection_input_count);
+
+ ClassDB::bind_method(_MD("get_connection_output_pos","idx"),&GraphNode::get_connection_output_pos);
+ ClassDB::bind_method(_MD("get_connection_output_type","idx"),&GraphNode::get_connection_output_type);
+ ClassDB::bind_method(_MD("get_connection_output_color","idx"),&GraphNode::get_connection_output_color);
+ ClassDB::bind_method(_MD("get_connection_input_pos","idx"),&GraphNode::get_connection_input_pos);
+ ClassDB::bind_method(_MD("get_connection_input_type","idx"),&GraphNode::get_connection_input_type);
+ ClassDB::bind_method(_MD("get_connection_input_color","idx"),&GraphNode::get_connection_input_color);
+
+ ClassDB::bind_method(_MD("set_modulate","color"),&GraphNode::set_modulate);
+ ClassDB::bind_method(_MD("get_modulate"),&GraphNode::get_modulate);
+
+ ClassDB::bind_method(_MD("set_show_close_button","show"),&GraphNode::set_show_close_button);
+ ClassDB::bind_method(_MD("is_close_button_visible"),&GraphNode::is_close_button_visible);
+
+ ClassDB::bind_method(_MD("set_overlay","overlay"),&GraphNode::set_overlay);
+ ClassDB::bind_method(_MD("get_overlay"),&GraphNode::get_overlay);
ADD_PROPERTY( PropertyInfo(Variant::STRING,"title"),_SCS("set_title"),_SCS("get_title"));
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"show_close"),_SCS("set_show_close_button"),_SCS("is_close_button_visible"));
diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h
index 0e9223d599..5d90a006e6 100644
--- a/scene/gui/graph_node.h
+++ b/scene/gui/graph_node.h
@@ -33,7 +33,7 @@
class GraphNode : public Container {
- OBJ_TYPE(GraphNode,Container);
+ GDCLASS(GraphNode,Container);
public:
enum Overlay {
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp
index debc8e6f29..13cb972a19 100644
--- a/scene/gui/grid_container.cpp
+++ b/scene/gui/grid_container.cpp
@@ -170,8 +170,8 @@ int GridContainer::get_columns() const{
void GridContainer::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_columns","columns"),&GridContainer::set_columns);
- ObjectTypeDB::bind_method(_MD("get_columns"),&GridContainer::get_columns);
+ ClassDB::bind_method(_MD("set_columns","columns"),&GridContainer::set_columns);
+ ClassDB::bind_method(_MD("get_columns"),&GridContainer::get_columns);
ADD_PROPERTY( PropertyInfo(Variant::INT,"columns",PROPERTY_HINT_RANGE,"1,1024,1"),_SCS("set_columns"),_SCS("get_columns"));
}
diff --git a/scene/gui/grid_container.h b/scene/gui/grid_container.h
index 7cf7cb7117..cc1d04cdb2 100644
--- a/scene/gui/grid_container.h
+++ b/scene/gui/grid_container.h
@@ -33,7 +33,7 @@
class GridContainer : public Container {
- OBJ_TYPE(GridContainer,Container);
+ GDCLASS(GridContainer,Container);
int columns;
protected:
diff --git a/scene/gui/input_action.cpp b/scene/gui/input_action.cpp
index c4e7a75298..501f39a7c2 100644
--- a/scene/gui/input_action.cpp
+++ b/scene/gui/input_action.cpp
@@ -109,13 +109,13 @@ bool ShortCut::is_valid() const {
void ShortCut::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_shortcut","event"),&ShortCut::set_shortcut);
- ObjectTypeDB::bind_method(_MD("get_shortcut"),&ShortCut::get_shortcut);
+ ClassDB::bind_method(_MD("set_shortcut","event"),&ShortCut::set_shortcut);
+ ClassDB::bind_method(_MD("get_shortcut"),&ShortCut::get_shortcut);
- ObjectTypeDB::bind_method(_MD("is_valid"),&ShortCut::is_valid);
+ ClassDB::bind_method(_MD("is_valid"),&ShortCut::is_valid);
- ObjectTypeDB::bind_method(_MD("is_shortcut","event"),&ShortCut::is_shortcut);
- ObjectTypeDB::bind_method(_MD("get_as_text"),&ShortCut::get_as_text);
+ ClassDB::bind_method(_MD("is_shortcut","event"),&ShortCut::is_shortcut);
+ ClassDB::bind_method(_MD("get_as_text"),&ShortCut::get_as_text);
ADD_PROPERTY(PropertyInfo(Variant::INPUT_EVENT,"shortcut"),_SCS("set_shortcut"),_SCS("get_shortcut"));
}
diff --git a/scene/gui/input_action.h b/scene/gui/input_action.h
index 8e0e1ef0bd..a83b3a70cd 100644
--- a/scene/gui/input_action.h
+++ b/scene/gui/input_action.h
@@ -5,7 +5,7 @@
class ShortCut : public Resource {
- OBJ_TYPE(ShortCut,Resource);
+ GDCLASS(ShortCut,Resource);
InputEvent shortcut;
protected:
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 22a4f133b4..af4751b1a8 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1285,83 +1285,83 @@ Vector<int> ItemList::get_selected_items() {
void ItemList::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("add_item","text","icon:Texture","selectable"),&ItemList::add_item,DEFVAL(Variant()),DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("add_icon_item","icon:Texture","selectable"),&ItemList::add_icon_item,DEFVAL(true));
+ ClassDB::bind_method(_MD("add_item","text","icon:Texture","selectable"),&ItemList::add_item,DEFVAL(Variant()),DEFVAL(true));
+ ClassDB::bind_method(_MD("add_icon_item","icon:Texture","selectable"),&ItemList::add_icon_item,DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("set_item_text","idx","text"),&ItemList::set_item_text);
- ObjectTypeDB::bind_method(_MD("get_item_text","idx"),&ItemList::get_item_text);
+ ClassDB::bind_method(_MD("set_item_text","idx","text"),&ItemList::set_item_text);
+ ClassDB::bind_method(_MD("get_item_text","idx"),&ItemList::get_item_text);
- ObjectTypeDB::bind_method(_MD("set_item_icon","idx","icon:Texture"),&ItemList::set_item_icon);
- ObjectTypeDB::bind_method(_MD("get_item_icon:Texture","idx"),&ItemList::get_item_icon);
+ ClassDB::bind_method(_MD("set_item_icon","idx","icon:Texture"),&ItemList::set_item_icon);
+ ClassDB::bind_method(_MD("get_item_icon:Texture","idx"),&ItemList::get_item_icon);
- ObjectTypeDB::bind_method(_MD("set_item_icon_region","idx","rect"),&ItemList::set_item_icon_region);
- ObjectTypeDB::bind_method(_MD("get_item_icon_region","idx"),&ItemList::get_item_icon_region);
+ ClassDB::bind_method(_MD("set_item_icon_region","idx","rect"),&ItemList::set_item_icon_region);
+ ClassDB::bind_method(_MD("get_item_icon_region","idx"),&ItemList::get_item_icon_region);
- ObjectTypeDB::bind_method(_MD("set_item_selectable","idx","selectable"),&ItemList::set_item_selectable);
- ObjectTypeDB::bind_method(_MD("is_item_selectable","idx"),&ItemList::is_item_selectable);
+ ClassDB::bind_method(_MD("set_item_selectable","idx","selectable"),&ItemList::set_item_selectable);
+ ClassDB::bind_method(_MD("is_item_selectable","idx"),&ItemList::is_item_selectable);
- ObjectTypeDB::bind_method(_MD("set_item_disabled","idx","disabled"),&ItemList::set_item_disabled);
- ObjectTypeDB::bind_method(_MD("is_item_disabled","idx"),&ItemList::is_item_disabled);
+ ClassDB::bind_method(_MD("set_item_disabled","idx","disabled"),&ItemList::set_item_disabled);
+ ClassDB::bind_method(_MD("is_item_disabled","idx"),&ItemList::is_item_disabled);
- ObjectTypeDB::bind_method(_MD("set_item_metadata","idx","metadata"),&ItemList::set_item_metadata);
- ObjectTypeDB::bind_method(_MD("get_item_metadata","idx"),&ItemList::get_item_metadata);
+ ClassDB::bind_method(_MD("set_item_metadata","idx","metadata"),&ItemList::set_item_metadata);
+ ClassDB::bind_method(_MD("get_item_metadata","idx"),&ItemList::get_item_metadata);
- ObjectTypeDB::bind_method(_MD("set_item_custom_bg_color","idx","custom_bg_color"),&ItemList::set_item_custom_bg_color);
- ObjectTypeDB::bind_method(_MD("get_item_custom_bg_color","idx"),&ItemList::get_item_custom_bg_color);
+ ClassDB::bind_method(_MD("set_item_custom_bg_color","idx","custom_bg_color"),&ItemList::set_item_custom_bg_color);
+ ClassDB::bind_method(_MD("get_item_custom_bg_color","idx"),&ItemList::get_item_custom_bg_color);
- ObjectTypeDB::bind_method(_MD("set_item_tooltip_enabled","idx","enable"),&ItemList::set_item_tooltip_enabled);
- ObjectTypeDB::bind_method(_MD("is_item_tooltip_enabled","idx"),&ItemList::is_item_tooltip_enabled);
+ ClassDB::bind_method(_MD("set_item_tooltip_enabled","idx","enable"),&ItemList::set_item_tooltip_enabled);
+ ClassDB::bind_method(_MD("is_item_tooltip_enabled","idx"),&ItemList::is_item_tooltip_enabled);
- ObjectTypeDB::bind_method(_MD("set_item_tooltip","idx","tooltip"),&ItemList::set_item_tooltip);
- ObjectTypeDB::bind_method(_MD("get_item_tooltip","idx"),&ItemList::get_item_tooltip);
+ ClassDB::bind_method(_MD("set_item_tooltip","idx","tooltip"),&ItemList::set_item_tooltip);
+ ClassDB::bind_method(_MD("get_item_tooltip","idx"),&ItemList::get_item_tooltip);
- ObjectTypeDB::bind_method(_MD("select","idx","single"),&ItemList::select,DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("unselect","idx"),&ItemList::unselect);
- ObjectTypeDB::bind_method(_MD("is_selected","idx"),&ItemList::is_selected);
- ObjectTypeDB::bind_method(_MD("get_selected_items"),&ItemList::get_selected_items);
+ ClassDB::bind_method(_MD("select","idx","single"),&ItemList::select,DEFVAL(true));
+ ClassDB::bind_method(_MD("unselect","idx"),&ItemList::unselect);
+ ClassDB::bind_method(_MD("is_selected","idx"),&ItemList::is_selected);
+ ClassDB::bind_method(_MD("get_selected_items"),&ItemList::get_selected_items);
- ObjectTypeDB::bind_method(_MD("get_item_count"),&ItemList::get_item_count);
- ObjectTypeDB::bind_method(_MD("remove_item","idx"),&ItemList::remove_item);
+ ClassDB::bind_method(_MD("get_item_count"),&ItemList::get_item_count);
+ ClassDB::bind_method(_MD("remove_item","idx"),&ItemList::remove_item);
- ObjectTypeDB::bind_method(_MD("clear"),&ItemList::clear);
- ObjectTypeDB::bind_method(_MD("sort_items_by_text"),&ItemList::sort_items_by_text);
+ ClassDB::bind_method(_MD("clear"),&ItemList::clear);
+ ClassDB::bind_method(_MD("sort_items_by_text"),&ItemList::sort_items_by_text);
- ObjectTypeDB::bind_method(_MD("set_fixed_column_width","width"),&ItemList::set_fixed_column_width);
- ObjectTypeDB::bind_method(_MD("get_fixed_column_width"),&ItemList::get_fixed_column_width);
+ ClassDB::bind_method(_MD("set_fixed_column_width","width"),&ItemList::set_fixed_column_width);
+ ClassDB::bind_method(_MD("get_fixed_column_width"),&ItemList::get_fixed_column_width);
- ObjectTypeDB::bind_method(_MD("set_same_column_width","enable"),&ItemList::set_same_column_width);
- ObjectTypeDB::bind_method(_MD("is_same_column_width"),&ItemList::is_same_column_width);
+ ClassDB::bind_method(_MD("set_same_column_width","enable"),&ItemList::set_same_column_width);
+ ClassDB::bind_method(_MD("is_same_column_width"),&ItemList::is_same_column_width);
- ObjectTypeDB::bind_method(_MD("set_max_text_lines","lines"),&ItemList::set_max_text_lines);
- ObjectTypeDB::bind_method(_MD("get_max_text_lines"),&ItemList::get_max_text_lines);
+ ClassDB::bind_method(_MD("set_max_text_lines","lines"),&ItemList::set_max_text_lines);
+ ClassDB::bind_method(_MD("get_max_text_lines"),&ItemList::get_max_text_lines);
- ObjectTypeDB::bind_method(_MD("set_max_columns","amount"),&ItemList::set_max_columns);
- ObjectTypeDB::bind_method(_MD("get_max_columns"),&ItemList::get_max_columns);
+ ClassDB::bind_method(_MD("set_max_columns","amount"),&ItemList::set_max_columns);
+ ClassDB::bind_method(_MD("get_max_columns"),&ItemList::get_max_columns);
- ObjectTypeDB::bind_method(_MD("set_select_mode","mode"),&ItemList::set_select_mode);
- ObjectTypeDB::bind_method(_MD("get_select_mode"),&ItemList::get_select_mode);
+ ClassDB::bind_method(_MD("set_select_mode","mode"),&ItemList::set_select_mode);
+ ClassDB::bind_method(_MD("get_select_mode"),&ItemList::get_select_mode);
- ObjectTypeDB::bind_method(_MD("set_icon_mode","mode"),&ItemList::set_icon_mode);
- ObjectTypeDB::bind_method(_MD("get_icon_mode"),&ItemList::get_icon_mode);
+ ClassDB::bind_method(_MD("set_icon_mode","mode"),&ItemList::set_icon_mode);
+ ClassDB::bind_method(_MD("get_icon_mode"),&ItemList::get_icon_mode);
- ObjectTypeDB::bind_method(_MD("set_fixed_icon_size","size"),&ItemList::set_fixed_icon_size);
- ObjectTypeDB::bind_method(_MD("get_fixed_icon_size"),&ItemList::get_fixed_icon_size);
+ ClassDB::bind_method(_MD("set_fixed_icon_size","size"),&ItemList::set_fixed_icon_size);
+ ClassDB::bind_method(_MD("get_fixed_icon_size"),&ItemList::get_fixed_icon_size);
- ObjectTypeDB::bind_method(_MD("set_icon_scale","scale"),&ItemList::set_icon_scale);
- ObjectTypeDB::bind_method(_MD("get_icon_scale"),&ItemList::get_icon_scale);
+ ClassDB::bind_method(_MD("set_icon_scale","scale"),&ItemList::set_icon_scale);
+ ClassDB::bind_method(_MD("get_icon_scale"),&ItemList::get_icon_scale);
- ObjectTypeDB::bind_method(_MD("set_allow_rmb_select","allow"),&ItemList::set_allow_rmb_select);
- ObjectTypeDB::bind_method(_MD("get_allow_rmb_select"),&ItemList::get_allow_rmb_select);
+ ClassDB::bind_method(_MD("set_allow_rmb_select","allow"),&ItemList::set_allow_rmb_select);
+ ClassDB::bind_method(_MD("get_allow_rmb_select"),&ItemList::get_allow_rmb_select);
- ObjectTypeDB::bind_method(_MD("get_item_at_pos","pos","exact"),&ItemList::get_item_at_pos,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_item_at_pos","pos","exact"),&ItemList::get_item_at_pos,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("ensure_current_is_visible"),&ItemList::ensure_current_is_visible);
+ ClassDB::bind_method(_MD("ensure_current_is_visible"),&ItemList::ensure_current_is_visible);
- ObjectTypeDB::bind_method(_MD("get_v_scroll"),&ItemList::get_v_scroll);
+ ClassDB::bind_method(_MD("get_v_scroll"),&ItemList::get_v_scroll);
- ObjectTypeDB::bind_method(_MD("_scroll_changed"),&ItemList::_scroll_changed);
- ObjectTypeDB::bind_method(_MD("_input_event"),&ItemList::_input_event);
+ ClassDB::bind_method(_MD("_scroll_changed"),&ItemList::_scroll_changed);
+ ClassDB::bind_method(_MD("_input_event"),&ItemList::_input_event);
BIND_CONSTANT( ICON_MODE_TOP );
BIND_CONSTANT( ICON_MODE_LEFT );
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index acafc88fb1..d3db209ceb 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -34,7 +34,7 @@
class ItemList : public Control {
- OBJ_TYPE( ItemList, Control );
+ GDCLASS( ItemList, Control );
public:
enum IconMode {
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 29d40e0d5e..03a0219e98 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -641,30 +641,30 @@ int Label::get_total_character_count() const {
void Label::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_align","align"),&Label::set_align);
- ObjectTypeDB::bind_method(_MD("get_align"),&Label::get_align);
- ObjectTypeDB::bind_method(_MD("set_valign","valign"),&Label::set_valign);
- ObjectTypeDB::bind_method(_MD("get_valign"),&Label::get_valign);
- ObjectTypeDB::bind_method(_MD("set_text","text"),&Label::set_text);
- ObjectTypeDB::bind_method(_MD("get_text"),&Label::get_text);
- ObjectTypeDB::bind_method(_MD("set_autowrap","enable"),&Label::set_autowrap);
- ObjectTypeDB::bind_method(_MD("has_autowrap"),&Label::has_autowrap);
- ObjectTypeDB::bind_method(_MD("set_clip_text","enable"),&Label::set_clip_text);
- ObjectTypeDB::bind_method(_MD("is_clipping_text"),&Label::is_clipping_text);
- ObjectTypeDB::bind_method(_MD("set_uppercase","enable"),&Label::set_uppercase);
- ObjectTypeDB::bind_method(_MD("is_uppercase"),&Label::is_uppercase);
- ObjectTypeDB::bind_method(_MD("get_line_height"),&Label::get_line_height);
- ObjectTypeDB::bind_method(_MD("get_line_count"),&Label::get_line_count);
- ObjectTypeDB::bind_method(_MD("get_visible_line_count"),&Label::get_visible_line_count);
- ObjectTypeDB::bind_method(_MD("get_total_character_count"),&Label::get_total_character_count);
- ObjectTypeDB::bind_method(_MD("set_visible_characters","amount"),&Label::set_visible_characters);
- ObjectTypeDB::bind_method(_MD("get_visible_characters"),&Label::get_visible_characters);
- ObjectTypeDB::bind_method(_MD("set_percent_visible","percent_visible"),&Label::set_percent_visible);
- ObjectTypeDB::bind_method(_MD("get_percent_visible"),&Label::get_percent_visible);
- ObjectTypeDB::bind_method(_MD("set_lines_skipped","lines_skipped"),&Label::set_lines_skipped);
- ObjectTypeDB::bind_method(_MD("get_lines_skipped"),&Label::get_lines_skipped);
- ObjectTypeDB::bind_method(_MD("set_max_lines_visible","lines_visible"),&Label::set_max_lines_visible);
- ObjectTypeDB::bind_method(_MD("get_max_lines_visible"),&Label::get_max_lines_visible);
+ ClassDB::bind_method(_MD("set_align","align"),&Label::set_align);
+ ClassDB::bind_method(_MD("get_align"),&Label::get_align);
+ ClassDB::bind_method(_MD("set_valign","valign"),&Label::set_valign);
+ ClassDB::bind_method(_MD("get_valign"),&Label::get_valign);
+ ClassDB::bind_method(_MD("set_text","text"),&Label::set_text);
+ ClassDB::bind_method(_MD("get_text"),&Label::get_text);
+ ClassDB::bind_method(_MD("set_autowrap","enable"),&Label::set_autowrap);
+ ClassDB::bind_method(_MD("has_autowrap"),&Label::has_autowrap);
+ ClassDB::bind_method(_MD("set_clip_text","enable"),&Label::set_clip_text);
+ ClassDB::bind_method(_MD("is_clipping_text"),&Label::is_clipping_text);
+ ClassDB::bind_method(_MD("set_uppercase","enable"),&Label::set_uppercase);
+ ClassDB::bind_method(_MD("is_uppercase"),&Label::is_uppercase);
+ ClassDB::bind_method(_MD("get_line_height"),&Label::get_line_height);
+ ClassDB::bind_method(_MD("get_line_count"),&Label::get_line_count);
+ ClassDB::bind_method(_MD("get_visible_line_count"),&Label::get_visible_line_count);
+ ClassDB::bind_method(_MD("get_total_character_count"),&Label::get_total_character_count);
+ ClassDB::bind_method(_MD("set_visible_characters","amount"),&Label::set_visible_characters);
+ ClassDB::bind_method(_MD("get_visible_characters"),&Label::get_visible_characters);
+ ClassDB::bind_method(_MD("set_percent_visible","percent_visible"),&Label::set_percent_visible);
+ ClassDB::bind_method(_MD("get_percent_visible"),&Label::get_percent_visible);
+ ClassDB::bind_method(_MD("set_lines_skipped","lines_skipped"),&Label::set_lines_skipped);
+ ClassDB::bind_method(_MD("get_lines_skipped"),&Label::get_lines_skipped);
+ ClassDB::bind_method(_MD("set_max_lines_visible","lines_visible"),&Label::set_max_lines_visible);
+ ClassDB::bind_method(_MD("get_max_lines_visible"),&Label::get_max_lines_visible);
BIND_CONSTANT( ALIGN_LEFT );
BIND_CONSTANT( ALIGN_CENTER );
diff --git a/scene/gui/label.h b/scene/gui/label.h
index bd531f7c9c..8a166bbe52 100644
--- a/scene/gui/label.h
+++ b/scene/gui/label.h
@@ -35,7 +35,7 @@
*/
class Label : public Control {
- OBJ_TYPE( Label, Control );
+ GDCLASS( Label, Control );
public:
enum Align {
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index d6319cf15e..fa0e067ced 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -1258,42 +1258,42 @@ void LineEdit::_text_changed() {
void LineEdit::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_toggle_draw_caret"),&LineEdit::_toggle_draw_caret);
+ ClassDB::bind_method(_MD("_toggle_draw_caret"),&LineEdit::_toggle_draw_caret);
#ifdef TOOLS_ENABLED
- ObjectTypeDB::bind_method("_editor_settings_changed",&LineEdit::_editor_settings_changed);
+ ClassDB::bind_method("_editor_settings_changed",&LineEdit::_editor_settings_changed);
#endif
- ObjectTypeDB::bind_method(_MD("set_align", "align"), &LineEdit::set_align);
- ObjectTypeDB::bind_method(_MD("get_align"), &LineEdit::get_align);
-
- ObjectTypeDB::bind_method(_MD("_input_event"),&LineEdit::_input_event);
- ObjectTypeDB::bind_method(_MD("clear"),&LineEdit::clear);
- ObjectTypeDB::bind_method(_MD("select_all"),&LineEdit::select_all);
- ObjectTypeDB::bind_method(_MD("set_text","text"),&LineEdit::set_text);
- ObjectTypeDB::bind_method(_MD("get_text"),&LineEdit::get_text);
- ObjectTypeDB::bind_method(_MD("set_placeholder","text"),&LineEdit::set_placeholder);
- ObjectTypeDB::bind_method(_MD("get_placeholder"),&LineEdit::get_placeholder);
- ObjectTypeDB::bind_method(_MD("set_placeholder_alpha","alpha"),&LineEdit::set_placeholder_alpha);
- ObjectTypeDB::bind_method(_MD("get_placeholder_alpha"),&LineEdit::get_placeholder_alpha);
- ObjectTypeDB::bind_method(_MD("set_cursor_pos","pos"),&LineEdit::set_cursor_pos);
- ObjectTypeDB::bind_method(_MD("get_cursor_pos"),&LineEdit::get_cursor_pos);
- ObjectTypeDB::bind_method(_MD("set_expand_to_text_length","enabled"),&LineEdit::set_expand_to_text_length);
- ObjectTypeDB::bind_method(_MD("get_expand_to_text_length"),&LineEdit::get_expand_to_text_length);
- ObjectTypeDB::bind_method(_MD("cursor_set_blink_enabled", "enabled"),&LineEdit::cursor_set_blink_enabled);
- ObjectTypeDB::bind_method(_MD("cursor_get_blink_enabled"),&LineEdit::cursor_get_blink_enabled);
- ObjectTypeDB::bind_method(_MD("cursor_set_blink_speed", "blink_speed"),&LineEdit::cursor_set_blink_speed);
- ObjectTypeDB::bind_method(_MD("cursor_get_blink_speed"),&LineEdit::cursor_get_blink_speed);
- ObjectTypeDB::bind_method(_MD("set_max_length","chars"),&LineEdit::set_max_length);
- ObjectTypeDB::bind_method(_MD("get_max_length"),&LineEdit::get_max_length);
- ObjectTypeDB::bind_method(_MD("append_at_cursor","text"),&LineEdit::append_at_cursor);
- ObjectTypeDB::bind_method(_MD("set_editable","enabled"),&LineEdit::set_editable);
- ObjectTypeDB::bind_method(_MD("is_editable"),&LineEdit::is_editable);
- ObjectTypeDB::bind_method(_MD("set_secret","enabled"),&LineEdit::set_secret);
- ObjectTypeDB::bind_method(_MD("is_secret"),&LineEdit::is_secret);
- ObjectTypeDB::bind_method(_MD("select","from","to"),&LineEdit::select,DEFVAL(0),DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("menu_option","option"),&LineEdit::menu_option);
- ObjectTypeDB::bind_method(_MD("get_menu:PopupMenu"),&LineEdit::get_menu);
+ ClassDB::bind_method(_MD("set_align", "align"), &LineEdit::set_align);
+ ClassDB::bind_method(_MD("get_align"), &LineEdit::get_align);
+
+ ClassDB::bind_method(_MD("_input_event"),&LineEdit::_input_event);
+ ClassDB::bind_method(_MD("clear"),&LineEdit::clear);
+ ClassDB::bind_method(_MD("select_all"),&LineEdit::select_all);
+ ClassDB::bind_method(_MD("set_text","text"),&LineEdit::set_text);
+ ClassDB::bind_method(_MD("get_text"),&LineEdit::get_text);
+ ClassDB::bind_method(_MD("set_placeholder","text"),&LineEdit::set_placeholder);
+ ClassDB::bind_method(_MD("get_placeholder"),&LineEdit::get_placeholder);
+ ClassDB::bind_method(_MD("set_placeholder_alpha","alpha"),&LineEdit::set_placeholder_alpha);
+ ClassDB::bind_method(_MD("get_placeholder_alpha"),&LineEdit::get_placeholder_alpha);
+ ClassDB::bind_method(_MD("set_cursor_pos","pos"),&LineEdit::set_cursor_pos);
+ ClassDB::bind_method(_MD("get_cursor_pos"),&LineEdit::get_cursor_pos);
+ ClassDB::bind_method(_MD("set_expand_to_text_length","enabled"),&LineEdit::set_expand_to_text_length);
+ ClassDB::bind_method(_MD("get_expand_to_text_length"),&LineEdit::get_expand_to_text_length);
+ ClassDB::bind_method(_MD("cursor_set_blink_enabled", "enabled"),&LineEdit::cursor_set_blink_enabled);
+ ClassDB::bind_method(_MD("cursor_get_blink_enabled"),&LineEdit::cursor_get_blink_enabled);
+ ClassDB::bind_method(_MD("cursor_set_blink_speed", "blink_speed"),&LineEdit::cursor_set_blink_speed);
+ ClassDB::bind_method(_MD("cursor_get_blink_speed"),&LineEdit::cursor_get_blink_speed);
+ ClassDB::bind_method(_MD("set_max_length","chars"),&LineEdit::set_max_length);
+ ClassDB::bind_method(_MD("get_max_length"),&LineEdit::get_max_length);
+ ClassDB::bind_method(_MD("append_at_cursor","text"),&LineEdit::append_at_cursor);
+ ClassDB::bind_method(_MD("set_editable","enabled"),&LineEdit::set_editable);
+ ClassDB::bind_method(_MD("is_editable"),&LineEdit::is_editable);
+ ClassDB::bind_method(_MD("set_secret","enabled"),&LineEdit::set_secret);
+ ClassDB::bind_method(_MD("is_secret"),&LineEdit::is_secret);
+ ClassDB::bind_method(_MD("select","from","to"),&LineEdit::select,DEFVAL(0),DEFVAL(-1));
+ ClassDB::bind_method(_MD("menu_option","option"),&LineEdit::menu_option);
+ ClassDB::bind_method(_MD("get_menu:PopupMenu"),&LineEdit::get_menu);
ADD_SIGNAL( MethodInfo("text_changed", PropertyInfo( Variant::STRING, "text" )) );
ADD_SIGNAL( MethodInfo("text_entered", PropertyInfo( Variant::STRING, "text" )) );
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index d97e234823..46ca472d6f 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -37,7 +37,7 @@
*/
class LineEdit : public Control {
- OBJ_TYPE( LineEdit, Control );
+ GDCLASS( LineEdit, Control );
public:
enum Align {
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index a547521ef9..5b791064a8 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -130,11 +130,11 @@ void LinkButton::_notification(int p_what) {
void LinkButton::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_text","text"),&LinkButton::set_text);
- ObjectTypeDB::bind_method(_MD("get_text"),&LinkButton::get_text);
+ ClassDB::bind_method(_MD("set_text","text"),&LinkButton::set_text);
+ ClassDB::bind_method(_MD("get_text"),&LinkButton::get_text);
- ObjectTypeDB::bind_method(_MD("set_underline_mode","underline_mode"),&LinkButton::set_underline_mode);
- ObjectTypeDB::bind_method(_MD("get_underline_mode"),&LinkButton::get_underline_mode);
+ ClassDB::bind_method(_MD("set_underline_mode","underline_mode"),&LinkButton::set_underline_mode);
+ ClassDB::bind_method(_MD("get_underline_mode"),&LinkButton::get_underline_mode);
BIND_CONSTANT( UNDERLINE_MODE_ALWAYS );
diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h
index 992daf2564..42d7c05cff 100644
--- a/scene/gui/link_button.h
+++ b/scene/gui/link_button.h
@@ -35,7 +35,7 @@
class LinkButton : public BaseButton {
- OBJ_TYPE( LinkButton, BaseButton );
+ GDCLASS( LinkButton, BaseButton );
public:
enum UnderlineMode {
diff --git a/scene/gui/margin_container.h b/scene/gui/margin_container.h
index 1959fcaecc..542578dd01 100644
--- a/scene/gui/margin_container.h
+++ b/scene/gui/margin_container.h
@@ -32,7 +32,7 @@
#include "scene/gui/container.h"
class MarginContainer : public Container {
- OBJ_TYPE(MarginContainer,Container);
+ GDCLASS(MarginContainer,Container);
protected:
void _notification(int p_what);
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 1ba54f2181..44d315eedc 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -100,10 +100,10 @@ void MenuButton::_set_items(const Array& p_items) {
void MenuButton::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_popup:PopupMenu"),&MenuButton::get_popup);
- ObjectTypeDB::bind_method(_MD("_unhandled_key_input"),&MenuButton::_unhandled_key_input);
- ObjectTypeDB::bind_method(_MD("_set_items"),&MenuButton::_set_items);
- ObjectTypeDB::bind_method(_MD("_get_items"),&MenuButton::_get_items);
+ ClassDB::bind_method(_MD("get_popup:PopupMenu"),&MenuButton::get_popup);
+ ClassDB::bind_method(_MD("_unhandled_key_input"),&MenuButton::_unhandled_key_input);
+ ClassDB::bind_method(_MD("_set_items"),&MenuButton::_set_items);
+ ClassDB::bind_method(_MD("_get_items"),&MenuButton::_get_items);
ADD_PROPERTY( PropertyInfo(Variant::ARRAY,"items",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_items"),_SCS("_get_items") );
diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h
index 865d6df55d..274f494fb5 100644
--- a/scene/gui/menu_button.h
+++ b/scene/gui/menu_button.h
@@ -36,7 +36,7 @@
*/
class MenuButton : public Button {
- OBJ_TYPE( MenuButton, Button );
+ GDCLASS( MenuButton, Button );
bool clicked;
PopupMenu *popup;
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index d74c03a219..010cacc14b 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -287,32 +287,32 @@ void OptionButton::get_translatable_strings(List<String> *p_strings) const {
void OptionButton::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_selected"),&OptionButton::_selected);
-
- ObjectTypeDB::bind_method(_MD("add_item","label","id"),&OptionButton::add_item,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("add_icon_item","texture:Texture","label","id"),&OptionButton::add_icon_item);
- ObjectTypeDB::bind_method(_MD("set_item_text","idx","text"),&OptionButton::set_item_text);
- ObjectTypeDB::bind_method(_MD("set_item_icon","idx","texture:Texture"),&OptionButton::set_item_icon);
- ObjectTypeDB::bind_method(_MD("set_item_disabled","idx","disabled"),&OptionButton::set_item_disabled);
- ObjectTypeDB::bind_method(_MD("set_item_ID","idx","id"),&OptionButton::set_item_ID);
- ObjectTypeDB::bind_method(_MD("set_item_metadata","idx","metadata"),&OptionButton::set_item_metadata);
- ObjectTypeDB::bind_method(_MD("get_item_text","idx"),&OptionButton::get_item_text);
- ObjectTypeDB::bind_method(_MD("get_item_icon:Texture","idx"),&OptionButton::get_item_icon);
- ObjectTypeDB::bind_method(_MD("get_item_ID","idx"),&OptionButton::get_item_ID);
- ObjectTypeDB::bind_method(_MD("get_item_metadata","idx"),&OptionButton::get_item_metadata);
- ObjectTypeDB::bind_method(_MD("is_item_disabled","idx"),&OptionButton::is_item_disabled);
- ObjectTypeDB::bind_method(_MD("get_item_count"),&OptionButton::get_item_count);
- ObjectTypeDB::bind_method(_MD("add_separator"),&OptionButton::add_separator);
- ObjectTypeDB::bind_method(_MD("clear"),&OptionButton::clear);
- ObjectTypeDB::bind_method(_MD("select","idx"),&OptionButton::select);
- ObjectTypeDB::bind_method(_MD("get_selected"),&OptionButton::get_selected);
- ObjectTypeDB::bind_method(_MD("get_selected_ID"),&OptionButton::get_selected_ID);
- ObjectTypeDB::bind_method(_MD("get_selected_metadata"),&OptionButton::get_selected_metadata);
- ObjectTypeDB::bind_method(_MD("remove_item","idx"),&OptionButton::remove_item);
- ObjectTypeDB::bind_method(_MD("_select_int"),&OptionButton::_select_int);
-
- ObjectTypeDB::bind_method(_MD("_set_items"),&OptionButton::_set_items);
- ObjectTypeDB::bind_method(_MD("_get_items"),&OptionButton::_get_items);
+ ClassDB::bind_method(_MD("_selected"),&OptionButton::_selected);
+
+ ClassDB::bind_method(_MD("add_item","label","id"),&OptionButton::add_item,DEFVAL(-1));
+ ClassDB::bind_method(_MD("add_icon_item","texture:Texture","label","id"),&OptionButton::add_icon_item);
+ ClassDB::bind_method(_MD("set_item_text","idx","text"),&OptionButton::set_item_text);
+ ClassDB::bind_method(_MD("set_item_icon","idx","texture:Texture"),&OptionButton::set_item_icon);
+ ClassDB::bind_method(_MD("set_item_disabled","idx","disabled"),&OptionButton::set_item_disabled);
+ ClassDB::bind_method(_MD("set_item_ID","idx","id"),&OptionButton::set_item_ID);
+ ClassDB::bind_method(_MD("set_item_metadata","idx","metadata"),&OptionButton::set_item_metadata);
+ ClassDB::bind_method(_MD("get_item_text","idx"),&OptionButton::get_item_text);
+ ClassDB::bind_method(_MD("get_item_icon:Texture","idx"),&OptionButton::get_item_icon);
+ ClassDB::bind_method(_MD("get_item_ID","idx"),&OptionButton::get_item_ID);
+ ClassDB::bind_method(_MD("get_item_metadata","idx"),&OptionButton::get_item_metadata);
+ ClassDB::bind_method(_MD("is_item_disabled","idx"),&OptionButton::is_item_disabled);
+ ClassDB::bind_method(_MD("get_item_count"),&OptionButton::get_item_count);
+ ClassDB::bind_method(_MD("add_separator"),&OptionButton::add_separator);
+ ClassDB::bind_method(_MD("clear"),&OptionButton::clear);
+ ClassDB::bind_method(_MD("select","idx"),&OptionButton::select);
+ ClassDB::bind_method(_MD("get_selected"),&OptionButton::get_selected);
+ ClassDB::bind_method(_MD("get_selected_ID"),&OptionButton::get_selected_ID);
+ ClassDB::bind_method(_MD("get_selected_metadata"),&OptionButton::get_selected_metadata);
+ ClassDB::bind_method(_MD("remove_item","idx"),&OptionButton::remove_item);
+ ClassDB::bind_method(_MD("_select_int"),&OptionButton::_select_int);
+
+ ClassDB::bind_method(_MD("_set_items"),&OptionButton::_set_items);
+ ClassDB::bind_method(_MD("_get_items"),&OptionButton::_get_items);
ADD_PROPERTY( PropertyInfo(Variant::INT,"selected"), _SCS("_select_int"),_SCS("get_selected") );
ADD_PROPERTY( PropertyInfo(Variant::ARRAY,"items",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_items"),_SCS("_get_items") );
diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h
index 3dd0571516..681cb5a088 100644
--- a/scene/gui/option_button.h
+++ b/scene/gui/option_button.h
@@ -36,7 +36,7 @@
*/
class OptionButton : public Button {
- OBJ_TYPE( OptionButton, Button );
+ GDCLASS( OptionButton, Button );
PopupMenu *popup;
int current;
diff --git a/scene/gui/panel.h b/scene/gui/panel.h
index a7c4ece1ab..34c73960e7 100644
--- a/scene/gui/panel.h
+++ b/scene/gui/panel.h
@@ -35,7 +35,7 @@
*/
class Panel : public Control{
- OBJ_TYPE(Panel,Control);
+ GDCLASS(Panel,Control);
protected:
void _notification(int p_what);
diff --git a/scene/gui/panel_container.h b/scene/gui/panel_container.h
index 4ccae197ff..86f390fdf3 100644
--- a/scene/gui/panel_container.h
+++ b/scene/gui/panel_container.h
@@ -33,7 +33,7 @@
class PanelContainer : public Container {
- OBJ_TYPE( PanelContainer, Container );
+ GDCLASS( PanelContainer, Container );
protected:
diff --git a/scene/gui/patch_9_frame.cpp b/scene/gui/patch_9_frame.cpp
index 2553bb952b..72b8369a57 100644
--- a/scene/gui/patch_9_frame.cpp
+++ b/scene/gui/patch_9_frame.cpp
@@ -68,16 +68,16 @@ Size2 Patch9Frame::get_minimum_size() const {
void Patch9Frame::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_texture","texture"), & Patch9Frame::set_texture );
- ObjectTypeDB::bind_method(_MD("get_texture"), & Patch9Frame::get_texture );
- ObjectTypeDB::bind_method(_MD("set_modulate","modulate"), & Patch9Frame::set_modulate );
- ObjectTypeDB::bind_method(_MD("get_modulate"), & Patch9Frame::get_modulate );
- ObjectTypeDB::bind_method(_MD("set_patch_margin","margin","value"), & Patch9Frame::set_patch_margin );
- ObjectTypeDB::bind_method(_MD("get_patch_margin","margin"), & Patch9Frame::get_patch_margin );
- ObjectTypeDB::bind_method(_MD("set_region_rect","rect"),&Patch9Frame::set_region_rect);
- ObjectTypeDB::bind_method(_MD("get_region_rect"),&Patch9Frame::get_region_rect);
- ObjectTypeDB::bind_method(_MD("set_draw_center","draw_center"), & Patch9Frame::set_draw_center );
- ObjectTypeDB::bind_method(_MD("get_draw_center"), & Patch9Frame::get_draw_center );
+ ClassDB::bind_method(_MD("set_texture","texture"), & Patch9Frame::set_texture );
+ ClassDB::bind_method(_MD("get_texture"), & Patch9Frame::get_texture );
+ ClassDB::bind_method(_MD("set_modulate","modulate"), & Patch9Frame::set_modulate );
+ ClassDB::bind_method(_MD("get_modulate"), & Patch9Frame::get_modulate );
+ ClassDB::bind_method(_MD("set_patch_margin","margin","value"), & Patch9Frame::set_patch_margin );
+ ClassDB::bind_method(_MD("get_patch_margin","margin"), & Patch9Frame::get_patch_margin );
+ ClassDB::bind_method(_MD("set_region_rect","rect"),&Patch9Frame::set_region_rect);
+ ClassDB::bind_method(_MD("get_region_rect"),&Patch9Frame::get_region_rect);
+ ClassDB::bind_method(_MD("set_draw_center","draw_center"), & Patch9Frame::set_draw_center );
+ ClassDB::bind_method(_MD("get_draw_center"), & Patch9Frame::get_draw_center );
ADD_SIGNAL(MethodInfo("texture_changed"));
diff --git a/scene/gui/patch_9_frame.h b/scene/gui/patch_9_frame.h
index f9a0294934..f9de022078 100644
--- a/scene/gui/patch_9_frame.h
+++ b/scene/gui/patch_9_frame.h
@@ -35,7 +35,7 @@
*/
class Patch9Frame : public Control {
- OBJ_TYPE(Patch9Frame,Control);
+ GDCLASS(Patch9Frame,Control);
bool draw_center;
int margin[4];
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 5bae2b9748..34e101d017 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -257,12 +257,12 @@ bool Popup::is_exclusive() const {
void Popup::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("popup_centered","size"),&Popup::popup_centered,DEFVAL(Size2()));
- ObjectTypeDB::bind_method(_MD("popup_centered_ratio","ratio"),&Popup::popup_centered_ratio,DEFVAL(0.75));
- ObjectTypeDB::bind_method(_MD("popup_centered_minsize","minsize"),&Popup::popup_centered_minsize,DEFVAL(Size2()));
- ObjectTypeDB::bind_method(_MD("popup"),&Popup::popup);
- ObjectTypeDB::bind_method(_MD("set_exclusive","enable"),&Popup::set_exclusive);
- ObjectTypeDB::bind_method(_MD("is_exclusive"),&Popup::is_exclusive);
+ ClassDB::bind_method(_MD("popup_centered","size"),&Popup::popup_centered,DEFVAL(Size2()));
+ ClassDB::bind_method(_MD("popup_centered_ratio","ratio"),&Popup::popup_centered_ratio,DEFVAL(0.75));
+ ClassDB::bind_method(_MD("popup_centered_minsize","minsize"),&Popup::popup_centered_minsize,DEFVAL(Size2()));
+ ClassDB::bind_method(_MD("popup"),&Popup::popup);
+ ClassDB::bind_method(_MD("set_exclusive","enable"),&Popup::set_exclusive);
+ ClassDB::bind_method(_MD("is_exclusive"),&Popup::is_exclusive);
ADD_SIGNAL( MethodInfo("about_to_show") );
ADD_SIGNAL( MethodInfo("popup_hide") );
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "popup/exclusive"), _SCS("set_exclusive"),_SCS("is_exclusive") );
diff --git a/scene/gui/popup.h b/scene/gui/popup.h
index 05c8198e72..c9b5511630 100644
--- a/scene/gui/popup.h
+++ b/scene/gui/popup.h
@@ -36,7 +36,7 @@
*/
class Popup : public Control {
- OBJ_TYPE( Popup, Control );
+ GDCLASS( Popup, Control );
bool exclusive;
bool popped_up;
@@ -74,7 +74,7 @@ public:
class PopupPanel : public Popup {
- OBJ_TYPE(PopupPanel,Popup);
+ GDCLASS(PopupPanel,Popup);
protected:
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 3cbf18b768..8686156a8e 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1092,61 +1092,61 @@ void PopupMenu::clear_autohide_areas(){
void PopupMenu::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&PopupMenu::_input_event);
- ObjectTypeDB::bind_method(_MD("add_icon_item","texture","label","id","accel"),&PopupMenu::add_icon_item,DEFVAL(-1),DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("add_item","label","id","accel"),&PopupMenu::add_item,DEFVAL(-1),DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("add_icon_check_item","texture","label","id","accel"),&PopupMenu::add_icon_check_item,DEFVAL(-1),DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("add_check_item","label","id","accel"),&PopupMenu::add_check_item,DEFVAL(-1),DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("add_submenu_item","label","submenu","id"),&PopupMenu::add_submenu_item,DEFVAL(-1));
-
- ObjectTypeDB::bind_method(_MD("add_icon_shortcut","texture","shortcut:ShortCut","id"),&PopupMenu::add_icon_shortcut,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("add_shortcut","shortcut:ShortCut","id"),&PopupMenu::add_shortcut,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("add_icon_check_shortcut","texture","shortcut:ShortCut","id"),&PopupMenu::add_icon_check_shortcut,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("add_check_shortcut","shortcut:ShortCut","id"),&PopupMenu::add_check_shortcut,DEFVAL(-1));
-
- ObjectTypeDB::bind_method(_MD("set_item_text","idx","text"),&PopupMenu::set_item_text);
- ObjectTypeDB::bind_method(_MD("set_item_icon","idx","icon"),&PopupMenu::set_item_icon);
- ObjectTypeDB::bind_method(_MD("set_item_checked","idx","checked"),&PopupMenu::set_item_checked);
- ObjectTypeDB::bind_method(_MD("set_item_ID","idx","id"),&PopupMenu::set_item_ID);
- ObjectTypeDB::bind_method(_MD("set_item_accelerator","idx","accel"),&PopupMenu::set_item_accelerator);
- ObjectTypeDB::bind_method(_MD("set_item_metadata","idx","metadata"),&PopupMenu::set_item_metadata);
- ObjectTypeDB::bind_method(_MD("set_item_disabled","idx","disabled"),&PopupMenu::set_item_disabled);
- ObjectTypeDB::bind_method(_MD("set_item_submenu","idx","submenu"),&PopupMenu::set_item_submenu);
- ObjectTypeDB::bind_method(_MD("set_item_as_separator","idx","enable"),&PopupMenu::set_item_as_separator);
- ObjectTypeDB::bind_method(_MD("set_item_as_checkable","idx","enable"),&PopupMenu::set_item_as_checkable);
- ObjectTypeDB::bind_method(_MD("set_item_tooltip","idx","tooltip"),&PopupMenu::set_item_tooltip);
- ObjectTypeDB::bind_method(_MD("set_item_shortcut","idx","shortcut:ShortCut"),&PopupMenu::set_item_shortcut);
-
- ObjectTypeDB::bind_method(_MD("toggle_item_checked","idx"), &PopupMenu::toggle_item_checked);
-
- ObjectTypeDB::bind_method(_MD("get_item_text","idx"),&PopupMenu::get_item_text);
- ObjectTypeDB::bind_method(_MD("get_item_icon","idx"),&PopupMenu::get_item_icon);
- ObjectTypeDB::bind_method(_MD("is_item_checked","idx"),&PopupMenu::is_item_checked);
- ObjectTypeDB::bind_method(_MD("get_item_ID","idx"),&PopupMenu::get_item_ID);
- ObjectTypeDB::bind_method(_MD("get_item_index","id"),&PopupMenu::get_item_index);
- ObjectTypeDB::bind_method(_MD("get_item_accelerator","idx"),&PopupMenu::get_item_accelerator);
- ObjectTypeDB::bind_method(_MD("get_item_metadata","idx"),&PopupMenu::get_item_metadata);
- ObjectTypeDB::bind_method(_MD("is_item_disabled","idx"),&PopupMenu::is_item_disabled);
- ObjectTypeDB::bind_method(_MD("get_item_submenu","idx"),&PopupMenu::get_item_submenu);
- ObjectTypeDB::bind_method(_MD("is_item_separator","idx"),&PopupMenu::is_item_separator);
- ObjectTypeDB::bind_method(_MD("is_item_checkable","idx"),&PopupMenu::is_item_checkable);
- ObjectTypeDB::bind_method(_MD("get_item_tooltip","idx"),&PopupMenu::get_item_tooltip);
- ObjectTypeDB::bind_method(_MD("get_item_shortcut:ShortCut","idx"),&PopupMenu::get_item_shortcut);
-
- ObjectTypeDB::bind_method(_MD("get_item_count"),&PopupMenu::get_item_count);
-
- ObjectTypeDB::bind_method(_MD("remove_item","idx"),&PopupMenu::remove_item);
-
- ObjectTypeDB::bind_method(_MD("add_separator"),&PopupMenu::add_separator);
- ObjectTypeDB::bind_method(_MD("clear"),&PopupMenu::clear);
-
- ObjectTypeDB::bind_method(_MD("_set_items"),&PopupMenu::_set_items);
- ObjectTypeDB::bind_method(_MD("_get_items"),&PopupMenu::_get_items);
-
- ObjectTypeDB::bind_method(_MD("set_hide_on_item_selection","enable"),&PopupMenu::set_hide_on_item_selection);
- ObjectTypeDB::bind_method(_MD("is_hide_on_item_selection"),&PopupMenu::is_hide_on_item_selection);
-
- ObjectTypeDB::bind_method(_MD("_submenu_timeout"),&PopupMenu::_submenu_timeout);
+ ClassDB::bind_method(_MD("_input_event"),&PopupMenu::_input_event);
+ ClassDB::bind_method(_MD("add_icon_item","texture","label","id","accel"),&PopupMenu::add_icon_item,DEFVAL(-1),DEFVAL(0));
+ ClassDB::bind_method(_MD("add_item","label","id","accel"),&PopupMenu::add_item,DEFVAL(-1),DEFVAL(0));
+ ClassDB::bind_method(_MD("add_icon_check_item","texture","label","id","accel"),&PopupMenu::add_icon_check_item,DEFVAL(-1),DEFVAL(0));
+ ClassDB::bind_method(_MD("add_check_item","label","id","accel"),&PopupMenu::add_check_item,DEFVAL(-1),DEFVAL(0));
+ ClassDB::bind_method(_MD("add_submenu_item","label","submenu","id"),&PopupMenu::add_submenu_item,DEFVAL(-1));
+
+ ClassDB::bind_method(_MD("add_icon_shortcut","texture","shortcut:ShortCut","id"),&PopupMenu::add_icon_shortcut,DEFVAL(-1));
+ ClassDB::bind_method(_MD("add_shortcut","shortcut:ShortCut","id"),&PopupMenu::add_shortcut,DEFVAL(-1));
+ ClassDB::bind_method(_MD("add_icon_check_shortcut","texture","shortcut:ShortCut","id"),&PopupMenu::add_icon_check_shortcut,DEFVAL(-1));
+ ClassDB::bind_method(_MD("add_check_shortcut","shortcut:ShortCut","id"),&PopupMenu::add_check_shortcut,DEFVAL(-1));
+
+ ClassDB::bind_method(_MD("set_item_text","idx","text"),&PopupMenu::set_item_text);
+ ClassDB::bind_method(_MD("set_item_icon","idx","icon"),&PopupMenu::set_item_icon);
+ ClassDB::bind_method(_MD("set_item_checked","idx","checked"),&PopupMenu::set_item_checked);
+ ClassDB::bind_method(_MD("set_item_ID","idx","id"),&PopupMenu::set_item_ID);
+ ClassDB::bind_method(_MD("set_item_accelerator","idx","accel"),&PopupMenu::set_item_accelerator);
+ ClassDB::bind_method(_MD("set_item_metadata","idx","metadata"),&PopupMenu::set_item_metadata);
+ ClassDB::bind_method(_MD("set_item_disabled","idx","disabled"),&PopupMenu::set_item_disabled);
+ ClassDB::bind_method(_MD("set_item_submenu","idx","submenu"),&PopupMenu::set_item_submenu);
+ ClassDB::bind_method(_MD("set_item_as_separator","idx","enable"),&PopupMenu::set_item_as_separator);
+ ClassDB::bind_method(_MD("set_item_as_checkable","idx","enable"),&PopupMenu::set_item_as_checkable);
+ ClassDB::bind_method(_MD("set_item_tooltip","idx","tooltip"),&PopupMenu::set_item_tooltip);
+ ClassDB::bind_method(_MD("set_item_shortcut","idx","shortcut:ShortCut"),&PopupMenu::set_item_shortcut);
+
+ ClassDB::bind_method(_MD("toggle_item_checked","idx"), &PopupMenu::toggle_item_checked);
+
+ ClassDB::bind_method(_MD("get_item_text","idx"),&PopupMenu::get_item_text);
+ ClassDB::bind_method(_MD("get_item_icon","idx"),&PopupMenu::get_item_icon);
+ ClassDB::bind_method(_MD("is_item_checked","idx"),&PopupMenu::is_item_checked);
+ ClassDB::bind_method(_MD("get_item_ID","idx"),&PopupMenu::get_item_ID);
+ ClassDB::bind_method(_MD("get_item_index","id"),&PopupMenu::get_item_index);
+ ClassDB::bind_method(_MD("get_item_accelerator","idx"),&PopupMenu::get_item_accelerator);
+ ClassDB::bind_method(_MD("get_item_metadata","idx"),&PopupMenu::get_item_metadata);
+ ClassDB::bind_method(_MD("is_item_disabled","idx"),&PopupMenu::is_item_disabled);
+ ClassDB::bind_method(_MD("get_item_submenu","idx"),&PopupMenu::get_item_submenu);
+ ClassDB::bind_method(_MD("is_item_separator","idx"),&PopupMenu::is_item_separator);
+ ClassDB::bind_method(_MD("is_item_checkable","idx"),&PopupMenu::is_item_checkable);
+ ClassDB::bind_method(_MD("get_item_tooltip","idx"),&PopupMenu::get_item_tooltip);
+ ClassDB::bind_method(_MD("get_item_shortcut:ShortCut","idx"),&PopupMenu::get_item_shortcut);
+
+ ClassDB::bind_method(_MD("get_item_count"),&PopupMenu::get_item_count);
+
+ ClassDB::bind_method(_MD("remove_item","idx"),&PopupMenu::remove_item);
+
+ ClassDB::bind_method(_MD("add_separator"),&PopupMenu::add_separator);
+ ClassDB::bind_method(_MD("clear"),&PopupMenu::clear);
+
+ ClassDB::bind_method(_MD("_set_items"),&PopupMenu::_set_items);
+ ClassDB::bind_method(_MD("_get_items"),&PopupMenu::_get_items);
+
+ ClassDB::bind_method(_MD("set_hide_on_item_selection","enable"),&PopupMenu::set_hide_on_item_selection);
+ ClassDB::bind_method(_MD("is_hide_on_item_selection"),&PopupMenu::is_hide_on_item_selection);
+
+ ClassDB::bind_method(_MD("_submenu_timeout"),&PopupMenu::_submenu_timeout);
ADD_PROPERTY( PropertyInfo(Variant::ARRAY,"items",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_items"),_SCS("_get_items") );
ADD_PROPERTYNO( PropertyInfo(Variant::BOOL, "hide_on_item_selection" ), _SCS("set_hide_on_item_selection"), _SCS("is_hide_on_item_selection") );
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index 64ce99e838..282e152287 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -39,7 +39,7 @@
class PopupMenu : public Popup {
- OBJ_TYPE(PopupMenu, Popup );
+ GDCLASS(PopupMenu, Popup );
struct Item {
Ref<Texture> icon;
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp
index 71c2a40279..48a9dd2fe6 100644
--- a/scene/gui/progress_bar.cpp
+++ b/scene/gui/progress_bar.cpp
@@ -82,8 +82,8 @@ bool ProgressBar::is_percent_visible() const{
void ProgressBar::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_percent_visible","visible"),&ProgressBar::set_percent_visible);
- ObjectTypeDB::bind_method(_MD("is_percent_visible"),&ProgressBar::is_percent_visible);
+ ClassDB::bind_method(_MD("set_percent_visible","visible"),&ProgressBar::set_percent_visible);
+ ClassDB::bind_method(_MD("is_percent_visible"),&ProgressBar::is_percent_visible);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"percent/visible"),_SCS("set_percent_visible"),_SCS("is_percent_visible"));
}
diff --git a/scene/gui/progress_bar.h b/scene/gui/progress_bar.h
index 4f5e0d998a..01306a2ac4 100644
--- a/scene/gui/progress_bar.h
+++ b/scene/gui/progress_bar.h
@@ -33,7 +33,7 @@
class ProgressBar : public Range {
- OBJ_TYPE( ProgressBar, Range );
+ GDCLASS( ProgressBar, Range );
bool percent_visible;
protected:
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index ef0e735af6..b6e52a3f6d 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -222,27 +222,27 @@ void Range::_unref_shared() {
void Range::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_val"),&Range::get_val);
- ObjectTypeDB::bind_method(_MD("get_value"),&Range::get_val);
- ObjectTypeDB::bind_method(_MD("get_min"),&Range::get_min);
- ObjectTypeDB::bind_method(_MD("get_max"),&Range::get_max);
- ObjectTypeDB::bind_method(_MD("get_step"),&Range::get_step);
- ObjectTypeDB::bind_method(_MD("get_page"),&Range::get_page);
- ObjectTypeDB::bind_method(_MD("get_unit_value"),&Range::get_unit_value);
- ObjectTypeDB::bind_method(_MD("set_val","value"),&Range::set_val);
- ObjectTypeDB::bind_method(_MD("set_value","value"),&Range::set_val);
- ObjectTypeDB::bind_method(_MD("set_min","minimum"),&Range::set_min);
- ObjectTypeDB::bind_method(_MD("set_max","maximum"),&Range::set_max);
- ObjectTypeDB::bind_method(_MD("set_step","step"),&Range::set_step);
- ObjectTypeDB::bind_method(_MD("set_page","pagesize"),&Range::set_page);
- ObjectTypeDB::bind_method(_MD("set_unit_value","value"),&Range::set_unit_value);
- ObjectTypeDB::bind_method(_MD("set_rounded_values","enabled"),&Range::set_rounded_values);
- ObjectTypeDB::bind_method(_MD("is_rounded_values"),&Range::is_rounded_values);
- ObjectTypeDB::bind_method(_MD("set_exp_unit_value","enabled"),&Range::set_exp_unit_value);
- ObjectTypeDB::bind_method(_MD("is_unit_value_exp"),&Range::is_unit_value_exp);
-
- ObjectTypeDB::bind_method(_MD("share","with"),&Range::_share);
- ObjectTypeDB::bind_method(_MD("unshare"),&Range::unshare);
+ ClassDB::bind_method(_MD("get_val"),&Range::get_val);
+ ClassDB::bind_method(_MD("get_value"),&Range::get_val);
+ ClassDB::bind_method(_MD("get_min"),&Range::get_min);
+ ClassDB::bind_method(_MD("get_max"),&Range::get_max);
+ ClassDB::bind_method(_MD("get_step"),&Range::get_step);
+ ClassDB::bind_method(_MD("get_page"),&Range::get_page);
+ ClassDB::bind_method(_MD("get_unit_value"),&Range::get_unit_value);
+ ClassDB::bind_method(_MD("set_val","value"),&Range::set_val);
+ ClassDB::bind_method(_MD("set_value","value"),&Range::set_val);
+ ClassDB::bind_method(_MD("set_min","minimum"),&Range::set_min);
+ ClassDB::bind_method(_MD("set_max","maximum"),&Range::set_max);
+ ClassDB::bind_method(_MD("set_step","step"),&Range::set_step);
+ ClassDB::bind_method(_MD("set_page","pagesize"),&Range::set_page);
+ ClassDB::bind_method(_MD("set_unit_value","value"),&Range::set_unit_value);
+ ClassDB::bind_method(_MD("set_rounded_values","enabled"),&Range::set_rounded_values);
+ ClassDB::bind_method(_MD("is_rounded_values"),&Range::is_rounded_values);
+ ClassDB::bind_method(_MD("set_exp_unit_value","enabled"),&Range::set_exp_unit_value);
+ ClassDB::bind_method(_MD("is_unit_value_exp"),&Range::is_unit_value_exp);
+
+ ClassDB::bind_method(_MD("share","with"),&Range::_share);
+ ClassDB::bind_method(_MD("unshare"),&Range::unshare);
ADD_SIGNAL( MethodInfo("value_changed", PropertyInfo(Variant::REAL,"value")));
ADD_SIGNAL( MethodInfo("changed"));
diff --git a/scene/gui/range.h b/scene/gui/range.h
index ba59c7bc24..9c38878c41 100644
--- a/scene/gui/range.h
+++ b/scene/gui/range.h
@@ -35,7 +35,7 @@
*/
class Range : public Control {
- OBJ_TYPE( Range, Control );
+ GDCLASS( Range, Control );
struct Shared {
diff --git a/scene/gui/reference_frame.h b/scene/gui/reference_frame.h
index 139ee3e666..8b4a16cb43 100644
--- a/scene/gui/reference_frame.h
+++ b/scene/gui/reference_frame.h
@@ -33,7 +33,7 @@
class ReferenceFrame : public Control {
- OBJ_TYPE( ReferenceFrame, Control);
+ GDCLASS( ReferenceFrame, Control);
protected:
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index c6a44f3f04..8f28a55a38 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1902,58 +1902,58 @@ String RichTextLabel::get_text() {
void RichTextLabel::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&RichTextLabel::_input_event);
- ObjectTypeDB::bind_method(_MD("_scroll_changed"),&RichTextLabel::_scroll_changed);
- ObjectTypeDB::bind_method(_MD("get_text"),&RichTextLabel::get_text);
- ObjectTypeDB::bind_method(_MD("add_text","text"),&RichTextLabel::add_text);
- ObjectTypeDB::bind_method(_MD("add_image","image:Texture"),&RichTextLabel::add_image);
- ObjectTypeDB::bind_method(_MD("newline"),&RichTextLabel::add_newline);
- ObjectTypeDB::bind_method(_MD("push_font","font"),&RichTextLabel::push_font);
- ObjectTypeDB::bind_method(_MD("push_color","color"),&RichTextLabel::push_color);
- ObjectTypeDB::bind_method(_MD("push_align","align"),&RichTextLabel::push_align);
- ObjectTypeDB::bind_method(_MD("push_indent","level"),&RichTextLabel::push_indent);
- ObjectTypeDB::bind_method(_MD("push_list","type"),&RichTextLabel::push_list);
- ObjectTypeDB::bind_method(_MD("push_meta","data"),&RichTextLabel::push_meta);
- ObjectTypeDB::bind_method(_MD("push_underline"),&RichTextLabel::push_underline);
- ObjectTypeDB::bind_method(_MD("push_table","columns"),&RichTextLabel::push_table);
- ObjectTypeDB::bind_method(_MD("set_table_column_expand","column","expand","ratio"),&RichTextLabel::set_table_column_expand);
- ObjectTypeDB::bind_method(_MD("push_cell"),&RichTextLabel::push_cell);
- ObjectTypeDB::bind_method(_MD("pop"),&RichTextLabel::pop);
+ ClassDB::bind_method(_MD("_input_event"),&RichTextLabel::_input_event);
+ ClassDB::bind_method(_MD("_scroll_changed"),&RichTextLabel::_scroll_changed);
+ ClassDB::bind_method(_MD("get_text"),&RichTextLabel::get_text);
+ ClassDB::bind_method(_MD("add_text","text"),&RichTextLabel::add_text);
+ ClassDB::bind_method(_MD("add_image","image:Texture"),&RichTextLabel::add_image);
+ ClassDB::bind_method(_MD("newline"),&RichTextLabel::add_newline);
+ ClassDB::bind_method(_MD("push_font","font"),&RichTextLabel::push_font);
+ ClassDB::bind_method(_MD("push_color","color"),&RichTextLabel::push_color);
+ ClassDB::bind_method(_MD("push_align","align"),&RichTextLabel::push_align);
+ ClassDB::bind_method(_MD("push_indent","level"),&RichTextLabel::push_indent);
+ ClassDB::bind_method(_MD("push_list","type"),&RichTextLabel::push_list);
+ ClassDB::bind_method(_MD("push_meta","data"),&RichTextLabel::push_meta);
+ ClassDB::bind_method(_MD("push_underline"),&RichTextLabel::push_underline);
+ ClassDB::bind_method(_MD("push_table","columns"),&RichTextLabel::push_table);
+ ClassDB::bind_method(_MD("set_table_column_expand","column","expand","ratio"),&RichTextLabel::set_table_column_expand);
+ ClassDB::bind_method(_MD("push_cell"),&RichTextLabel::push_cell);
+ ClassDB::bind_method(_MD("pop"),&RichTextLabel::pop);
- ObjectTypeDB::bind_method(_MD("clear"),&RichTextLabel::clear);
+ ClassDB::bind_method(_MD("clear"),&RichTextLabel::clear);
- ObjectTypeDB::bind_method(_MD("set_meta_underline","enable"),&RichTextLabel::set_meta_underline);
- ObjectTypeDB::bind_method(_MD("is_meta_underlined"),&RichTextLabel::is_meta_underlined);
+ ClassDB::bind_method(_MD("set_meta_underline","enable"),&RichTextLabel::set_meta_underline);
+ ClassDB::bind_method(_MD("is_meta_underlined"),&RichTextLabel::is_meta_underlined);
- ObjectTypeDB::bind_method(_MD("set_scroll_active","active"),&RichTextLabel::set_scroll_active);
- ObjectTypeDB::bind_method(_MD("is_scroll_active"),&RichTextLabel::is_scroll_active);
+ ClassDB::bind_method(_MD("set_scroll_active","active"),&RichTextLabel::set_scroll_active);
+ ClassDB::bind_method(_MD("is_scroll_active"),&RichTextLabel::is_scroll_active);
- ObjectTypeDB::bind_method(_MD("set_scroll_follow","follow"),&RichTextLabel::set_scroll_follow);
- ObjectTypeDB::bind_method(_MD("is_scroll_following"),&RichTextLabel::is_scroll_following);
+ ClassDB::bind_method(_MD("set_scroll_follow","follow"),&RichTextLabel::set_scroll_follow);
+ ClassDB::bind_method(_MD("is_scroll_following"),&RichTextLabel::is_scroll_following);
- ObjectTypeDB::bind_method(_MD("get_v_scroll"),&RichTextLabel::get_v_scroll);
+ ClassDB::bind_method(_MD("get_v_scroll"),&RichTextLabel::get_v_scroll);
- ObjectTypeDB::bind_method(_MD("scroll_to_line","line"),&RichTextLabel::scroll_to_line);
+ ClassDB::bind_method(_MD("scroll_to_line","line"),&RichTextLabel::scroll_to_line);
- ObjectTypeDB::bind_method(_MD("set_tab_size","spaces"),&RichTextLabel::set_tab_size);
- ObjectTypeDB::bind_method(_MD("get_tab_size"),&RichTextLabel::get_tab_size);
+ ClassDB::bind_method(_MD("set_tab_size","spaces"),&RichTextLabel::set_tab_size);
+ ClassDB::bind_method(_MD("get_tab_size"),&RichTextLabel::get_tab_size);
- ObjectTypeDB::bind_method(_MD("set_selection_enabled","enabled"),&RichTextLabel::set_selection_enabled);
- ObjectTypeDB::bind_method(_MD("is_selection_enabled"),&RichTextLabel::is_selection_enabled);
+ ClassDB::bind_method(_MD("set_selection_enabled","enabled"),&RichTextLabel::set_selection_enabled);
+ ClassDB::bind_method(_MD("is_selection_enabled"),&RichTextLabel::is_selection_enabled);
- ObjectTypeDB::bind_method(_MD("parse_bbcode", "bbcode"),&RichTextLabel::parse_bbcode);
- ObjectTypeDB::bind_method(_MD("append_bbcode", "bbcode"),&RichTextLabel::append_bbcode);
+ ClassDB::bind_method(_MD("parse_bbcode", "bbcode"),&RichTextLabel::parse_bbcode);
+ ClassDB::bind_method(_MD("append_bbcode", "bbcode"),&RichTextLabel::append_bbcode);
- ObjectTypeDB::bind_method(_MD("set_bbcode","text"),&RichTextLabel::set_bbcode);
- ObjectTypeDB::bind_method(_MD("get_bbcode"),&RichTextLabel::get_bbcode);
+ ClassDB::bind_method(_MD("set_bbcode","text"),&RichTextLabel::set_bbcode);
+ ClassDB::bind_method(_MD("get_bbcode"),&RichTextLabel::get_bbcode);
- ObjectTypeDB::bind_method(_MD("set_visible_characters","amount"),&RichTextLabel::set_visible_characters);
- ObjectTypeDB::bind_method(_MD("get_visible_characters"),&RichTextLabel::get_visible_characters);
+ ClassDB::bind_method(_MD("set_visible_characters","amount"),&RichTextLabel::set_visible_characters);
+ ClassDB::bind_method(_MD("get_visible_characters"),&RichTextLabel::get_visible_characters);
- ObjectTypeDB::bind_method(_MD("get_total_character_count"),&RichTextLabel::get_total_character_count);
+ ClassDB::bind_method(_MD("get_total_character_count"),&RichTextLabel::get_total_character_count);
- ObjectTypeDB::bind_method(_MD("set_use_bbcode","enable"),&RichTextLabel::set_use_bbcode);
- ObjectTypeDB::bind_method(_MD("is_using_bbcode"),&RichTextLabel::is_using_bbcode);
+ ClassDB::bind_method(_MD("set_use_bbcode","enable"),&RichTextLabel::set_use_bbcode);
+ ClassDB::bind_method(_MD("is_using_bbcode"),&RichTextLabel::is_using_bbcode);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"bbcode/enabled"),_SCS("set_use_bbcode"),_SCS("is_using_bbcode"));
ADD_PROPERTY(PropertyInfo(Variant::STRING,"bbcode/bbcode",PROPERTY_HINT_MULTILINE_TEXT),_SCS("set_bbcode"),_SCS("get_bbcode"));
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index 1ac008a951..829103dea2 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -34,7 +34,7 @@
class RichTextLabel : public Control {
- OBJ_TYPE( RichTextLabel, Control );
+ GDCLASS( RichTextLabel, Control );
public:
enum Align {
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index b49aa520d9..bf6664ab3d 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -804,11 +804,11 @@ bool ScrollBar::key(unsigned long p_unicode, unsigned long p_scan_code,bool b.pr
void ScrollBar::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&ScrollBar::_input_event);
- ObjectTypeDB::bind_method(_MD("set_custom_step","step"),&ScrollBar::set_custom_step);
- ObjectTypeDB::bind_method(_MD("get_custom_step"),&ScrollBar::get_custom_step);
- ObjectTypeDB::bind_method(_MD("_drag_slave_input"),&ScrollBar::_drag_slave_input);
- ObjectTypeDB::bind_method(_MD("_drag_slave_exit"),&ScrollBar::_drag_slave_exit);
+ ClassDB::bind_method(_MD("_input_event"),&ScrollBar::_input_event);
+ ClassDB::bind_method(_MD("set_custom_step","step"),&ScrollBar::set_custom_step);
+ ClassDB::bind_method(_MD("get_custom_step"),&ScrollBar::get_custom_step);
+ ClassDB::bind_method(_MD("_drag_slave_input"),&ScrollBar::_drag_slave_input);
+ ClassDB::bind_method(_MD("_drag_slave_exit"),&ScrollBar::_drag_slave_exit);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"custom_step",PROPERTY_HINT_RANGE,"-1,4096"), _SCS("set_custom_step"),_SCS("get_custom_step"));
diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h
index 0e79912059..97259a07cb 100644
--- a/scene/gui/scroll_bar.h
+++ b/scene/gui/scroll_bar.h
@@ -37,7 +37,7 @@
*/
class ScrollBar : public Range {
- OBJ_TYPE( ScrollBar, Range );
+ GDCLASS( ScrollBar, Range );
enum HiliteStatus {
HILITE_NONE,
@@ -109,7 +109,7 @@ public:
class HScrollBar : public ScrollBar {
- OBJ_TYPE( HScrollBar, ScrollBar );
+ GDCLASS( HScrollBar, ScrollBar );
public:
HScrollBar() : ScrollBar(HORIZONTAL) { set_v_size_flags(0); }
@@ -117,7 +117,7 @@ public:
class VScrollBar : public ScrollBar {
- OBJ_TYPE( VScrollBar, ScrollBar );
+ GDCLASS( VScrollBar, ScrollBar );
public:
VScrollBar() : ScrollBar(VERTICAL) { set_h_size_flags(0); }
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index bad478a745..b8a66d4360 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -437,17 +437,17 @@ void ScrollContainer::set_h_scroll(int p_pos) {
void ScrollContainer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_scroll_moved"),&ScrollContainer::_scroll_moved);
- ObjectTypeDB::bind_method(_MD("_input_event"),&ScrollContainer::_input_event);
- ObjectTypeDB::bind_method(_MD("set_enable_h_scroll","enable"),&ScrollContainer::set_enable_h_scroll);
- ObjectTypeDB::bind_method(_MD("is_h_scroll_enabled"),&ScrollContainer::is_h_scroll_enabled);
- ObjectTypeDB::bind_method(_MD("set_enable_v_scroll","enable"),&ScrollContainer::set_enable_v_scroll);
- ObjectTypeDB::bind_method(_MD("is_v_scroll_enabled"),&ScrollContainer::is_v_scroll_enabled);
- ObjectTypeDB::bind_method(_MD("_update_scrollbar_pos"),&ScrollContainer::_update_scrollbar_pos);
- ObjectTypeDB::bind_method(_MD("set_h_scroll","val"),&ScrollContainer::set_h_scroll);
- ObjectTypeDB::bind_method(_MD("get_h_scroll"),&ScrollContainer::get_h_scroll);
- ObjectTypeDB::bind_method(_MD("set_v_scroll","val"),&ScrollContainer::set_v_scroll);
- ObjectTypeDB::bind_method(_MD("get_v_scroll"),&ScrollContainer::get_v_scroll);
+ ClassDB::bind_method(_MD("_scroll_moved"),&ScrollContainer::_scroll_moved);
+ ClassDB::bind_method(_MD("_input_event"),&ScrollContainer::_input_event);
+ ClassDB::bind_method(_MD("set_enable_h_scroll","enable"),&ScrollContainer::set_enable_h_scroll);
+ ClassDB::bind_method(_MD("is_h_scroll_enabled"),&ScrollContainer::is_h_scroll_enabled);
+ ClassDB::bind_method(_MD("set_enable_v_scroll","enable"),&ScrollContainer::set_enable_v_scroll);
+ ClassDB::bind_method(_MD("is_v_scroll_enabled"),&ScrollContainer::is_v_scroll_enabled);
+ ClassDB::bind_method(_MD("_update_scrollbar_pos"),&ScrollContainer::_update_scrollbar_pos);
+ ClassDB::bind_method(_MD("set_h_scroll","val"),&ScrollContainer::set_h_scroll);
+ ClassDB::bind_method(_MD("get_h_scroll"),&ScrollContainer::get_h_scroll);
+ ClassDB::bind_method(_MD("set_v_scroll","val"),&ScrollContainer::set_v_scroll);
+ ClassDB::bind_method(_MD("get_v_scroll"),&ScrollContainer::get_v_scroll);
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "scroll/horizontal"), _SCS("set_enable_h_scroll"),_SCS("is_h_scroll_enabled"));
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "scroll/vertical"), _SCS("set_enable_v_scroll"),_SCS("is_v_scroll_enabled"));
diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h
index f6832acf66..4d783e8f77 100644
--- a/scene/gui/scroll_container.h
+++ b/scene/gui/scroll_container.h
@@ -35,7 +35,7 @@
class ScrollContainer : public Container {
- OBJ_TYPE(ScrollContainer, Container);
+ GDCLASS(ScrollContainer, Container);
HScrollBar* h_scroll;
VScrollBar* v_scroll;
diff --git a/scene/gui/separator.h b/scene/gui/separator.h
index cdaaa23ab0..5fb17e1c2e 100644
--- a/scene/gui/separator.h
+++ b/scene/gui/separator.h
@@ -36,7 +36,7 @@
#include "scene/gui/control.h"
class Separator : public Control {
- OBJ_TYPE( Separator, Control );
+ GDCLASS( Separator, Control );
protected:
@@ -54,7 +54,7 @@ public:
class VSeparator : public Separator {
- OBJ_TYPE( VSeparator, Separator );
+ GDCLASS( VSeparator, Separator );
public:
@@ -64,7 +64,7 @@ public:
class HSeparator : public Separator {
- OBJ_TYPE( HSeparator, Separator );
+ GDCLASS( HSeparator, Separator );
public:
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index 8747cc965f..9ab0f21993 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -231,12 +231,12 @@ void Slider::set_ticks_on_borders(bool _tob){
void Slider::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&Slider::_input_event);
- ObjectTypeDB::bind_method(_MD("set_ticks","count"),&Slider::set_ticks);
- ObjectTypeDB::bind_method(_MD("get_ticks"),&Slider::get_ticks);
+ ClassDB::bind_method(_MD("_input_event"),&Slider::_input_event);
+ ClassDB::bind_method(_MD("set_ticks","count"),&Slider::set_ticks);
+ ClassDB::bind_method(_MD("get_ticks"),&Slider::get_ticks);
- ObjectTypeDB::bind_method(_MD("get_ticks_on_borders"),&Slider::get_ticks_on_borders);
- ObjectTypeDB::bind_method(_MD("set_ticks_on_borders","ticks_on_border"),&Slider::set_ticks_on_borders);
+ ClassDB::bind_method(_MD("get_ticks_on_borders"),&Slider::get_ticks_on_borders);
+ ClassDB::bind_method(_MD("set_ticks_on_borders","ticks_on_border"),&Slider::set_ticks_on_borders);
ADD_PROPERTY( PropertyInfo( Variant::INT, "tick_count", PROPERTY_HINT_RANGE,"0,4096,1"), _SCS("set_ticks"), _SCS("get_ticks") );
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "ticks_on_borders" ), _SCS("set_ticks_on_borders"), _SCS("get_ticks_on_borders") );
diff --git a/scene/gui/slider.h b/scene/gui/slider.h
index 31cc9f90d3..5d68de1b4b 100644
--- a/scene/gui/slider.h
+++ b/scene/gui/slider.h
@@ -33,7 +33,7 @@
class Slider : public Range {
- OBJ_TYPE( Slider, Range );
+ GDCLASS( Slider, Range );
struct Grab {
int pos;
@@ -74,7 +74,7 @@ public:
class HSlider : public Slider {
- OBJ_TYPE( HSlider, Slider );
+ GDCLASS( HSlider, Slider );
public:
HSlider() : Slider(HORIZONTAL) { set_v_size_flags(0);}
@@ -82,7 +82,7 @@ public:
class VSlider : public Slider {
- OBJ_TYPE( VSlider, Slider );
+ GDCLASS( VSlider, Slider );
public:
VSlider() : Slider(VERTICAL) { set_h_size_flags(0);}
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 194922441d..a16a515dca 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -251,19 +251,19 @@ bool SpinBox::is_editable() const {
void SpinBox::_bind_methods() {
- //ObjectTypeDB::bind_method(_MD("_value_changed"),&SpinBox::_value_changed);
- ObjectTypeDB::bind_method(_MD("_input_event"),&SpinBox::_input_event);
- ObjectTypeDB::bind_method(_MD("_text_entered"),&SpinBox::_text_entered);
- ObjectTypeDB::bind_method(_MD("set_suffix","suffix"),&SpinBox::set_suffix);
- ObjectTypeDB::bind_method(_MD("get_suffix"),&SpinBox::get_suffix);
- ObjectTypeDB::bind_method(_MD("set_prefix","prefix"),&SpinBox::set_prefix);
- ObjectTypeDB::bind_method(_MD("get_prefix"),&SpinBox::get_prefix);
- ObjectTypeDB::bind_method(_MD("set_editable","editable"),&SpinBox::set_editable);
- ObjectTypeDB::bind_method(_MD("is_editable"),&SpinBox::is_editable);
- ObjectTypeDB::bind_method(_MD("_line_edit_focus_exit"),&SpinBox::_line_edit_focus_exit);
- ObjectTypeDB::bind_method(_MD("get_line_edit"),&SpinBox::get_line_edit);
- ObjectTypeDB::bind_method(_MD("_line_edit_input"),&SpinBox::_line_edit_input);
- ObjectTypeDB::bind_method(_MD("_range_click_timeout"),&SpinBox::_range_click_timeout);
+ //ClassDB::bind_method(_MD("_value_changed"),&SpinBox::_value_changed);
+ ClassDB::bind_method(_MD("_input_event"),&SpinBox::_input_event);
+ ClassDB::bind_method(_MD("_text_entered"),&SpinBox::_text_entered);
+ ClassDB::bind_method(_MD("set_suffix","suffix"),&SpinBox::set_suffix);
+ ClassDB::bind_method(_MD("get_suffix"),&SpinBox::get_suffix);
+ ClassDB::bind_method(_MD("set_prefix","prefix"),&SpinBox::set_prefix);
+ ClassDB::bind_method(_MD("get_prefix"),&SpinBox::get_prefix);
+ ClassDB::bind_method(_MD("set_editable","editable"),&SpinBox::set_editable);
+ ClassDB::bind_method(_MD("is_editable"),&SpinBox::is_editable);
+ ClassDB::bind_method(_MD("_line_edit_focus_exit"),&SpinBox::_line_edit_focus_exit);
+ ClassDB::bind_method(_MD("get_line_edit"),&SpinBox::get_line_edit);
+ ClassDB::bind_method(_MD("_line_edit_input"),&SpinBox::_line_edit_input);
+ ClassDB::bind_method(_MD("_range_click_timeout"),&SpinBox::_range_click_timeout);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"editable"),_SCS("set_editable"),_SCS("is_editable"));
diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h
index 7b33d562be..e56ff0cd6f 100644
--- a/scene/gui/spin_box.h
+++ b/scene/gui/spin_box.h
@@ -35,7 +35,7 @@
class SpinBox : public Range {
- OBJ_TYPE( SpinBox, Range );
+ GDCLASS( SpinBox, Range );
LineEdit *line_edit;
int last_w;
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index 2c81bd19f9..d3ea6aa4e9 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -422,15 +422,15 @@ bool SplitContainer::is_collapsed() const {
void SplitContainer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&SplitContainer::_input_event);
- ObjectTypeDB::bind_method(_MD("set_split_offset","offset"),&SplitContainer::set_split_offset);
- ObjectTypeDB::bind_method(_MD("get_split_offset"),&SplitContainer::get_split_offset);
+ ClassDB::bind_method(_MD("_input_event"),&SplitContainer::_input_event);
+ ClassDB::bind_method(_MD("set_split_offset","offset"),&SplitContainer::set_split_offset);
+ ClassDB::bind_method(_MD("get_split_offset"),&SplitContainer::get_split_offset);
- ObjectTypeDB::bind_method(_MD("set_collapsed","collapsed"),&SplitContainer::set_collapsed);
- ObjectTypeDB::bind_method(_MD("is_collapsed"),&SplitContainer::is_collapsed);
+ ClassDB::bind_method(_MD("set_collapsed","collapsed"),&SplitContainer::set_collapsed);
+ ClassDB::bind_method(_MD("is_collapsed"),&SplitContainer::is_collapsed);
- ObjectTypeDB::bind_method(_MD("set_dragger_visibility","mode"),&SplitContainer::set_dragger_visibility);
- ObjectTypeDB::bind_method(_MD("get_dragger_visibility"),&SplitContainer::get_dragger_visibility);
+ ClassDB::bind_method(_MD("set_dragger_visibility","mode"),&SplitContainer::set_dragger_visibility);
+ ClassDB::bind_method(_MD("get_dragger_visibility"),&SplitContainer::get_dragger_visibility);
ADD_SIGNAL( MethodInfo("dragged",PropertyInfo(Variant::INT,"offset")));
diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h
index 5893043bbe..b9c77db253 100644
--- a/scene/gui/split_container.h
+++ b/scene/gui/split_container.h
@@ -34,7 +34,7 @@
class SplitContainer : public Container {
- OBJ_TYPE(SplitContainer,Container);
+ GDCLASS(SplitContainer,Container);
public:
enum DraggerVisibility {
DRAGGER_VISIBLE,
@@ -86,7 +86,7 @@ VARIANT_ENUM_CAST(SplitContainer::DraggerVisibility);
class HSplitContainer : public SplitContainer {
- OBJ_TYPE(HSplitContainer,SplitContainer);
+ GDCLASS(HSplitContainer,SplitContainer);
public:
@@ -96,7 +96,7 @@ public:
class VSplitContainer : public SplitContainer {
- OBJ_TYPE(VSplitContainer,SplitContainer);
+ GDCLASS(VSplitContainer,SplitContainer);
public:
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index b298850a2f..d47a4f7ae6 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -714,24 +714,24 @@ Popup* TabContainer::get_popup() const {
void TabContainer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&TabContainer::_input_event);
- ObjectTypeDB::bind_method(_MD("get_tab_count"),&TabContainer::get_tab_count);
- ObjectTypeDB::bind_method(_MD("set_current_tab","tab_idx"),&TabContainer::set_current_tab);
- ObjectTypeDB::bind_method(_MD("get_current_tab"),&TabContainer::get_current_tab);
- ObjectTypeDB::bind_method(_MD("get_current_tab_control:Control"),&TabContainer::get_current_tab_control);
- ObjectTypeDB::bind_method(_MD("get_tab_control:Control","idx"),&TabContainer::get_tab_control);
- ObjectTypeDB::bind_method(_MD("set_tab_align","align"),&TabContainer::set_tab_align);
- ObjectTypeDB::bind_method(_MD("get_tab_align"),&TabContainer::get_tab_align);
- ObjectTypeDB::bind_method(_MD("set_tabs_visible","visible"),&TabContainer::set_tabs_visible);
- ObjectTypeDB::bind_method(_MD("are_tabs_visible"),&TabContainer::are_tabs_visible);
- ObjectTypeDB::bind_method(_MD("set_tab_title","tab_idx","title"),&TabContainer::set_tab_title);
- ObjectTypeDB::bind_method(_MD("get_tab_title","tab_idx"),&TabContainer::get_tab_title);
- ObjectTypeDB::bind_method(_MD("set_tab_icon","tab_idx","icon:Texture"),&TabContainer::set_tab_icon);
- ObjectTypeDB::bind_method(_MD("get_tab_icon:Texture","tab_idx"),&TabContainer::get_tab_icon);
- ObjectTypeDB::bind_method(_MD("set_popup","popup:Popup"),&TabContainer::set_popup);
- ObjectTypeDB::bind_method(_MD("get_popup:Popup"),&TabContainer::get_popup);
-
- ObjectTypeDB::bind_method(_MD("_child_renamed_callback"),&TabContainer::_child_renamed_callback);
+ ClassDB::bind_method(_MD("_input_event"),&TabContainer::_input_event);
+ ClassDB::bind_method(_MD("get_tab_count"),&TabContainer::get_tab_count);
+ ClassDB::bind_method(_MD("set_current_tab","tab_idx"),&TabContainer::set_current_tab);
+ ClassDB::bind_method(_MD("get_current_tab"),&TabContainer::get_current_tab);
+ ClassDB::bind_method(_MD("get_current_tab_control:Control"),&TabContainer::get_current_tab_control);
+ ClassDB::bind_method(_MD("get_tab_control:Control","idx"),&TabContainer::get_tab_control);
+ ClassDB::bind_method(_MD("set_tab_align","align"),&TabContainer::set_tab_align);
+ ClassDB::bind_method(_MD("get_tab_align"),&TabContainer::get_tab_align);
+ ClassDB::bind_method(_MD("set_tabs_visible","visible"),&TabContainer::set_tabs_visible);
+ ClassDB::bind_method(_MD("are_tabs_visible"),&TabContainer::are_tabs_visible);
+ ClassDB::bind_method(_MD("set_tab_title","tab_idx","title"),&TabContainer::set_tab_title);
+ ClassDB::bind_method(_MD("get_tab_title","tab_idx"),&TabContainer::get_tab_title);
+ ClassDB::bind_method(_MD("set_tab_icon","tab_idx","icon:Texture"),&TabContainer::set_tab_icon);
+ ClassDB::bind_method(_MD("get_tab_icon:Texture","tab_idx"),&TabContainer::get_tab_icon);
+ ClassDB::bind_method(_MD("set_popup","popup:Popup"),&TabContainer::set_popup);
+ ClassDB::bind_method(_MD("get_popup:Popup"),&TabContainer::get_popup);
+
+ ClassDB::bind_method(_MD("_child_renamed_callback"),&TabContainer::_child_renamed_callback);
ADD_SIGNAL(MethodInfo("tab_changed",PropertyInfo(Variant::INT,"tab")));
ADD_SIGNAL(MethodInfo("pre_popup_pressed"));
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h
index d63caf173a..6885a0f569 100644
--- a/scene/gui/tab_container.h
+++ b/scene/gui/tab_container.h
@@ -34,7 +34,7 @@
#include "scene/gui/popup.h"
class TabContainer : public Control {
- OBJ_TYPE( TabContainer, Control );
+ GDCLASS( TabContainer, Control );
public:
enum TabAlign {
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index 83e51eb6c8..2518672705 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -649,19 +649,19 @@ void Tabs::set_tab_close_display_policy(CloseButtonDisplayPolicy p_policy) {
void Tabs::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&Tabs::_input_event);
- ObjectTypeDB::bind_method(_MD("get_tab_count"),&Tabs::get_tab_count);
- ObjectTypeDB::bind_method(_MD("set_current_tab","tab_idx"),&Tabs::set_current_tab);
- ObjectTypeDB::bind_method(_MD("get_current_tab"),&Tabs::get_current_tab);
- ObjectTypeDB::bind_method(_MD("set_tab_title","tab_idx","title"),&Tabs::set_tab_title);
- ObjectTypeDB::bind_method(_MD("get_tab_title","tab_idx"),&Tabs::get_tab_title);
- ObjectTypeDB::bind_method(_MD("set_tab_icon","tab_idx","icon:Texture"),&Tabs::set_tab_icon);
- ObjectTypeDB::bind_method(_MD("get_tab_icon:Texture","tab_idx"),&Tabs::get_tab_icon);
- ObjectTypeDB::bind_method(_MD("remove_tab","tab_idx"),&Tabs::remove_tab);
- ObjectTypeDB::bind_method(_MD("add_tab","title","icon:Texture"),&Tabs::add_tab);
- ObjectTypeDB::bind_method(_MD("set_tab_align","align"),&Tabs::set_tab_align);
- ObjectTypeDB::bind_method(_MD("get_tab_align"),&Tabs::get_tab_align);
- ObjectTypeDB::bind_method(_MD("ensure_tab_visible","idx"),&Tabs::ensure_tab_visible);
+ ClassDB::bind_method(_MD("_input_event"),&Tabs::_input_event);
+ ClassDB::bind_method(_MD("get_tab_count"),&Tabs::get_tab_count);
+ ClassDB::bind_method(_MD("set_current_tab","tab_idx"),&Tabs::set_current_tab);
+ ClassDB::bind_method(_MD("get_current_tab"),&Tabs::get_current_tab);
+ ClassDB::bind_method(_MD("set_tab_title","tab_idx","title"),&Tabs::set_tab_title);
+ ClassDB::bind_method(_MD("get_tab_title","tab_idx"),&Tabs::get_tab_title);
+ ClassDB::bind_method(_MD("set_tab_icon","tab_idx","icon:Texture"),&Tabs::set_tab_icon);
+ ClassDB::bind_method(_MD("get_tab_icon:Texture","tab_idx"),&Tabs::get_tab_icon);
+ ClassDB::bind_method(_MD("remove_tab","tab_idx"),&Tabs::remove_tab);
+ ClassDB::bind_method(_MD("add_tab","title","icon:Texture"),&Tabs::add_tab);
+ ClassDB::bind_method(_MD("set_tab_align","align"),&Tabs::set_tab_align);
+ ClassDB::bind_method(_MD("get_tab_align"),&Tabs::get_tab_align);
+ ClassDB::bind_method(_MD("ensure_tab_visible","idx"),&Tabs::ensure_tab_visible);
ADD_SIGNAL(MethodInfo("tab_changed",PropertyInfo(Variant::INT,"tab")));
ADD_SIGNAL(MethodInfo("right_button_pressed",PropertyInfo(Variant::INT,"tab")));
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h
index adbddd56e3..81e1c565b5 100644
--- a/scene/gui/tabs.h
+++ b/scene/gui/tabs.h
@@ -33,7 +33,7 @@
class Tabs : public Control {
- OBJ_TYPE( Tabs, Control );
+ GDCLASS( Tabs, Control );
public:
enum TabAlign {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index c4d0664eb3..64c4f4fa49 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4607,80 +4607,80 @@ PopupMenu *TextEdit::get_menu() const {
void TextEdit::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&TextEdit::_input_event);
- ObjectTypeDB::bind_method(_MD("_scroll_moved"),&TextEdit::_scroll_moved);
- ObjectTypeDB::bind_method(_MD("_cursor_changed_emit"),&TextEdit::_cursor_changed_emit);
- ObjectTypeDB::bind_method(_MD("_text_changed_emit"),&TextEdit::_text_changed_emit);
- ObjectTypeDB::bind_method(_MD("_push_current_op"),&TextEdit::_push_current_op);
- ObjectTypeDB::bind_method(_MD("_click_selection_held"),&TextEdit::_click_selection_held);
- ObjectTypeDB::bind_method(_MD("_toggle_draw_caret"),&TextEdit::_toggle_draw_caret);
+ ClassDB::bind_method(_MD("_input_event"),&TextEdit::_input_event);
+ ClassDB::bind_method(_MD("_scroll_moved"),&TextEdit::_scroll_moved);
+ ClassDB::bind_method(_MD("_cursor_changed_emit"),&TextEdit::_cursor_changed_emit);
+ ClassDB::bind_method(_MD("_text_changed_emit"),&TextEdit::_text_changed_emit);
+ ClassDB::bind_method(_MD("_push_current_op"),&TextEdit::_push_current_op);
+ ClassDB::bind_method(_MD("_click_selection_held"),&TextEdit::_click_selection_held);
+ ClassDB::bind_method(_MD("_toggle_draw_caret"),&TextEdit::_toggle_draw_caret);
BIND_CONSTANT( SEARCH_MATCH_CASE );
BIND_CONSTANT( SEARCH_WHOLE_WORDS );
BIND_CONSTANT( SEARCH_BACKWARDS );
/*
- ObjectTypeDB::bind_method(_MD("delete_char"),&TextEdit::delete_char);
- ObjectTypeDB::bind_method(_MD("delete_line"),&TextEdit::delete_line);
+ ClassDB::bind_method(_MD("delete_char"),&TextEdit::delete_char);
+ ClassDB::bind_method(_MD("delete_line"),&TextEdit::delete_line);
*/
- ObjectTypeDB::bind_method(_MD("set_text","text"),&TextEdit::set_text);
- ObjectTypeDB::bind_method(_MD("insert_text_at_cursor","text"),&TextEdit::insert_text_at_cursor);
-
- ObjectTypeDB::bind_method(_MD("get_line_count"),&TextEdit::get_line_count);
- ObjectTypeDB::bind_method(_MD("get_text"),&TextEdit::get_text);
- ObjectTypeDB::bind_method(_MD("get_line","line"),&TextEdit::get_line);
-
- ObjectTypeDB::bind_method(_MD("cursor_set_column","column","adjust_viewport"),&TextEdit::cursor_set_column,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("cursor_set_line","line","adjust_viewport"),&TextEdit::cursor_set_line,DEFVAL(false));
-
- ObjectTypeDB::bind_method(_MD("cursor_get_column"),&TextEdit::cursor_get_column);
- ObjectTypeDB::bind_method(_MD("cursor_get_line"),&TextEdit::cursor_get_line);
- ObjectTypeDB::bind_method(_MD("cursor_set_blink_enabled", "enable"),&TextEdit::cursor_set_blink_enabled);
- ObjectTypeDB::bind_method(_MD("cursor_get_blink_enabled"),&TextEdit::cursor_get_blink_enabled);
- ObjectTypeDB::bind_method(_MD("cursor_set_blink_speed", "blink_speed"),&TextEdit::cursor_set_blink_speed);
- ObjectTypeDB::bind_method(_MD("cursor_get_blink_speed"),&TextEdit::cursor_get_blink_speed);
- ObjectTypeDB::bind_method(_MD("cursor_set_block_mode", "enable"), &TextEdit::cursor_set_block_mode);
- ObjectTypeDB::bind_method(_MD("cursor_is_block_mode"), &TextEdit::cursor_is_block_mode);
-
- ObjectTypeDB::bind_method(_MD("set_readonly","enable"),&TextEdit::set_readonly);
- ObjectTypeDB::bind_method(_MD("set_wrap","enable"),&TextEdit::set_wrap);
- ObjectTypeDB::bind_method(_MD("set_max_chars","amount"),&TextEdit::set_max_chars);
-
- ObjectTypeDB::bind_method(_MD("cut"),&TextEdit::cut);
- ObjectTypeDB::bind_method(_MD("copy"),&TextEdit::copy);
- ObjectTypeDB::bind_method(_MD("paste"),&TextEdit::paste);
- ObjectTypeDB::bind_method(_MD("select_all"),&TextEdit::select_all);
- ObjectTypeDB::bind_method(_MD("select","from_line","from_column","to_line","to_column"),&TextEdit::select);
-
- ObjectTypeDB::bind_method(_MD("is_selection_active"),&TextEdit::is_selection_active);
- ObjectTypeDB::bind_method(_MD("get_selection_from_line"),&TextEdit::get_selection_from_line);
- ObjectTypeDB::bind_method(_MD("get_selection_from_column"),&TextEdit::get_selection_from_column);
- ObjectTypeDB::bind_method(_MD("get_selection_to_line"),&TextEdit::get_selection_to_line);
- ObjectTypeDB::bind_method(_MD("get_selection_to_column"),&TextEdit::get_selection_to_column);
- ObjectTypeDB::bind_method(_MD("get_selection_text"),&TextEdit::get_selection_text);
- ObjectTypeDB::bind_method(_MD("get_word_under_cursor"),&TextEdit::get_word_under_cursor);
- ObjectTypeDB::bind_method(_MD("search","flags","from_line","from_column","to_line","to_column"),&TextEdit::_search_bind);
-
- ObjectTypeDB::bind_method(_MD("undo"),&TextEdit::undo);
- ObjectTypeDB::bind_method(_MD("redo"),&TextEdit::redo);
- ObjectTypeDB::bind_method(_MD("clear_undo_history"),&TextEdit::clear_undo_history);
-
- ObjectTypeDB::bind_method(_MD("set_show_line_numbers", "enable"), &TextEdit::set_show_line_numbers);
- ObjectTypeDB::bind_method(_MD("is_show_line_numbers_enabled"), &TextEdit::is_show_line_numbers_enabled);
-
- ObjectTypeDB::bind_method(_MD("set_highlight_all_occurrences", "enable"), &TextEdit::set_highlight_all_occurrences);
- ObjectTypeDB::bind_method(_MD("is_highlight_all_occurrences_enabled"), &TextEdit::is_highlight_all_occurrences_enabled);
-
- ObjectTypeDB::bind_method(_MD("set_syntax_coloring","enable"),&TextEdit::set_syntax_coloring);
- ObjectTypeDB::bind_method(_MD("is_syntax_coloring_enabled"),&TextEdit::is_syntax_coloring_enabled);
-
-
- ObjectTypeDB::bind_method(_MD("add_keyword_color","keyword","color"),&TextEdit::add_keyword_color);
- ObjectTypeDB::bind_method(_MD("add_color_region","begin_key","end_key","color","line_only"),&TextEdit::add_color_region,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("clear_colors"),&TextEdit::clear_colors);
- ObjectTypeDB::bind_method(_MD("menu_option"),&TextEdit::menu_option);
- ObjectTypeDB::bind_method(_MD("get_menu:PopupMenu"),&TextEdit::get_menu);
+ ClassDB::bind_method(_MD("set_text","text"),&TextEdit::set_text);
+ ClassDB::bind_method(_MD("insert_text_at_cursor","text"),&TextEdit::insert_text_at_cursor);
+
+ ClassDB::bind_method(_MD("get_line_count"),&TextEdit::get_line_count);
+ ClassDB::bind_method(_MD("get_text"),&TextEdit::get_text);
+ ClassDB::bind_method(_MD("get_line","line"),&TextEdit::get_line);
+
+ ClassDB::bind_method(_MD("cursor_set_column","column","adjust_viewport"),&TextEdit::cursor_set_column,DEFVAL(false));
+ ClassDB::bind_method(_MD("cursor_set_line","line","adjust_viewport"),&TextEdit::cursor_set_line,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("cursor_get_column"),&TextEdit::cursor_get_column);
+ ClassDB::bind_method(_MD("cursor_get_line"),&TextEdit::cursor_get_line);
+ ClassDB::bind_method(_MD("cursor_set_blink_enabled", "enable"),&TextEdit::cursor_set_blink_enabled);
+ ClassDB::bind_method(_MD("cursor_get_blink_enabled"),&TextEdit::cursor_get_blink_enabled);
+ ClassDB::bind_method(_MD("cursor_set_blink_speed", "blink_speed"),&TextEdit::cursor_set_blink_speed);
+ ClassDB::bind_method(_MD("cursor_get_blink_speed"),&TextEdit::cursor_get_blink_speed);
+ ClassDB::bind_method(_MD("cursor_set_block_mode", "enable"), &TextEdit::cursor_set_block_mode);
+ ClassDB::bind_method(_MD("cursor_is_block_mode"), &TextEdit::cursor_is_block_mode);
+
+ ClassDB::bind_method(_MD("set_readonly","enable"),&TextEdit::set_readonly);
+ ClassDB::bind_method(_MD("set_wrap","enable"),&TextEdit::set_wrap);
+ ClassDB::bind_method(_MD("set_max_chars","amount"),&TextEdit::set_max_chars);
+
+ ClassDB::bind_method(_MD("cut"),&TextEdit::cut);
+ ClassDB::bind_method(_MD("copy"),&TextEdit::copy);
+ ClassDB::bind_method(_MD("paste"),&TextEdit::paste);
+ ClassDB::bind_method(_MD("select_all"),&TextEdit::select_all);
+ ClassDB::bind_method(_MD("select","from_line","from_column","to_line","to_column"),&TextEdit::select);
+
+ ClassDB::bind_method(_MD("is_selection_active"),&TextEdit::is_selection_active);
+ ClassDB::bind_method(_MD("get_selection_from_line"),&TextEdit::get_selection_from_line);
+ ClassDB::bind_method(_MD("get_selection_from_column"),&TextEdit::get_selection_from_column);
+ ClassDB::bind_method(_MD("get_selection_to_line"),&TextEdit::get_selection_to_line);
+ ClassDB::bind_method(_MD("get_selection_to_column"),&TextEdit::get_selection_to_column);
+ ClassDB::bind_method(_MD("get_selection_text"),&TextEdit::get_selection_text);
+ ClassDB::bind_method(_MD("get_word_under_cursor"),&TextEdit::get_word_under_cursor);
+ ClassDB::bind_method(_MD("search","flags","from_line","from_column","to_line","to_column"),&TextEdit::_search_bind);
+
+ ClassDB::bind_method(_MD("undo"),&TextEdit::undo);
+ ClassDB::bind_method(_MD("redo"),&TextEdit::redo);
+ ClassDB::bind_method(_MD("clear_undo_history"),&TextEdit::clear_undo_history);
+
+ ClassDB::bind_method(_MD("set_show_line_numbers", "enable"), &TextEdit::set_show_line_numbers);
+ ClassDB::bind_method(_MD("is_show_line_numbers_enabled"), &TextEdit::is_show_line_numbers_enabled);
+
+ ClassDB::bind_method(_MD("set_highlight_all_occurrences", "enable"), &TextEdit::set_highlight_all_occurrences);
+ ClassDB::bind_method(_MD("is_highlight_all_occurrences_enabled"), &TextEdit::is_highlight_all_occurrences_enabled);
+
+ ClassDB::bind_method(_MD("set_syntax_coloring","enable"),&TextEdit::set_syntax_coloring);
+ ClassDB::bind_method(_MD("is_syntax_coloring_enabled"),&TextEdit::is_syntax_coloring_enabled);
+
+
+ ClassDB::bind_method(_MD("add_keyword_color","keyword","color"),&TextEdit::add_keyword_color);
+ ClassDB::bind_method(_MD("add_color_region","begin_key","end_key","color","line_only"),&TextEdit::add_color_region,DEFVAL(false));
+ ClassDB::bind_method(_MD("clear_colors"),&TextEdit::clear_colors);
+ ClassDB::bind_method(_MD("menu_option"),&TextEdit::menu_option);
+ ClassDB::bind_method(_MD("get_menu:PopupMenu"),&TextEdit::get_menu);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "syntax_highlighting"), _SCS("set_syntax_coloring"), _SCS("is_syntax_coloring_enabled"));
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_line_numbers"), _SCS("set_show_line_numbers"), _SCS("is_show_line_numbers_enabled"));
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index d94ade96bf..c674c859e6 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -37,7 +37,7 @@
class TextEdit : public Control {
- OBJ_TYPE( TextEdit, Control );
+ GDCLASS( TextEdit, Control );
struct Cursor {
int last_fit_x;
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 2c788ee34c..74337eff58 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -136,23 +136,23 @@ void TextureButton::_notification(int p_what) {
void TextureButton::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_normal_texture","texture:Texture"),&TextureButton::set_normal_texture);
- ObjectTypeDB::bind_method(_MD("set_pressed_texture","texture:Texture"),&TextureButton::set_pressed_texture);
- ObjectTypeDB::bind_method(_MD("set_hover_texture","texture:Texture"),&TextureButton::set_hover_texture);
- ObjectTypeDB::bind_method(_MD("set_disabled_texture","texture:Texture"),&TextureButton::set_disabled_texture);
- ObjectTypeDB::bind_method(_MD("set_focused_texture","texture:Texture"),&TextureButton::set_focused_texture);
- ObjectTypeDB::bind_method(_MD("set_click_mask","mask:BitMap"),&TextureButton::set_click_mask);
- ObjectTypeDB::bind_method(_MD("set_texture_scale","scale"),&TextureButton::set_texture_scale);
- ObjectTypeDB::bind_method(_MD("set_modulate","color"),&TextureButton::set_modulate);
-
- ObjectTypeDB::bind_method(_MD("get_normal_texture:Texture"),&TextureButton::get_normal_texture);
- ObjectTypeDB::bind_method(_MD("get_pressed_texture:Texture"),&TextureButton::get_pressed_texture);
- ObjectTypeDB::bind_method(_MD("get_hover_texture:Texture"),&TextureButton::get_hover_texture);
- ObjectTypeDB::bind_method(_MD("get_disabled_texture:Texture"),&TextureButton::get_disabled_texture);
- ObjectTypeDB::bind_method(_MD("get_focused_texture:Texture"),&TextureButton::get_focused_texture);
- ObjectTypeDB::bind_method(_MD("get_click_mask:BitMap"),&TextureButton::get_click_mask);
- ObjectTypeDB::bind_method(_MD("get_texture_scale"),&TextureButton::get_texture_scale);
- ObjectTypeDB::bind_method(_MD("get_modulate"),&TextureButton::get_modulate);
+ ClassDB::bind_method(_MD("set_normal_texture","texture:Texture"),&TextureButton::set_normal_texture);
+ ClassDB::bind_method(_MD("set_pressed_texture","texture:Texture"),&TextureButton::set_pressed_texture);
+ ClassDB::bind_method(_MD("set_hover_texture","texture:Texture"),&TextureButton::set_hover_texture);
+ ClassDB::bind_method(_MD("set_disabled_texture","texture:Texture"),&TextureButton::set_disabled_texture);
+ ClassDB::bind_method(_MD("set_focused_texture","texture:Texture"),&TextureButton::set_focused_texture);
+ ClassDB::bind_method(_MD("set_click_mask","mask:BitMap"),&TextureButton::set_click_mask);
+ ClassDB::bind_method(_MD("set_texture_scale","scale"),&TextureButton::set_texture_scale);
+ ClassDB::bind_method(_MD("set_modulate","color"),&TextureButton::set_modulate);
+
+ ClassDB::bind_method(_MD("get_normal_texture:Texture"),&TextureButton::get_normal_texture);
+ ClassDB::bind_method(_MD("get_pressed_texture:Texture"),&TextureButton::get_pressed_texture);
+ ClassDB::bind_method(_MD("get_hover_texture:Texture"),&TextureButton::get_hover_texture);
+ ClassDB::bind_method(_MD("get_disabled_texture:Texture"),&TextureButton::get_disabled_texture);
+ ClassDB::bind_method(_MD("get_focused_texture:Texture"),&TextureButton::get_focused_texture);
+ ClassDB::bind_method(_MD("get_click_mask:BitMap"),&TextureButton::get_click_mask);
+ ClassDB::bind_method(_MD("get_texture_scale"),&TextureButton::get_texture_scale);
+ ClassDB::bind_method(_MD("get_modulate"),&TextureButton::get_modulate);
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/normal",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_normal_texture"), _SCS("get_normal_texture"));
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT,"textures/pressed",PROPERTY_HINT_RESOURCE_TYPE,"Texture"), _SCS("set_pressed_texture"), _SCS("get_pressed_texture"));
diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h
index 047dbfadfa..b6cb531c71 100644
--- a/scene/gui/texture_button.h
+++ b/scene/gui/texture_button.h
@@ -33,7 +33,7 @@
#include "scene/resources/bit_mask.h"
class TextureButton : public BaseButton {
- OBJ_TYPE( TextureButton, BaseButton );
+ GDCLASS( TextureButton, BaseButton );
Ref<Texture> normal;
Ref<Texture> pressed;
diff --git a/scene/gui/texture_frame.cpp b/scene/gui/texture_frame.cpp
index 571aafdbf7..9c2113233c 100644
--- a/scene/gui/texture_frame.cpp
+++ b/scene/gui/texture_frame.cpp
@@ -95,14 +95,14 @@ Size2 TextureFrame::get_minimum_size() const {
void TextureFrame::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_texture","texture"), & TextureFrame::set_texture );
- ObjectTypeDB::bind_method(_MD("get_texture"), & TextureFrame::get_texture );
- ObjectTypeDB::bind_method(_MD("set_modulate","modulate"), & TextureFrame::set_modulate );
- ObjectTypeDB::bind_method(_MD("get_modulate"), & TextureFrame::get_modulate );
- ObjectTypeDB::bind_method(_MD("set_expand","enable"), & TextureFrame::set_expand );
- ObjectTypeDB::bind_method(_MD("has_expand"), & TextureFrame::has_expand );
- ObjectTypeDB::bind_method(_MD("set_stretch_mode","stretch_mode"), & TextureFrame::set_stretch_mode );
- ObjectTypeDB::bind_method(_MD("get_stretch_mode"), & TextureFrame::get_stretch_mode );
+ ClassDB::bind_method(_MD("set_texture","texture"), & TextureFrame::set_texture );
+ ClassDB::bind_method(_MD("get_texture"), & TextureFrame::get_texture );
+ ClassDB::bind_method(_MD("set_modulate","modulate"), & TextureFrame::set_modulate );
+ ClassDB::bind_method(_MD("get_modulate"), & TextureFrame::get_modulate );
+ ClassDB::bind_method(_MD("set_expand","enable"), & TextureFrame::set_expand );
+ ClassDB::bind_method(_MD("has_expand"), & TextureFrame::has_expand );
+ ClassDB::bind_method(_MD("set_stretch_mode","stretch_mode"), & TextureFrame::set_stretch_mode );
+ ClassDB::bind_method(_MD("get_stretch_mode"), & TextureFrame::get_stretch_mode );
ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), _SCS("set_texture"),_SCS("get_texture") );
ADD_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate") );
diff --git a/scene/gui/texture_frame.h b/scene/gui/texture_frame.h
index bfd0ff0c20..47a653a117 100644
--- a/scene/gui/texture_frame.h
+++ b/scene/gui/texture_frame.h
@@ -35,7 +35,7 @@
*/
class TextureFrame : public Control {
- OBJ_TYPE(TextureFrame,Control);
+ GDCLASS(TextureFrame,Control);
public:
enum StretchMode {
STRETCH_SCALE_ON_EXPAND, //default, for backwards compatibility
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index ba9fec03d2..93e89f0769 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -255,26 +255,26 @@ Point2 TextureProgress::get_radial_center_offset()
void TextureProgress::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_under_texture","tex"),&TextureProgress::set_under_texture);
- ObjectTypeDB::bind_method(_MD("get_under_texture"),&TextureProgress::get_under_texture);
+ ClassDB::bind_method(_MD("set_under_texture","tex"),&TextureProgress::set_under_texture);
+ ClassDB::bind_method(_MD("get_under_texture"),&TextureProgress::get_under_texture);
- ObjectTypeDB::bind_method(_MD("set_progress_texture","tex"),&TextureProgress::set_progress_texture);
- ObjectTypeDB::bind_method(_MD("get_progress_texture"),&TextureProgress::get_progress_texture);
+ ClassDB::bind_method(_MD("set_progress_texture","tex"),&TextureProgress::set_progress_texture);
+ ClassDB::bind_method(_MD("get_progress_texture"),&TextureProgress::get_progress_texture);
- ObjectTypeDB::bind_method(_MD("set_over_texture","tex"),&TextureProgress::set_over_texture);
- ObjectTypeDB::bind_method(_MD("get_over_texture"),&TextureProgress::get_over_texture);
+ ClassDB::bind_method(_MD("set_over_texture","tex"),&TextureProgress::set_over_texture);
+ ClassDB::bind_method(_MD("get_over_texture"),&TextureProgress::get_over_texture);
- ObjectTypeDB::bind_method(_MD("set_fill_mode","mode"),&TextureProgress::set_fill_mode);
- ObjectTypeDB::bind_method(_MD("get_fill_mode"), &TextureProgress::get_fill_mode);
+ ClassDB::bind_method(_MD("set_fill_mode","mode"),&TextureProgress::set_fill_mode);
+ ClassDB::bind_method(_MD("get_fill_mode"), &TextureProgress::get_fill_mode);
- ObjectTypeDB::bind_method(_MD("set_radial_initial_angle","mode"),&TextureProgress::set_radial_initial_angle);
- ObjectTypeDB::bind_method(_MD("get_radial_initial_angle"), &TextureProgress::get_radial_initial_angle);
+ ClassDB::bind_method(_MD("set_radial_initial_angle","mode"),&TextureProgress::set_radial_initial_angle);
+ ClassDB::bind_method(_MD("get_radial_initial_angle"), &TextureProgress::get_radial_initial_angle);
- ObjectTypeDB::bind_method(_MD("set_radial_center_offset","mode"),&TextureProgress::set_radial_center_offset);
- ObjectTypeDB::bind_method(_MD("get_radial_center_offset"), &TextureProgress::get_radial_center_offset);
+ ClassDB::bind_method(_MD("set_radial_center_offset","mode"),&TextureProgress::set_radial_center_offset);
+ ClassDB::bind_method(_MD("get_radial_center_offset"), &TextureProgress::get_radial_center_offset);
- ObjectTypeDB::bind_method(_MD("set_fill_degrees","mode"),&TextureProgress::set_fill_degrees);
- ObjectTypeDB::bind_method(_MD("get_fill_degrees"), &TextureProgress::get_fill_degrees);
+ ClassDB::bind_method(_MD("set_fill_degrees","mode"),&TextureProgress::set_fill_degrees);
+ ClassDB::bind_method(_MD("get_fill_degrees"), &TextureProgress::get_fill_degrees);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture/under",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_under_texture"),_SCS("get_under_texture"));
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"texture/over",PROPERTY_HINT_RESOURCE_TYPE,"Texture"),_SCS("set_over_texture"),_SCS("get_over_texture"));
diff --git a/scene/gui/texture_progress.h b/scene/gui/texture_progress.h
index 17faa606f9..02794354ef 100644
--- a/scene/gui/texture_progress.h
+++ b/scene/gui/texture_progress.h
@@ -33,7 +33,7 @@
class TextureProgress : public Range {
- OBJ_TYPE( TextureProgress, Range );
+ GDCLASS( TextureProgress, Range );
Ref<Texture> under;
Ref<Texture> progress;
diff --git a/scene/gui/tool_button.h b/scene/gui/tool_button.h
index bce4657e8e..ddeb34273b 100644
--- a/scene/gui/tool_button.h
+++ b/scene/gui/tool_button.h
@@ -32,7 +32,7 @@
#include "scene/gui/button.h"
class ToolButton : public Button {
- OBJ_TYPE(ToolButton,Button);
+ GDCLASS(ToolButton,Button);
public:
ToolButton();
};
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index c6727d132e..6e8d4a173f 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -657,76 +657,76 @@ Color TreeItem::get_custom_bg_color(int p_column) const {
void TreeItem::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_cell_mode","column","mode"),&TreeItem::set_cell_mode);
- ObjectTypeDB::bind_method(_MD("get_cell_mode","column"),&TreeItem::get_cell_mode);
+ ClassDB::bind_method(_MD("set_cell_mode","column","mode"),&TreeItem::set_cell_mode);
+ ClassDB::bind_method(_MD("get_cell_mode","column"),&TreeItem::get_cell_mode);
- ObjectTypeDB::bind_method(_MD("set_checked","column","checked"),&TreeItem::set_checked);
- ObjectTypeDB::bind_method(_MD("is_checked","column"),&TreeItem::is_checked);
+ ClassDB::bind_method(_MD("set_checked","column","checked"),&TreeItem::set_checked);
+ ClassDB::bind_method(_MD("is_checked","column"),&TreeItem::is_checked);
- ObjectTypeDB::bind_method(_MD("set_text","column","text"),&TreeItem::set_text);
- ObjectTypeDB::bind_method(_MD("get_text","column"),&TreeItem::get_text);
+ ClassDB::bind_method(_MD("set_text","column","text"),&TreeItem::set_text);
+ ClassDB::bind_method(_MD("get_text","column"),&TreeItem::get_text);
- ObjectTypeDB::bind_method(_MD("set_icon","column","texture:Texture"),&TreeItem::set_icon);
- ObjectTypeDB::bind_method(_MD("get_icon:Texture","column"),&TreeItem::get_icon);
+ ClassDB::bind_method(_MD("set_icon","column","texture:Texture"),&TreeItem::set_icon);
+ ClassDB::bind_method(_MD("get_icon:Texture","column"),&TreeItem::get_icon);
- ObjectTypeDB::bind_method(_MD("set_icon_region","column","region"),&TreeItem::set_icon_region);
- ObjectTypeDB::bind_method(_MD("get_icon_region","column"),&TreeItem::get_icon_region);
+ ClassDB::bind_method(_MD("set_icon_region","column","region"),&TreeItem::set_icon_region);
+ ClassDB::bind_method(_MD("get_icon_region","column"),&TreeItem::get_icon_region);
- ObjectTypeDB::bind_method(_MD("set_icon_max_width","column","width"),&TreeItem::set_icon_max_width);
- ObjectTypeDB::bind_method(_MD("get_icon_max_width","column"),&TreeItem::get_icon_max_width);
+ ClassDB::bind_method(_MD("set_icon_max_width","column","width"),&TreeItem::set_icon_max_width);
+ ClassDB::bind_method(_MD("get_icon_max_width","column"),&TreeItem::get_icon_max_width);
- ObjectTypeDB::bind_method(_MD("set_range","column","value"),&TreeItem::set_range);
- ObjectTypeDB::bind_method(_MD("get_range","column"),&TreeItem::get_range);
- ObjectTypeDB::bind_method(_MD("set_range_config","column","min","max","step","expr"),&TreeItem::set_range_config,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_range_config","column"),&TreeItem::_get_range_config);
+ ClassDB::bind_method(_MD("set_range","column","value"),&TreeItem::set_range);
+ ClassDB::bind_method(_MD("get_range","column"),&TreeItem::get_range);
+ ClassDB::bind_method(_MD("set_range_config","column","min","max","step","expr"),&TreeItem::set_range_config,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_range_config","column"),&TreeItem::_get_range_config);
- ObjectTypeDB::bind_method(_MD("set_metadata","column","meta"),&TreeItem::set_metadata);
- ObjectTypeDB::bind_method(_MD("get_metadata","column"),&TreeItem::get_metadata);
+ ClassDB::bind_method(_MD("set_metadata","column","meta"),&TreeItem::set_metadata);
+ ClassDB::bind_method(_MD("get_metadata","column"),&TreeItem::get_metadata);
- ObjectTypeDB::bind_method(_MD("set_custom_draw","column","object","callback"),&TreeItem::set_custom_draw);
+ ClassDB::bind_method(_MD("set_custom_draw","column","object","callback"),&TreeItem::set_custom_draw);
- ObjectTypeDB::bind_method(_MD("set_collapsed","enable"),&TreeItem::set_collapsed);
- ObjectTypeDB::bind_method(_MD("is_collapsed"),&TreeItem::is_collapsed);
+ ClassDB::bind_method(_MD("set_collapsed","enable"),&TreeItem::set_collapsed);
+ ClassDB::bind_method(_MD("is_collapsed"),&TreeItem::is_collapsed);
- ObjectTypeDB::bind_method(_MD("get_next:TreeItem"),&TreeItem::get_next);
- ObjectTypeDB::bind_method(_MD("get_prev:TreeItem"),&TreeItem::get_prev);
- ObjectTypeDB::bind_method(_MD("get_parent:TreeItem"),&TreeItem::get_parent);
- ObjectTypeDB::bind_method(_MD("get_children:TreeItem"),&TreeItem::get_children);
+ ClassDB::bind_method(_MD("get_next:TreeItem"),&TreeItem::get_next);
+ ClassDB::bind_method(_MD("get_prev:TreeItem"),&TreeItem::get_prev);
+ ClassDB::bind_method(_MD("get_parent:TreeItem"),&TreeItem::get_parent);
+ ClassDB::bind_method(_MD("get_children:TreeItem"),&TreeItem::get_children);
- ObjectTypeDB::bind_method(_MD("get_next_visible:TreeItem"),&TreeItem::get_next_visible);
- ObjectTypeDB::bind_method(_MD("get_prev_visible:TreeItem"),&TreeItem::get_prev_visible);
+ ClassDB::bind_method(_MD("get_next_visible:TreeItem"),&TreeItem::get_next_visible);
+ ClassDB::bind_method(_MD("get_prev_visible:TreeItem"),&TreeItem::get_prev_visible);
- ObjectTypeDB::bind_method(_MD("remove_child:TreeItem","child"),&TreeItem::_remove_child);
+ ClassDB::bind_method(_MD("remove_child:TreeItem","child"),&TreeItem::_remove_child);
- ObjectTypeDB::bind_method(_MD("set_selectable","column","selectable"),&TreeItem::set_selectable);
- ObjectTypeDB::bind_method(_MD("is_selectable","column"),&TreeItem::is_selectable);
+ ClassDB::bind_method(_MD("set_selectable","column","selectable"),&TreeItem::set_selectable);
+ ClassDB::bind_method(_MD("is_selectable","column"),&TreeItem::is_selectable);
- ObjectTypeDB::bind_method(_MD("is_selected","column"),&TreeItem::is_selected);
- ObjectTypeDB::bind_method(_MD("select","column"),&TreeItem::select);
- ObjectTypeDB::bind_method(_MD("deselect","column"),&TreeItem::deselect);
+ ClassDB::bind_method(_MD("is_selected","column"),&TreeItem::is_selected);
+ ClassDB::bind_method(_MD("select","column"),&TreeItem::select);
+ ClassDB::bind_method(_MD("deselect","column"),&TreeItem::deselect);
- ObjectTypeDB::bind_method(_MD("set_editable","column","enabled"),&TreeItem::set_editable);
- ObjectTypeDB::bind_method(_MD("is_editable","column"),&TreeItem::is_editable);
+ ClassDB::bind_method(_MD("set_editable","column","enabled"),&TreeItem::set_editable);
+ ClassDB::bind_method(_MD("is_editable","column"),&TreeItem::is_editable);
- ObjectTypeDB::bind_method(_MD("set_custom_color","column","color"),&TreeItem::set_custom_color);
- ObjectTypeDB::bind_method(_MD("clear_custom_color","column"),&TreeItem::clear_custom_color);
+ ClassDB::bind_method(_MD("set_custom_color","column","color"),&TreeItem::set_custom_color);
+ ClassDB::bind_method(_MD("clear_custom_color","column"),&TreeItem::clear_custom_color);
- ObjectTypeDB::bind_method(_MD("set_custom_bg_color","column","color","just_outline"),&TreeItem::set_custom_bg_color,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("clear_custom_bg_color","column"),&TreeItem::clear_custom_bg_color);
- ObjectTypeDB::bind_method(_MD("get_custom_bg_color","column"),&TreeItem::get_custom_bg_color);
+ ClassDB::bind_method(_MD("set_custom_bg_color","column","color","just_outline"),&TreeItem::set_custom_bg_color,DEFVAL(false));
+ ClassDB::bind_method(_MD("clear_custom_bg_color","column"),&TreeItem::clear_custom_bg_color);
+ ClassDB::bind_method(_MD("get_custom_bg_color","column"),&TreeItem::get_custom_bg_color);
- ObjectTypeDB::bind_method(_MD("add_button","column","button:Texture","button_idx","disabled"),&TreeItem::add_button,DEFVAL(-1),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_button_count","column"),&TreeItem::get_button_count);
- ObjectTypeDB::bind_method(_MD("get_button:Texture","column","button_idx"),&TreeItem::get_button);
- ObjectTypeDB::bind_method(_MD("set_button","column","button_idx","button:Texture"),&TreeItem::set_button);
- ObjectTypeDB::bind_method(_MD("erase_button","column","button_idx"),&TreeItem::erase_button);
- ObjectTypeDB::bind_method(_MD("is_button_disabled","column","button_idx"),&TreeItem::is_button_disabled);
+ ClassDB::bind_method(_MD("add_button","column","button:Texture","button_idx","disabled"),&TreeItem::add_button,DEFVAL(-1),DEFVAL(false));
+ ClassDB::bind_method(_MD("get_button_count","column"),&TreeItem::get_button_count);
+ ClassDB::bind_method(_MD("get_button:Texture","column","button_idx"),&TreeItem::get_button);
+ ClassDB::bind_method(_MD("set_button","column","button_idx","button:Texture"),&TreeItem::set_button);
+ ClassDB::bind_method(_MD("erase_button","column","button_idx"),&TreeItem::erase_button);
+ ClassDB::bind_method(_MD("is_button_disabled","column","button_idx"),&TreeItem::is_button_disabled);
- ObjectTypeDB::bind_method(_MD("set_tooltip","column","tooltip"),&TreeItem::set_tooltip);
- ObjectTypeDB::bind_method(_MD("get_tooltip","column"),&TreeItem::get_tooltip);
+ ClassDB::bind_method(_MD("set_tooltip","column","tooltip"),&TreeItem::set_tooltip);
+ ClassDB::bind_method(_MD("get_tooltip","column"),&TreeItem::get_tooltip);
- ObjectTypeDB::bind_method(_MD("move_to_top"),&TreeItem::move_to_top);
- ObjectTypeDB::bind_method(_MD("move_to_bottom"),&TreeItem::move_to_bottom);
+ ClassDB::bind_method(_MD("move_to_top"),&TreeItem::move_to_top);
+ ClassDB::bind_method(_MD("move_to_bottom"),&TreeItem::move_to_bottom);
BIND_CONSTANT( CELL_MODE_STRING );
BIND_CONSTANT( CELL_MODE_CHECK );
@@ -3566,59 +3566,59 @@ bool Tree::get_allow_rmb_select() const{
void Tree::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_range_click_timeout"),&Tree::_range_click_timeout);
- ObjectTypeDB::bind_method(_MD("_input_event"),&Tree::_input_event);
- ObjectTypeDB::bind_method(_MD("_popup_select"),&Tree::popup_select);
- ObjectTypeDB::bind_method(_MD("_text_editor_enter"),&Tree::text_editor_enter);
- ObjectTypeDB::bind_method(_MD("_text_editor_modal_close"),&Tree::_text_editor_modal_close);
- ObjectTypeDB::bind_method(_MD("_value_editor_changed"),&Tree::value_editor_changed);
- ObjectTypeDB::bind_method(_MD("_scroll_moved"),&Tree::_scroll_moved);
+ ClassDB::bind_method(_MD("_range_click_timeout"),&Tree::_range_click_timeout);
+ ClassDB::bind_method(_MD("_input_event"),&Tree::_input_event);
+ ClassDB::bind_method(_MD("_popup_select"),&Tree::popup_select);
+ ClassDB::bind_method(_MD("_text_editor_enter"),&Tree::text_editor_enter);
+ ClassDB::bind_method(_MD("_text_editor_modal_close"),&Tree::_text_editor_modal_close);
+ ClassDB::bind_method(_MD("_value_editor_changed"),&Tree::value_editor_changed);
+ ClassDB::bind_method(_MD("_scroll_moved"),&Tree::_scroll_moved);
- ObjectTypeDB::bind_method(_MD("clear"),&Tree::clear);
- ObjectTypeDB::bind_method(_MD("create_item:TreeItem","parent:TreeItem"),&Tree::_create_item,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("clear"),&Tree::clear);
+ ClassDB::bind_method(_MD("create_item:TreeItem","parent:TreeItem"),&Tree::_create_item,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("get_root:TreeItem"),&Tree::get_root);
- ObjectTypeDB::bind_method(_MD("set_column_min_width","column","min_width"),&Tree::set_column_min_width);
- ObjectTypeDB::bind_method(_MD("set_column_expand","column","expand"),&Tree::set_column_expand);
- ObjectTypeDB::bind_method(_MD("get_column_width","column"),&Tree::get_column_width);
+ ClassDB::bind_method(_MD("get_root:TreeItem"),&Tree::get_root);
+ ClassDB::bind_method(_MD("set_column_min_width","column","min_width"),&Tree::set_column_min_width);
+ ClassDB::bind_method(_MD("set_column_expand","column","expand"),&Tree::set_column_expand);
+ ClassDB::bind_method(_MD("get_column_width","column"),&Tree::get_column_width);
- ObjectTypeDB::bind_method(_MD("set_hide_root","enable"),&Tree::set_hide_root);
- ObjectTypeDB::bind_method(_MD("get_next_selected:TreeItem","from:TreeItem"),&Tree::_get_next_selected);
- ObjectTypeDB::bind_method(_MD("get_selected:TreeItem"),&Tree::get_selected);
- ObjectTypeDB::bind_method(_MD("get_selected_column"),&Tree::get_selected_column);
- ObjectTypeDB::bind_method(_MD("get_pressed_button"),&Tree::get_pressed_button);
- ObjectTypeDB::bind_method(_MD("set_select_mode","mode"),&Tree::set_select_mode);
+ ClassDB::bind_method(_MD("set_hide_root","enable"),&Tree::set_hide_root);
+ ClassDB::bind_method(_MD("get_next_selected:TreeItem","from:TreeItem"),&Tree::_get_next_selected);
+ ClassDB::bind_method(_MD("get_selected:TreeItem"),&Tree::get_selected);
+ ClassDB::bind_method(_MD("get_selected_column"),&Tree::get_selected_column);
+ ClassDB::bind_method(_MD("get_pressed_button"),&Tree::get_pressed_button);
+ ClassDB::bind_method(_MD("set_select_mode","mode"),&Tree::set_select_mode);
- ObjectTypeDB::bind_method(_MD("set_columns","amount"),&Tree::set_columns);
- ObjectTypeDB::bind_method(_MD("get_columns"),&Tree::get_columns);
+ ClassDB::bind_method(_MD("set_columns","amount"),&Tree::set_columns);
+ ClassDB::bind_method(_MD("get_columns"),&Tree::get_columns);
- ObjectTypeDB::bind_method(_MD("get_edited:TreeItem"),&Tree::get_edited);
- ObjectTypeDB::bind_method(_MD("get_edited_column"),&Tree::get_edited_column);
- ObjectTypeDB::bind_method(_MD("get_custom_popup_rect"),&Tree::get_custom_popup_rect);
- ObjectTypeDB::bind_method(_MD("get_item_area_rect","item:TreeItem","column"),&Tree::_get_item_rect,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("get_item_at_pos:TreeItem","pos"),&Tree::get_item_at_pos);
- ObjectTypeDB::bind_method(_MD("get_column_at_pos","pos"),&Tree::get_column_at_pos);
+ ClassDB::bind_method(_MD("get_edited:TreeItem"),&Tree::get_edited);
+ ClassDB::bind_method(_MD("get_edited_column"),&Tree::get_edited_column);
+ ClassDB::bind_method(_MD("get_custom_popup_rect"),&Tree::get_custom_popup_rect);
+ ClassDB::bind_method(_MD("get_item_area_rect","item:TreeItem","column"),&Tree::_get_item_rect,DEFVAL(-1));
+ ClassDB::bind_method(_MD("get_item_at_pos:TreeItem","pos"),&Tree::get_item_at_pos);
+ ClassDB::bind_method(_MD("get_column_at_pos","pos"),&Tree::get_column_at_pos);
- ObjectTypeDB::bind_method(_MD("ensure_cursor_is_visible"),&Tree::ensure_cursor_is_visible);
+ ClassDB::bind_method(_MD("ensure_cursor_is_visible"),&Tree::ensure_cursor_is_visible);
- ObjectTypeDB::bind_method(_MD("set_column_titles_visible","visible"),&Tree::set_column_titles_visible);
- ObjectTypeDB::bind_method(_MD("are_column_titles_visible"),&Tree::are_column_titles_visible);
+ ClassDB::bind_method(_MD("set_column_titles_visible","visible"),&Tree::set_column_titles_visible);
+ ClassDB::bind_method(_MD("are_column_titles_visible"),&Tree::are_column_titles_visible);
- ObjectTypeDB::bind_method(_MD("set_column_title","column","title"),&Tree::set_column_title);
- ObjectTypeDB::bind_method(_MD("get_column_title","column"),&Tree::get_column_title);
- ObjectTypeDB::bind_method(_MD("get_scroll"),&Tree::get_scroll);
+ ClassDB::bind_method(_MD("set_column_title","column","title"),&Tree::set_column_title);
+ ClassDB::bind_method(_MD("get_column_title","column"),&Tree::get_column_title);
+ ClassDB::bind_method(_MD("get_scroll"),&Tree::get_scroll);
- ObjectTypeDB::bind_method(_MD("set_hide_folding","hide"),&Tree::set_hide_folding);
- ObjectTypeDB::bind_method(_MD("is_folding_hidden"),&Tree::is_folding_hidden);
+ ClassDB::bind_method(_MD("set_hide_folding","hide"),&Tree::set_hide_folding);
+ ClassDB::bind_method(_MD("is_folding_hidden"),&Tree::is_folding_hidden);
- ObjectTypeDB::bind_method(_MD("set_drop_mode_flags","flags"),&Tree::set_drop_mode_flags);
- ObjectTypeDB::bind_method(_MD("get_drop_mode_flags"),&Tree::get_drop_mode_flags);
+ ClassDB::bind_method(_MD("set_drop_mode_flags","flags"),&Tree::set_drop_mode_flags);
+ ClassDB::bind_method(_MD("get_drop_mode_flags"),&Tree::get_drop_mode_flags);
- ObjectTypeDB::bind_method(_MD("set_allow_rmb_select","allow"),&Tree::set_allow_rmb_select);
- ObjectTypeDB::bind_method(_MD("get_allow_rmb_select"),&Tree::get_allow_rmb_select);
+ ClassDB::bind_method(_MD("set_allow_rmb_select","allow"),&Tree::set_allow_rmb_select);
+ ClassDB::bind_method(_MD("get_allow_rmb_select"),&Tree::get_allow_rmb_select);
- ObjectTypeDB::bind_method(_MD("set_single_select_cell_editing_only_when_already_selected","enable"),&Tree::set_single_select_cell_editing_only_when_already_selected);
- ObjectTypeDB::bind_method(_MD("get_single_select_cell_editing_only_when_already_selected"),&Tree::get_single_select_cell_editing_only_when_already_selected);
+ ClassDB::bind_method(_MD("set_single_select_cell_editing_only_when_already_selected","enable"),&Tree::set_single_select_cell_editing_only_when_already_selected);
+ ClassDB::bind_method(_MD("get_single_select_cell_editing_only_when_already_selected"),&Tree::get_single_select_cell_editing_only_when_already_selected);
ADD_SIGNAL( MethodInfo("item_selected"));
ADD_SIGNAL( MethodInfo("cell_selected"));
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 19b48f2000..c69f685176 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -45,7 +45,7 @@ class Tree;
class TreeItem : public Object {
- OBJ_TYPE(TreeItem,Object);
+ GDCLASS(TreeItem,Object);
public:
enum TreeCellMode {
@@ -257,7 +257,7 @@ VARIANT_ENUM_CAST( TreeItem::TreeCellMode );
class Tree : public Control {
- OBJ_TYPE( Tree, Control );
+ GDCLASS( Tree, Control );
public:
enum SelectMode {
SELECT_SINGLE,
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 46b7bc6cbe..a6690189cc 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -357,40 +357,40 @@ bool VideoPlayer::has_autoplay() const {
void VideoPlayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_stream","stream:VideoStream"),&VideoPlayer::set_stream);
- ObjectTypeDB::bind_method(_MD("get_stream:VideoStream"),&VideoPlayer::get_stream);
+ ClassDB::bind_method(_MD("set_stream","stream:VideoStream"),&VideoPlayer::set_stream);
+ ClassDB::bind_method(_MD("get_stream:VideoStream"),&VideoPlayer::get_stream);
- ObjectTypeDB::bind_method(_MD("play"),&VideoPlayer::play);
- ObjectTypeDB::bind_method(_MD("stop"),&VideoPlayer::stop);
+ ClassDB::bind_method(_MD("play"),&VideoPlayer::play);
+ ClassDB::bind_method(_MD("stop"),&VideoPlayer::stop);
- ObjectTypeDB::bind_method(_MD("is_playing"),&VideoPlayer::is_playing);
+ ClassDB::bind_method(_MD("is_playing"),&VideoPlayer::is_playing);
- ObjectTypeDB::bind_method(_MD("set_paused","paused"),&VideoPlayer::set_paused);
- ObjectTypeDB::bind_method(_MD("is_paused"),&VideoPlayer::is_paused);
+ ClassDB::bind_method(_MD("set_paused","paused"),&VideoPlayer::set_paused);
+ ClassDB::bind_method(_MD("is_paused"),&VideoPlayer::is_paused);
- ObjectTypeDB::bind_method(_MD("set_volume","volume"),&VideoPlayer::set_volume);
- ObjectTypeDB::bind_method(_MD("get_volume"),&VideoPlayer::get_volume);
+ ClassDB::bind_method(_MD("set_volume","volume"),&VideoPlayer::set_volume);
+ ClassDB::bind_method(_MD("get_volume"),&VideoPlayer::get_volume);
- ObjectTypeDB::bind_method(_MD("set_volume_db","db"),&VideoPlayer::set_volume_db);
- ObjectTypeDB::bind_method(_MD("get_volume_db"),&VideoPlayer::get_volume_db);
+ ClassDB::bind_method(_MD("set_volume_db","db"),&VideoPlayer::set_volume_db);
+ ClassDB::bind_method(_MD("get_volume_db"),&VideoPlayer::get_volume_db);
- ObjectTypeDB::bind_method(_MD("set_audio_track","track"),&VideoPlayer::set_audio_track);
- ObjectTypeDB::bind_method(_MD("get_audio_track"),&VideoPlayer::get_audio_track);
+ ClassDB::bind_method(_MD("set_audio_track","track"),&VideoPlayer::set_audio_track);
+ ClassDB::bind_method(_MD("get_audio_track"),&VideoPlayer::get_audio_track);
- ObjectTypeDB::bind_method(_MD("get_stream_name"),&VideoPlayer::get_stream_name);
+ ClassDB::bind_method(_MD("get_stream_name"),&VideoPlayer::get_stream_name);
- ObjectTypeDB::bind_method(_MD("get_stream_pos"),&VideoPlayer::get_stream_pos);
+ ClassDB::bind_method(_MD("get_stream_pos"),&VideoPlayer::get_stream_pos);
- ObjectTypeDB::bind_method(_MD("set_autoplay","enabled"),&VideoPlayer::set_autoplay);
- ObjectTypeDB::bind_method(_MD("has_autoplay"),&VideoPlayer::has_autoplay);
+ ClassDB::bind_method(_MD("set_autoplay","enabled"),&VideoPlayer::set_autoplay);
+ ClassDB::bind_method(_MD("has_autoplay"),&VideoPlayer::has_autoplay);
- ObjectTypeDB::bind_method(_MD("set_expand","enable"), &VideoPlayer::set_expand );
- ObjectTypeDB::bind_method(_MD("has_expand"), &VideoPlayer::has_expand );
+ ClassDB::bind_method(_MD("set_expand","enable"), &VideoPlayer::set_expand );
+ ClassDB::bind_method(_MD("has_expand"), &VideoPlayer::has_expand );
- ObjectTypeDB::bind_method(_MD("set_buffering_msec","msec"),&VideoPlayer::set_buffering_msec);
- ObjectTypeDB::bind_method(_MD("get_buffering_msec"),&VideoPlayer::get_buffering_msec);
+ ClassDB::bind_method(_MD("set_buffering_msec","msec"),&VideoPlayer::set_buffering_msec);
+ ClassDB::bind_method(_MD("get_buffering_msec"),&VideoPlayer::get_buffering_msec);
- ObjectTypeDB::bind_method(_MD("get_video_texture:Texture"), &VideoPlayer::get_video_texture );
+ ClassDB::bind_method(_MD("get_video_texture:Texture"), &VideoPlayer::get_video_texture );
ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/audio_track",PROPERTY_HINT_RANGE,"0,128,1"), _SCS("set_audio_track"), _SCS("get_audio_track") );
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"VideoStream"), _SCS("set_stream"), _SCS("get_stream") );
diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h
index c1d2caee8e..694cb253a4 100644
--- a/scene/gui/video_player.h
+++ b/scene/gui/video_player.h
@@ -35,7 +35,7 @@
class VideoPlayer : public Control {
- OBJ_TYPE(VideoPlayer,Control);
+ GDCLASS(VideoPlayer,Control);
struct InternalStream : public AudioServer::AudioStream {
VideoPlayer *player;
diff --git a/scene/gui/viewport_container.cpp b/scene/gui/viewport_container.cpp
index 3418a495e9..37ecd3cb2f 100644
--- a/scene/gui/viewport_container.cpp
+++ b/scene/gui/viewport_container.cpp
@@ -91,8 +91,8 @@ void ViewportContainer::_notification(int p_what) {
void ViewportContainer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_stretch","enable"),&ViewportContainer::set_stretch);
- ObjectTypeDB::bind_method(_MD("is_stretch_enabled"),&ViewportContainer::is_stretch_enabled);
+ ClassDB::bind_method(_MD("set_stretch","enable"),&ViewportContainer::set_stretch);
+ ClassDB::bind_method(_MD("is_stretch_enabled"),&ViewportContainer::is_stretch_enabled);
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"stretch"),_SCS("set_stretch"),_SCS("is_stretch_enabled"));
}
diff --git a/scene/gui/viewport_container.h b/scene/gui/viewport_container.h
index cfc58f7d6e..632c54f2f4 100644
--- a/scene/gui/viewport_container.h
+++ b/scene/gui/viewport_container.h
@@ -5,7 +5,7 @@
class ViewportContainer : public Container {
- OBJ_TYPE( ViewportContainer, Container );
+ GDCLASS( ViewportContainer, Container );
bool stretch;
protected:
diff --git a/scene/io/resource_format_image.cpp b/scene/io/resource_format_image.cpp
index 597485cae0..b1034041ba 100644
--- a/scene/io/resource_format_image.cpp
+++ b/scene/io/resource_format_image.cpp
@@ -224,7 +224,7 @@ uint32_t ResourceFormatLoaderImage::load_image_flags(const String &p_path) {
bool ResourceFormatLoaderImage::handles_type(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Texture") || ObjectTypeDB::is_type(p_type,"CubeMap");
+ return ClassDB::is_parent_class(p_type,"Texture") || ClassDB::is_parent_class(p_type,"CubeMap");
}
void ResourceFormatLoaderImage::get_recognized_extensions(List<String> *p_extensions) const {
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp
index 9f20e0f845..c5fdcddf15 100644
--- a/scene/main/canvas_layer.cpp
+++ b/scene/main/canvas_layer.cpp
@@ -259,33 +259,33 @@ int CanvasLayer::get_sort_index() {
void CanvasLayer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_layer","layer"),&CanvasLayer::set_layer);
- ObjectTypeDB::bind_method(_MD("get_layer"),&CanvasLayer::get_layer);
+ ClassDB::bind_method(_MD("set_layer","layer"),&CanvasLayer::set_layer);
+ ClassDB::bind_method(_MD("get_layer"),&CanvasLayer::get_layer);
- ObjectTypeDB::bind_method(_MD("set_transform","transform"),&CanvasLayer::set_transform);
- ObjectTypeDB::bind_method(_MD("get_transform"),&CanvasLayer::get_transform);
+ ClassDB::bind_method(_MD("set_transform","transform"),&CanvasLayer::set_transform);
+ ClassDB::bind_method(_MD("get_transform"),&CanvasLayer::get_transform);
- ObjectTypeDB::bind_method(_MD("set_offset","offset"),&CanvasLayer::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset"),&CanvasLayer::get_offset);
+ ClassDB::bind_method(_MD("set_offset","offset"),&CanvasLayer::set_offset);
+ ClassDB::bind_method(_MD("get_offset"),&CanvasLayer::get_offset);
- ObjectTypeDB::bind_method(_MD("set_rotation","radians"),&CanvasLayer::set_rotation);
- ObjectTypeDB::bind_method(_MD("get_rotation"),&CanvasLayer::get_rotation);
+ ClassDB::bind_method(_MD("set_rotation","radians"),&CanvasLayer::set_rotation);
+ ClassDB::bind_method(_MD("get_rotation"),&CanvasLayer::get_rotation);
- ObjectTypeDB::bind_method(_MD("set_rotationd","degrees"),&CanvasLayer::set_rotationd);
- ObjectTypeDB::bind_method(_MD("get_rotationd"),&CanvasLayer::get_rotationd);
+ ClassDB::bind_method(_MD("set_rotationd","degrees"),&CanvasLayer::set_rotationd);
+ ClassDB::bind_method(_MD("get_rotationd"),&CanvasLayer::get_rotationd);
// TODO: Obsolete those two methods (old name) properly (GH-4397)
- ObjectTypeDB::bind_method(_MD("_set_rotationd","degrees"),&CanvasLayer::_set_rotationd);
- ObjectTypeDB::bind_method(_MD("_get_rotationd"),&CanvasLayer::_get_rotationd);
+ ClassDB::bind_method(_MD("_set_rotationd","degrees"),&CanvasLayer::_set_rotationd);
+ ClassDB::bind_method(_MD("_get_rotationd"),&CanvasLayer::_get_rotationd);
- ObjectTypeDB::bind_method(_MD("set_scale","scale"),&CanvasLayer::set_scale);
- ObjectTypeDB::bind_method(_MD("get_scale"),&CanvasLayer::get_scale);
+ ClassDB::bind_method(_MD("set_scale","scale"),&CanvasLayer::set_scale);
+ ClassDB::bind_method(_MD("get_scale"),&CanvasLayer::get_scale);
- ObjectTypeDB::bind_method(_MD("set_custom_viewport","viewport:Viewport"),&CanvasLayer::set_custom_viewport);
- ObjectTypeDB::bind_method(_MD("get_custom_viewport:Viewport"),&CanvasLayer::get_custom_viewport);
+ ClassDB::bind_method(_MD("set_custom_viewport","viewport:Viewport"),&CanvasLayer::set_custom_viewport);
+ ClassDB::bind_method(_MD("get_custom_viewport:Viewport"),&CanvasLayer::get_custom_viewport);
- ObjectTypeDB::bind_method(_MD("get_world_2d:World2D"),&CanvasLayer::get_world_2d);
-// ObjectTypeDB::bind_method(_MD("get_viewport"),&CanvasLayer::get_viewport);
+ ClassDB::bind_method(_MD("get_world_2d:World2D"),&CanvasLayer::get_world_2d);
+// ClassDB::bind_method(_MD("get_viewport"),&CanvasLayer::get_viewport);
ADD_PROPERTY( PropertyInfo(Variant::INT,"layer",PROPERTY_HINT_RANGE,"-128,128,1"),_SCS("set_layer"),_SCS("get_layer") );
//ADD_PROPERTY( PropertyInfo(Variant::MATRIX32,"transform",PROPERTY_HINT_RANGE),_SCS("set_transform"),_SCS("get_transform") );
diff --git a/scene/main/canvas_layer.h b/scene/main/canvas_layer.h
index 2e3c917205..ea05fd7e1f 100644
--- a/scene/main/canvas_layer.h
+++ b/scene/main/canvas_layer.h
@@ -36,7 +36,7 @@
class Viewport;
class CanvasLayer : public Node {
- OBJ_TYPE( CanvasLayer, Node );
+ GDCLASS( CanvasLayer, Node );
bool locrotscale_dirty;
Vector2 ofs;
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index 4203edda77..1be43826f7 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -539,29 +539,29 @@ int HTTPRequest::get_body_size() const{
void HTTPRequest::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPRequest::set_ip_type);
- ObjectTypeDB::bind_method(_MD("request","url","custom_headers","ssl_validate_domain","method","request_data"),&HTTPRequest::request,DEFVAL(StringArray()),DEFVAL(true),DEFVAL(HTTPClient::METHOD_GET),DEFVAL(String()));
- ObjectTypeDB::bind_method(_MD("cancel_request"),&HTTPRequest::cancel_request);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPRequest::set_ip_type);
+ ClassDB::bind_method(_MD("request","url","custom_headers","ssl_validate_domain","method","request_data"),&HTTPRequest::request,DEFVAL(StringArray()),DEFVAL(true),DEFVAL(HTTPClient::METHOD_GET),DEFVAL(String()));
+ ClassDB::bind_method(_MD("cancel_request"),&HTTPRequest::cancel_request);
- ObjectTypeDB::bind_method(_MD("get_http_client_status"),&HTTPRequest::get_http_client_status);
+ ClassDB::bind_method(_MD("get_http_client_status"),&HTTPRequest::get_http_client_status);
- ObjectTypeDB::bind_method(_MD("set_use_threads","enable"),&HTTPRequest::set_use_threads);
- ObjectTypeDB::bind_method(_MD("is_using_threads"),&HTTPRequest::is_using_threads);
+ ClassDB::bind_method(_MD("set_use_threads","enable"),&HTTPRequest::set_use_threads);
+ ClassDB::bind_method(_MD("is_using_threads"),&HTTPRequest::is_using_threads);
- ObjectTypeDB::bind_method(_MD("set_body_size_limit","bytes"),&HTTPRequest::set_body_size_limit);
- ObjectTypeDB::bind_method(_MD("get_body_size_limit"),&HTTPRequest::get_body_size_limit);
+ ClassDB::bind_method(_MD("set_body_size_limit","bytes"),&HTTPRequest::set_body_size_limit);
+ ClassDB::bind_method(_MD("get_body_size_limit"),&HTTPRequest::get_body_size_limit);
- ObjectTypeDB::bind_method(_MD("set_max_redirects","amount"),&HTTPRequest::set_max_redirects);
- ObjectTypeDB::bind_method(_MD("get_max_redirects"),&HTTPRequest::get_max_redirects);
+ ClassDB::bind_method(_MD("set_max_redirects","amount"),&HTTPRequest::set_max_redirects);
+ ClassDB::bind_method(_MD("get_max_redirects"),&HTTPRequest::get_max_redirects);
- ObjectTypeDB::bind_method(_MD("set_download_file","path"),&HTTPRequest::set_download_file);
- ObjectTypeDB::bind_method(_MD("get_download_file"),&HTTPRequest::get_download_file);
+ ClassDB::bind_method(_MD("set_download_file","path"),&HTTPRequest::set_download_file);
+ ClassDB::bind_method(_MD("get_download_file"),&HTTPRequest::get_download_file);
- ObjectTypeDB::bind_method(_MD("get_downloaded_bytes"),&HTTPRequest::get_downloaded_bytes);
- ObjectTypeDB::bind_method(_MD("get_body_size"),&HTTPRequest::get_body_size);
+ ClassDB::bind_method(_MD("get_downloaded_bytes"),&HTTPRequest::get_downloaded_bytes);
+ ClassDB::bind_method(_MD("get_body_size"),&HTTPRequest::get_body_size);
- ObjectTypeDB::bind_method(_MD("_redirect_request"),&HTTPRequest::_redirect_request);
- ObjectTypeDB::bind_method(_MD("_request_done"),&HTTPRequest::_request_done);
+ ClassDB::bind_method(_MD("_redirect_request"),&HTTPRequest::_redirect_request);
+ ClassDB::bind_method(_MD("_request_done"),&HTTPRequest::_request_done);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"use_threads"),_SCS("set_use_threads"),_SCS("is_using_threads"));
ADD_PROPERTY(PropertyInfo(Variant::INT,"body_size_limit",PROPERTY_HINT_RANGE,"-1,2000000000"),_SCS("set_body_size_limit"),_SCS("get_body_size_limit"));
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index 5bf47111e8..d4adaa16d4 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -36,7 +36,7 @@
class HTTPRequest : public Node {
- OBJ_TYPE(HTTPRequest,Node);
+ GDCLASS(HTTPRequest,Node);
public:
enum Result {
diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp
index ebba96ff81..289adc3c53 100644
--- a/scene/main/instance_placeholder.cpp
+++ b/scene/main/instance_placeholder.cpp
@@ -122,9 +122,9 @@ Dictionary InstancePlaceholder::get_stored_values(bool p_with_order) {
void InstancePlaceholder::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_stored_values","with_order"),&InstancePlaceholder::get_stored_values,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("replace_by_instance","custom_scene:PackedScene"),&InstancePlaceholder::replace_by_instance,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("get_instance_path"),&InstancePlaceholder::get_instance_path);
+ ClassDB::bind_method(_MD("get_stored_values","with_order"),&InstancePlaceholder::get_stored_values,DEFVAL(false));
+ ClassDB::bind_method(_MD("replace_by_instance","custom_scene:PackedScene"),&InstancePlaceholder::replace_by_instance,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("get_instance_path"),&InstancePlaceholder::get_instance_path);
}
InstancePlaceholder::InstancePlaceholder() {
diff --git a/scene/main/instance_placeholder.h b/scene/main/instance_placeholder.h
index 85de393247..069b1c9756 100644
--- a/scene/main/instance_placeholder.h
+++ b/scene/main/instance_placeholder.h
@@ -35,7 +35,7 @@ class PackedScene;
class InstancePlaceholder : public Node {
- OBJ_TYPE(InstancePlaceholder,Node);
+ GDCLASS(InstancePlaceholder,Node);
String path;
struct PropSet {
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 23230a8b40..c065c62ab4 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1314,7 +1314,7 @@ String Node::_generate_serial_child_name(Node *p_child) {
if (name=="") {
- name = p_child->get_type();
+ name = p_child->get_class();
}
// Extract trailing number
@@ -2233,7 +2233,7 @@ Node *Node::_duplicate(bool p_use_instancing) const {
} else {
- Object *obj = ObjectTypeDB::instance(get_type());
+ Object *obj = ClassDB::instance(get_class());
ERR_FAIL_COND_V(!obj,NULL);
node = obj->cast_to<Node>();
if (!node)
@@ -2318,9 +2318,9 @@ void Node::_duplicate_and_reown(Node* p_new_parent, const Map<Node*,Node*>& p_re
ERR_FAIL_COND(!node);
} else {
- Object *obj = ObjectTypeDB::instance(get_type());
+ Object *obj = ClassDB::instance(get_class());
if (!obj) {
- print_line("could not duplicate: "+String(get_type()));
+ print_line("could not duplicate: "+String(get_class()));
}
ERR_FAIL_COND(!obj);
node = obj->cast_to<Node>();
@@ -2414,9 +2414,9 @@ Node *Node::duplicate_and_reown(const Map<Node*,Node*>& p_reown_map) const {
Node *node=NULL;
- Object *obj = ObjectTypeDB::instance(get_type());
+ Object *obj = ClassDB::instance(get_class());
if (!obj) {
- print_line("could not duplicate: "+String(get_type()));
+ print_line("could not duplicate: "+String(get_class()));
}
ERR_FAIL_COND_V(!obj,NULL);
node = obj->cast_to<Node>();
@@ -2704,7 +2704,7 @@ static void _Node_debug_sn(Object *p_obj) {
path=n->get_name();
else
path=String(p->get_name())+"/"+p->get_path_to(n);
- print_line(itos(p_obj->get_instance_ID())+"- Stray Node: "+path+" (Type: "+n->get_type()+")");
+ print_line(itos(p_obj->get_instance_ID())+"- Stray Node: "+path+" (Type: "+n->get_class()+")");
}
@@ -2819,87 +2819,87 @@ void Node::_bind_methods() {
Globals::get_singleton()->set_custom_property_info("node/name_num_separator",PropertyInfo(Variant::INT,"node/name_num_separator",PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash"));
- ObjectTypeDB::bind_method(_MD("_add_child_below_node","node:Node","child_node:Node","legible_unique_name"),&Node::add_child_below_node,DEFVAL(false));
-
- ObjectTypeDB::bind_method(_MD("set_name","name"),&Node::set_name);
- ObjectTypeDB::bind_method(_MD("get_name"),&Node::get_name);
- ObjectTypeDB::bind_method(_MD("add_child","node:Node","legible_unique_name"),&Node::add_child,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("remove_child","node:Node"),&Node::remove_child);
- //ObjectTypeDB::bind_method(_MD("remove_and_delete_child","node:Node"),&Node::remove_and_delete_child);
- ObjectTypeDB::bind_method(_MD("get_child_count"),&Node::get_child_count);
- ObjectTypeDB::bind_method(_MD("get_children"),&Node::_get_children);
- ObjectTypeDB::bind_method(_MD("get_child:Node","idx"),&Node::get_child);
- ObjectTypeDB::bind_method(_MD("has_node","path"),&Node::has_node);
- ObjectTypeDB::bind_method(_MD("get_node:Node","path"),&Node::get_node);
- ObjectTypeDB::bind_method(_MD("get_parent:Node"),&Node::get_parent);
- ObjectTypeDB::bind_method(_MD("find_node:Node","mask","recursive","owned"),&Node::find_node,DEFVAL(true),DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("has_node_and_resource","path"),&Node::has_node_and_resource);
- ObjectTypeDB::bind_method(_MD("get_node_and_resource","path"),&Node::_get_node_and_resource);
-
- ObjectTypeDB::bind_method(_MD("is_inside_tree"),&Node::is_inside_tree);
- ObjectTypeDB::bind_method(_MD("is_a_parent_of","node:Node"),&Node::is_a_parent_of);
- ObjectTypeDB::bind_method(_MD("is_greater_than","node:Node"),&Node::is_greater_than);
- ObjectTypeDB::bind_method(_MD("get_path"),&Node::get_path);
- ObjectTypeDB::bind_method(_MD("get_path_to","node:Node"),&Node::get_path_to);
- ObjectTypeDB::bind_method(_MD("add_to_group","group","persistent"),&Node::add_to_group,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("remove_from_group","group"),&Node::remove_from_group);
- ObjectTypeDB::bind_method(_MD("is_in_group","group"),&Node::is_in_group);
- ObjectTypeDB::bind_method(_MD("move_child","child_node:Node","to_pos"),&Node::move_child);
- ObjectTypeDB::bind_method(_MD("get_groups"),&Node::_get_groups);
- ObjectTypeDB::bind_method(_MD("raise"),&Node::raise);
- ObjectTypeDB::bind_method(_MD("set_owner","owner:Node"),&Node::set_owner);
- ObjectTypeDB::bind_method(_MD("get_owner:Node"),&Node::get_owner);
- ObjectTypeDB::bind_method(_MD("remove_and_skip"),&Node::remove_and_skip);
- ObjectTypeDB::bind_method(_MD("get_index"),&Node::get_index);
- ObjectTypeDB::bind_method(_MD("print_tree"),&Node::print_tree);
- ObjectTypeDB::bind_method(_MD("set_filename","filename"),&Node::set_filename);
- ObjectTypeDB::bind_method(_MD("get_filename"),&Node::get_filename);
- ObjectTypeDB::bind_method(_MD("propagate_notification","what"),&Node::propagate_notification);
- ObjectTypeDB::bind_method(_MD("set_fixed_process","enable"),&Node::set_fixed_process);
- ObjectTypeDB::bind_method(_MD("get_fixed_process_delta_time"),&Node::get_fixed_process_delta_time);
- ObjectTypeDB::bind_method(_MD("is_fixed_processing"),&Node::is_fixed_processing);
- ObjectTypeDB::bind_method(_MD("set_process","enable"),&Node::set_process);
- ObjectTypeDB::bind_method(_MD("get_process_delta_time"),&Node::get_process_delta_time);
- ObjectTypeDB::bind_method(_MD("is_processing"),&Node::is_processing);
- ObjectTypeDB::bind_method(_MD("set_process_input","enable"),&Node::set_process_input);
- ObjectTypeDB::bind_method(_MD("is_processing_input"),&Node::is_processing_input);
- ObjectTypeDB::bind_method(_MD("set_process_unhandled_input","enable"),&Node::set_process_unhandled_input);
- ObjectTypeDB::bind_method(_MD("is_processing_unhandled_input"),&Node::is_processing_unhandled_input);
- ObjectTypeDB::bind_method(_MD("set_process_unhandled_key_input","enable"),&Node::set_process_unhandled_key_input);
- ObjectTypeDB::bind_method(_MD("is_processing_unhandled_key_input"),&Node::is_processing_unhandled_key_input);
- ObjectTypeDB::bind_method(_MD("set_pause_mode","mode"),&Node::set_pause_mode);
- ObjectTypeDB::bind_method(_MD("get_pause_mode"),&Node::get_pause_mode);
- ObjectTypeDB::bind_method(_MD("can_process"),&Node::can_process);
- ObjectTypeDB::bind_method(_MD("print_stray_nodes"),&Node::_print_stray_nodes);
- ObjectTypeDB::bind_method(_MD("get_position_in_parent"),&Node::get_position_in_parent);
- ObjectTypeDB::bind_method(_MD("set_display_folded","fold"),&Node::set_display_folded);
- ObjectTypeDB::bind_method(_MD("is_displayed_folded"),&Node::is_displayed_folded);
-
- ObjectTypeDB::bind_method(_MD("get_tree:SceneTree"),&Node::get_tree);
-
- ObjectTypeDB::bind_method(_MD("duplicate:Node","use_instancing"),&Node::duplicate,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("replace_by","node:Node","keep_data"),&Node::replace_by,DEFVAL(false));
-
- ObjectTypeDB::bind_method(_MD("set_scene_instance_load_placeholder","load_placeholder"),&Node::set_scene_instance_load_placeholder);
- ObjectTypeDB::bind_method(_MD("get_scene_instance_load_placeholder"),&Node::get_scene_instance_load_placeholder);
-
-
- ObjectTypeDB::bind_method(_MD("get_viewport"),&Node::get_viewport);
-
- ObjectTypeDB::bind_method(_MD("queue_free"),&Node::queue_delete);
-
- ObjectTypeDB::bind_method(_MD("set_network_mode","mode"),&Node::set_network_mode);
- ObjectTypeDB::bind_method(_MD("get_network_mode"),&Node::get_network_mode);
-
- ObjectTypeDB::bind_method(_MD("is_network_master"),&Node::is_network_master);
-
- ObjectTypeDB::bind_method(_MD("rpc_config","method","mode"),&Node::rpc_config);
- ObjectTypeDB::bind_method(_MD("rset_config","property","mode"),&Node::rset_config);
+ ClassDB::bind_method(_MD("_add_child_below_node","node:Node","child_node:Node","legible_unique_name"),&Node::add_child_below_node,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("set_name","name"),&Node::set_name);
+ ClassDB::bind_method(_MD("get_name"),&Node::get_name);
+ ClassDB::bind_method(_MD("add_child","node:Node","legible_unique_name"),&Node::add_child,DEFVAL(false));
+ ClassDB::bind_method(_MD("remove_child","node:Node"),&Node::remove_child);
+ //ClassDB::bind_method(_MD("remove_and_delete_child","node:Node"),&Node::remove_and_delete_child);
+ ClassDB::bind_method(_MD("get_child_count"),&Node::get_child_count);
+ ClassDB::bind_method(_MD("get_children"),&Node::_get_children);
+ ClassDB::bind_method(_MD("get_child:Node","idx"),&Node::get_child);
+ ClassDB::bind_method(_MD("has_node","path"),&Node::has_node);
+ ClassDB::bind_method(_MD("get_node:Node","path"),&Node::get_node);
+ ClassDB::bind_method(_MD("get_parent:Node"),&Node::get_parent);
+ ClassDB::bind_method(_MD("find_node:Node","mask","recursive","owned"),&Node::find_node,DEFVAL(true),DEFVAL(true));
+ ClassDB::bind_method(_MD("has_node_and_resource","path"),&Node::has_node_and_resource);
+ ClassDB::bind_method(_MD("get_node_and_resource","path"),&Node::_get_node_and_resource);
+
+ ClassDB::bind_method(_MD("is_inside_tree"),&Node::is_inside_tree);
+ ClassDB::bind_method(_MD("is_a_parent_of","node:Node"),&Node::is_a_parent_of);
+ ClassDB::bind_method(_MD("is_greater_than","node:Node"),&Node::is_greater_than);
+ ClassDB::bind_method(_MD("get_path"),&Node::get_path);
+ ClassDB::bind_method(_MD("get_path_to","node:Node"),&Node::get_path_to);
+ ClassDB::bind_method(_MD("add_to_group","group","persistent"),&Node::add_to_group,DEFVAL(false));
+ ClassDB::bind_method(_MD("remove_from_group","group"),&Node::remove_from_group);
+ ClassDB::bind_method(_MD("is_in_group","group"),&Node::is_in_group);
+ ClassDB::bind_method(_MD("move_child","child_node:Node","to_pos"),&Node::move_child);
+ ClassDB::bind_method(_MD("get_groups"),&Node::_get_groups);
+ ClassDB::bind_method(_MD("raise"),&Node::raise);
+ ClassDB::bind_method(_MD("set_owner","owner:Node"),&Node::set_owner);
+ ClassDB::bind_method(_MD("get_owner:Node"),&Node::get_owner);
+ ClassDB::bind_method(_MD("remove_and_skip"),&Node::remove_and_skip);
+ ClassDB::bind_method(_MD("get_index"),&Node::get_index);
+ ClassDB::bind_method(_MD("print_tree"),&Node::print_tree);
+ ClassDB::bind_method(_MD("set_filename","filename"),&Node::set_filename);
+ ClassDB::bind_method(_MD("get_filename"),&Node::get_filename);
+ ClassDB::bind_method(_MD("propagate_notification","what"),&Node::propagate_notification);
+ ClassDB::bind_method(_MD("set_fixed_process","enable"),&Node::set_fixed_process);
+ ClassDB::bind_method(_MD("get_fixed_process_delta_time"),&Node::get_fixed_process_delta_time);
+ ClassDB::bind_method(_MD("is_fixed_processing"),&Node::is_fixed_processing);
+ ClassDB::bind_method(_MD("set_process","enable"),&Node::set_process);
+ ClassDB::bind_method(_MD("get_process_delta_time"),&Node::get_process_delta_time);
+ ClassDB::bind_method(_MD("is_processing"),&Node::is_processing);
+ ClassDB::bind_method(_MD("set_process_input","enable"),&Node::set_process_input);
+ ClassDB::bind_method(_MD("is_processing_input"),&Node::is_processing_input);
+ ClassDB::bind_method(_MD("set_process_unhandled_input","enable"),&Node::set_process_unhandled_input);
+ ClassDB::bind_method(_MD("is_processing_unhandled_input"),&Node::is_processing_unhandled_input);
+ ClassDB::bind_method(_MD("set_process_unhandled_key_input","enable"),&Node::set_process_unhandled_key_input);
+ ClassDB::bind_method(_MD("is_processing_unhandled_key_input"),&Node::is_processing_unhandled_key_input);
+ ClassDB::bind_method(_MD("set_pause_mode","mode"),&Node::set_pause_mode);
+ ClassDB::bind_method(_MD("get_pause_mode"),&Node::get_pause_mode);
+ ClassDB::bind_method(_MD("can_process"),&Node::can_process);
+ ClassDB::bind_method(_MD("print_stray_nodes"),&Node::_print_stray_nodes);
+ ClassDB::bind_method(_MD("get_position_in_parent"),&Node::get_position_in_parent);
+ ClassDB::bind_method(_MD("set_display_folded","fold"),&Node::set_display_folded);
+ ClassDB::bind_method(_MD("is_displayed_folded"),&Node::is_displayed_folded);
+
+ ClassDB::bind_method(_MD("get_tree:SceneTree"),&Node::get_tree);
+
+ ClassDB::bind_method(_MD("duplicate:Node","use_instancing"),&Node::duplicate,DEFVAL(false));
+ ClassDB::bind_method(_MD("replace_by","node:Node","keep_data"),&Node::replace_by,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("set_scene_instance_load_placeholder","load_placeholder"),&Node::set_scene_instance_load_placeholder);
+ ClassDB::bind_method(_MD("get_scene_instance_load_placeholder"),&Node::get_scene_instance_load_placeholder);
+
+
+ ClassDB::bind_method(_MD("get_viewport"),&Node::get_viewport);
+
+ ClassDB::bind_method(_MD("queue_free"),&Node::queue_delete);
+
+ ClassDB::bind_method(_MD("set_network_mode","mode"),&Node::set_network_mode);
+ ClassDB::bind_method(_MD("get_network_mode"),&Node::get_network_mode);
+
+ ClassDB::bind_method(_MD("is_network_master"),&Node::is_network_master);
+
+ ClassDB::bind_method(_MD("rpc_config","method","mode"),&Node::rpc_config);
+ ClassDB::bind_method(_MD("rset_config","property","mode"),&Node::rset_config);
#ifdef TOOLS_ENABLED
- ObjectTypeDB::bind_method(_MD("_set_import_path","import_path"),&Node::set_import_path);
- ObjectTypeDB::bind_method(_MD("_get_import_path"),&Node::get_import_path);
+ ClassDB::bind_method(_MD("_set_import_path","import_path"),&Node::set_import_path);
+ ClassDB::bind_method(_MD("_get_import_path"),&Node::get_import_path);
ADD_PROPERTYNZ( PropertyInfo(Variant::NODE_PATH,"_import_path",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_import_path"),_SCS("_get_import_path"));
#endif
@@ -2911,24 +2911,24 @@ void Node::_bind_methods() {
mi.name="rpc";
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc",&Node::_rpc_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc",&Node::_rpc_bind,mi);
mi.name="rpc_unreliable";
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable",&Node::_rpc_unreliable_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable",&Node::_rpc_unreliable_bind,mi);
mi.arguments.push_front( PropertyInfo( Variant::INT, "peer_id") );
mi.name="rpc_id";
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_id",&Node::_rpc_id_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_id",&Node::_rpc_id_bind,mi);
mi.name="rpc_unreliable_id";
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable_id",&Node::_rpc_unreliable_id_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"rpc_unreliable_id",&Node::_rpc_unreliable_id_bind,mi);
}
- ObjectTypeDB::bind_method(_MD("rset","property","value:Variant"),&Node::rset);
- ObjectTypeDB::bind_method(_MD("rset_id","peer_id","property","value:Variant"),&Node::rset_id);
- ObjectTypeDB::bind_method(_MD("rset_unreliable","property","value:Variant"),&Node::rset_unreliable);
- ObjectTypeDB::bind_method(_MD("rset_unreliable_id","peer_id","property","value:Variant"),&Node::rset_unreliable_id);
+ ClassDB::bind_method(_MD("rset","property","value:Variant"),&Node::rset);
+ ClassDB::bind_method(_MD("rset_id","peer_id","property","value:Variant"),&Node::rset_id);
+ ClassDB::bind_method(_MD("rset_unreliable","property","value:Variant"),&Node::rset_unreliable);
+ ClassDB::bind_method(_MD("rset_unreliable_id","peer_id","property","value:Variant"),&Node::rset_unreliable_id);
BIND_CONSTANT( NOTIFICATION_ENTER_TREE );
@@ -2982,8 +2982,8 @@ void Node::_bind_methods() {
BIND_VMETHOD( MethodInfo("_unhandled_input",PropertyInfo(Variant::INPUT_EVENT,"event")) );
BIND_VMETHOD( MethodInfo("_unhandled_key_input",PropertyInfo(Variant::INPUT_EVENT,"key_event")) );
- //ObjectTypeDB::bind_method(_MD("get_child",&Node::get_child,PH("index")));
- //ObjectTypeDB::bind_method(_MD("get_node",&Node::get_node,PH("path")));
+ //ClassDB::bind_method(_MD("get_child",&Node::get_child,PH("index")));
+ //ClassDB::bind_method(_MD("get_node",&Node::get_node,PH("path")));
}
diff --git a/scene/main/node.h b/scene/main/node.h
index 66846217d1..5c8cde5192 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -42,7 +42,7 @@ class Viewport;
class SceneState;
class Node : public Object {
- OBJ_TYPE( Node, Object );
+ GDCLASS( Node, Object );
OBJ_CATEGORY("Nodes");
public:
diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp
index 49bf6106b3..57bda91494 100644
--- a/scene/main/resource_preloader.cpp
+++ b/scene/main/resource_preloader.cpp
@@ -163,15 +163,15 @@ void ResourcePreloader::get_resource_list(List<StringName> *p_list) {
void ResourcePreloader::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_set_resources"),&ResourcePreloader::_set_resources);
- ObjectTypeDB::bind_method(_MD("_get_resources"),&ResourcePreloader::_get_resources);
-
- ObjectTypeDB::bind_method(_MD("add_resource","name","resource"),&ResourcePreloader::add_resource);
- ObjectTypeDB::bind_method(_MD("remove_resource","name"),&ResourcePreloader::remove_resource);
- ObjectTypeDB::bind_method(_MD("rename_resource","name","newname"),&ResourcePreloader::rename_resource);
- ObjectTypeDB::bind_method(_MD("has_resource","name"),&ResourcePreloader::has_resource);
- ObjectTypeDB::bind_method(_MD("get_resource","name"),&ResourcePreloader::get_resource);
- ObjectTypeDB::bind_method(_MD("get_resource_list"),&ResourcePreloader::_get_resource_list);
+ ClassDB::bind_method(_MD("_set_resources"),&ResourcePreloader::_set_resources);
+ ClassDB::bind_method(_MD("_get_resources"),&ResourcePreloader::_get_resources);
+
+ ClassDB::bind_method(_MD("add_resource","name","resource"),&ResourcePreloader::add_resource);
+ ClassDB::bind_method(_MD("remove_resource","name"),&ResourcePreloader::remove_resource);
+ ClassDB::bind_method(_MD("rename_resource","name","newname"),&ResourcePreloader::rename_resource);
+ ClassDB::bind_method(_MD("has_resource","name"),&ResourcePreloader::has_resource);
+ ClassDB::bind_method(_MD("get_resource","name"),&ResourcePreloader::get_resource);
+ ClassDB::bind_method(_MD("get_resource_list"),&ResourcePreloader::_get_resource_list);
ADD_PROPERTY( PropertyInfo(Variant::ARRAY,"resources",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_resources"), _SCS("_get_resources"));
diff --git a/scene/main/resource_preloader.h b/scene/main/resource_preloader.h
index f2d1461fba..8f4f997cee 100644
--- a/scene/main/resource_preloader.h
+++ b/scene/main/resource_preloader.h
@@ -34,7 +34,7 @@
class ResourcePreloader : public Node {
- OBJ_TYPE(ResourcePreloader,Node);
+ GDCLASS(ResourcePreloader,Node);
Map<StringName,RES > resources;
diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp
index 874562ad3b..966d4c82ef 100644
--- a/scene/main/scene_main_loop.cpp
+++ b/scene/main/scene_main_loop.cpp
@@ -48,8 +48,8 @@
void SceneTreeTimer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_time_left","time"),&SceneTreeTimer::set_time_left);
- ObjectTypeDB::bind_method(_MD("get_time_left"),&SceneTreeTimer::get_time_left);
+ ClassDB::bind_method(_MD("set_time_left","time"),&SceneTreeTimer::set_time_left);
+ ClassDB::bind_method(_MD("get_time_left"),&SceneTreeTimer::get_time_left);
ADD_SIGNAL(MethodInfo("timeout"));
}
@@ -1052,7 +1052,7 @@ static void _fill_array(Node *p_node, Array& array, int p_level) {
array.push_back(p_level);
array.push_back(p_node->get_name());
- array.push_back(p_node->get_type());
+ array.push_back(p_node->get_class());
array.push_back(p_node->get_instance_ID());
for(int i=0;i<p_node->get_child_count();i++) {
@@ -1427,7 +1427,7 @@ void SceneTree::_live_edit_create_node_func(const NodePath& p_parent,const Strin
continue;
Node *n2 = n->get_node(p_parent);
- Object *o = ObjectTypeDB::instance(p_type);
+ Object *o = ClassDB::instance(p_type);
if (!o)
continue;
Node *no=o->cast_to<Node>();
@@ -2062,7 +2062,7 @@ void SceneTree::_network_process_packet(int p_from, const uint8_t* p_packet, int
node->set(name,value,&valid);
if (!valid) {
- String error = "Error setting remote property '"+String(name)+"', not found in object of type "+node->get_type();
+ String error = "Error setting remote property '"+String(name)+"', not found in object of type "+node->get_class();
ERR_PRINTS(error);
}
}
@@ -2160,43 +2160,43 @@ void SceneTree::_network_poll() {
void SceneTree::_bind_methods() {
- //ObjectTypeDB::bind_method(_MD("call_group","call_flags","group","method","arg1","arg2"),&SceneMainLoop::_call_group,DEFVAL(Variant()),DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("notify_group","call_flags","group","notification"),&SceneTree::notify_group);
- ObjectTypeDB::bind_method(_MD("set_group","call_flags","group","property","value"),&SceneTree::set_group);
+ //ClassDB::bind_method(_MD("call_group","call_flags","group","method","arg1","arg2"),&SceneMainLoop::_call_group,DEFVAL(Variant()),DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("notify_group","call_flags","group","notification"),&SceneTree::notify_group);
+ ClassDB::bind_method(_MD("set_group","call_flags","group","property","value"),&SceneTree::set_group);
- ObjectTypeDB::bind_method(_MD("get_nodes_in_group","group"),&SceneTree::_get_nodes_in_group);
+ ClassDB::bind_method(_MD("get_nodes_in_group","group"),&SceneTree::_get_nodes_in_group);
- ObjectTypeDB::bind_method(_MD("get_root:Viewport"),&SceneTree::get_root);
- ObjectTypeDB::bind_method(_MD("has_group","name"),&SceneTree::has_group);
+ ClassDB::bind_method(_MD("get_root:Viewport"),&SceneTree::get_root);
+ ClassDB::bind_method(_MD("has_group","name"),&SceneTree::has_group);
- ObjectTypeDB::bind_method(_MD("set_auto_accept_quit","enabled"),&SceneTree::set_auto_accept_quit);
+ ClassDB::bind_method(_MD("set_auto_accept_quit","enabled"),&SceneTree::set_auto_accept_quit);
- ObjectTypeDB::bind_method(_MD("set_editor_hint","enable"),&SceneTree::set_editor_hint);
- ObjectTypeDB::bind_method(_MD("is_editor_hint"),&SceneTree::is_editor_hint);
- ObjectTypeDB::bind_method(_MD("set_debug_collisions_hint","enable"),&SceneTree::set_debug_collisions_hint);
- ObjectTypeDB::bind_method(_MD("is_debugging_collisions_hint"),&SceneTree::is_debugging_collisions_hint);
- ObjectTypeDB::bind_method(_MD("set_debug_navigation_hint","enable"),&SceneTree::set_debug_navigation_hint);
- ObjectTypeDB::bind_method(_MD("is_debugging_navigation_hint"),&SceneTree::is_debugging_navigation_hint);
+ ClassDB::bind_method(_MD("set_editor_hint","enable"),&SceneTree::set_editor_hint);
+ ClassDB::bind_method(_MD("is_editor_hint"),&SceneTree::is_editor_hint);
+ ClassDB::bind_method(_MD("set_debug_collisions_hint","enable"),&SceneTree::set_debug_collisions_hint);
+ ClassDB::bind_method(_MD("is_debugging_collisions_hint"),&SceneTree::is_debugging_collisions_hint);
+ ClassDB::bind_method(_MD("set_debug_navigation_hint","enable"),&SceneTree::set_debug_navigation_hint);
+ ClassDB::bind_method(_MD("is_debugging_navigation_hint"),&SceneTree::is_debugging_navigation_hint);
#ifdef TOOLS_ENABLED
- ObjectTypeDB::bind_method(_MD("set_edited_scene_root","scene"),&SceneTree::set_edited_scene_root);
- ObjectTypeDB::bind_method(_MD("get_edited_scene_root"),&SceneTree::get_edited_scene_root);
+ ClassDB::bind_method(_MD("set_edited_scene_root","scene"),&SceneTree::set_edited_scene_root);
+ ClassDB::bind_method(_MD("get_edited_scene_root"),&SceneTree::get_edited_scene_root);
#endif
- ObjectTypeDB::bind_method(_MD("set_pause","enable"),&SceneTree::set_pause);
- ObjectTypeDB::bind_method(_MD("is_paused"),&SceneTree::is_paused);
- ObjectTypeDB::bind_method(_MD("set_input_as_handled"),&SceneTree::set_input_as_handled);
+ ClassDB::bind_method(_MD("set_pause","enable"),&SceneTree::set_pause);
+ ClassDB::bind_method(_MD("is_paused"),&SceneTree::is_paused);
+ ClassDB::bind_method(_MD("set_input_as_handled"),&SceneTree::set_input_as_handled);
- ObjectTypeDB::bind_method(_MD("create_timer:SceneTreeTimer","time_sec"),&SceneTree::create_timer);
+ ClassDB::bind_method(_MD("create_timer:SceneTreeTimer","time_sec"),&SceneTree::create_timer);
- ObjectTypeDB::bind_method(_MD("get_node_count"),&SceneTree::get_node_count);
- ObjectTypeDB::bind_method(_MD("get_frame"),&SceneTree::get_frame);
- ObjectTypeDB::bind_method(_MD("quit"),&SceneTree::quit);
+ ClassDB::bind_method(_MD("get_node_count"),&SceneTree::get_node_count);
+ ClassDB::bind_method(_MD("get_frame"),&SceneTree::get_frame);
+ ClassDB::bind_method(_MD("quit"),&SceneTree::quit);
- ObjectTypeDB::bind_method(_MD("set_screen_stretch","mode","aspect","minsize"),&SceneTree::set_screen_stretch);
+ ClassDB::bind_method(_MD("set_screen_stretch","mode","aspect","minsize"),&SceneTree::set_screen_stretch);
- ObjectTypeDB::bind_method(_MD("queue_delete","obj"),&SceneTree::queue_delete);
+ ClassDB::bind_method(_MD("queue_delete","obj"),&SceneTree::queue_delete);
@@ -2208,29 +2208,29 @@ void SceneTree::_bind_methods() {
mi.arguments.push_back( PropertyInfo( Variant::STRING, "method"));
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call_group",&SceneTree::_call_group,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call_group",&SceneTree::_call_group,mi);
- ObjectTypeDB::bind_method(_MD("set_current_scene","child_node:Node"),&SceneTree::set_current_scene);
- ObjectTypeDB::bind_method(_MD("get_current_scene:Node"),&SceneTree::get_current_scene);
+ ClassDB::bind_method(_MD("set_current_scene","child_node:Node"),&SceneTree::set_current_scene);
+ ClassDB::bind_method(_MD("get_current_scene:Node"),&SceneTree::get_current_scene);
- ObjectTypeDB::bind_method(_MD("change_scene","path"),&SceneTree::change_scene);
- ObjectTypeDB::bind_method(_MD("change_scene_to","packed_scene:PackedScene"),&SceneTree::change_scene_to);
+ ClassDB::bind_method(_MD("change_scene","path"),&SceneTree::change_scene);
+ ClassDB::bind_method(_MD("change_scene_to","packed_scene:PackedScene"),&SceneTree::change_scene_to);
- ObjectTypeDB::bind_method(_MD("reload_current_scene"),&SceneTree::reload_current_scene);
+ ClassDB::bind_method(_MD("reload_current_scene"),&SceneTree::reload_current_scene);
- ObjectTypeDB::bind_method(_MD("_change_scene"),&SceneTree::_change_scene);
+ ClassDB::bind_method(_MD("_change_scene"),&SceneTree::_change_scene);
- ObjectTypeDB::bind_method(_MD("set_network_peer","peer:NetworkedMultiplayerPeer"),&SceneTree::set_network_peer);
- ObjectTypeDB::bind_method(_MD("is_network_server"),&SceneTree::is_network_server);
- ObjectTypeDB::bind_method(_MD("get_network_unique_id"),&SceneTree::get_network_unique_id);
- ObjectTypeDB::bind_method(_MD("set_refuse_new_network_connections","refuse"),&SceneTree::set_refuse_new_network_connections);
- ObjectTypeDB::bind_method(_MD("is_refusing_new_network_connections"),&SceneTree::is_refusing_new_network_connections);
- ObjectTypeDB::bind_method(_MD("_network_peer_connected"),&SceneTree::_network_peer_connected);
- ObjectTypeDB::bind_method(_MD("_network_peer_disconnected"),&SceneTree::_network_peer_disconnected);
- ObjectTypeDB::bind_method(_MD("_connected_to_server"),&SceneTree::_connected_to_server);
- ObjectTypeDB::bind_method(_MD("_connection_failed"),&SceneTree::_connection_failed);
- ObjectTypeDB::bind_method(_MD("_server_disconnected"),&SceneTree::_server_disconnected);
+ ClassDB::bind_method(_MD("set_network_peer","peer:NetworkedMultiplayerPeer"),&SceneTree::set_network_peer);
+ ClassDB::bind_method(_MD("is_network_server"),&SceneTree::is_network_server);
+ ClassDB::bind_method(_MD("get_network_unique_id"),&SceneTree::get_network_unique_id);
+ ClassDB::bind_method(_MD("set_refuse_new_network_connections","refuse"),&SceneTree::set_refuse_new_network_connections);
+ ClassDB::bind_method(_MD("is_refusing_new_network_connections"),&SceneTree::is_refusing_new_network_connections);
+ ClassDB::bind_method(_MD("_network_peer_connected"),&SceneTree::_network_peer_connected);
+ ClassDB::bind_method(_MD("_network_peer_disconnected"),&SceneTree::_network_peer_disconnected);
+ ClassDB::bind_method(_MD("_connected_to_server"),&SceneTree::_connected_to_server);
+ ClassDB::bind_method(_MD("_connection_failed"),&SceneTree::_connection_failed);
+ ClassDB::bind_method(_MD("_server_disconnected"),&SceneTree::_server_disconnected);
ADD_SIGNAL( MethodInfo("tree_changed") );
ADD_SIGNAL( MethodInfo("node_removed",PropertyInfo( Variant::OBJECT, "node") ) );
diff --git a/scene/main/scene_main_loop.h b/scene/main/scene_main_loop.h
index 915a78918a..164ffe2ef7 100644
--- a/scene/main/scene_main_loop.h
+++ b/scene/main/scene_main_loop.h
@@ -53,7 +53,7 @@ class Mesh;
class SceneTreeTimer : public Reference {
- OBJ_TYPE(SceneTreeTimer,Reference);
+ GDCLASS(SceneTreeTimer,Reference);
float time_left;
protected:
@@ -70,7 +70,7 @@ class SceneTree : public MainLoop {
_THREAD_SAFE_CLASS_
- OBJ_TYPE( SceneTree, MainLoop );
+ GDCLASS( SceneTree, MainLoop );
public:
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 721e9a56cd..408a3e9a2c 100644
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -179,25 +179,25 @@ void Timer::_set_process(bool p_process, bool p_force)
void Timer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_wait_time","time_sec"),&Timer::set_wait_time);
- ObjectTypeDB::bind_method(_MD("get_wait_time"),&Timer::get_wait_time);
+ ClassDB::bind_method(_MD("set_wait_time","time_sec"),&Timer::set_wait_time);
+ ClassDB::bind_method(_MD("get_wait_time"),&Timer::get_wait_time);
- ObjectTypeDB::bind_method(_MD("set_one_shot","enable"),&Timer::set_one_shot);
- ObjectTypeDB::bind_method(_MD("is_one_shot"),&Timer::is_one_shot);
+ ClassDB::bind_method(_MD("set_one_shot","enable"),&Timer::set_one_shot);
+ ClassDB::bind_method(_MD("is_one_shot"),&Timer::is_one_shot);
- ObjectTypeDB::bind_method(_MD("set_autostart","enable"),&Timer::set_autostart);
- ObjectTypeDB::bind_method(_MD("has_autostart"),&Timer::has_autostart);
+ ClassDB::bind_method(_MD("set_autostart","enable"),&Timer::set_autostart);
+ ClassDB::bind_method(_MD("has_autostart"),&Timer::has_autostart);
- ObjectTypeDB::bind_method(_MD("start"),&Timer::start);
- ObjectTypeDB::bind_method(_MD("stop"),&Timer::stop);
+ ClassDB::bind_method(_MD("start"),&Timer::start);
+ ClassDB::bind_method(_MD("stop"),&Timer::stop);
- ObjectTypeDB::bind_method(_MD("set_active", "active"), &Timer::set_active);
- ObjectTypeDB::bind_method(_MD("is_active"), &Timer::is_active);
+ ClassDB::bind_method(_MD("set_active", "active"), &Timer::set_active);
+ ClassDB::bind_method(_MD("is_active"), &Timer::is_active);
- ObjectTypeDB::bind_method(_MD("get_time_left"),&Timer::get_time_left);
+ ClassDB::bind_method(_MD("get_time_left"),&Timer::get_time_left);
- ObjectTypeDB::bind_method(_MD("set_timer_process_mode", "mode"), &Timer::set_timer_process_mode);
- ObjectTypeDB::bind_method(_MD("get_timer_process_mode"), &Timer::get_timer_process_mode);
+ ClassDB::bind_method(_MD("set_timer_process_mode", "mode"), &Timer::set_timer_process_mode);
+ ClassDB::bind_method(_MD("get_timer_process_mode"), &Timer::get_timer_process_mode);
ADD_SIGNAL( MethodInfo("timeout") );
diff --git a/scene/main/timer.h b/scene/main/timer.h
index ea8d24b3a0..6b69f3f409 100644
--- a/scene/main/timer.h
+++ b/scene/main/timer.h
@@ -33,7 +33,7 @@
class Timer : public Node {
- OBJ_TYPE( Timer, Node );
+ GDCLASS( Timer, Node );
float wait_time;
bool one_shot;
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index ff148cc413..4894dfd30f 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -106,7 +106,7 @@ ViewportTexture::ViewportTexture(Viewport *p_vp){
class TooltipPanel : public Panel {
- OBJ_TYPE(TooltipPanel,Panel)
+ GDCLASS(TooltipPanel,Panel)
public:
TooltipPanel() {};
@@ -114,7 +114,7 @@ public:
class TooltipLabel : public Label {
- OBJ_TYPE(TooltipLabel,Label)
+ GDCLASS(TooltipLabel,Label)
public:
TooltipLabel() {};
@@ -1824,7 +1824,7 @@ void Viewport::_gui_input_event(InputEvent p_event) {
Array arr;
arr.push_back(gui.mouse_focus->get_path());
- arr.push_back(gui.mouse_focus->get_type());
+ arr.push_back(gui.mouse_focus->get_class());
ScriptDebugger::get_singleton()->send_message("click_ctrl",arr);
}
@@ -2630,101 +2630,101 @@ bool Viewport::get_hdr() const{
void Viewport::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_size","size"), &Viewport::set_size);
- ObjectTypeDB::bind_method(_MD("get_size"), &Viewport::get_size);
- ObjectTypeDB::bind_method(_MD("set_world_2d","world_2d:World2D"), &Viewport::set_world_2d);
- ObjectTypeDB::bind_method(_MD("get_world_2d:World2D"), &Viewport::get_world_2d);
- ObjectTypeDB::bind_method(_MD("find_world_2d:World2D"), &Viewport::find_world_2d);
- ObjectTypeDB::bind_method(_MD("set_world","world:World"), &Viewport::set_world);
- ObjectTypeDB::bind_method(_MD("get_world:World"), &Viewport::get_world);
- ObjectTypeDB::bind_method(_MD("find_world:World"), &Viewport::find_world);
+ ClassDB::bind_method(_MD("set_size","size"), &Viewport::set_size);
+ ClassDB::bind_method(_MD("get_size"), &Viewport::get_size);
+ ClassDB::bind_method(_MD("set_world_2d","world_2d:World2D"), &Viewport::set_world_2d);
+ ClassDB::bind_method(_MD("get_world_2d:World2D"), &Viewport::get_world_2d);
+ ClassDB::bind_method(_MD("find_world_2d:World2D"), &Viewport::find_world_2d);
+ ClassDB::bind_method(_MD("set_world","world:World"), &Viewport::set_world);
+ ClassDB::bind_method(_MD("get_world:World"), &Viewport::get_world);
+ ClassDB::bind_method(_MD("find_world:World"), &Viewport::find_world);
- ObjectTypeDB::bind_method(_MD("set_canvas_transform","xform"), &Viewport::set_canvas_transform);
- ObjectTypeDB::bind_method(_MD("get_canvas_transform"), &Viewport::get_canvas_transform);
+ ClassDB::bind_method(_MD("set_canvas_transform","xform"), &Viewport::set_canvas_transform);
+ ClassDB::bind_method(_MD("get_canvas_transform"), &Viewport::get_canvas_transform);
- ObjectTypeDB::bind_method(_MD("set_global_canvas_transform","xform"), &Viewport::set_global_canvas_transform);
- ObjectTypeDB::bind_method(_MD("get_global_canvas_transform"), &Viewport::get_global_canvas_transform);
- ObjectTypeDB::bind_method(_MD("get_final_transform"), &Viewport::get_final_transform);
+ ClassDB::bind_method(_MD("set_global_canvas_transform","xform"), &Viewport::set_global_canvas_transform);
+ ClassDB::bind_method(_MD("get_global_canvas_transform"), &Viewport::get_global_canvas_transform);
+ ClassDB::bind_method(_MD("get_final_transform"), &Viewport::get_final_transform);
- ObjectTypeDB::bind_method(_MD("get_visible_rect"), &Viewport::get_visible_rect);
- ObjectTypeDB::bind_method(_MD("set_transparent_background","enable"), &Viewport::set_transparent_background);
- ObjectTypeDB::bind_method(_MD("has_transparent_background"), &Viewport::has_transparent_background);
+ ClassDB::bind_method(_MD("get_visible_rect"), &Viewport::get_visible_rect);
+ ClassDB::bind_method(_MD("set_transparent_background","enable"), &Viewport::set_transparent_background);
+ ClassDB::bind_method(_MD("has_transparent_background"), &Viewport::has_transparent_background);
- ObjectTypeDB::bind_method(_MD("_parent_visibility_changed"), &Viewport::_parent_visibility_changed);
+ ClassDB::bind_method(_MD("_parent_visibility_changed"), &Viewport::_parent_visibility_changed);
- ObjectTypeDB::bind_method(_MD("_parent_resized"), &Viewport::_parent_resized);
- ObjectTypeDB::bind_method(_MD("_vp_input"), &Viewport::_vp_input);
- ObjectTypeDB::bind_method(_MD("_vp_input_text","text"), &Viewport::_vp_input_text);
- ObjectTypeDB::bind_method(_MD("_vp_unhandled_input"), &Viewport::_vp_unhandled_input);
+ ClassDB::bind_method(_MD("_parent_resized"), &Viewport::_parent_resized);
+ ClassDB::bind_method(_MD("_vp_input"), &Viewport::_vp_input);
+ ClassDB::bind_method(_MD("_vp_input_text","text"), &Viewport::_vp_input_text);
+ ClassDB::bind_method(_MD("_vp_unhandled_input"), &Viewport::_vp_unhandled_input);
- ObjectTypeDB::bind_method(_MD("set_size_override","enable","size","margin"), &Viewport::set_size_override,DEFVAL(Size2(-1,-1)),DEFVAL(Size2(0,0)));
- ObjectTypeDB::bind_method(_MD("get_size_override"), &Viewport::get_size_override);
- ObjectTypeDB::bind_method(_MD("is_size_override_enabled"), &Viewport::is_size_override_enabled);
- ObjectTypeDB::bind_method(_MD("set_size_override_stretch","enabled"), &Viewport::set_size_override_stretch);
- ObjectTypeDB::bind_method(_MD("is_size_override_stretch_enabled"), &Viewport::is_size_override_stretch_enabled);
- ObjectTypeDB::bind_method(_MD("queue_screen_capture"), &Viewport::queue_screen_capture);
- ObjectTypeDB::bind_method(_MD("get_screen_capture"), &Viewport::get_screen_capture);
+ ClassDB::bind_method(_MD("set_size_override","enable","size","margin"), &Viewport::set_size_override,DEFVAL(Size2(-1,-1)),DEFVAL(Size2(0,0)));
+ ClassDB::bind_method(_MD("get_size_override"), &Viewport::get_size_override);
+ ClassDB::bind_method(_MD("is_size_override_enabled"), &Viewport::is_size_override_enabled);
+ ClassDB::bind_method(_MD("set_size_override_stretch","enabled"), &Viewport::set_size_override_stretch);
+ ClassDB::bind_method(_MD("is_size_override_stretch_enabled"), &Viewport::is_size_override_stretch_enabled);
+ ClassDB::bind_method(_MD("queue_screen_capture"), &Viewport::queue_screen_capture);
+ ClassDB::bind_method(_MD("get_screen_capture"), &Viewport::get_screen_capture);
- ObjectTypeDB::bind_method(_MD("set_vflip","enable"), &Viewport::set_vflip);
- ObjectTypeDB::bind_method(_MD("get_vflip"), &Viewport::get_vflip);
+ ClassDB::bind_method(_MD("set_vflip","enable"), &Viewport::set_vflip);
+ ClassDB::bind_method(_MD("get_vflip"), &Viewport::get_vflip);
- ObjectTypeDB::bind_method(_MD("set_clear_on_new_frame","enable"), &Viewport::set_clear_on_new_frame);
- ObjectTypeDB::bind_method(_MD("get_clear_on_new_frame"), &Viewport::get_clear_on_new_frame);
+ ClassDB::bind_method(_MD("set_clear_on_new_frame","enable"), &Viewport::set_clear_on_new_frame);
+ ClassDB::bind_method(_MD("get_clear_on_new_frame"), &Viewport::get_clear_on_new_frame);
- ObjectTypeDB::bind_method(_MD("clear"), &Viewport::clear);
- ObjectTypeDB::bind_method(_MD("set_update_mode","mode"), &Viewport::set_update_mode);
- ObjectTypeDB::bind_method(_MD("get_update_mode"), &Viewport::get_update_mode);
+ ClassDB::bind_method(_MD("clear"), &Viewport::clear);
+ ClassDB::bind_method(_MD("set_update_mode","mode"), &Viewport::set_update_mode);
+ ClassDB::bind_method(_MD("get_update_mode"), &Viewport::get_update_mode);
- ObjectTypeDB::bind_method(_MD("set_msaa","msaa"), &Viewport::set_msaa);
- ObjectTypeDB::bind_method(_MD("get_msaa"), &Viewport::get_msaa);
+ ClassDB::bind_method(_MD("set_msaa","msaa"), &Viewport::set_msaa);
+ ClassDB::bind_method(_MD("get_msaa"), &Viewport::get_msaa);
- ObjectTypeDB::bind_method(_MD("set_hdr","enable"), &Viewport::set_hdr);
- ObjectTypeDB::bind_method(_MD("get_hdr"), &Viewport::get_hdr);
+ ClassDB::bind_method(_MD("set_hdr","enable"), &Viewport::set_hdr);
+ ClassDB::bind_method(_MD("get_hdr"), &Viewport::get_hdr);
- ObjectTypeDB::bind_method(_MD("get_texture:ViewportTexture"), &Viewport::get_texture);
+ ClassDB::bind_method(_MD("get_texture:ViewportTexture"), &Viewport::get_texture);
- ObjectTypeDB::bind_method(_MD("set_physics_object_picking","enable"), &Viewport::set_physics_object_picking);
- ObjectTypeDB::bind_method(_MD("get_physics_object_picking"), &Viewport::get_physics_object_picking);
+ ClassDB::bind_method(_MD("set_physics_object_picking","enable"), &Viewport::set_physics_object_picking);
+ ClassDB::bind_method(_MD("get_physics_object_picking"), &Viewport::get_physics_object_picking);
- ObjectTypeDB::bind_method(_MD("get_viewport"), &Viewport::get_viewport);
- ObjectTypeDB::bind_method(_MD("input","local_event"), &Viewport::input);
- ObjectTypeDB::bind_method(_MD("unhandled_input","local_event"), &Viewport::unhandled_input);
+ ClassDB::bind_method(_MD("get_viewport"), &Viewport::get_viewport);
+ ClassDB::bind_method(_MD("input","local_event"), &Viewport::input);
+ ClassDB::bind_method(_MD("unhandled_input","local_event"), &Viewport::unhandled_input);
- ObjectTypeDB::bind_method(_MD("update_worlds"), &Viewport::update_worlds);
+ ClassDB::bind_method(_MD("update_worlds"), &Viewport::update_worlds);
- ObjectTypeDB::bind_method(_MD("set_use_own_world","enable"), &Viewport::set_use_own_world);
- ObjectTypeDB::bind_method(_MD("is_using_own_world"), &Viewport::is_using_own_world);
+ ClassDB::bind_method(_MD("set_use_own_world","enable"), &Viewport::set_use_own_world);
+ ClassDB::bind_method(_MD("is_using_own_world"), &Viewport::is_using_own_world);
- ObjectTypeDB::bind_method(_MD("get_camera:Camera"), &Viewport::get_camera);
+ ClassDB::bind_method(_MD("get_camera:Camera"), &Viewport::get_camera);
- ObjectTypeDB::bind_method(_MD("set_as_audio_listener","enable"), &Viewport::set_as_audio_listener);
- ObjectTypeDB::bind_method(_MD("is_audio_listener","enable"), &Viewport::is_audio_listener);
+ ClassDB::bind_method(_MD("set_as_audio_listener","enable"), &Viewport::set_as_audio_listener);
+ ClassDB::bind_method(_MD("is_audio_listener","enable"), &Viewport::is_audio_listener);
- ObjectTypeDB::bind_method(_MD("set_as_audio_listener_2d","enable"), &Viewport::set_as_audio_listener_2d);
- ObjectTypeDB::bind_method(_MD("is_audio_listener_2d","enable"), &Viewport::is_audio_listener_2d);
- ObjectTypeDB::bind_method(_MD("set_attach_to_screen_rect","rect"), &Viewport::set_attach_to_screen_rect);
+ ClassDB::bind_method(_MD("set_as_audio_listener_2d","enable"), &Viewport::set_as_audio_listener_2d);
+ ClassDB::bind_method(_MD("is_audio_listener_2d","enable"), &Viewport::is_audio_listener_2d);
+ ClassDB::bind_method(_MD("set_attach_to_screen_rect","rect"), &Viewport::set_attach_to_screen_rect);
- ObjectTypeDB::bind_method(_MD("get_mouse_pos"), &Viewport::get_mouse_pos);
- ObjectTypeDB::bind_method(_MD("warp_mouse","to_pos"), &Viewport::warp_mouse);
+ ClassDB::bind_method(_MD("get_mouse_pos"), &Viewport::get_mouse_pos);
+ ClassDB::bind_method(_MD("warp_mouse","to_pos"), &Viewport::warp_mouse);
- ObjectTypeDB::bind_method(_MD("gui_has_modal_stack"), &Viewport::gui_has_modal_stack);
- ObjectTypeDB::bind_method(_MD("gui_get_drag_data:Variant"), &Viewport::gui_get_drag_data);
+ ClassDB::bind_method(_MD("gui_has_modal_stack"), &Viewport::gui_has_modal_stack);
+ ClassDB::bind_method(_MD("gui_get_drag_data:Variant"), &Viewport::gui_get_drag_data);
- ObjectTypeDB::bind_method(_MD("set_disable_input","disable"), &Viewport::set_disable_input);
- ObjectTypeDB::bind_method(_MD("is_input_disabled"), &Viewport::is_input_disabled);
+ ClassDB::bind_method(_MD("set_disable_input","disable"), &Viewport::set_disable_input);
+ ClassDB::bind_method(_MD("is_input_disabled"), &Viewport::is_input_disabled);
- ObjectTypeDB::bind_method(_MD("set_disable_3d","disable"), &Viewport::set_disable_3d);
- ObjectTypeDB::bind_method(_MD("is_3d_disabled"), &Viewport::is_3d_disabled);
+ ClassDB::bind_method(_MD("set_disable_3d","disable"), &Viewport::set_disable_3d);
+ ClassDB::bind_method(_MD("is_3d_disabled"), &Viewport::is_3d_disabled);
- ObjectTypeDB::bind_method(_MD("_gui_show_tooltip"), &Viewport::_gui_show_tooltip);
- ObjectTypeDB::bind_method(_MD("_gui_remove_focus"), &Viewport::_gui_remove_focus);
+ ClassDB::bind_method(_MD("_gui_show_tooltip"), &Viewport::_gui_show_tooltip);
+ ClassDB::bind_method(_MD("_gui_remove_focus"), &Viewport::_gui_remove_focus);
- ObjectTypeDB::bind_method(_MD("set_shadow_atlas_size","size"), &Viewport::set_shadow_atlas_size);
- ObjectTypeDB::bind_method(_MD("get_shadow_atlas_size"), &Viewport::get_shadow_atlas_size);
+ ClassDB::bind_method(_MD("set_shadow_atlas_size","size"), &Viewport::set_shadow_atlas_size);
+ ClassDB::bind_method(_MD("get_shadow_atlas_size"), &Viewport::get_shadow_atlas_size);
- ObjectTypeDB::bind_method(_MD("set_shadow_atlas_quadrant_subdiv","quadrant","subdiv"), &Viewport::set_shadow_atlas_quadrant_subdiv);
- ObjectTypeDB::bind_method(_MD("get_shadow_atlas_quadrant_subdiv","quadrant"), &Viewport::get_shadow_atlas_quadrant_subdiv);
+ ClassDB::bind_method(_MD("set_shadow_atlas_quadrant_subdiv","quadrant","subdiv"), &Viewport::set_shadow_atlas_quadrant_subdiv);
+ ClassDB::bind_method(_MD("get_shadow_atlas_quadrant_subdiv","quadrant"), &Viewport::get_shadow_atlas_quadrant_subdiv);
ADD_PROPERTY( PropertyInfo(Variant::RECT2,"size"), _SCS("set_size"), _SCS("get_size") );
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"own_world"), _SCS("set_use_own_world"), _SCS("is_using_own_world") );
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index c4b4948c30..702c9f792f 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -50,7 +50,7 @@ class Viewport;
class ViewportTexture : public Texture {
- OBJ_TYPE( ViewportTexture, Texture );
+ GDCLASS( ViewportTexture, Texture );
int flags;
friend class Viewport;
@@ -76,7 +76,7 @@ public:
class Viewport : public Node {
- OBJ_TYPE( Viewport, Node );
+ GDCLASS( Viewport, Node );
public:
enum UpdateMode {
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 5cc71d5203..063c2ec56c 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -298,103 +298,102 @@ void register_scene_types() {
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_type<Object>();
+ ClassDB::register_class<Object>();
- ObjectTypeDB::register_type<Node>();
- ObjectTypeDB::register_virtual_type<InstancePlaceholder>();
+ ClassDB::register_class<Node>();
+ ClassDB::register_virtual_class<InstancePlaceholder>();
- ObjectTypeDB::register_type<Viewport>();
- ObjectTypeDB::register_type<ViewportTexture>();
- ObjectTypeDB::register_type<HTTPRequest>();
- ObjectTypeDB::register_type<Timer>();
- ObjectTypeDB::register_type<CanvasLayer>();
- ObjectTypeDB::register_type<CanvasModulate>();
- ObjectTypeDB::register_type<ResourcePreloader>();
+ ClassDB::register_class<Viewport>();
+ ClassDB::register_class<ViewportTexture>();
+ ClassDB::register_class<HTTPRequest>();
+ ClassDB::register_class<Timer>();
+ ClassDB::register_class<CanvasLayer>();
+ ClassDB::register_class<CanvasModulate>();
+ ClassDB::register_class<ResourcePreloader>();
/* REGISTER GUI */
- ObjectTypeDB::register_type<ButtonGroup>();
- ObjectTypeDB::register_virtual_type<BaseButton>();
+ ClassDB::register_class<ButtonGroup>();
+ ClassDB::register_virtual_class<BaseButton>();
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_type<ShortCut>();
- ObjectTypeDB::register_type<Control>();
-// ObjectTypeDB::register_type<EmptyControl>();
- ObjectTypeDB::add_compatibility_type("EmptyControl","Control");
- ObjectTypeDB::register_type<Button>();
- ObjectTypeDB::register_type<Label>();
- ObjectTypeDB::register_type<HScrollBar>();
- ObjectTypeDB::register_type<VScrollBar>();
- ObjectTypeDB::register_type<ProgressBar>();
- ObjectTypeDB::register_type<HSlider>();
- ObjectTypeDB::register_type<VSlider>();
- ObjectTypeDB::register_type<Popup>();
- ObjectTypeDB::register_type<PopupPanel>();
- ObjectTypeDB::register_type<MenuButton>();
- ObjectTypeDB::register_type<CheckBox>();
- ObjectTypeDB::register_type<CheckButton>();
- ObjectTypeDB::register_type<ToolButton>();
- ObjectTypeDB::register_type<LinkButton>();
- ObjectTypeDB::register_type<Panel>();
- ObjectTypeDB::register_type<Range>();
+ ClassDB::register_class<ShortCut>();
+ ClassDB::register_class<Control>();
+// ClassDB::register_type<EmptyControl>();
+ ClassDB::register_class<Button>();
+ ClassDB::register_class<Label>();
+ ClassDB::register_class<HScrollBar>();
+ ClassDB::register_class<VScrollBar>();
+ ClassDB::register_class<ProgressBar>();
+ ClassDB::register_class<HSlider>();
+ ClassDB::register_class<VSlider>();
+ ClassDB::register_class<Popup>();
+ ClassDB::register_class<PopupPanel>();
+ ClassDB::register_class<MenuButton>();
+ ClassDB::register_class<CheckBox>();
+ ClassDB::register_class<CheckButton>();
+ ClassDB::register_class<ToolButton>();
+ ClassDB::register_class<LinkButton>();
+ ClassDB::register_class<Panel>();
+ ClassDB::register_class<Range>();
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_type<TextureFrame>();
- ObjectTypeDB::register_type<ColorFrame>();
- ObjectTypeDB::register_type<Patch9Frame>();
- ObjectTypeDB::register_type<TabContainer>();
- ObjectTypeDB::register_type<Tabs>();
- ObjectTypeDB::register_virtual_type<Separator>();
- ObjectTypeDB::register_type<HSeparator>();
- ObjectTypeDB::register_type<VSeparator>();
- ObjectTypeDB::register_type<TextureButton>();
- ObjectTypeDB::register_type<Container>();
- ObjectTypeDB::register_virtual_type<BoxContainer>();
- ObjectTypeDB::register_type<HBoxContainer>();
- ObjectTypeDB::register_type<VBoxContainer>();
- ObjectTypeDB::register_type<GridContainer>();
- ObjectTypeDB::register_type<CenterContainer>();
- ObjectTypeDB::register_type<ScrollContainer>();
- ObjectTypeDB::register_type<PanelContainer>();
- ObjectTypeDB::register_virtual_type<SplitContainer>();
- ObjectTypeDB::register_type<HSplitContainer>();
- ObjectTypeDB::register_type<VSplitContainer>();
- ObjectTypeDB::register_type<GraphNode>();
- ObjectTypeDB::register_type<GraphEdit>();
+ ClassDB::register_class<TextureFrame>();
+ ClassDB::register_class<ColorFrame>();
+ ClassDB::register_class<Patch9Frame>();
+ ClassDB::register_class<TabContainer>();
+ ClassDB::register_class<Tabs>();
+ ClassDB::register_virtual_class<Separator>();
+ ClassDB::register_class<HSeparator>();
+ ClassDB::register_class<VSeparator>();
+ ClassDB::register_class<TextureButton>();
+ ClassDB::register_class<Container>();
+ ClassDB::register_virtual_class<BoxContainer>();
+ ClassDB::register_class<HBoxContainer>();
+ ClassDB::register_class<VBoxContainer>();
+ ClassDB::register_class<GridContainer>();
+ ClassDB::register_class<CenterContainer>();
+ ClassDB::register_class<ScrollContainer>();
+ ClassDB::register_class<PanelContainer>();
+ ClassDB::register_virtual_class<SplitContainer>();
+ ClassDB::register_class<HSplitContainer>();
+ ClassDB::register_class<VSplitContainer>();
+ ClassDB::register_class<GraphNode>();
+ ClassDB::register_class<GraphEdit>();
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_virtual_type<ButtonArray>();
- ObjectTypeDB::register_type<HButtonArray>();
- ObjectTypeDB::register_type<VButtonArray>();
- ObjectTypeDB::register_type<TextureProgress>();
- ObjectTypeDB::register_type<ItemList>();
+ ClassDB::register_virtual_class<ButtonArray>();
+ ClassDB::register_class<HButtonArray>();
+ ClassDB::register_class<VButtonArray>();
+ ClassDB::register_class<TextureProgress>();
+ ClassDB::register_class<ItemList>();
#ifndef ADVANCED_GUI_DISABLED
- ObjectTypeDB::register_type<FileDialog>();
- ObjectTypeDB::register_type<LineEdit>();
- ObjectTypeDB::register_type<PopupMenu>();
- ObjectTypeDB::register_type<Tree>();
-
- ObjectTypeDB::register_type<TextEdit>();
-
- ObjectTypeDB::register_virtual_type<TreeItem>();
- ObjectTypeDB::register_type<OptionButton>();
- ObjectTypeDB::register_type<SpinBox>();
- ObjectTypeDB::register_type<ReferenceFrame>();
- ObjectTypeDB::register_type<ColorPicker>();
- ObjectTypeDB::register_type<ColorPickerButton>();
- ObjectTypeDB::register_type<RichTextLabel>();
- ObjectTypeDB::register_type<PopupDialog>();
- ObjectTypeDB::register_type<WindowDialog>();
- ObjectTypeDB::register_type<AcceptDialog>();
- ObjectTypeDB::register_type<ConfirmationDialog>();
- ObjectTypeDB::register_type<VideoPlayer>();
- ObjectTypeDB::register_type<MarginContainer>();
- ObjectTypeDB::register_type<ViewportContainer>();
+ ClassDB::register_class<FileDialog>();
+ ClassDB::register_class<LineEdit>();
+ ClassDB::register_class<PopupMenu>();
+ ClassDB::register_class<Tree>();
+
+ ClassDB::register_class<TextEdit>();
+
+ ClassDB::register_virtual_class<TreeItem>();
+ ClassDB::register_class<OptionButton>();
+ ClassDB::register_class<SpinBox>();
+ ClassDB::register_class<ReferenceFrame>();
+ ClassDB::register_class<ColorPicker>();
+ ClassDB::register_class<ColorPickerButton>();
+ ClassDB::register_class<RichTextLabel>();
+ ClassDB::register_class<PopupDialog>();
+ ClassDB::register_class<WindowDialog>();
+ ClassDB::register_class<AcceptDialog>();
+ ClassDB::register_class<ConfirmationDialog>();
+ ClassDB::register_class<VideoPlayer>();
+ ClassDB::register_class<MarginContainer>();
+ ClassDB::register_class<ViewportContainer>();
OS::get_singleton()->yield(); //may take time to init
@@ -402,251 +401,245 @@ void register_scene_types() {
/* REGISTER 3D */
- ObjectTypeDB::register_type<Spatial>();
- ObjectTypeDB::register_virtual_type<SpatialGizmo>();
- ObjectTypeDB::register_type<Skeleton>();
- ObjectTypeDB::register_type<AnimationPlayer>();
- ObjectTypeDB::register_type<Tween>();
+ ClassDB::register_class<Spatial>();
+ ClassDB::register_virtual_class<SpatialGizmo>();
+ ClassDB::register_class<Skeleton>();
+ ClassDB::register_class<AnimationPlayer>();
+ ClassDB::register_class<Tween>();
OS::get_singleton()->yield(); //may take time to init
#ifndef _3D_DISABLED
- ObjectTypeDB::register_type<BoneAttachment>();
- ObjectTypeDB::register_virtual_type<VisualInstance>();
- ObjectTypeDB::register_type<Camera>();
- ObjectTypeDB::register_type<Listener>();
- ObjectTypeDB::register_type<InterpolatedCamera>();
- ObjectTypeDB::register_type<TestCube>();
- ObjectTypeDB::register_type<MeshInstance>();
- ObjectTypeDB::register_type<ImmediateGeometry>();
- ObjectTypeDB::register_type<Sprite3D>();
- ObjectTypeDB::register_type<AnimatedSprite3D>();
- ObjectTypeDB::register_virtual_type<Light>();
- ObjectTypeDB::register_type<DirectionalLight>();
- ObjectTypeDB::register_type<OmniLight>();
- ObjectTypeDB::register_type<SpotLight>();
- ObjectTypeDB::register_type<ReflectionProbe>();
- ObjectTypeDB::register_type<GIProbe>();
- ObjectTypeDB::register_type<GIProbeData>();
- ObjectTypeDB::register_type<AnimationTreePlayer>();
- ObjectTypeDB::register_type<Portal>();
- //ObjectTypeDB::register_type<Particles>();
- ObjectTypeDB::register_type<Position3D>();
- ObjectTypeDB::register_type<Quad>();
- ObjectTypeDB::register_type<NavigationMeshInstance>();
- ObjectTypeDB::register_type<NavigationMesh>();
- ObjectTypeDB::register_type<Navigation>();
+ ClassDB::register_class<BoneAttachment>();
+ ClassDB::register_virtual_class<VisualInstance>();
+ ClassDB::register_class<Camera>();
+ ClassDB::register_class<Listener>();
+ ClassDB::register_class<InterpolatedCamera>();
+ ClassDB::register_class<TestCube>();
+ ClassDB::register_class<MeshInstance>();
+ ClassDB::register_class<ImmediateGeometry>();
+ ClassDB::register_class<Sprite3D>();
+ ClassDB::register_class<AnimatedSprite3D>();
+ ClassDB::register_virtual_class<Light>();
+ ClassDB::register_class<DirectionalLight>();
+ ClassDB::register_class<OmniLight>();
+ ClassDB::register_class<SpotLight>();
+ ClassDB::register_class<ReflectionProbe>();
+ ClassDB::register_class<GIProbe>();
+ ClassDB::register_class<GIProbeData>();
+ ClassDB::register_class<AnimationTreePlayer>();
+ ClassDB::register_class<Portal>();
+ //ClassDB::register_type<Particles>();
+ ClassDB::register_class<Position3D>();
+ ClassDB::register_class<Quad>();
+ ClassDB::register_class<NavigationMeshInstance>();
+ ClassDB::register_class<NavigationMesh>();
+ ClassDB::register_class<Navigation>();
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_virtual_type<CollisionObject>();
- ObjectTypeDB::register_type<StaticBody>();
- ObjectTypeDB::register_type<RigidBody>();
- ObjectTypeDB::register_type<KinematicBody>();
-
-
- ObjectTypeDB::register_type<VehicleBody>();
- ObjectTypeDB::register_type<VehicleWheel>();
- ObjectTypeDB::register_type<Area>();
- ObjectTypeDB::register_type<ProximityGroup>();
- ObjectTypeDB::register_type<CollisionShape>();
- ObjectTypeDB::register_type<CollisionPolygon>();
- ObjectTypeDB::register_type<RayCast>();
- ObjectTypeDB::register_type<MultiMeshInstance>();
- ObjectTypeDB::register_type<Room>();
- ObjectTypeDB::register_type<Curve3D>();
- ObjectTypeDB::register_type<Path>();
- ObjectTypeDB::register_type<PathFollow>();
- ObjectTypeDB::register_type<VisibilityNotifier>();
- ObjectTypeDB::register_type<VisibilityEnabler>();
- ObjectTypeDB::register_type<BakedLight>();
- //ObjectTypeDB::register_type<BakedLightSampler>();
- ObjectTypeDB::register_type<WorldEnvironment>();
- ObjectTypeDB::register_type<RemoteTransform>();
-
- ObjectTypeDB::register_virtual_type<Joint>();
- ObjectTypeDB::register_type<PinJoint>();
- ObjectTypeDB::register_type<HingeJoint>();
- ObjectTypeDB::register_type<SliderJoint>();
- ObjectTypeDB::register_type<ConeTwistJoint>();
- ObjectTypeDB::register_type<Generic6DOFJoint>();
+ ClassDB::register_virtual_class<CollisionObject>();
+ ClassDB::register_class<StaticBody>();
+ ClassDB::register_class<RigidBody>();
+ ClassDB::register_class<KinematicBody>();
+
+
+ ClassDB::register_class<VehicleBody>();
+ ClassDB::register_class<VehicleWheel>();
+ ClassDB::register_class<Area>();
+ ClassDB::register_class<ProximityGroup>();
+ ClassDB::register_class<CollisionShape>();
+ ClassDB::register_class<CollisionPolygon>();
+ ClassDB::register_class<RayCast>();
+ ClassDB::register_class<MultiMeshInstance>();
+ ClassDB::register_class<Room>();
+ ClassDB::register_class<Curve3D>();
+ ClassDB::register_class<Path>();
+ ClassDB::register_class<PathFollow>();
+ ClassDB::register_class<VisibilityNotifier>();
+ ClassDB::register_class<VisibilityEnabler>();
+ ClassDB::register_class<BakedLight>();
+ //ClassDB::register_type<BakedLightSampler>();
+ ClassDB::register_class<WorldEnvironment>();
+ ClassDB::register_class<RemoteTransform>();
+
+ ClassDB::register_virtual_class<Joint>();
+ ClassDB::register_class<PinJoint>();
+ ClassDB::register_class<HingeJoint>();
+ ClassDB::register_class<SliderJoint>();
+ ClassDB::register_class<ConeTwistJoint>();
+ ClassDB::register_class<Generic6DOFJoint>();
//scenariofx
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_type<SpatialSamplePlayer>();
- ObjectTypeDB::register_type<SpatialStreamPlayer>();
- ObjectTypeDB::register_type<SoundRoomParams>();
+ ClassDB::register_class<SpatialSamplePlayer>();
+ ClassDB::register_class<SpatialStreamPlayer>();
+ ClassDB::register_class<SoundRoomParams>();
#endif
- ObjectTypeDB::register_type<MeshLibrary>();
+ ClassDB::register_class<MeshLibrary>();
AcceptDialog::set_swap_ok_cancel( GLOBAL_DEF("display/swap_ok_cancel",bool(OS::get_singleton()->get_swap_ok_cancel())) );
- ObjectTypeDB::register_type<SamplePlayer>();
- ObjectTypeDB::register_type<StreamPlayer>();
- ObjectTypeDB::register_type<EventPlayer>();
-
-
- ObjectTypeDB::register_type<CanvasItemMaterial>();
- ObjectTypeDB::register_virtual_type<CanvasItem>();
- ObjectTypeDB::register_type<Node2D>();
- ObjectTypeDB::register_type<Particles2D>();
- ObjectTypeDB::register_type<ParticleAttractor2D>();
- ObjectTypeDB::register_type<Sprite>();
-// ObjectTypeDB::register_type<ViewportSprite>();
- ObjectTypeDB::register_type<SpriteFrames>();
- ObjectTypeDB::register_type<AnimatedSprite>();
- ObjectTypeDB::register_type<Position2D>();
- ObjectTypeDB::register_virtual_type<CollisionObject2D>();
- ObjectTypeDB::register_virtual_type<PhysicsBody2D>();
- ObjectTypeDB::register_type<StaticBody2D>();
- ObjectTypeDB::register_type<RigidBody2D>();
- ObjectTypeDB::register_type<KinematicBody2D>();
- ObjectTypeDB::register_type<Area2D>();
- ObjectTypeDB::register_type<CollisionShape2D>();
- ObjectTypeDB::register_type<CollisionPolygon2D>();
- ObjectTypeDB::register_type<RayCast2D>();
- ObjectTypeDB::register_type<VisibilityNotifier2D>();
- ObjectTypeDB::register_type<VisibilityEnabler2D>();
- ObjectTypeDB::register_type<Polygon2D>();
- ObjectTypeDB::register_type<Light2D>();
- ObjectTypeDB::register_type<LightOccluder2D>();
- ObjectTypeDB::register_type<OccluderPolygon2D>();
- ObjectTypeDB::register_type<YSort>();
- ObjectTypeDB::register_type<BackBufferCopy>();
+ ClassDB::register_class<SamplePlayer>();
+ ClassDB::register_class<StreamPlayer>();
+ ClassDB::register_class<EventPlayer>();
+
+
+ ClassDB::register_class<CanvasItemMaterial>();
+ ClassDB::register_virtual_class<CanvasItem>();
+ ClassDB::register_class<Node2D>();
+ ClassDB::register_class<Particles2D>();
+ ClassDB::register_class<ParticleAttractor2D>();
+ ClassDB::register_class<Sprite>();
+// ClassDB::register_type<ViewportSprite>();
+ ClassDB::register_class<SpriteFrames>();
+ ClassDB::register_class<AnimatedSprite>();
+ ClassDB::register_class<Position2D>();
+ ClassDB::register_virtual_class<CollisionObject2D>();
+ ClassDB::register_virtual_class<PhysicsBody2D>();
+ ClassDB::register_class<StaticBody2D>();
+ ClassDB::register_class<RigidBody2D>();
+ ClassDB::register_class<KinematicBody2D>();
+ ClassDB::register_class<Area2D>();
+ ClassDB::register_class<CollisionShape2D>();
+ ClassDB::register_class<CollisionPolygon2D>();
+ ClassDB::register_class<RayCast2D>();
+ ClassDB::register_class<VisibilityNotifier2D>();
+ ClassDB::register_class<VisibilityEnabler2D>();
+ ClassDB::register_class<Polygon2D>();
+ ClassDB::register_class<Light2D>();
+ ClassDB::register_class<LightOccluder2D>();
+ ClassDB::register_class<OccluderPolygon2D>();
+ ClassDB::register_class<YSort>();
+ ClassDB::register_class<BackBufferCopy>();
if (bool(GLOBAL_DEF("physics/remove_collision_helpers_at_runtime",false))) {
- ObjectTypeDB::set_type_enabled("CollisionShape2D",false);
- ObjectTypeDB::set_type_enabled("CollisionPolygon2D",false);
- ObjectTypeDB::set_type_enabled("CollisionShape",false);
- ObjectTypeDB::set_type_enabled("CollisionPolygon",false);
+ ClassDB::set_class_enabled("CollisionShape2D",false);
+ ClassDB::set_class_enabled("CollisionPolygon2D",false);
+ ClassDB::set_class_enabled("CollisionShape",false);
+ ClassDB::set_class_enabled("CollisionPolygon",false);
}
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_type<Camera2D>();
- ObjectTypeDB::register_virtual_type<Joint2D>();
- ObjectTypeDB::register_type<PinJoint2D>();
- ObjectTypeDB::register_type<GrooveJoint2D>();
- ObjectTypeDB::register_type<DampedSpringJoint2D>();
- ObjectTypeDB::register_type<TileSet>();
- ObjectTypeDB::register_type<TileMap>();
- ObjectTypeDB::register_type<ParallaxBackground>();
- ObjectTypeDB::register_type<ParallaxLayer>();
- ObjectTypeDB::register_virtual_type<SoundPlayer2D>();
- ObjectTypeDB::register_type<SamplePlayer2D>();
- ObjectTypeDB::register_type<TouchScreenButton>();
- ObjectTypeDB::register_type<RemoteTransform2D>();
+ ClassDB::register_class<Camera2D>();
+ ClassDB::register_virtual_class<Joint2D>();
+ ClassDB::register_class<PinJoint2D>();
+ ClassDB::register_class<GrooveJoint2D>();
+ ClassDB::register_class<DampedSpringJoint2D>();
+ ClassDB::register_class<TileSet>();
+ ClassDB::register_class<TileMap>();
+ ClassDB::register_class<ParallaxBackground>();
+ ClassDB::register_class<ParallaxLayer>();
+ ClassDB::register_virtual_class<SoundPlayer2D>();
+ ClassDB::register_class<SamplePlayer2D>();
+ ClassDB::register_class<TouchScreenButton>();
+ ClassDB::register_class<RemoteTransform2D>();
OS::get_singleton()->yield(); //may take time to init
/* REGISTER RESOURCES */
- ObjectTypeDB::register_virtual_type<Shader>();
-// ObjectTypeDB::register_virtual_type<ShaderGraph>();
- ObjectTypeDB::register_type<CanvasItemShader>();
-// ObjectTypeDB::register_type<CanvasItemShaderGraph>();
+ ClassDB::register_virtual_class<Shader>();
+// ClassDB::register_virtual_type<ShaderGraph>();
+ ClassDB::register_class<CanvasItemShader>();
+// ClassDB::register_type<CanvasItemShaderGraph>();
#ifndef _3D_DISABLED
- ObjectTypeDB::register_type<Mesh>();
- ObjectTypeDB::register_virtual_type<Material>();
- ObjectTypeDB::register_type<FixedSpatialMaterial>();
+ ClassDB::register_class<Mesh>();
+ ClassDB::register_virtual_class<Material>();
+ ClassDB::register_class<FixedSpatialMaterial>();
SceneTree::add_idle_callback(FixedSpatialMaterial::flush_changes);
FixedSpatialMaterial::init_shaders();
-// ObjectTypeDB::register_type<ShaderMaterial>();
- ObjectTypeDB::register_type<RoomBounds>();
-// ObjectTypeDB::register_type<MaterialShaderGraph>();
- ObjectTypeDB::register_type<SpatialShader>();
- ObjectTypeDB::register_type<ParticlesShader>();
- ObjectTypeDB::add_compatibility_type("Shader","MaterialShader");
- ObjectTypeDB::add_compatibility_type("ParticleSystemMaterial","FixedSpatialMaterial");
- ObjectTypeDB::add_compatibility_type("UnshadedMaterial","FixedSpatialMaterial");
- ObjectTypeDB::register_type<MultiMesh>();
- ObjectTypeDB::register_type<MeshLibrary>();
+// ClassDB::register_type<ShaderMaterial>();
+ ClassDB::register_class<RoomBounds>();
+// ClassDB::register_type<MaterialShaderGraph>();
+ ClassDB::register_class<SpatialShader>();
+ ClassDB::register_class<ParticlesShader>();
+ ClassDB::register_class<MultiMesh>();
+ ClassDB::register_class<MeshLibrary>();
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_type<RayShape>();
- ObjectTypeDB::register_type<SphereShape>();
- ObjectTypeDB::register_type<BoxShape>();
- ObjectTypeDB::register_type<CapsuleShape>();
- ObjectTypeDB::register_type<PlaneShape>();
- ObjectTypeDB::register_type<ConvexPolygonShape>();
- ObjectTypeDB::register_type<ConcavePolygonShape>();
+ ClassDB::register_class<RayShape>();
+ ClassDB::register_class<SphereShape>();
+ ClassDB::register_class<BoxShape>();
+ ClassDB::register_class<CapsuleShape>();
+ ClassDB::register_class<PlaneShape>();
+ ClassDB::register_class<ConvexPolygonShape>();
+ ClassDB::register_class<ConcavePolygonShape>();
- ObjectTypeDB::register_type<SurfaceTool>();
- ObjectTypeDB::register_type<MeshDataTool>();
- //ObjectTypeDB::register_type<BakedLight>();
+ ClassDB::register_class<SurfaceTool>();
+ ClassDB::register_class<MeshDataTool>();
+ //ClassDB::register_type<BakedLight>();
OS::get_singleton()->yield(); //may take time to init
#endif
- ObjectTypeDB::register_type<World>();
- ObjectTypeDB::register_type<Environment>();
- ObjectTypeDB::register_type<World2D>();
- ObjectTypeDB::register_virtual_type<Texture>();
- ObjectTypeDB::register_virtual_type<SkyBox>();
- ObjectTypeDB::register_type<ImageSkyBox>();
- ObjectTypeDB::register_type<ImageTexture>();
- ObjectTypeDB::register_type<AtlasTexture>();
- ObjectTypeDB::register_type<LargeTexture>();
- ObjectTypeDB::register_type<CubeMap>();
- ObjectTypeDB::register_type<Animation>();
- ObjectTypeDB::register_virtual_type<Font>();
- ObjectTypeDB::register_type<BitmapFont>();
-
- ObjectTypeDB::register_type<DynamicFontData>();
- ObjectTypeDB::register_type<DynamicFont>();
-
- ObjectTypeDB::register_type<StyleBoxEmpty>();
- ObjectTypeDB::register_type<StyleBoxTexture>();
- ObjectTypeDB::register_type<StyleBoxFlat>();
- ObjectTypeDB::register_type<Theme>();
-
- ObjectTypeDB::add_compatibility_type("Font","BitmapFont");
-
-
- ObjectTypeDB::register_type<PolygonPathFinder>();
- ObjectTypeDB::register_type<BitMap>();
- ObjectTypeDB::register_type<ColorRamp>();
+ ClassDB::register_class<World>();
+ ClassDB::register_class<Environment>();
+ ClassDB::register_class<World2D>();
+ ClassDB::register_virtual_class<Texture>();
+ ClassDB::register_virtual_class<SkyBox>();
+ ClassDB::register_class<ImageSkyBox>();
+ ClassDB::register_class<ImageTexture>();
+ ClassDB::register_class<AtlasTexture>();
+ ClassDB::register_class<LargeTexture>();
+ ClassDB::register_class<CubeMap>();
+ ClassDB::register_class<Animation>();
+ ClassDB::register_virtual_class<Font>();
+ ClassDB::register_class<BitmapFont>();
+
+ ClassDB::register_class<DynamicFontData>();
+ ClassDB::register_class<DynamicFont>();
+
+ ClassDB::register_class<StyleBoxEmpty>();
+ ClassDB::register_class<StyleBoxTexture>();
+ ClassDB::register_class<StyleBoxFlat>();
+ ClassDB::register_class<Theme>();
+
+ ClassDB::register_class<PolygonPathFinder>();
+ ClassDB::register_class<BitMap>();
+ ClassDB::register_class<ColorRamp>();
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_type<Sample>();
- ObjectTypeDB::register_type<SampleLibrary>();
- ObjectTypeDB::register_virtual_type<AudioStream>();
- ObjectTypeDB::register_virtual_type<AudioStreamPlayback>();
+ ClassDB::register_class<Sample>();
+ ClassDB::register_class<SampleLibrary>();
+ ClassDB::register_virtual_class<AudioStream>();
+ ClassDB::register_virtual_class<AudioStreamPlayback>();
//TODO: Adapt to the new AudioStream API or drop (GH-3307)
-// ObjectTypeDB::register_type<AudioStreamGibberish>();
- ObjectTypeDB::register_virtual_type<VideoStream>();
+// ClassDB::register_type<AudioStreamGibberish>();
+ ClassDB::register_virtual_class<VideoStream>();
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_virtual_type<Shape2D>();
- ObjectTypeDB::register_type<LineShape2D>();
- ObjectTypeDB::register_type<SegmentShape2D>();
- ObjectTypeDB::register_type<RayShape2D>();
- ObjectTypeDB::register_type<CircleShape2D>();
- ObjectTypeDB::register_type<RectangleShape2D>();
- ObjectTypeDB::register_type<CapsuleShape2D>();
- ObjectTypeDB::register_type<ConvexPolygonShape2D>();
- ObjectTypeDB::register_type<ConcavePolygonShape2D>();
- ObjectTypeDB::register_type<Curve2D>();
- ObjectTypeDB::register_type<Path2D>();
- ObjectTypeDB::register_type<PathFollow2D>();
-
- ObjectTypeDB::register_type<Navigation2D>();
- ObjectTypeDB::register_type<NavigationPolygon>();
- ObjectTypeDB::register_type<NavigationPolygonInstance>();
+ ClassDB::register_virtual_class<Shape2D>();
+ ClassDB::register_class<LineShape2D>();
+ ClassDB::register_class<SegmentShape2D>();
+ ClassDB::register_class<RayShape2D>();
+ ClassDB::register_class<CircleShape2D>();
+ ClassDB::register_class<RectangleShape2D>();
+ ClassDB::register_class<CapsuleShape2D>();
+ ClassDB::register_class<ConvexPolygonShape2D>();
+ ClassDB::register_class<ConcavePolygonShape2D>();
+ ClassDB::register_class<Curve2D>();
+ ClassDB::register_class<Path2D>();
+ ClassDB::register_class<PathFollow2D>();
+
+ ClassDB::register_class<Navigation2D>();
+ ClassDB::register_class<NavigationPolygon>();
+ ClassDB::register_class<NavigationPolygonInstance>();
OS::get_singleton()->yield(); //may take time to init
- ObjectTypeDB::register_virtual_type<SceneState>();
- ObjectTypeDB::register_type<PackedScene>();
+ ClassDB::register_virtual_class<SceneState>();
+ ClassDB::register_class<PackedScene>();
- ObjectTypeDB::register_type<SceneTree>();
- ObjectTypeDB::register_virtual_type<SceneTreeTimer>(); //sorry, you can't create it
+ ClassDB::register_class<SceneTree>();
+ ClassDB::register_virtual_class<SceneTreeTimer>(); //sorry, you can't create it
OS::get_singleton()->yield(); //may take time to init
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index d86c476ef4..b5c438d953 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1680,59 +1680,59 @@ float Animation::get_step() const{
void Animation::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_track","type","at_pos"),&Animation::add_track,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("remove_track","idx"),&Animation::remove_track);
- ObjectTypeDB::bind_method(_MD("get_track_count"),&Animation::get_track_count);
- ObjectTypeDB::bind_method(_MD("track_get_type","idx"),&Animation::track_get_type);
- ObjectTypeDB::bind_method(_MD("track_get_path","idx"),&Animation::track_get_path);
- ObjectTypeDB::bind_method(_MD("track_set_path","idx","path"),&Animation::track_set_path);
- ObjectTypeDB::bind_method(_MD("find_track","path"),&Animation::find_track);
+ ClassDB::bind_method(_MD("add_track","type","at_pos"),&Animation::add_track,DEFVAL(-1));
+ ClassDB::bind_method(_MD("remove_track","idx"),&Animation::remove_track);
+ ClassDB::bind_method(_MD("get_track_count"),&Animation::get_track_count);
+ ClassDB::bind_method(_MD("track_get_type","idx"),&Animation::track_get_type);
+ ClassDB::bind_method(_MD("track_get_path","idx"),&Animation::track_get_path);
+ ClassDB::bind_method(_MD("track_set_path","idx","path"),&Animation::track_set_path);
+ ClassDB::bind_method(_MD("find_track","path"),&Animation::find_track);
- ObjectTypeDB::bind_method(_MD("track_move_up","idx"),&Animation::track_move_up);
- ObjectTypeDB::bind_method(_MD("track_move_down","idx"),&Animation::track_move_down);
+ ClassDB::bind_method(_MD("track_move_up","idx"),&Animation::track_move_up);
+ ClassDB::bind_method(_MD("track_move_down","idx"),&Animation::track_move_down);
- ObjectTypeDB::bind_method(_MD("track_set_imported","idx","imported"),&Animation::track_set_imported);
- ObjectTypeDB::bind_method(_MD("track_is_imported","idx"),&Animation::track_is_imported);
+ ClassDB::bind_method(_MD("track_set_imported","idx","imported"),&Animation::track_set_imported);
+ ClassDB::bind_method(_MD("track_is_imported","idx"),&Animation::track_is_imported);
- ObjectTypeDB::bind_method(_MD("transform_track_insert_key","idx","time","loc","rot","scale"),&Animation::transform_track_insert_key);
- ObjectTypeDB::bind_method(_MD("track_insert_key","idx","time","key","transition"),&Animation::track_insert_key,DEFVAL(1));
- ObjectTypeDB::bind_method(_MD("track_remove_key","idx","key_idx"),&Animation::track_remove_key);
- ObjectTypeDB::bind_method(_MD("track_remove_key_at_pos","idx","pos"),&Animation::track_remove_key_at_pos);
- ObjectTypeDB::bind_method(_MD("track_set_key_value","idx","key","value"),&Animation::track_set_key_value);
- ObjectTypeDB::bind_method(_MD("track_set_key_transition","idx","key_idx","transition"),&Animation::track_set_key_transition);
- ObjectTypeDB::bind_method(_MD("track_get_key_transition","idx","key_idx"),&Animation::track_get_key_transition);
+ ClassDB::bind_method(_MD("transform_track_insert_key","idx","time","loc","rot","scale"),&Animation::transform_track_insert_key);
+ ClassDB::bind_method(_MD("track_insert_key","idx","time","key","transition"),&Animation::track_insert_key,DEFVAL(1));
+ ClassDB::bind_method(_MD("track_remove_key","idx","key_idx"),&Animation::track_remove_key);
+ ClassDB::bind_method(_MD("track_remove_key_at_pos","idx","pos"),&Animation::track_remove_key_at_pos);
+ ClassDB::bind_method(_MD("track_set_key_value","idx","key","value"),&Animation::track_set_key_value);
+ ClassDB::bind_method(_MD("track_set_key_transition","idx","key_idx","transition"),&Animation::track_set_key_transition);
+ ClassDB::bind_method(_MD("track_get_key_transition","idx","key_idx"),&Animation::track_get_key_transition);
- ObjectTypeDB::bind_method(_MD("track_get_key_count","idx"),&Animation::track_get_key_count);
- ObjectTypeDB::bind_method(_MD("track_get_key_value","idx","key_idx"),&Animation::track_get_key_value);
- ObjectTypeDB::bind_method(_MD("track_get_key_time","idx","key_idx"),&Animation::track_get_key_time);
- ObjectTypeDB::bind_method(_MD("track_find_key","idx","time","exact"),&Animation::track_find_key,DEFVAL(false));
+ ClassDB::bind_method(_MD("track_get_key_count","idx"),&Animation::track_get_key_count);
+ ClassDB::bind_method(_MD("track_get_key_value","idx","key_idx"),&Animation::track_get_key_value);
+ ClassDB::bind_method(_MD("track_get_key_time","idx","key_idx"),&Animation::track_get_key_time);
+ ClassDB::bind_method(_MD("track_find_key","idx","time","exact"),&Animation::track_find_key,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("track_set_interpolation_type","idx","interpolation"),&Animation::track_set_interpolation_type);
- ObjectTypeDB::bind_method(_MD("track_get_interpolation_type","idx"),&Animation::track_get_interpolation_type);
+ ClassDB::bind_method(_MD("track_set_interpolation_type","idx","interpolation"),&Animation::track_set_interpolation_type);
+ ClassDB::bind_method(_MD("track_get_interpolation_type","idx"),&Animation::track_get_interpolation_type);
- ObjectTypeDB::bind_method(_MD("transform_track_interpolate","idx","time_sec"),&Animation::_transform_track_interpolate);
- ObjectTypeDB::bind_method(_MD("value_track_set_update_mode","idx","mode"),&Animation::value_track_set_update_mode);
- ObjectTypeDB::bind_method(_MD("value_track_get_update_mode","idx"),&Animation::value_track_get_update_mode);
+ ClassDB::bind_method(_MD("transform_track_interpolate","idx","time_sec"),&Animation::_transform_track_interpolate);
+ ClassDB::bind_method(_MD("value_track_set_update_mode","idx","mode"),&Animation::value_track_set_update_mode);
+ ClassDB::bind_method(_MD("value_track_get_update_mode","idx"),&Animation::value_track_get_update_mode);
- ObjectTypeDB::bind_method(_MD("value_track_get_key_indices","idx","time_sec","delta"),&Animation::_value_track_get_key_indices);
+ ClassDB::bind_method(_MD("value_track_get_key_indices","idx","time_sec","delta"),&Animation::_value_track_get_key_indices);
- ObjectTypeDB::bind_method(_MD("method_track_get_key_indices","idx","time_sec","delta"),&Animation::_method_track_get_key_indices);
- ObjectTypeDB::bind_method(_MD("method_track_get_name","idx","key_idx"),&Animation::method_track_get_name);
- ObjectTypeDB::bind_method(_MD("method_track_get_params","idx","key_idx"),&Animation::method_track_get_params);
+ ClassDB::bind_method(_MD("method_track_get_key_indices","idx","time_sec","delta"),&Animation::_method_track_get_key_indices);
+ ClassDB::bind_method(_MD("method_track_get_name","idx","key_idx"),&Animation::method_track_get_name);
+ ClassDB::bind_method(_MD("method_track_get_params","idx","key_idx"),&Animation::method_track_get_params);
- ObjectTypeDB::bind_method(_MD("set_length","time_sec"),&Animation::set_length);
- ObjectTypeDB::bind_method(_MD("get_length"),&Animation::get_length);
+ ClassDB::bind_method(_MD("set_length","time_sec"),&Animation::set_length);
+ ClassDB::bind_method(_MD("get_length"),&Animation::get_length);
- ObjectTypeDB::bind_method(_MD("set_loop","enabled"),&Animation::set_loop);
- ObjectTypeDB::bind_method(_MD("has_loop"),&Animation::has_loop);
+ ClassDB::bind_method(_MD("set_loop","enabled"),&Animation::set_loop);
+ ClassDB::bind_method(_MD("has_loop"),&Animation::has_loop);
- ObjectTypeDB::bind_method(_MD("set_step","size_sec"),&Animation::set_step);
- ObjectTypeDB::bind_method(_MD("get_step"),&Animation::get_step);
+ ClassDB::bind_method(_MD("set_step","size_sec"),&Animation::set_step);
+ ClassDB::bind_method(_MD("get_step"),&Animation::get_step);
- ObjectTypeDB::bind_method(_MD("clear"),&Animation::clear);
+ ClassDB::bind_method(_MD("clear"),&Animation::clear);
BIND_CONSTANT( TYPE_VALUE );
BIND_CONSTANT( TYPE_TRANSFORM );
diff --git a/scene/resources/animation.h b/scene/resources/animation.h
index 6f39d069f4..90824d8c7b 100644
--- a/scene/resources/animation.h
+++ b/scene/resources/animation.h
@@ -35,7 +35,7 @@
*/
class Animation : public Resource {
- OBJ_TYPE( Animation, Resource );
+ GDCLASS( Animation, Resource );
RES_BASE_EXTENSION("anm");
public:
diff --git a/scene/resources/audio_stream.cpp b/scene/resources/audio_stream.cpp
index f6dc99b8a3..7c269de007 100644
--- a/scene/resources/audio_stream.cpp
+++ b/scene/resources/audio_stream.cpp
@@ -33,22 +33,22 @@
void AudioStreamPlayback::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("play","from_pos_sec"),&AudioStreamPlayback::play,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("stop"),&AudioStreamPlayback::stop);
- ObjectTypeDB::bind_method(_MD("is_playing"),&AudioStreamPlayback::is_playing);
+ ClassDB::bind_method(_MD("play","from_pos_sec"),&AudioStreamPlayback::play,DEFVAL(0));
+ ClassDB::bind_method(_MD("stop"),&AudioStreamPlayback::stop);
+ ClassDB::bind_method(_MD("is_playing"),&AudioStreamPlayback::is_playing);
- ObjectTypeDB::bind_method(_MD("set_loop","enabled"),&AudioStreamPlayback::set_loop);
- ObjectTypeDB::bind_method(_MD("has_loop"),&AudioStreamPlayback::has_loop);
+ ClassDB::bind_method(_MD("set_loop","enabled"),&AudioStreamPlayback::set_loop);
+ ClassDB::bind_method(_MD("has_loop"),&AudioStreamPlayback::has_loop);
- ObjectTypeDB::bind_method(_MD("get_loop_count"),&AudioStreamPlayback::get_loop_count);
+ ClassDB::bind_method(_MD("get_loop_count"),&AudioStreamPlayback::get_loop_count);
- ObjectTypeDB::bind_method(_MD("seek_pos","pos"),&AudioStreamPlayback::seek_pos);
- ObjectTypeDB::bind_method(_MD("get_pos"),&AudioStreamPlayback::get_pos);
+ ClassDB::bind_method(_MD("seek_pos","pos"),&AudioStreamPlayback::seek_pos);
+ ClassDB::bind_method(_MD("get_pos"),&AudioStreamPlayback::get_pos);
- ObjectTypeDB::bind_method(_MD("get_length"),&AudioStreamPlayback::get_length);
- ObjectTypeDB::bind_method(_MD("get_channels"),&AudioStreamPlayback::get_channels);
- ObjectTypeDB::bind_method(_MD("get_mix_rate"),&AudioStreamPlayback::get_mix_rate);
- ObjectTypeDB::bind_method(_MD("get_minimum_buffer_size"),&AudioStreamPlayback::get_minimum_buffer_size);
+ ClassDB::bind_method(_MD("get_length"),&AudioStreamPlayback::get_length);
+ ClassDB::bind_method(_MD("get_channels"),&AudioStreamPlayback::get_channels);
+ ClassDB::bind_method(_MD("get_mix_rate"),&AudioStreamPlayback::get_mix_rate);
+ ClassDB::bind_method(_MD("get_minimum_buffer_size"),&AudioStreamPlayback::get_minimum_buffer_size);
}
diff --git a/scene/resources/audio_stream.h b/scene/resources/audio_stream.h
index 2039c4e902..b79707cd32 100644
--- a/scene/resources/audio_stream.h
+++ b/scene/resources/audio_stream.h
@@ -34,7 +34,7 @@
class AudioStreamPlayback : public Reference {
- OBJ_TYPE( AudioStreamPlayback, Reference );
+ GDCLASS( AudioStreamPlayback, Reference );
protected:
static void _bind_methods();
public:
@@ -67,7 +67,7 @@ public:
class AudioStream : public Resource {
- OBJ_TYPE( AudioStream, Resource );
+ GDCLASS( AudioStream, Resource );
OBJ_SAVE_TYPE( AudioStream ); //children are all saved as AudioStream, so they can be exchanged
protected:
diff --git a/scene/resources/audio_stream_resampled.h b/scene/resources/audio_stream_resampled.h
index 70adc53fb0..761643b027 100644
--- a/scene/resources/audio_stream_resampled.h
+++ b/scene/resources/audio_stream_resampled.h
@@ -34,7 +34,7 @@
#if 0
class AudioStreamResampled : public AudioStream {
- OBJ_TYPE(AudioStreamResampled,AudioStream);
+ GDCLASS(AudioStreamResampled,AudioStream);
uint32_t rb_bits;
uint32_t rb_len;
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index 5763be2e08..81ba28fd26 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -177,19 +177,19 @@ Dictionary BitMap::_get_data() const{
void BitMap::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("create","size"),&BitMap::create);
- ObjectTypeDB::bind_method(_MD("create_from_image_alpha","image"),&BitMap::create_from_image_alpha);
+ ClassDB::bind_method(_MD("create","size"),&BitMap::create);
+ ClassDB::bind_method(_MD("create_from_image_alpha","image"),&BitMap::create_from_image_alpha);
- ObjectTypeDB::bind_method(_MD("set_bit","pos","bit"),&BitMap::set_bit);
- ObjectTypeDB::bind_method(_MD("get_bit","pos"),&BitMap::get_bit);
+ ClassDB::bind_method(_MD("set_bit","pos","bit"),&BitMap::set_bit);
+ ClassDB::bind_method(_MD("get_bit","pos"),&BitMap::get_bit);
- ObjectTypeDB::bind_method(_MD("set_bit_rect","p_rect","bit"),&BitMap::set_bit_rect);
- ObjectTypeDB::bind_method(_MD("get_true_bit_count"),&BitMap::get_true_bit_count);
+ ClassDB::bind_method(_MD("set_bit_rect","p_rect","bit"),&BitMap::set_bit_rect);
+ ClassDB::bind_method(_MD("get_true_bit_count"),&BitMap::get_true_bit_count);
- ObjectTypeDB::bind_method(_MD("get_size"),&BitMap::get_size);
+ ClassDB::bind_method(_MD("get_size"),&BitMap::get_size);
- ObjectTypeDB::bind_method(_MD("_set_data"),&BitMap::_set_data);
- ObjectTypeDB::bind_method(_MD("_get_data"),&BitMap::_get_data);
+ ClassDB::bind_method(_MD("_set_data"),&BitMap::_set_data);
+ ClassDB::bind_method(_MD("_get_data"),&BitMap::_get_data);
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY,"data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_data"),_SCS("_get_data"));
diff --git a/scene/resources/bit_mask.h b/scene/resources/bit_mask.h
index 1bc8688aaa..f749a53e34 100644
--- a/scene/resources/bit_mask.h
+++ b/scene/resources/bit_mask.h
@@ -35,7 +35,7 @@
class BitMap : public Resource {
- OBJ_TYPE(BitMap,Resource);
+ GDCLASS(BitMap,Resource);
OBJ_SAVE_TYPE(BitMap);
RES_BASE_EXTENSION("pbm");
diff --git a/scene/resources/bounds.cpp b/scene/resources/bounds.cpp
index d8f8745ae6..03d819451d 100644
--- a/scene/resources/bounds.cpp
+++ b/scene/resources/bounds.cpp
@@ -31,8 +31,8 @@
void Bounds::_bind_methods() {
- ObjectTypeDB::bind_method( _MD("set_bsp_tree","bsp_tree"),&Bounds::set_bsp_tree);
- ObjectTypeDB::bind_method( _MD("get_bsp_tree"),&Bounds::get_bsp_tree );
+ ClassDB::bind_method( _MD("set_bsp_tree","bsp_tree"),&Bounds::set_bsp_tree);
+ ClassDB::bind_method( _MD("get_bsp_tree"),&Bounds::get_bsp_tree );
ADD_PROPERTY( PropertyInfo( Variant::ARRAY, "bsp_tree" ), _SCS("set_bsp_tree"), _SCS("get_bsp_tree"));
diff --git a/scene/resources/bounds.h b/scene/resources/bounds.h
index aa7d248a05..bd5d996a36 100644
--- a/scene/resources/bounds.h
+++ b/scene/resources/bounds.h
@@ -34,7 +34,7 @@
class Bounds : public Resource {
- OBJ_TYPE(Bounds,Resource);
+ GDCLASS(Bounds,Resource);
BSP_Tree bsp_tree;
protected:
diff --git a/scene/resources/box_shape.cpp b/scene/resources/box_shape.cpp
index 3271022268..fa5b35ca41 100644
--- a/scene/resources/box_shape.cpp
+++ b/scene/resources/box_shape.cpp
@@ -70,8 +70,8 @@ Vector3 BoxShape::get_extents() const {
void BoxShape::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_extents","extents"),&BoxShape::set_extents);
- ObjectTypeDB::bind_method(_MD("get_extents"),&BoxShape::get_extents);
+ ClassDB::bind_method(_MD("set_extents","extents"),&BoxShape::set_extents);
+ ClassDB::bind_method(_MD("get_extents"),&BoxShape::get_extents);
ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"extents"), _SCS("set_extents"), _SCS("get_extents") );
diff --git a/scene/resources/box_shape.h b/scene/resources/box_shape.h
index 34918a9780..c17dd22015 100644
--- a/scene/resources/box_shape.h
+++ b/scene/resources/box_shape.h
@@ -33,7 +33,7 @@
class BoxShape : public Shape {
- OBJ_TYPE(BoxShape,Shape);
+ GDCLASS(BoxShape,Shape);
Vector3 extents;
protected:
diff --git a/scene/resources/canvas.h b/scene/resources/canvas.h
index 9ca840978c..960136ac14 100644
--- a/scene/resources/canvas.h
+++ b/scene/resources/canvas.h
@@ -34,7 +34,7 @@
class Canvas : public Resource {
- OBJ_TYPE(Canvas,Resource);
+ GDCLASS(Canvas,Resource);
RID canvas;
diff --git a/scene/resources/capsule_shape.cpp b/scene/resources/capsule_shape.cpp
index 5ed49c5b90..db83a20f38 100644
--- a/scene/resources/capsule_shape.cpp
+++ b/scene/resources/capsule_shape.cpp
@@ -107,10 +107,10 @@ float CapsuleShape::get_height() const {
void CapsuleShape::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_radius","radius"),&CapsuleShape::set_radius);
- ObjectTypeDB::bind_method(_MD("get_radius"),&CapsuleShape::get_radius);
- ObjectTypeDB::bind_method(_MD("set_height","height"),&CapsuleShape::set_height);
- ObjectTypeDB::bind_method(_MD("get_height"),&CapsuleShape::get_height);
+ ClassDB::bind_method(_MD("set_radius","radius"),&CapsuleShape::set_radius);
+ ClassDB::bind_method(_MD("get_radius"),&CapsuleShape::get_radius);
+ ClassDB::bind_method(_MD("set_height","height"),&CapsuleShape::set_height);
+ ClassDB::bind_method(_MD("get_height"),&CapsuleShape::get_height);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"radius",PROPERTY_HINT_RANGE,"0.01,4096,0.01"), _SCS("set_radius"),_SCS("get_radius") );
ADD_PROPERTY( PropertyInfo(Variant::REAL,"height",PROPERTY_HINT_RANGE,"0.01,4096,0.01"), _SCS("set_height"),_SCS("get_height") );
diff --git a/scene/resources/capsule_shape.h b/scene/resources/capsule_shape.h
index 8425d724fd..e788d9cfc5 100644
--- a/scene/resources/capsule_shape.h
+++ b/scene/resources/capsule_shape.h
@@ -33,7 +33,7 @@
class CapsuleShape : public Shape {
- OBJ_TYPE(CapsuleShape,Shape);
+ GDCLASS(CapsuleShape,Shape);
float radius;
float height;
diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp
index 805666e7aa..27dcff0ce0 100644
--- a/scene/resources/capsule_shape_2d.cpp
+++ b/scene/resources/capsule_shape_2d.cpp
@@ -89,11 +89,11 @@ Rect2 CapsuleShape2D::get_rect() const {
void CapsuleShape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_radius","radius"),&CapsuleShape2D::set_radius);
- ObjectTypeDB::bind_method(_MD("get_radius"),&CapsuleShape2D::get_radius);
+ ClassDB::bind_method(_MD("set_radius","radius"),&CapsuleShape2D::set_radius);
+ ClassDB::bind_method(_MD("get_radius"),&CapsuleShape2D::get_radius);
- ObjectTypeDB::bind_method(_MD("set_height","height"),&CapsuleShape2D::set_height);
- ObjectTypeDB::bind_method(_MD("get_height"),&CapsuleShape2D::get_height);
+ ClassDB::bind_method(_MD("set_height","height"),&CapsuleShape2D::set_height);
+ ClassDB::bind_method(_MD("get_height"),&CapsuleShape2D::get_height);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"radius"),_SCS("set_radius"),_SCS("get_radius") );
diff --git a/scene/resources/capsule_shape_2d.h b/scene/resources/capsule_shape_2d.h
index b17d3cec70..ef06072e14 100644
--- a/scene/resources/capsule_shape_2d.h
+++ b/scene/resources/capsule_shape_2d.h
@@ -32,7 +32,7 @@
#include "scene/resources/shape_2d.h"
class CapsuleShape2D : public Shape2D {
- OBJ_TYPE( CapsuleShape2D, Shape2D );
+ GDCLASS( CapsuleShape2D, Shape2D );
real_t height;
real_t radius;
diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/circle_shape_2d.cpp
index 3aec7300d3..a82f3f5e2d 100644
--- a/scene/resources/circle_shape_2d.cpp
+++ b/scene/resources/circle_shape_2d.cpp
@@ -51,8 +51,8 @@ real_t CircleShape2D::get_radius() const {
void CircleShape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_radius","radius"),&CircleShape2D::set_radius);
- ObjectTypeDB::bind_method(_MD("get_radius"),&CircleShape2D::get_radius);
+ ClassDB::bind_method(_MD("set_radius","radius"),&CircleShape2D::set_radius);
+ ClassDB::bind_method(_MD("get_radius"),&CircleShape2D::get_radius);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"radius",PROPERTY_HINT_RANGE,"0.01,16384,0.5"),_SCS("set_radius"),_SCS("get_radius") );
diff --git a/scene/resources/circle_shape_2d.h b/scene/resources/circle_shape_2d.h
index 9c728a22a4..ec11b55169 100644
--- a/scene/resources/circle_shape_2d.h
+++ b/scene/resources/circle_shape_2d.h
@@ -32,7 +32,7 @@
#include "scene/resources/shape_2d.h"
class CircleShape2D : public Shape2D {
- OBJ_TYPE( CircleShape2D, Shape2D );
+ GDCLASS( CircleShape2D, Shape2D );
real_t radius;
void _update_shape();
diff --git a/scene/resources/color_ramp.cpp b/scene/resources/color_ramp.cpp
index cdef4346ba..1144ea41f1 100644
--- a/scene/resources/color_ramp.cpp
+++ b/scene/resources/color_ramp.cpp
@@ -54,24 +54,24 @@ void ColorRamp::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_point","offset","color"),&ColorRamp::add_point);
- ObjectTypeDB::bind_method(_MD("remove_point","offset","color"),&ColorRamp::remove_point);
+ ClassDB::bind_method(_MD("add_point","offset","color"),&ColorRamp::add_point);
+ ClassDB::bind_method(_MD("remove_point","offset","color"),&ColorRamp::remove_point);
- ObjectTypeDB::bind_method(_MD("set_offset","point","offset"),&ColorRamp::set_offset);
- ObjectTypeDB::bind_method(_MD("get_offset","point"),&ColorRamp::get_offset);
+ ClassDB::bind_method(_MD("set_offset","point","offset"),&ColorRamp::set_offset);
+ ClassDB::bind_method(_MD("get_offset","point"),&ColorRamp::get_offset);
- ObjectTypeDB::bind_method(_MD("set_color","point","color"),&ColorRamp::set_color);
- ObjectTypeDB::bind_method(_MD("get_color","point"),&ColorRamp::get_color);
+ ClassDB::bind_method(_MD("set_color","point","color"),&ColorRamp::set_color);
+ ClassDB::bind_method(_MD("get_color","point"),&ColorRamp::get_color);
- ObjectTypeDB::bind_method(_MD("interpolate","offset"),&ColorRamp::get_color_at_offset);
+ ClassDB::bind_method(_MD("interpolate","offset"),&ColorRamp::get_color_at_offset);
- ObjectTypeDB::bind_method(_MD("get_point_count"),&ColorRamp::get_points_count);
+ ClassDB::bind_method(_MD("get_point_count"),&ColorRamp::get_points_count);
- ObjectTypeDB::bind_method(_MD(COLOR_RAMP_SET_OFFSETS,"offsets"),&ColorRamp::set_offsets);
- ObjectTypeDB::bind_method(_MD(COLOR_RAMP_GET_OFFSETS),&ColorRamp::get_offsets);
+ ClassDB::bind_method(_MD(COLOR_RAMP_SET_OFFSETS,"offsets"),&ColorRamp::set_offsets);
+ ClassDB::bind_method(_MD(COLOR_RAMP_GET_OFFSETS),&ColorRamp::get_offsets);
- ObjectTypeDB::bind_method(_MD(COLOR_RAMP_SET_COLORS,"colors"),&ColorRamp::set_colors);
- ObjectTypeDB::bind_method(_MD(COLOR_RAMP_GET_COLORS),&ColorRamp::get_colors);
+ ClassDB::bind_method(_MD(COLOR_RAMP_SET_COLORS,"colors"),&ColorRamp::set_colors);
+ ClassDB::bind_method(_MD(COLOR_RAMP_GET_COLORS),&ColorRamp::get_colors);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"offsets"),_SCS(COLOR_RAMP_SET_OFFSETS),_SCS(COLOR_RAMP_GET_OFFSETS) );
ADD_PROPERTY( PropertyInfo(Variant::REAL,"colors"),_SCS(COLOR_RAMP_SET_COLORS),_SCS(COLOR_RAMP_GET_COLORS) );
diff --git a/scene/resources/color_ramp.h b/scene/resources/color_ramp.h
index 7908956efd..b6ca56dbf5 100644
--- a/scene/resources/color_ramp.h
+++ b/scene/resources/color_ramp.h
@@ -32,7 +32,7 @@
#include "resource.h"
class ColorRamp: public Resource {
- OBJ_TYPE( ColorRamp, Resource );
+ GDCLASS( ColorRamp, Resource );
OBJ_SAVE_TYPE( ColorRamp );
public:
diff --git a/scene/resources/concave_polygon_shape.cpp b/scene/resources/concave_polygon_shape.cpp
index 0589a0928f..fc1a3a9961 100644
--- a/scene/resources/concave_polygon_shape.cpp
+++ b/scene/resources/concave_polygon_shape.cpp
@@ -110,8 +110,8 @@ DVector<Vector3> ConcavePolygonShape::get_faces() const {
void ConcavePolygonShape::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_faces","faces"),&ConcavePolygonShape::set_faces);
- ObjectTypeDB::bind_method(_MD("get_faces"),&ConcavePolygonShape::get_faces);
+ ClassDB::bind_method(_MD("set_faces","faces"),&ConcavePolygonShape::set_faces);
+ ClassDB::bind_method(_MD("get_faces"),&ConcavePolygonShape::get_faces);
}
ConcavePolygonShape::ConcavePolygonShape() : Shape( PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONCAVE_POLYGON)) {
diff --git a/scene/resources/concave_polygon_shape.h b/scene/resources/concave_polygon_shape.h
index b4c07f189c..08d95da0ac 100644
--- a/scene/resources/concave_polygon_shape.h
+++ b/scene/resources/concave_polygon_shape.h
@@ -33,7 +33,7 @@
class ConcavePolygonShape : public Shape {
- OBJ_TYPE(ConcavePolygonShape,Shape);
+ GDCLASS(ConcavePolygonShape,Shape);
struct DrawEdge {
diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/concave_polygon_shape_2d.cpp
index 4b16e924c0..4be95cb26d 100644
--- a/scene/resources/concave_polygon_shape_2d.cpp
+++ b/scene/resources/concave_polygon_shape_2d.cpp
@@ -82,8 +82,8 @@ Rect2 ConcavePolygonShape2D::get_rect() const {
void ConcavePolygonShape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_segments","segments"),&ConcavePolygonShape2D::set_segments);
- ObjectTypeDB::bind_method(_MD("get_segments"),&ConcavePolygonShape2D::get_segments);
+ ClassDB::bind_method(_MD("set_segments","segments"),&ConcavePolygonShape2D::set_segments);
+ ClassDB::bind_method(_MD("get_segments"),&ConcavePolygonShape2D::get_segments);
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2_ARRAY,"segments"),_SCS("set_segments"),_SCS("get_segments") );
diff --git a/scene/resources/concave_polygon_shape_2d.h b/scene/resources/concave_polygon_shape_2d.h
index cda36a7990..36c67254f3 100644
--- a/scene/resources/concave_polygon_shape_2d.h
+++ b/scene/resources/concave_polygon_shape_2d.h
@@ -32,7 +32,7 @@
#include "scene/resources/shape_2d.h"
class ConcavePolygonShape2D : public Shape2D {
- OBJ_TYPE( ConcavePolygonShape2D, Shape2D );
+ GDCLASS( ConcavePolygonShape2D, Shape2D );
protected:
static void _bind_methods();
diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp
index ed2557ac7e..21e93e4b5c 100644
--- a/scene/resources/convex_polygon_shape.cpp
+++ b/scene/resources/convex_polygon_shape.cpp
@@ -79,8 +79,8 @@ DVector<Vector3> ConvexPolygonShape::get_points() const {
void ConvexPolygonShape::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_points","points"),&ConvexPolygonShape::set_points);
- ObjectTypeDB::bind_method(_MD("get_points"),&ConvexPolygonShape::get_points);
+ ClassDB::bind_method(_MD("set_points","points"),&ConvexPolygonShape::set_points);
+ ClassDB::bind_method(_MD("get_points"),&ConvexPolygonShape::get_points);
ADD_PROPERTY( PropertyInfo(Variant::ARRAY,"points"), _SCS("set_points"), _SCS("get_points") );
diff --git a/scene/resources/convex_polygon_shape.h b/scene/resources/convex_polygon_shape.h
index 33c60768a9..296a0ce4ca 100644
--- a/scene/resources/convex_polygon_shape.h
+++ b/scene/resources/convex_polygon_shape.h
@@ -33,7 +33,7 @@
class ConvexPolygonShape : public Shape {
- OBJ_TYPE(ConvexPolygonShape,Shape);
+ GDCLASS(ConvexPolygonShape,Shape);
DVector<Vector3> points;
protected:
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp
index 4550ea3311..cc3b0c063d 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/convex_polygon_shape_2d.cpp
@@ -61,9 +61,9 @@ Vector<Vector2> ConvexPolygonShape2D::get_points() const {
void ConvexPolygonShape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_point_cloud","point_cloud"),&ConvexPolygonShape2D::set_point_cloud);
- ObjectTypeDB::bind_method(_MD("set_points","points"),&ConvexPolygonShape2D::set_points);
- ObjectTypeDB::bind_method(_MD("get_points"),&ConvexPolygonShape2D::get_points);
+ ClassDB::bind_method(_MD("set_point_cloud","point_cloud"),&ConvexPolygonShape2D::set_point_cloud);
+ ClassDB::bind_method(_MD("set_points","points"),&ConvexPolygonShape2D::set_points);
+ ClassDB::bind_method(_MD("get_points"),&ConvexPolygonShape2D::get_points);
diff --git a/scene/resources/convex_polygon_shape_2d.h b/scene/resources/convex_polygon_shape_2d.h
index 886f4eab70..8a4ad0e6d8 100644
--- a/scene/resources/convex_polygon_shape_2d.h
+++ b/scene/resources/convex_polygon_shape_2d.h
@@ -32,7 +32,7 @@
#include "scene/resources/shape_2d.h"
class ConvexPolygonShape2D : public Shape2D {
- OBJ_TYPE( ConvexPolygonShape2D, Shape2D );
+ GDCLASS( ConvexPolygonShape2D, Shape2D );
Vector<Vector2> points;
void _update_shape();
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 537f93c0f5..fd0e9be304 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -349,26 +349,26 @@ Vector2Array Curve2D::get_points_pos() const {
void Curve2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_point_count"),&Curve2D::get_point_count);
- ObjectTypeDB::bind_method(_MD("add_point","pos","in","out"),&Curve2D::add_point,DEFVAL(Vector2()),DEFVAL(Vector2()));
- ObjectTypeDB::bind_method(_MD("set_point_pos","idx","pos"),&Curve2D::set_point_pos);
- ObjectTypeDB::bind_method(_MD("get_point_pos","idx"),&Curve2D::get_point_pos);
- ObjectTypeDB::bind_method(_MD("set_point_in","idx","pos"),&Curve2D::set_point_in);
- ObjectTypeDB::bind_method(_MD("get_point_in","idx"),&Curve2D::get_point_in);
- ObjectTypeDB::bind_method(_MD("set_point_out","idx","pos"),&Curve2D::set_point_out);
- ObjectTypeDB::bind_method(_MD("get_point_out","idx"),&Curve2D::get_point_out);
- ObjectTypeDB::bind_method(_MD("remove_point","idx"),&Curve2D::remove_point);
- ObjectTypeDB::bind_method(_MD("interpolate","idx","t"),&Curve2D::interpolate);
- ObjectTypeDB::bind_method(_MD("bake","subdivs"),&Curve2D::bake,DEFVAL(10));
-
-
- ObjectTypeDB::bind_method(_MD("set_points_in"),&Curve2D::set_points_in);
- ObjectTypeDB::bind_method(_MD("set_points_out"),&Curve2D::set_points_out);
- ObjectTypeDB::bind_method(_MD("set_points_pos"),&Curve2D::set_points_pos);
-
- ObjectTypeDB::bind_method(_MD("get_points_in"),&Curve2D::get_points_in);
- ObjectTypeDB::bind_method(_MD("get_points_out"),&Curve2D::get_points_out);
- ObjectTypeDB::bind_method(_MD("get_points_pos"),&Curve2D::get_points_pos);
+ ClassDB::bind_method(_MD("get_point_count"),&Curve2D::get_point_count);
+ ClassDB::bind_method(_MD("add_point","pos","in","out"),&Curve2D::add_point,DEFVAL(Vector2()),DEFVAL(Vector2()));
+ ClassDB::bind_method(_MD("set_point_pos","idx","pos"),&Curve2D::set_point_pos);
+ ClassDB::bind_method(_MD("get_point_pos","idx"),&Curve2D::get_point_pos);
+ ClassDB::bind_method(_MD("set_point_in","idx","pos"),&Curve2D::set_point_in);
+ ClassDB::bind_method(_MD("get_point_in","idx"),&Curve2D::get_point_in);
+ ClassDB::bind_method(_MD("set_point_out","idx","pos"),&Curve2D::set_point_out);
+ ClassDB::bind_method(_MD("get_point_out","idx"),&Curve2D::get_point_out);
+ ClassDB::bind_method(_MD("remove_point","idx"),&Curve2D::remove_point);
+ ClassDB::bind_method(_MD("interpolate","idx","t"),&Curve2D::interpolate);
+ ClassDB::bind_method(_MD("bake","subdivs"),&Curve2D::bake,DEFVAL(10));
+
+
+ ClassDB::bind_method(_MD("set_points_in"),&Curve2D::set_points_in);
+ ClassDB::bind_method(_MD("set_points_out"),&Curve2D::set_points_out);
+ ClassDB::bind_method(_MD("set_points_pos"),&Curve2D::set_points_pos);
+
+ ClassDB::bind_method(_MD("get_points_in"),&Curve2D::get_points_in);
+ ClassDB::bind_method(_MD("get_points_out"),&Curve2D::get_points_out);
+ ClassDB::bind_method(_MD("get_points_pos"),&Curve2D::get_points_pos);
ADD_PROPERTY( PropertyInfo( Variant::VECTOR2_ARRAY, "points_in"), _SCS("set_points_in"),_SCS("get_points_in"));
ADD_PROPERTY( PropertyInfo( Variant::VECTOR2_ARRAY, "points_out"), _SCS("set_points_out"),_SCS("get_points_out"));
@@ -789,29 +789,29 @@ Vector2Array Curve2D::tesselate(int p_max_stages,float p_tolerance) const {
void Curve2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_point_count"),&Curve2D::get_point_count);
- ObjectTypeDB::bind_method(_MD("add_point","pos","in","out","atpos"),&Curve2D::add_point,DEFVAL(Vector2()),DEFVAL(Vector2()),DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("set_point_pos","idx","pos"),&Curve2D::set_point_pos);
- ObjectTypeDB::bind_method(_MD("get_point_pos","idx"),&Curve2D::get_point_pos);
- ObjectTypeDB::bind_method(_MD("set_point_in","idx","pos"),&Curve2D::set_point_in);
- ObjectTypeDB::bind_method(_MD("get_point_in","idx"),&Curve2D::get_point_in);
- ObjectTypeDB::bind_method(_MD("set_point_out","idx","pos"),&Curve2D::set_point_out);
- ObjectTypeDB::bind_method(_MD("get_point_out","idx"),&Curve2D::get_point_out);
- ObjectTypeDB::bind_method(_MD("remove_point","idx"),&Curve2D::remove_point);
- ObjectTypeDB::bind_method(_MD("clear_points"),&Curve2D::clear_points);
- ObjectTypeDB::bind_method(_MD("interpolate","idx","t"),&Curve2D::interpolate);
- ObjectTypeDB::bind_method(_MD("interpolatef","fofs"),&Curve2D::interpolatef);
- //ObjectTypeDB::bind_method(_MD("bake","subdivs"),&Curve2D::bake,DEFVAL(10));
- ObjectTypeDB::bind_method(_MD("set_bake_interval","distance"),&Curve2D::set_bake_interval);
- ObjectTypeDB::bind_method(_MD("get_bake_interval"),&Curve2D::get_bake_interval);
-
- ObjectTypeDB::bind_method(_MD("get_baked_length"),&Curve2D::get_baked_length);
- ObjectTypeDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve2D::interpolate_baked,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_baked_points"),&Curve2D::get_baked_points);
- ObjectTypeDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve2D::tesselate,DEFVAL(5),DEFVAL(4));
-
- ObjectTypeDB::bind_method(_MD("_get_data"),&Curve2D::_get_data);
- ObjectTypeDB::bind_method(_MD("_set_data"),&Curve2D::_set_data);
+ ClassDB::bind_method(_MD("get_point_count"),&Curve2D::get_point_count);
+ ClassDB::bind_method(_MD("add_point","pos","in","out","atpos"),&Curve2D::add_point,DEFVAL(Vector2()),DEFVAL(Vector2()),DEFVAL(-1));
+ ClassDB::bind_method(_MD("set_point_pos","idx","pos"),&Curve2D::set_point_pos);
+ ClassDB::bind_method(_MD("get_point_pos","idx"),&Curve2D::get_point_pos);
+ ClassDB::bind_method(_MD("set_point_in","idx","pos"),&Curve2D::set_point_in);
+ ClassDB::bind_method(_MD("get_point_in","idx"),&Curve2D::get_point_in);
+ ClassDB::bind_method(_MD("set_point_out","idx","pos"),&Curve2D::set_point_out);
+ ClassDB::bind_method(_MD("get_point_out","idx"),&Curve2D::get_point_out);
+ ClassDB::bind_method(_MD("remove_point","idx"),&Curve2D::remove_point);
+ ClassDB::bind_method(_MD("clear_points"),&Curve2D::clear_points);
+ ClassDB::bind_method(_MD("interpolate","idx","t"),&Curve2D::interpolate);
+ ClassDB::bind_method(_MD("interpolatef","fofs"),&Curve2D::interpolatef);
+ //ClassDB::bind_method(_MD("bake","subdivs"),&Curve2D::bake,DEFVAL(10));
+ ClassDB::bind_method(_MD("set_bake_interval","distance"),&Curve2D::set_bake_interval);
+ ClassDB::bind_method(_MD("get_bake_interval"),&Curve2D::get_bake_interval);
+
+ ClassDB::bind_method(_MD("get_baked_length"),&Curve2D::get_baked_length);
+ ClassDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve2D::interpolate_baked,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_baked_points"),&Curve2D::get_baked_points);
+ ClassDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve2D::tesselate,DEFVAL(5),DEFVAL(4));
+
+ ClassDB::bind_method(_MD("_get_data"),&Curve2D::_get_data);
+ ClassDB::bind_method(_MD("_set_data"),&Curve2D::_set_data);
ADD_PROPERTY( PropertyInfo( Variant::REAL, "bake_interval",PROPERTY_HINT_RANGE,"0.01,512,0.01"), _SCS("set_bake_interval"),_SCS("get_bake_interval"));
@@ -1329,32 +1329,32 @@ Vector3Array Curve3D::tesselate(int p_max_stages,float p_tolerance) const {
void Curve3D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_point_count"),&Curve3D::get_point_count);
- ObjectTypeDB::bind_method(_MD("add_point","pos","in","out","atpos"),&Curve3D::add_point,DEFVAL(Vector3()),DEFVAL(Vector3()),DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("set_point_pos","idx","pos"),&Curve3D::set_point_pos);
- ObjectTypeDB::bind_method(_MD("get_point_pos","idx"),&Curve3D::get_point_pos);
- ObjectTypeDB::bind_method(_MD("set_point_tilt","idx","tilt"),&Curve3D::set_point_tilt);
- ObjectTypeDB::bind_method(_MD("get_point_tilt","idx"),&Curve3D::get_point_tilt);
- ObjectTypeDB::bind_method(_MD("set_point_in","idx","pos"),&Curve3D::set_point_in);
- ObjectTypeDB::bind_method(_MD("get_point_in","idx"),&Curve3D::get_point_in);
- ObjectTypeDB::bind_method(_MD("set_point_out","idx","pos"),&Curve3D::set_point_out);
- ObjectTypeDB::bind_method(_MD("get_point_out","idx"),&Curve3D::get_point_out);
- ObjectTypeDB::bind_method(_MD("remove_point","idx"),&Curve3D::remove_point);
- ObjectTypeDB::bind_method(_MD("clear_points"),&Curve3D::clear_points);
- ObjectTypeDB::bind_method(_MD("interpolate","idx","t"),&Curve3D::interpolate);
- ObjectTypeDB::bind_method(_MD("interpolatef","fofs"),&Curve3D::interpolatef);
- //ObjectTypeDB::bind_method(_MD("bake","subdivs"),&Curve3D::bake,DEFVAL(10));
- ObjectTypeDB::bind_method(_MD("set_bake_interval","distance"),&Curve3D::set_bake_interval);
- ObjectTypeDB::bind_method(_MD("get_bake_interval"),&Curve3D::get_bake_interval);
-
- ObjectTypeDB::bind_method(_MD("get_baked_length"),&Curve3D::get_baked_length);
- ObjectTypeDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve3D::interpolate_baked,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_baked_points"),&Curve3D::get_baked_points);
- ObjectTypeDB::bind_method(_MD("get_baked_tilts"),&Curve3D::get_baked_tilts);
- ObjectTypeDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve3D::tesselate,DEFVAL(5),DEFVAL(4));
-
- ObjectTypeDB::bind_method(_MD("_get_data"),&Curve3D::_get_data);
- ObjectTypeDB::bind_method(_MD("_set_data"),&Curve3D::_set_data);
+ ClassDB::bind_method(_MD("get_point_count"),&Curve3D::get_point_count);
+ ClassDB::bind_method(_MD("add_point","pos","in","out","atpos"),&Curve3D::add_point,DEFVAL(Vector3()),DEFVAL(Vector3()),DEFVAL(-1));
+ ClassDB::bind_method(_MD("set_point_pos","idx","pos"),&Curve3D::set_point_pos);
+ ClassDB::bind_method(_MD("get_point_pos","idx"),&Curve3D::get_point_pos);
+ ClassDB::bind_method(_MD("set_point_tilt","idx","tilt"),&Curve3D::set_point_tilt);
+ ClassDB::bind_method(_MD("get_point_tilt","idx"),&Curve3D::get_point_tilt);
+ ClassDB::bind_method(_MD("set_point_in","idx","pos"),&Curve3D::set_point_in);
+ ClassDB::bind_method(_MD("get_point_in","idx"),&Curve3D::get_point_in);
+ ClassDB::bind_method(_MD("set_point_out","idx","pos"),&Curve3D::set_point_out);
+ ClassDB::bind_method(_MD("get_point_out","idx"),&Curve3D::get_point_out);
+ ClassDB::bind_method(_MD("remove_point","idx"),&Curve3D::remove_point);
+ ClassDB::bind_method(_MD("clear_points"),&Curve3D::clear_points);
+ ClassDB::bind_method(_MD("interpolate","idx","t"),&Curve3D::interpolate);
+ ClassDB::bind_method(_MD("interpolatef","fofs"),&Curve3D::interpolatef);
+ //ClassDB::bind_method(_MD("bake","subdivs"),&Curve3D::bake,DEFVAL(10));
+ ClassDB::bind_method(_MD("set_bake_interval","distance"),&Curve3D::set_bake_interval);
+ ClassDB::bind_method(_MD("get_bake_interval"),&Curve3D::get_bake_interval);
+
+ ClassDB::bind_method(_MD("get_baked_length"),&Curve3D::get_baked_length);
+ ClassDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve3D::interpolate_baked,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_baked_points"),&Curve3D::get_baked_points);
+ ClassDB::bind_method(_MD("get_baked_tilts"),&Curve3D::get_baked_tilts);
+ ClassDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve3D::tesselate,DEFVAL(5),DEFVAL(4));
+
+ ClassDB::bind_method(_MD("_get_data"),&Curve3D::_get_data);
+ ClassDB::bind_method(_MD("_set_data"),&Curve3D::_set_data);
ADD_PROPERTY( PropertyInfo( Variant::REAL, "bake_interval",PROPERTY_HINT_RANGE,"0.01,512,0.01"), _SCS("set_bake_interval"),_SCS("get_bake_interval"));
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index c842c03c03..289de50444 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -33,7 +33,7 @@
#if 0
class Curve2D : public Resource {
- OBJ_TYPE(Curve2D,Resource);
+ GDCLASS(Curve2D,Resource);
struct Point {
@@ -84,7 +84,7 @@ public:
class Curve2D : public Resource {
- OBJ_TYPE(Curve2D,Resource);
+ GDCLASS(Curve2D,Resource);
struct Point {
@@ -157,7 +157,7 @@ public:
class Curve3D : public Resource {
- OBJ_TYPE(Curve3D,Resource);
+ GDCLASS(Curve3D,Resource);
struct Point {
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index b661240fd3..e157ee46d0 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -84,8 +84,8 @@ void DynamicFontData::set_force_autohinter(bool p_force) {
}
void DynamicFontData::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_font_path","path"),&DynamicFontData::set_font_path);
- ObjectTypeDB::bind_method(_MD("get_font_path"),&DynamicFontData::get_font_path);
+ ClassDB::bind_method(_MD("set_font_path","path"),&DynamicFontData::set_font_path);
+ ClassDB::bind_method(_MD("get_font_path"),&DynamicFontData::get_font_path);
ADD_PROPERTY(PropertyInfo(Variant::STRING,"font_path",PROPERTY_HINT_FILE,"*.ttf,*.otf"),_SCS("set_font_path"),_SCS("get_font_path"));
}
@@ -879,24 +879,24 @@ void DynamicFont::_get_property_list( List<PropertyInfo> *p_list) const{
void DynamicFont::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_font_data","data:DynamicFontData"),&DynamicFont::set_font_data);
- ObjectTypeDB::bind_method(_MD("get_font_data:DynamicFontData"),&DynamicFont::get_font_data);
+ ClassDB::bind_method(_MD("set_font_data","data:DynamicFontData"),&DynamicFont::set_font_data);
+ ClassDB::bind_method(_MD("get_font_data:DynamicFontData"),&DynamicFont::get_font_data);
- ObjectTypeDB::bind_method(_MD("set_size","data"),&DynamicFont::set_size);
- ObjectTypeDB::bind_method(_MD("get_size"),&DynamicFont::get_size);
+ ClassDB::bind_method(_MD("set_size","data"),&DynamicFont::set_size);
+ ClassDB::bind_method(_MD("get_size"),&DynamicFont::get_size);
- ObjectTypeDB::bind_method(_MD("set_use_mipmaps","enable"),&DynamicFont::set_use_mipmaps);
- ObjectTypeDB::bind_method(_MD("get_use_mipmaps"),&DynamicFont::get_use_mipmaps);
- ObjectTypeDB::bind_method(_MD("set_use_filter","enable"),&DynamicFont::set_use_filter);
- ObjectTypeDB::bind_method(_MD("get_use_filter"),&DynamicFont::get_use_filter);
- ObjectTypeDB::bind_method(_MD("set_spacing","type","value"),&DynamicFont::set_spacing);
- ObjectTypeDB::bind_method(_MD("get_spacing","type"),&DynamicFont::get_spacing);
+ ClassDB::bind_method(_MD("set_use_mipmaps","enable"),&DynamicFont::set_use_mipmaps);
+ ClassDB::bind_method(_MD("get_use_mipmaps"),&DynamicFont::get_use_mipmaps);
+ ClassDB::bind_method(_MD("set_use_filter","enable"),&DynamicFont::set_use_filter);
+ ClassDB::bind_method(_MD("get_use_filter"),&DynamicFont::get_use_filter);
+ ClassDB::bind_method(_MD("set_spacing","type","value"),&DynamicFont::set_spacing);
+ ClassDB::bind_method(_MD("get_spacing","type"),&DynamicFont::get_spacing);
- ObjectTypeDB::bind_method(_MD("add_fallback","data:DynamicFontData"),&DynamicFont::add_fallback);
- ObjectTypeDB::bind_method(_MD("set_fallback","idx","data:DynamicFontData"),&DynamicFont::set_fallback);
- ObjectTypeDB::bind_method(_MD("get_fallback:DynamicFontData","idx"),&DynamicFont::get_fallback);
- ObjectTypeDB::bind_method(_MD("remove_fallback","idx"),&DynamicFont::remove_fallback);
- ObjectTypeDB::bind_method(_MD("get_fallback_count"),&DynamicFont::get_fallback_count);
+ ClassDB::bind_method(_MD("add_fallback","data:DynamicFontData"),&DynamicFont::add_fallback);
+ ClassDB::bind_method(_MD("set_fallback","idx","data:DynamicFontData"),&DynamicFont::set_fallback);
+ ClassDB::bind_method(_MD("get_fallback:DynamicFontData","idx"),&DynamicFont::get_fallback);
+ ClassDB::bind_method(_MD("remove_fallback","idx"),&DynamicFont::remove_fallback);
+ ClassDB::bind_method(_MD("get_fallback_count"),&DynamicFont::get_fallback_count);
ADD_PROPERTY(PropertyInfo(Variant::INT,"font/size"),_SCS("set_size"),_SCS("get_size"));
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h
index 131c3d3e8f..133d48bdea 100644
--- a/scene/resources/dynamic_font.h
+++ b/scene/resources/dynamic_font.h
@@ -43,7 +43,7 @@ class DynamicFont;
class DynamicFontData : public Resource {
- OBJ_TYPE(DynamicFontData,Resource);
+ GDCLASS(DynamicFontData,Resource);
public:
@@ -88,7 +88,7 @@ public:
class DynamicFontAtSize : public Reference {
- OBJ_TYPE(DynamicFontAtSize,Reference)
+ GDCLASS(DynamicFontAtSize,Reference)
_THREAD_SAFE_CLASS_
@@ -168,7 +168,7 @@ public:
class DynamicFont : public Font {
- OBJ_TYPE( DynamicFont, Font );
+ GDCLASS( DynamicFont, Font );
public:
diff --git a/scene/resources/dynamic_font_stb.cpp b/scene/resources/dynamic_font_stb.cpp
index d1efc0f705..c931b4d6c8 100644
--- a/scene/resources/dynamic_font_stb.cpp
+++ b/scene/resources/dynamic_font_stb.cpp
@@ -378,11 +378,11 @@ DynamicFontAtSize::~DynamicFontAtSize(){
void DynamicFont::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_font_data","data:DynamicFontData"),&DynamicFont::set_font_data);
- ObjectTypeDB::bind_method(_MD("get_font_data:DynamicFontData"),&DynamicFont::get_font_data);
+ ClassDB::bind_method(_MD("set_font_data","data:DynamicFontData"),&DynamicFont::set_font_data);
+ ClassDB::bind_method(_MD("get_font_data:DynamicFontData"),&DynamicFont::get_font_data);
- ObjectTypeDB::bind_method(_MD("set_size","data"),&DynamicFont::set_size);
- ObjectTypeDB::bind_method(_MD("get_size"),&DynamicFont::get_size);
+ ClassDB::bind_method(_MD("set_size","data"),&DynamicFont::set_size);
+ ClassDB::bind_method(_MD("get_size"),&DynamicFont::get_size);
ADD_PROPERTY(PropertyInfo(Variant::INT,"font/size"),_SCS("set_size"),_SCS("get_size"));
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"font/font",PROPERTY_HINT_RESOURCE_TYPE,"DynamicFontData"),_SCS("set_font_data"),_SCS("get_font_data"));
diff --git a/scene/resources/dynamic_font_stb.h b/scene/resources/dynamic_font_stb.h
index 136edff2fc..ad7ca0009d 100644
--- a/scene/resources/dynamic_font_stb.h
+++ b/scene/resources/dynamic_font_stb.h
@@ -14,7 +14,7 @@ class DynamicFont;
class DynamicFontData : public Resource {
- OBJ_TYPE(DynamicFontData,Resource);
+ GDCLASS(DynamicFontData,Resource);
bool valid;
@@ -64,7 +64,7 @@ public:
class DynamicFontAtSize : public Reference {
- OBJ_TYPE(DynamicFontAtSize,Reference);
+ GDCLASS(DynamicFontAtSize,Reference);
int rect_margin;
@@ -124,7 +124,7 @@ public:
class DynamicFont : public Font {
- OBJ_TYPE( DynamicFont, Font );
+ GDCLASS( DynamicFont, Font );
Ref<DynamicFontData> data;
Ref<DynamicFontAtSize> data_at_size;
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 6e388e70ec..55c9bbeae4 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -701,26 +701,26 @@ Environment::DOFBlurQuality Environment::get_dof_blur_near_quality() const {
void Environment::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_background","mode"),&Environment::set_background);
- ObjectTypeDB::bind_method(_MD("set_skybox","skybox:CubeMap"),&Environment::set_skybox);
- ObjectTypeDB::bind_method(_MD("set_skybox_scale","scale"),&Environment::set_skybox_scale);
- ObjectTypeDB::bind_method(_MD("set_bg_color","color"),&Environment::set_bg_color);
- ObjectTypeDB::bind_method(_MD("set_bg_energy","energy"),&Environment::set_bg_energy);
- ObjectTypeDB::bind_method(_MD("set_canvas_max_layer","layer"),&Environment::set_canvas_max_layer);
- ObjectTypeDB::bind_method(_MD("set_ambient_light_color","color"),&Environment::set_ambient_light_color);
- ObjectTypeDB::bind_method(_MD("set_ambient_light_energy","energy"),&Environment::set_ambient_light_energy);
- ObjectTypeDB::bind_method(_MD("set_ambient_light_skybox_contribution","energy"),&Environment::set_ambient_light_skybox_contribution);
-
-
- ObjectTypeDB::bind_method(_MD("get_background"),&Environment::get_background);
- ObjectTypeDB::bind_method(_MD("get_skybox:CubeMap"),&Environment::get_skybox);
- ObjectTypeDB::bind_method(_MD("get_skybox_scale"),&Environment::get_skybox_scale);
- ObjectTypeDB::bind_method(_MD("get_bg_color"),&Environment::get_bg_color);
- ObjectTypeDB::bind_method(_MD("get_bg_energy"),&Environment::get_bg_energy);
- ObjectTypeDB::bind_method(_MD("get_canvas_max_layer"),&Environment::get_canvas_max_layer);
- ObjectTypeDB::bind_method(_MD("get_ambient_light_color"),&Environment::get_ambient_light_color);
- ObjectTypeDB::bind_method(_MD("get_ambient_light_energy"),&Environment::get_ambient_light_energy);
- ObjectTypeDB::bind_method(_MD("get_ambient_light_skybox_contribution"),&Environment::get_ambient_light_skybox_contribution);
+ ClassDB::bind_method(_MD("set_background","mode"),&Environment::set_background);
+ ClassDB::bind_method(_MD("set_skybox","skybox:CubeMap"),&Environment::set_skybox);
+ ClassDB::bind_method(_MD("set_skybox_scale","scale"),&Environment::set_skybox_scale);
+ ClassDB::bind_method(_MD("set_bg_color","color"),&Environment::set_bg_color);
+ ClassDB::bind_method(_MD("set_bg_energy","energy"),&Environment::set_bg_energy);
+ ClassDB::bind_method(_MD("set_canvas_max_layer","layer"),&Environment::set_canvas_max_layer);
+ ClassDB::bind_method(_MD("set_ambient_light_color","color"),&Environment::set_ambient_light_color);
+ ClassDB::bind_method(_MD("set_ambient_light_energy","energy"),&Environment::set_ambient_light_energy);
+ ClassDB::bind_method(_MD("set_ambient_light_skybox_contribution","energy"),&Environment::set_ambient_light_skybox_contribution);
+
+
+ ClassDB::bind_method(_MD("get_background"),&Environment::get_background);
+ ClassDB::bind_method(_MD("get_skybox:CubeMap"),&Environment::get_skybox);
+ ClassDB::bind_method(_MD("get_skybox_scale"),&Environment::get_skybox_scale);
+ ClassDB::bind_method(_MD("get_bg_color"),&Environment::get_bg_color);
+ ClassDB::bind_method(_MD("get_bg_energy"),&Environment::get_bg_energy);
+ ClassDB::bind_method(_MD("get_canvas_max_layer"),&Environment::get_canvas_max_layer);
+ ClassDB::bind_method(_MD("get_ambient_light_color"),&Environment::get_ambient_light_color);
+ ClassDB::bind_method(_MD("get_ambient_light_energy"),&Environment::get_ambient_light_energy);
+ ClassDB::bind_method(_MD("get_ambient_light_skybox_contribution"),&Environment::get_ambient_light_skybox_contribution);
ADD_PROPERTY(PropertyInfo(Variant::INT,"background/mode",PROPERTY_HINT_ENUM,"Clear Color,Custom Color,Skybox,Canvas,Keep"),_SCS("set_background"),_SCS("get_background") );
@@ -734,26 +734,26 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_light/skybox_contribution",PROPERTY_HINT_RANGE,"0,1,0.01"),_SCS("set_ambient_light_skybox_contribution"),_SCS("get_ambient_light_skybox_contribution") );
- ObjectTypeDB::bind_method(_MD("set_ssr_enabled","enabled"),&Environment::set_ssr_enabled);
- ObjectTypeDB::bind_method(_MD("is_ssr_enabled"),&Environment::is_ssr_enabled);
+ ClassDB::bind_method(_MD("set_ssr_enabled","enabled"),&Environment::set_ssr_enabled);
+ ClassDB::bind_method(_MD("is_ssr_enabled"),&Environment::is_ssr_enabled);
- ObjectTypeDB::bind_method(_MD("set_ssr_max_steps","max_steps"),&Environment::set_ssr_max_steps);
- ObjectTypeDB::bind_method(_MD("get_ssr_max_steps"),&Environment::get_ssr_max_steps);
+ ClassDB::bind_method(_MD("set_ssr_max_steps","max_steps"),&Environment::set_ssr_max_steps);
+ ClassDB::bind_method(_MD("get_ssr_max_steps"),&Environment::get_ssr_max_steps);
- ObjectTypeDB::bind_method(_MD("set_ssr_accel","accel"),&Environment::set_ssr_accel);
- ObjectTypeDB::bind_method(_MD("get_ssr_accel"),&Environment::get_ssr_accel);
+ ClassDB::bind_method(_MD("set_ssr_accel","accel"),&Environment::set_ssr_accel);
+ ClassDB::bind_method(_MD("get_ssr_accel"),&Environment::get_ssr_accel);
- ObjectTypeDB::bind_method(_MD("set_ssr_fade","fade"),&Environment::set_ssr_fade);
- ObjectTypeDB::bind_method(_MD("get_ssr_fade"),&Environment::get_ssr_fade);
+ ClassDB::bind_method(_MD("set_ssr_fade","fade"),&Environment::set_ssr_fade);
+ ClassDB::bind_method(_MD("get_ssr_fade"),&Environment::get_ssr_fade);
- ObjectTypeDB::bind_method(_MD("set_ssr_depth_tolerance","depth_tolerance"),&Environment::set_ssr_depth_tolerance);
- ObjectTypeDB::bind_method(_MD("get_ssr_depth_tolerance"),&Environment::get_ssr_depth_tolerance);
+ ClassDB::bind_method(_MD("set_ssr_depth_tolerance","depth_tolerance"),&Environment::set_ssr_depth_tolerance);
+ ClassDB::bind_method(_MD("get_ssr_depth_tolerance"),&Environment::get_ssr_depth_tolerance);
- ObjectTypeDB::bind_method(_MD("set_ssr_smooth","smooth"),&Environment::set_ssr_smooth);
- ObjectTypeDB::bind_method(_MD("is_ssr_smooth"),&Environment::is_ssr_smooth);
+ ClassDB::bind_method(_MD("set_ssr_smooth","smooth"),&Environment::set_ssr_smooth);
+ ClassDB::bind_method(_MD("is_ssr_smooth"),&Environment::is_ssr_smooth);
- ObjectTypeDB::bind_method(_MD("set_ssr_rough","rough"),&Environment::set_ssr_rough);
- ObjectTypeDB::bind_method(_MD("is_ssr_rough"),&Environment::is_ssr_rough);
+ ClassDB::bind_method(_MD("set_ssr_rough","rough"),&Environment::set_ssr_rough);
+ ClassDB::bind_method(_MD("is_ssr_rough"),&Environment::is_ssr_rough);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ss_reflections/enabled"),_SCS("set_ssr_enabled"),_SCS("is_ssr_enabled") );
ADD_PROPERTY(PropertyInfo(Variant::INT,"ss_reflections/max_steps",PROPERTY_HINT_RANGE,"1,512,1"),_SCS("set_ssr_max_steps"),_SCS("get_ssr_max_steps") );
@@ -763,32 +763,32 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ss_reflections/accel_smooth"),_SCS("set_ssr_smooth"),_SCS("is_ssr_smooth") );
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ss_reflections/roughness"),_SCS("set_ssr_rough"),_SCS("is_ssr_rough") );
- ObjectTypeDB::bind_method(_MD("set_ssao_enabled","enabled"),&Environment::set_ssao_enabled);
- ObjectTypeDB::bind_method(_MD("is_ssao_enabled"),&Environment::is_ssao_enabled);
+ ClassDB::bind_method(_MD("set_ssao_enabled","enabled"),&Environment::set_ssao_enabled);
+ ClassDB::bind_method(_MD("is_ssao_enabled"),&Environment::is_ssao_enabled);
- ObjectTypeDB::bind_method(_MD("set_ssao_radius","radius"),&Environment::set_ssao_radius);
- ObjectTypeDB::bind_method(_MD("get_ssao_radius"),&Environment::get_ssao_radius);
+ ClassDB::bind_method(_MD("set_ssao_radius","radius"),&Environment::set_ssao_radius);
+ ClassDB::bind_method(_MD("get_ssao_radius"),&Environment::get_ssao_radius);
- ObjectTypeDB::bind_method(_MD("set_ssao_intensity","intensity"),&Environment::set_ssao_intensity);
- ObjectTypeDB::bind_method(_MD("get_ssao_intensity"),&Environment::get_ssao_intensity);
+ ClassDB::bind_method(_MD("set_ssao_intensity","intensity"),&Environment::set_ssao_intensity);
+ ClassDB::bind_method(_MD("get_ssao_intensity"),&Environment::get_ssao_intensity);
- ObjectTypeDB::bind_method(_MD("set_ssao_radius2","radius"),&Environment::set_ssao_radius2);
- ObjectTypeDB::bind_method(_MD("get_ssao_radius2"),&Environment::get_ssao_radius2);
+ ClassDB::bind_method(_MD("set_ssao_radius2","radius"),&Environment::set_ssao_radius2);
+ ClassDB::bind_method(_MD("get_ssao_radius2"),&Environment::get_ssao_radius2);
- ObjectTypeDB::bind_method(_MD("set_ssao_intensity2","intensity"),&Environment::set_ssao_intensity2);
- ObjectTypeDB::bind_method(_MD("get_ssao_intensity2"),&Environment::get_ssao_intensity2);
+ ClassDB::bind_method(_MD("set_ssao_intensity2","intensity"),&Environment::set_ssao_intensity2);
+ ClassDB::bind_method(_MD("get_ssao_intensity2"),&Environment::get_ssao_intensity2);
- ObjectTypeDB::bind_method(_MD("set_ssao_bias","bias"),&Environment::set_ssao_bias);
- ObjectTypeDB::bind_method(_MD("get_ssao_bias"),&Environment::get_ssao_bias);
+ ClassDB::bind_method(_MD("set_ssao_bias","bias"),&Environment::set_ssao_bias);
+ ClassDB::bind_method(_MD("get_ssao_bias"),&Environment::get_ssao_bias);
- ObjectTypeDB::bind_method(_MD("set_ssao_direct_light_affect","amount"),&Environment::set_ssao_direct_light_affect);
- ObjectTypeDB::bind_method(_MD("get_ssao_direct_light_affect"),&Environment::get_ssao_direct_light_affect);
+ ClassDB::bind_method(_MD("set_ssao_direct_light_affect","amount"),&Environment::set_ssao_direct_light_affect);
+ ClassDB::bind_method(_MD("get_ssao_direct_light_affect"),&Environment::get_ssao_direct_light_affect);
- ObjectTypeDB::bind_method(_MD("set_ssao_color","color"),&Environment::set_ssao_color);
- ObjectTypeDB::bind_method(_MD("get_ssao_color"),&Environment::get_ssao_color);
+ ClassDB::bind_method(_MD("set_ssao_color","color"),&Environment::set_ssao_color);
+ ClassDB::bind_method(_MD("get_ssao_color"),&Environment::get_ssao_color);
- ObjectTypeDB::bind_method(_MD("set_ssao_blur","enabled"),&Environment::set_ssao_blur);
- ObjectTypeDB::bind_method(_MD("is_ssao_blur_enabled"),&Environment::is_ssao_blur_enabled);
+ ClassDB::bind_method(_MD("set_ssao_blur","enabled"),&Environment::set_ssao_blur);
+ ClassDB::bind_method(_MD("is_ssao_blur_enabled"),&Environment::is_ssao_blur_enabled);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ambient_occlusion/enabled"),_SCS("set_ssao_enabled"),_SCS("is_ssao_enabled") );
ADD_PROPERTY(PropertyInfo(Variant::REAL,"ambient_occlusion/radius",PROPERTY_HINT_RANGE,"0.1,16,0.1"),_SCS("set_ssao_radius"),_SCS("get_ssao_radius") );
@@ -800,35 +800,35 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"ambient_occlusion/color",PROPERTY_HINT_COLOR_NO_ALPHA),_SCS("set_ssao_color"),_SCS("get_ssao_color") );
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"ambient_occlusion/blur"),_SCS("set_ssao_blur"),_SCS("is_ssao_blur_enabled") );
- ObjectTypeDB::bind_method(_MD("set_dof_blur_far_enabled","enabled"),&Environment::set_dof_blur_far_enabled);
- ObjectTypeDB::bind_method(_MD("is_dof_blur_far_enabled"),&Environment::is_dof_blur_far_enabled);
+ ClassDB::bind_method(_MD("set_dof_blur_far_enabled","enabled"),&Environment::set_dof_blur_far_enabled);
+ ClassDB::bind_method(_MD("is_dof_blur_far_enabled"),&Environment::is_dof_blur_far_enabled);
- ObjectTypeDB::bind_method(_MD("set_dof_blur_far_distance","intensity"),&Environment::set_dof_blur_far_distance);
- ObjectTypeDB::bind_method(_MD("get_dof_blur_far_distance"),&Environment::get_dof_blur_far_distance);
+ ClassDB::bind_method(_MD("set_dof_blur_far_distance","intensity"),&Environment::set_dof_blur_far_distance);
+ ClassDB::bind_method(_MD("get_dof_blur_far_distance"),&Environment::get_dof_blur_far_distance);
- ObjectTypeDB::bind_method(_MD("set_dof_blur_far_transition","intensity"),&Environment::set_dof_blur_far_transition);
- ObjectTypeDB::bind_method(_MD("get_dof_blur_far_transition"),&Environment::get_dof_blur_far_transition);
+ ClassDB::bind_method(_MD("set_dof_blur_far_transition","intensity"),&Environment::set_dof_blur_far_transition);
+ ClassDB::bind_method(_MD("get_dof_blur_far_transition"),&Environment::get_dof_blur_far_transition);
- ObjectTypeDB::bind_method(_MD("set_dof_blur_far_amount","intensity"),&Environment::set_dof_blur_far_amount);
- ObjectTypeDB::bind_method(_MD("get_dof_blur_far_amount"),&Environment::get_dof_blur_far_amount);
+ ClassDB::bind_method(_MD("set_dof_blur_far_amount","intensity"),&Environment::set_dof_blur_far_amount);
+ ClassDB::bind_method(_MD("get_dof_blur_far_amount"),&Environment::get_dof_blur_far_amount);
- ObjectTypeDB::bind_method(_MD("set_dof_blur_far_quality","intensity"),&Environment::set_dof_blur_far_quality);
- ObjectTypeDB::bind_method(_MD("get_dof_blur_far_quality"),&Environment::get_dof_blur_far_quality);
+ ClassDB::bind_method(_MD("set_dof_blur_far_quality","intensity"),&Environment::set_dof_blur_far_quality);
+ ClassDB::bind_method(_MD("get_dof_blur_far_quality"),&Environment::get_dof_blur_far_quality);
- ObjectTypeDB::bind_method(_MD("set_dof_blur_near_enabled","enabled"),&Environment::set_dof_blur_near_enabled);
- ObjectTypeDB::bind_method(_MD("is_dof_blur_near_enabled"),&Environment::is_dof_blur_near_enabled);
+ ClassDB::bind_method(_MD("set_dof_blur_near_enabled","enabled"),&Environment::set_dof_blur_near_enabled);
+ ClassDB::bind_method(_MD("is_dof_blur_near_enabled"),&Environment::is_dof_blur_near_enabled);
- ObjectTypeDB::bind_method(_MD("set_dof_blur_near_distance","intensity"),&Environment::set_dof_blur_near_distance);
- ObjectTypeDB::bind_method(_MD("get_dof_blur_near_distance"),&Environment::get_dof_blur_near_distance);
+ ClassDB::bind_method(_MD("set_dof_blur_near_distance","intensity"),&Environment::set_dof_blur_near_distance);
+ ClassDB::bind_method(_MD("get_dof_blur_near_distance"),&Environment::get_dof_blur_near_distance);
- ObjectTypeDB::bind_method(_MD("set_dof_blur_near_transition","intensity"),&Environment::set_dof_blur_near_transition);
- ObjectTypeDB::bind_method(_MD("get_dof_blur_near_transition"),&Environment::get_dof_blur_near_transition);
+ ClassDB::bind_method(_MD("set_dof_blur_near_transition","intensity"),&Environment::set_dof_blur_near_transition);
+ ClassDB::bind_method(_MD("get_dof_blur_near_transition"),&Environment::get_dof_blur_near_transition);
- ObjectTypeDB::bind_method(_MD("set_dof_blur_near_amount","intensity"),&Environment::set_dof_blur_near_amount);
- ObjectTypeDB::bind_method(_MD("get_dof_blur_near_amount"),&Environment::get_dof_blur_near_amount);
+ ClassDB::bind_method(_MD("set_dof_blur_near_amount","intensity"),&Environment::set_dof_blur_near_amount);
+ ClassDB::bind_method(_MD("get_dof_blur_near_amount"),&Environment::get_dof_blur_near_amount);
- ObjectTypeDB::bind_method(_MD("set_dof_blur_near_quality","level"),&Environment::set_dof_blur_near_quality);
- ObjectTypeDB::bind_method(_MD("get_dof_blur_near_quality"),&Environment::get_dof_blur_near_quality);
+ ClassDB::bind_method(_MD("set_dof_blur_near_quality","level"),&Environment::set_dof_blur_near_quality);
+ ClassDB::bind_method(_MD("get_dof_blur_near_quality"),&Environment::get_dof_blur_near_quality);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"dof_blur_far/enabled"),_SCS("set_dof_blur_far_enabled"),_SCS("is_dof_blur_far_enabled") );
ADD_PROPERTY(PropertyInfo(Variant::REAL,"dof_blur_far/distance",PROPERTY_HINT_EXP_RANGE,"0.01,8192,0.01"),_SCS("set_dof_blur_far_distance"),_SCS("get_dof_blur_far_distance") );
@@ -843,32 +843,32 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT,"dof_blur_near/quality",PROPERTY_HINT_ENUM,"Low,Medium,High"),_SCS("set_dof_blur_near_quality"),_SCS("get_dof_blur_near_quality") );
- ObjectTypeDB::bind_method(_MD("set_glow_enabled","enabled"),&Environment::set_glow_enabled);
- ObjectTypeDB::bind_method(_MD("is_glow_enabled"),&Environment::is_glow_enabled);
+ ClassDB::bind_method(_MD("set_glow_enabled","enabled"),&Environment::set_glow_enabled);
+ ClassDB::bind_method(_MD("is_glow_enabled"),&Environment::is_glow_enabled);
- ObjectTypeDB::bind_method(_MD("set_glow_level","idx","enabled"),&Environment::set_glow_level);
- ObjectTypeDB::bind_method(_MD("is_glow_level_enabled","idx"),&Environment::is_glow_level_enabled);
+ ClassDB::bind_method(_MD("set_glow_level","idx","enabled"),&Environment::set_glow_level);
+ ClassDB::bind_method(_MD("is_glow_level_enabled","idx"),&Environment::is_glow_level_enabled);
- ObjectTypeDB::bind_method(_MD("set_glow_intensity","intensity"),&Environment::set_glow_intensity);
- ObjectTypeDB::bind_method(_MD("get_glow_intensity"),&Environment::get_glow_intensity);
+ ClassDB::bind_method(_MD("set_glow_intensity","intensity"),&Environment::set_glow_intensity);
+ ClassDB::bind_method(_MD("get_glow_intensity"),&Environment::get_glow_intensity);
- ObjectTypeDB::bind_method(_MD("set_glow_strength","strength"),&Environment::set_glow_strength);
- ObjectTypeDB::bind_method(_MD("get_glow_strength"),&Environment::get_glow_strength);
+ ClassDB::bind_method(_MD("set_glow_strength","strength"),&Environment::set_glow_strength);
+ ClassDB::bind_method(_MD("get_glow_strength"),&Environment::get_glow_strength);
- ObjectTypeDB::bind_method(_MD("set_glow_bloom","amount"),&Environment::set_glow_bloom);
- ObjectTypeDB::bind_method(_MD("get_glow_bloom"),&Environment::get_glow_bloom);
+ ClassDB::bind_method(_MD("set_glow_bloom","amount"),&Environment::set_glow_bloom);
+ ClassDB::bind_method(_MD("get_glow_bloom"),&Environment::get_glow_bloom);
- ObjectTypeDB::bind_method(_MD("set_glow_blend_mode","mode"),&Environment::set_glow_blend_mode);
- ObjectTypeDB::bind_method(_MD("get_glow_blend_mode"),&Environment::get_glow_blend_mode);
+ ClassDB::bind_method(_MD("set_glow_blend_mode","mode"),&Environment::set_glow_blend_mode);
+ ClassDB::bind_method(_MD("get_glow_blend_mode"),&Environment::get_glow_blend_mode);
- ObjectTypeDB::bind_method(_MD("set_glow_hdr_bleed_treshold","treshold"),&Environment::set_glow_hdr_bleed_treshold);
- ObjectTypeDB::bind_method(_MD("get_glow_hdr_bleed_treshold"),&Environment::get_glow_hdr_bleed_treshold);
+ ClassDB::bind_method(_MD("set_glow_hdr_bleed_treshold","treshold"),&Environment::set_glow_hdr_bleed_treshold);
+ ClassDB::bind_method(_MD("get_glow_hdr_bleed_treshold"),&Environment::get_glow_hdr_bleed_treshold);
- ObjectTypeDB::bind_method(_MD("set_glow_hdr_bleed_scale","scale"),&Environment::set_glow_hdr_bleed_scale);
- ObjectTypeDB::bind_method(_MD("get_glow_hdr_bleed_scale"),&Environment::get_glow_hdr_bleed_scale);
+ ClassDB::bind_method(_MD("set_glow_hdr_bleed_scale","scale"),&Environment::set_glow_hdr_bleed_scale);
+ ClassDB::bind_method(_MD("get_glow_hdr_bleed_scale"),&Environment::get_glow_hdr_bleed_scale);
- ObjectTypeDB::bind_method(_MD("set_glow_bicubic_upscale","enabled"),&Environment::set_glow_bicubic_upscale);
- ObjectTypeDB::bind_method(_MD("is_glow_bicubic_upscale_enabled"),&Environment::is_glow_bicubic_upscale_enabled);
+ ClassDB::bind_method(_MD("set_glow_bicubic_upscale","enabled"),&Environment::set_glow_bicubic_upscale);
+ ClassDB::bind_method(_MD("is_glow_bicubic_upscale_enabled"),&Environment::is_glow_bicubic_upscale_enabled);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"glow/enabled"),_SCS("set_glow_enabled"),_SCS("is_glow_enabled") );
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"glow/levels/1"),_SCS("set_glow_level"),_SCS("is_glow_level_enabled"),0 );
@@ -888,29 +888,29 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"glow/bicubic_upscale"),_SCS("set_glow_bicubic_upscale"),_SCS("is_glow_bicubic_upscale_enabled") );
- ObjectTypeDB::bind_method(_MD("set_tonemapper","mode"),&Environment::set_tonemapper);
- ObjectTypeDB::bind_method(_MD("get_tonemapper"),&Environment::get_tonemapper);
+ ClassDB::bind_method(_MD("set_tonemapper","mode"),&Environment::set_tonemapper);
+ ClassDB::bind_method(_MD("get_tonemapper"),&Environment::get_tonemapper);
- ObjectTypeDB::bind_method(_MD("set_tonemap_exposure","exposure"),&Environment::set_tonemap_exposure);
- ObjectTypeDB::bind_method(_MD("get_tonemap_exposure"),&Environment::get_tonemap_exposure);
+ ClassDB::bind_method(_MD("set_tonemap_exposure","exposure"),&Environment::set_tonemap_exposure);
+ ClassDB::bind_method(_MD("get_tonemap_exposure"),&Environment::get_tonemap_exposure);
- ObjectTypeDB::bind_method(_MD("set_tonemap_white","white"),&Environment::set_tonemap_white);
- ObjectTypeDB::bind_method(_MD("get_tonemap_white"),&Environment::get_tonemap_white);
+ ClassDB::bind_method(_MD("set_tonemap_white","white"),&Environment::set_tonemap_white);
+ ClassDB::bind_method(_MD("get_tonemap_white"),&Environment::get_tonemap_white);
- ObjectTypeDB::bind_method(_MD("set_tonemap_auto_exposure","auto_exposure"),&Environment::set_tonemap_auto_exposure);
- ObjectTypeDB::bind_method(_MD("get_tonemap_auto_exposure"),&Environment::get_tonemap_auto_exposure);
+ ClassDB::bind_method(_MD("set_tonemap_auto_exposure","auto_exposure"),&Environment::set_tonemap_auto_exposure);
+ ClassDB::bind_method(_MD("get_tonemap_auto_exposure"),&Environment::get_tonemap_auto_exposure);
- ObjectTypeDB::bind_method(_MD("set_tonemap_auto_exposure_max","exposure_max"),&Environment::set_tonemap_auto_exposure_max);
- ObjectTypeDB::bind_method(_MD("get_tonemap_auto_exposure_max"),&Environment::get_tonemap_auto_exposure_max);
+ ClassDB::bind_method(_MD("set_tonemap_auto_exposure_max","exposure_max"),&Environment::set_tonemap_auto_exposure_max);
+ ClassDB::bind_method(_MD("get_tonemap_auto_exposure_max"),&Environment::get_tonemap_auto_exposure_max);
- ObjectTypeDB::bind_method(_MD("set_tonemap_auto_exposure_min","exposure_min"),&Environment::set_tonemap_auto_exposure_min);
- ObjectTypeDB::bind_method(_MD("get_tonemap_auto_exposure_min"),&Environment::get_tonemap_auto_exposure_min);
+ ClassDB::bind_method(_MD("set_tonemap_auto_exposure_min","exposure_min"),&Environment::set_tonemap_auto_exposure_min);
+ ClassDB::bind_method(_MD("get_tonemap_auto_exposure_min"),&Environment::get_tonemap_auto_exposure_min);
- ObjectTypeDB::bind_method(_MD("set_tonemap_auto_exposure_speed","exposure_speed"),&Environment::set_tonemap_auto_exposure_speed);
- ObjectTypeDB::bind_method(_MD("get_tonemap_auto_exposure_speed"),&Environment::get_tonemap_auto_exposure_speed);
+ ClassDB::bind_method(_MD("set_tonemap_auto_exposure_speed","exposure_speed"),&Environment::set_tonemap_auto_exposure_speed);
+ ClassDB::bind_method(_MD("get_tonemap_auto_exposure_speed"),&Environment::get_tonemap_auto_exposure_speed);
- ObjectTypeDB::bind_method(_MD("set_tonemap_auto_exposure_grey","exposure_grey"),&Environment::set_tonemap_auto_exposure_grey);
- ObjectTypeDB::bind_method(_MD("get_tonemap_auto_exposure_grey"),&Environment::get_tonemap_auto_exposure_grey);
+ ClassDB::bind_method(_MD("set_tonemap_auto_exposure_grey","exposure_grey"),&Environment::set_tonemap_auto_exposure_grey);
+ ClassDB::bind_method(_MD("get_tonemap_auto_exposure_grey"),&Environment::get_tonemap_auto_exposure_grey);
ADD_PROPERTY(PropertyInfo(Variant::INT,"tonemap/mode",PROPERTY_HINT_ENUM,"Linear,Reindhart,Filmic,Aces"),_SCS("set_tonemapper"),_SCS("get_tonemapper") );
@@ -922,20 +922,20 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_exposure/max_luma",PROPERTY_HINT_RANGE,"0,16,0.01"),_SCS("set_tonemap_auto_exposure_max"),_SCS("get_tonemap_auto_exposure_max") );
ADD_PROPERTY(PropertyInfo(Variant::REAL,"auto_exposure/speed",PROPERTY_HINT_RANGE,"0.01,64,0.01"),_SCS("set_tonemap_auto_exposure_speed"),_SCS("get_tonemap_auto_exposure_speed") );
- ObjectTypeDB::bind_method(_MD("set_adjustment_enable","enabled"),&Environment::set_adjustment_enable);
- ObjectTypeDB::bind_method(_MD("is_adjustment_enabled"),&Environment::is_adjustment_enabled);
+ ClassDB::bind_method(_MD("set_adjustment_enable","enabled"),&Environment::set_adjustment_enable);
+ ClassDB::bind_method(_MD("is_adjustment_enabled"),&Environment::is_adjustment_enabled);
- ObjectTypeDB::bind_method(_MD("set_adjustment_brightness","brightness"),&Environment::set_adjustment_brightness);
- ObjectTypeDB::bind_method(_MD("get_adjustment_brightness"),&Environment::get_adjustment_brightness);
+ ClassDB::bind_method(_MD("set_adjustment_brightness","brightness"),&Environment::set_adjustment_brightness);
+ ClassDB::bind_method(_MD("get_adjustment_brightness"),&Environment::get_adjustment_brightness);
- ObjectTypeDB::bind_method(_MD("set_adjustment_contrast","contrast"),&Environment::set_adjustment_contrast);
- ObjectTypeDB::bind_method(_MD("get_adjustment_contrast"),&Environment::get_adjustment_contrast);
+ ClassDB::bind_method(_MD("set_adjustment_contrast","contrast"),&Environment::set_adjustment_contrast);
+ ClassDB::bind_method(_MD("get_adjustment_contrast"),&Environment::get_adjustment_contrast);
- ObjectTypeDB::bind_method(_MD("set_adjustment_saturation","saturation"),&Environment::set_adjustment_saturation);
- ObjectTypeDB::bind_method(_MD("get_adjustment_saturation"),&Environment::get_adjustment_saturation);
+ ClassDB::bind_method(_MD("set_adjustment_saturation","saturation"),&Environment::set_adjustment_saturation);
+ ClassDB::bind_method(_MD("get_adjustment_saturation"),&Environment::get_adjustment_saturation);
- ObjectTypeDB::bind_method(_MD("set_adjustment_color_correction","color_correction"),&Environment::set_adjustment_color_correction);
- ObjectTypeDB::bind_method(_MD("get_adjustment_color_correction"),&Environment::get_adjustment_color_correction);
+ ClassDB::bind_method(_MD("set_adjustment_color_correction","color_correction"),&Environment::set_adjustment_color_correction);
+ ClassDB::bind_method(_MD("get_adjustment_color_correction"),&Environment::get_adjustment_color_correction);
ADD_PROPERTY(PropertyInfo(Variant::BOOL,"adjustment/enabled"),_SCS("set_adjustment_enable"),_SCS("is_adjustment_enabled") );
ADD_PROPERTY(PropertyInfo(Variant::REAL,"adjustment/brightness",PROPERTY_HINT_RANGE,"0.01,8,0.01"),_SCS("set_adjustment_brightness"),_SCS("get_adjustment_brightness") );
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 8f2e4532a4..b8c243b588 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -36,7 +36,7 @@
class Environment : public Resource {
- OBJ_TYPE(Environment,Resource);
+ GDCLASS(Environment,Resource);
public:
enum BGMode {
diff --git a/scene/resources/event_stream.h b/scene/resources/event_stream.h
index 82a59ebab5..40af78fcce 100644
--- a/scene/resources/event_stream.h
+++ b/scene/resources/event_stream.h
@@ -34,7 +34,7 @@
class EventStreamPlayback : public Reference {
- OBJ_TYPE(EventStreamPlayback,Reference);
+ GDCLASS(EventStreamPlayback,Reference);
class InternalEventStream : public AudioServer::EventStream {
public:
@@ -99,7 +99,7 @@ public:
class EventStream : public Resource {
- OBJ_TYPE(EventStream,Resource);
+ GDCLASS(EventStream,Resource);
OBJ_SAVE_TYPE( EventStream ); //children are all saved as EventStream, so they can be exchanged
public:
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 743a0b1fc5..d4e18c58b8 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -78,14 +78,14 @@ void Font::update_changes() {
void Font::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("draw","canvas_item","pos","string","modulate","clip_w"),&Font::draw,DEFVAL(Color(1,1,1)),DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("get_ascent"),&Font::get_ascent);
- ObjectTypeDB::bind_method(_MD("get_descent"),&Font::get_descent);
- ObjectTypeDB::bind_method(_MD("get_height"),&Font::get_height);
- ObjectTypeDB::bind_method(_MD("is_distance_field_hint"),&Font::is_distance_field_hint);
- ObjectTypeDB::bind_method(_MD("get_string_size","string"),&Font::get_string_size);
- ObjectTypeDB::bind_method(_MD("draw_char","canvas_item","pos","char","next","modulate"),&Font::draw_char,DEFVAL(-1),DEFVAL(Color(1,1,1)));
- ObjectTypeDB::bind_method(_MD("update_changes"),&Font::update_changes);
+ ClassDB::bind_method(_MD("draw","canvas_item","pos","string","modulate","clip_w"),&Font::draw,DEFVAL(Color(1,1,1)),DEFVAL(-1));
+ ClassDB::bind_method(_MD("get_ascent"),&Font::get_ascent);
+ ClassDB::bind_method(_MD("get_descent"),&Font::get_descent);
+ ClassDB::bind_method(_MD("get_height"),&Font::get_height);
+ ClassDB::bind_method(_MD("is_distance_field_hint"),&Font::is_distance_field_hint);
+ ClassDB::bind_method(_MD("get_string_size","string"),&Font::get_string_size);
+ ClassDB::bind_method(_MD("draw_char","canvas_item","pos","char","next","modulate"),&Font::draw_char,DEFVAL(-1),DEFVAL(Color(1,1,1)));
+ ClassDB::bind_method(_MD("update_changes"),&Font::update_changes);
}
@@ -564,39 +564,39 @@ Size2 BitmapFont::get_char_size(CharType p_char,CharType p_next) const {
void BitmapFont::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("create_from_fnt","path"),&BitmapFont::create_from_fnt);
- ObjectTypeDB::bind_method(_MD("set_height","px"),&BitmapFont::set_height);
+ ClassDB::bind_method(_MD("create_from_fnt","path"),&BitmapFont::create_from_fnt);
+ ClassDB::bind_method(_MD("set_height","px"),&BitmapFont::set_height);
- ObjectTypeDB::bind_method(_MD("set_ascent","px"),&BitmapFont::set_ascent);
+ ClassDB::bind_method(_MD("set_ascent","px"),&BitmapFont::set_ascent);
- ObjectTypeDB::bind_method(_MD("add_kerning_pair","char_a","char_b","kerning"),&BitmapFont::add_kerning_pair);
- ObjectTypeDB::bind_method(_MD("get_kerning_pair","char_a","char_b"),&BitmapFont::get_kerning_pair);
+ ClassDB::bind_method(_MD("add_kerning_pair","char_a","char_b","kerning"),&BitmapFont::add_kerning_pair);
+ ClassDB::bind_method(_MD("get_kerning_pair","char_a","char_b"),&BitmapFont::get_kerning_pair);
- ObjectTypeDB::bind_method(_MD("add_texture","texture:Texture"),&BitmapFont::add_texture);
- ObjectTypeDB::bind_method(_MD("add_char","character","texture","rect","align","advance"),&BitmapFont::add_char,DEFVAL(Point2()),DEFVAL(-1));
+ ClassDB::bind_method(_MD("add_texture","texture:Texture"),&BitmapFont::add_texture);
+ ClassDB::bind_method(_MD("add_char","character","texture","rect","align","advance"),&BitmapFont::add_char,DEFVAL(Point2()),DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("get_texture_count"),&BitmapFont::get_texture_count);
- ObjectTypeDB::bind_method(_MD("get_texture:Texture","idx"),&BitmapFont::get_texture);
+ ClassDB::bind_method(_MD("get_texture_count"),&BitmapFont::get_texture_count);
+ ClassDB::bind_method(_MD("get_texture:Texture","idx"),&BitmapFont::get_texture);
- ObjectTypeDB::bind_method(_MD("get_char_size","char","next"),&BitmapFont::get_char_size,DEFVAL(0));
+ ClassDB::bind_method(_MD("get_char_size","char","next"),&BitmapFont::get_char_size,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("set_distance_field_hint","enable"),&BitmapFont::set_distance_field_hint);
+ ClassDB::bind_method(_MD("set_distance_field_hint","enable"),&BitmapFont::set_distance_field_hint);
- ObjectTypeDB::bind_method(_MD("clear"),&BitmapFont::clear);
+ ClassDB::bind_method(_MD("clear"),&BitmapFont::clear);
- ObjectTypeDB::bind_method(_MD("_set_chars"),&BitmapFont::_set_chars);
- ObjectTypeDB::bind_method(_MD("_get_chars"),&BitmapFont::_get_chars);
+ ClassDB::bind_method(_MD("_set_chars"),&BitmapFont::_set_chars);
+ ClassDB::bind_method(_MD("_get_chars"),&BitmapFont::_get_chars);
- ObjectTypeDB::bind_method(_MD("_set_kernings"),&BitmapFont::_set_kernings);
- ObjectTypeDB::bind_method(_MD("_get_kernings"),&BitmapFont::_get_kernings);
+ ClassDB::bind_method(_MD("_set_kernings"),&BitmapFont::_set_kernings);
+ ClassDB::bind_method(_MD("_get_kernings"),&BitmapFont::_get_kernings);
- ObjectTypeDB::bind_method(_MD("_set_textures"),&BitmapFont::_set_textures);
- ObjectTypeDB::bind_method(_MD("_get_textures"),&BitmapFont::_get_textures);
+ ClassDB::bind_method(_MD("_set_textures"),&BitmapFont::_set_textures);
+ ClassDB::bind_method(_MD("_get_textures"),&BitmapFont::_get_textures);
- ObjectTypeDB::bind_method(_MD("set_fallback","fallback"),&BitmapFont::set_fallback);
- ObjectTypeDB::bind_method(_MD("get_fallback"),&BitmapFont::get_fallback);
+ ClassDB::bind_method(_MD("set_fallback","fallback"),&BitmapFont::set_fallback);
+ ClassDB::bind_method(_MD("get_fallback"),&BitmapFont::get_fallback);
ADD_PROPERTY( PropertyInfo( Variant::ARRAY, "textures", PROPERTY_HINT_NONE,"", PROPERTY_USAGE_NOEDITOR ), _SCS("_set_textures"), _SCS("_get_textures") );
ADD_PROPERTY( PropertyInfo( Variant::INT_ARRAY, "chars", PROPERTY_HINT_NONE,"", PROPERTY_USAGE_NOEDITOR ), _SCS("_set_chars"), _SCS("_get_chars") );
diff --git a/scene/resources/font.h b/scene/resources/font.h
index f311796559..397d48cbb0 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -39,7 +39,7 @@
class Font : public Resource {
- OBJ_TYPE( Font, Resource );
+ GDCLASS( Font, Resource );
protected:
@@ -69,7 +69,7 @@ public:
class BitmapFont : public Font {
- OBJ_TYPE( BitmapFont, Font );
+ GDCLASS( BitmapFont, Font );
RES_BASE_EXTENSION("fnt");
Vector< Ref<Texture> > textures;
diff --git a/scene/resources/gibberish_stream.cpp b/scene/resources/gibberish_stream.cpp
index 2c3bc9de60..3a6a6df7ea 100644
--- a/scene/resources/gibberish_stream.cpp
+++ b/scene/resources/gibberish_stream.cpp
@@ -305,17 +305,17 @@ float AudioStreamGibberish::get_pitch_random_scale() const {
void AudioStreamGibberish::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_phonemes","phonemes"),&AudioStreamGibberish::set_phonemes);
- ObjectTypeDB::bind_method(_MD("get_phonemes"),&AudioStreamGibberish::get_phonemes);
+ ClassDB::bind_method(_MD("set_phonemes","phonemes"),&AudioStreamGibberish::set_phonemes);
+ ClassDB::bind_method(_MD("get_phonemes"),&AudioStreamGibberish::get_phonemes);
- ObjectTypeDB::bind_method(_MD("set_pitch_scale","pitch_scale"),&AudioStreamGibberish::set_pitch_scale);
- ObjectTypeDB::bind_method(_MD("get_pitch_scale"),&AudioStreamGibberish::get_pitch_scale);
+ ClassDB::bind_method(_MD("set_pitch_scale","pitch_scale"),&AudioStreamGibberish::set_pitch_scale);
+ ClassDB::bind_method(_MD("get_pitch_scale"),&AudioStreamGibberish::get_pitch_scale);
- ObjectTypeDB::bind_method(_MD("set_pitch_random_scale","pitch_random_scale"),&AudioStreamGibberish::set_pitch_random_scale);
- ObjectTypeDB::bind_method(_MD("get_pitch_random_scale"),&AudioStreamGibberish::get_pitch_random_scale);
+ ClassDB::bind_method(_MD("set_pitch_random_scale","pitch_random_scale"),&AudioStreamGibberish::set_pitch_random_scale);
+ ClassDB::bind_method(_MD("get_pitch_random_scale"),&AudioStreamGibberish::get_pitch_random_scale);
- ObjectTypeDB::bind_method(_MD("set_xfade_time","sec"),&AudioStreamGibberish::set_xfade_time);
- ObjectTypeDB::bind_method(_MD("get_xfade_time"),&AudioStreamGibberish::get_xfade_time);
+ ClassDB::bind_method(_MD("set_xfade_time","sec"),&AudioStreamGibberish::set_xfade_time);
+ ClassDB::bind_method(_MD("get_xfade_time"),&AudioStreamGibberish::get_xfade_time);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"phonemes",PROPERTY_HINT_RESOURCE_TYPE,"SampleLibrary"),_SCS("set_phonemes"),_SCS("get_phonemes"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"pitch_scale",PROPERTY_HINT_RANGE,"0.01,64,0.01"),_SCS("set_pitch_scale"),_SCS("get_pitch_scale"));
diff --git a/scene/resources/gibberish_stream.h b/scene/resources/gibberish_stream.h
index 557e78fc09..257a1faebf 100644
--- a/scene/resources/gibberish_stream.h
+++ b/scene/resources/gibberish_stream.h
@@ -37,7 +37,7 @@
#include "scene/resources/sample_library.h"
class AudioStreamGibberish : public AudioStream {
- OBJ_TYPE( AudioStreamGibberish, AudioStream );
+ GDCLASS( AudioStreamGibberish, AudioStream );
enum {
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index a6136b2741..d36705b4bb 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -831,101 +831,101 @@ Vector2 FixedSpatialMaterial::get_uv2_offset() const{
void FixedSpatialMaterial::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_albedo","albedo"),&FixedSpatialMaterial::set_albedo);
- ObjectTypeDB::bind_method(_MD("get_albedo"),&FixedSpatialMaterial::get_albedo);
+ ClassDB::bind_method(_MD("set_albedo","albedo"),&FixedSpatialMaterial::set_albedo);
+ ClassDB::bind_method(_MD("get_albedo"),&FixedSpatialMaterial::get_albedo);
- ObjectTypeDB::bind_method(_MD("set_specular_mode","specular_mode"),&FixedSpatialMaterial::set_specular_mode);
- ObjectTypeDB::bind_method(_MD("get_specular_mode"),&FixedSpatialMaterial::get_specular_mode);
+ ClassDB::bind_method(_MD("set_specular_mode","specular_mode"),&FixedSpatialMaterial::set_specular_mode);
+ ClassDB::bind_method(_MD("get_specular_mode"),&FixedSpatialMaterial::get_specular_mode);
- ObjectTypeDB::bind_method(_MD("set_specular","specular"),&FixedSpatialMaterial::set_specular);
- ObjectTypeDB::bind_method(_MD("get_specular"),&FixedSpatialMaterial::get_specular);
+ ClassDB::bind_method(_MD("set_specular","specular"),&FixedSpatialMaterial::set_specular);
+ ClassDB::bind_method(_MD("get_specular"),&FixedSpatialMaterial::get_specular);
- ObjectTypeDB::bind_method(_MD("set_metalness","metalness"),&FixedSpatialMaterial::set_metalness);
- ObjectTypeDB::bind_method(_MD("get_metalness"),&FixedSpatialMaterial::get_metalness);
+ ClassDB::bind_method(_MD("set_metalness","metalness"),&FixedSpatialMaterial::set_metalness);
+ ClassDB::bind_method(_MD("get_metalness"),&FixedSpatialMaterial::get_metalness);
- ObjectTypeDB::bind_method(_MD("set_roughness","roughness"),&FixedSpatialMaterial::set_roughness);
- ObjectTypeDB::bind_method(_MD("get_roughness"),&FixedSpatialMaterial::get_roughness);
+ ClassDB::bind_method(_MD("set_roughness","roughness"),&FixedSpatialMaterial::set_roughness);
+ ClassDB::bind_method(_MD("get_roughness"),&FixedSpatialMaterial::get_roughness);
- ObjectTypeDB::bind_method(_MD("set_emission","emission"),&FixedSpatialMaterial::set_emission);
- ObjectTypeDB::bind_method(_MD("get_emission"),&FixedSpatialMaterial::get_emission);
+ ClassDB::bind_method(_MD("set_emission","emission"),&FixedSpatialMaterial::set_emission);
+ ClassDB::bind_method(_MD("get_emission"),&FixedSpatialMaterial::get_emission);
- ObjectTypeDB::bind_method(_MD("set_emission_energy","emission_energy"),&FixedSpatialMaterial::set_emission_energy);
- ObjectTypeDB::bind_method(_MD("get_emission_energy"),&FixedSpatialMaterial::get_emission_energy);
+ ClassDB::bind_method(_MD("set_emission_energy","emission_energy"),&FixedSpatialMaterial::set_emission_energy);
+ ClassDB::bind_method(_MD("get_emission_energy"),&FixedSpatialMaterial::get_emission_energy);
- ObjectTypeDB::bind_method(_MD("set_normal_scale","normal_scale"),&FixedSpatialMaterial::set_normal_scale);
- ObjectTypeDB::bind_method(_MD("get_normal_scale"),&FixedSpatialMaterial::get_normal_scale);
+ ClassDB::bind_method(_MD("set_normal_scale","normal_scale"),&FixedSpatialMaterial::set_normal_scale);
+ ClassDB::bind_method(_MD("get_normal_scale"),&FixedSpatialMaterial::get_normal_scale);
- ObjectTypeDB::bind_method(_MD("set_rim","rim"),&FixedSpatialMaterial::set_rim);
- ObjectTypeDB::bind_method(_MD("get_rim"),&FixedSpatialMaterial::get_rim);
+ ClassDB::bind_method(_MD("set_rim","rim"),&FixedSpatialMaterial::set_rim);
+ ClassDB::bind_method(_MD("get_rim"),&FixedSpatialMaterial::get_rim);
- ObjectTypeDB::bind_method(_MD("set_rim_tint","rim_tint"),&FixedSpatialMaterial::set_rim_tint);
- ObjectTypeDB::bind_method(_MD("get_rim_tint"),&FixedSpatialMaterial::get_rim_tint);
+ ClassDB::bind_method(_MD("set_rim_tint","rim_tint"),&FixedSpatialMaterial::set_rim_tint);
+ ClassDB::bind_method(_MD("get_rim_tint"),&FixedSpatialMaterial::get_rim_tint);
- ObjectTypeDB::bind_method(_MD("set_clearcoat","clearcoat"),&FixedSpatialMaterial::set_clearcoat);
- ObjectTypeDB::bind_method(_MD("get_clearcoat"),&FixedSpatialMaterial::get_clearcoat);
+ ClassDB::bind_method(_MD("set_clearcoat","clearcoat"),&FixedSpatialMaterial::set_clearcoat);
+ ClassDB::bind_method(_MD("get_clearcoat"),&FixedSpatialMaterial::get_clearcoat);
- ObjectTypeDB::bind_method(_MD("set_clearcoat_gloss","clearcoat_gloss"),&FixedSpatialMaterial::set_clearcoat_gloss);
- ObjectTypeDB::bind_method(_MD("get_clearcoat_gloss"),&FixedSpatialMaterial::get_clearcoat_gloss);
+ ClassDB::bind_method(_MD("set_clearcoat_gloss","clearcoat_gloss"),&FixedSpatialMaterial::set_clearcoat_gloss);
+ ClassDB::bind_method(_MD("get_clearcoat_gloss"),&FixedSpatialMaterial::get_clearcoat_gloss);
- ObjectTypeDB::bind_method(_MD("set_anisotropy","anisotropy"),&FixedSpatialMaterial::set_anisotropy);
- ObjectTypeDB::bind_method(_MD("get_anisotropy"),&FixedSpatialMaterial::get_anisotropy);
+ ClassDB::bind_method(_MD("set_anisotropy","anisotropy"),&FixedSpatialMaterial::set_anisotropy);
+ ClassDB::bind_method(_MD("get_anisotropy"),&FixedSpatialMaterial::get_anisotropy);
- ObjectTypeDB::bind_method(_MD("set_height_scale","height_scale"),&FixedSpatialMaterial::set_height_scale);
- ObjectTypeDB::bind_method(_MD("get_height_scale"),&FixedSpatialMaterial::get_height_scale);
+ ClassDB::bind_method(_MD("set_height_scale","height_scale"),&FixedSpatialMaterial::set_height_scale);
+ ClassDB::bind_method(_MD("get_height_scale"),&FixedSpatialMaterial::get_height_scale);
- ObjectTypeDB::bind_method(_MD("set_subsurface_scattering_strength","strength"),&FixedSpatialMaterial::set_subsurface_scattering_strength);
- ObjectTypeDB::bind_method(_MD("get_subsurface_scattering_strength"),&FixedSpatialMaterial::get_subsurface_scattering_strength);
+ ClassDB::bind_method(_MD("set_subsurface_scattering_strength","strength"),&FixedSpatialMaterial::set_subsurface_scattering_strength);
+ ClassDB::bind_method(_MD("get_subsurface_scattering_strength"),&FixedSpatialMaterial::get_subsurface_scattering_strength);
- ObjectTypeDB::bind_method(_MD("set_refraction","refraction"),&FixedSpatialMaterial::set_refraction);
- ObjectTypeDB::bind_method(_MD("get_refraction"),&FixedSpatialMaterial::get_refraction);
+ ClassDB::bind_method(_MD("set_refraction","refraction"),&FixedSpatialMaterial::set_refraction);
+ ClassDB::bind_method(_MD("get_refraction"),&FixedSpatialMaterial::get_refraction);
- ObjectTypeDB::bind_method(_MD("set_refraction_roughness","refraction_roughness"),&FixedSpatialMaterial::set_refraction_roughness);
- ObjectTypeDB::bind_method(_MD("get_refraction_roughness"),&FixedSpatialMaterial::get_refraction_roughness);
+ ClassDB::bind_method(_MD("set_refraction_roughness","refraction_roughness"),&FixedSpatialMaterial::set_refraction_roughness);
+ ClassDB::bind_method(_MD("get_refraction_roughness"),&FixedSpatialMaterial::get_refraction_roughness);
- ObjectTypeDB::bind_method(_MD("set_line_width","line_width"),&FixedSpatialMaterial::set_line_width);
- ObjectTypeDB::bind_method(_MD("get_line_width"),&FixedSpatialMaterial::get_line_width);
+ ClassDB::bind_method(_MD("set_line_width","line_width"),&FixedSpatialMaterial::set_line_width);
+ ClassDB::bind_method(_MD("get_line_width"),&FixedSpatialMaterial::get_line_width);
- ObjectTypeDB::bind_method(_MD("set_point_size","point_size"),&FixedSpatialMaterial::set_point_size);
- ObjectTypeDB::bind_method(_MD("get_point_size"),&FixedSpatialMaterial::get_point_size);
+ ClassDB::bind_method(_MD("set_point_size","point_size"),&FixedSpatialMaterial::set_point_size);
+ ClassDB::bind_method(_MD("get_point_size"),&FixedSpatialMaterial::get_point_size);
- ObjectTypeDB::bind_method(_MD("set_detail_uv","detail_uv"),&FixedSpatialMaterial::set_detail_uv);
- ObjectTypeDB::bind_method(_MD("get_detail_uv"),&FixedSpatialMaterial::get_detail_uv);
+ ClassDB::bind_method(_MD("set_detail_uv","detail_uv"),&FixedSpatialMaterial::set_detail_uv);
+ ClassDB::bind_method(_MD("get_detail_uv"),&FixedSpatialMaterial::get_detail_uv);
- ObjectTypeDB::bind_method(_MD("set_blend_mode","blend_mode"),&FixedSpatialMaterial::set_blend_mode);
- ObjectTypeDB::bind_method(_MD("get_blend_mode"),&FixedSpatialMaterial::get_blend_mode);
+ ClassDB::bind_method(_MD("set_blend_mode","blend_mode"),&FixedSpatialMaterial::set_blend_mode);
+ ClassDB::bind_method(_MD("get_blend_mode"),&FixedSpatialMaterial::get_blend_mode);
- ObjectTypeDB::bind_method(_MD("set_depth_draw_mode","depth_draw_mode"),&FixedSpatialMaterial::set_depth_draw_mode);
- ObjectTypeDB::bind_method(_MD("get_depth_draw_mode"),&FixedSpatialMaterial::get_depth_draw_mode);
+ ClassDB::bind_method(_MD("set_depth_draw_mode","depth_draw_mode"),&FixedSpatialMaterial::set_depth_draw_mode);
+ ClassDB::bind_method(_MD("get_depth_draw_mode"),&FixedSpatialMaterial::get_depth_draw_mode);
- ObjectTypeDB::bind_method(_MD("set_cull_mode","cull_mode"),&FixedSpatialMaterial::set_cull_mode);
- ObjectTypeDB::bind_method(_MD("get_cull_mode"),&FixedSpatialMaterial::get_cull_mode);
+ ClassDB::bind_method(_MD("set_cull_mode","cull_mode"),&FixedSpatialMaterial::set_cull_mode);
+ ClassDB::bind_method(_MD("get_cull_mode"),&FixedSpatialMaterial::get_cull_mode);
- ObjectTypeDB::bind_method(_MD("set_diffuse_mode","diffuse_mode"),&FixedSpatialMaterial::set_diffuse_mode);
- ObjectTypeDB::bind_method(_MD("get_diffuse_mode"),&FixedSpatialMaterial::get_diffuse_mode);
+ ClassDB::bind_method(_MD("set_diffuse_mode","diffuse_mode"),&FixedSpatialMaterial::set_diffuse_mode);
+ ClassDB::bind_method(_MD("get_diffuse_mode"),&FixedSpatialMaterial::get_diffuse_mode);
- ObjectTypeDB::bind_method(_MD("set_flag","flag","enable"),&FixedSpatialMaterial::set_flag);
- ObjectTypeDB::bind_method(_MD("get_flag"),&FixedSpatialMaterial::get_flag);
+ ClassDB::bind_method(_MD("set_flag","flag","enable"),&FixedSpatialMaterial::set_flag);
+ ClassDB::bind_method(_MD("get_flag"),&FixedSpatialMaterial::get_flag);
- ObjectTypeDB::bind_method(_MD("set_feature","feature","enable"),&FixedSpatialMaterial::set_feature);
- ObjectTypeDB::bind_method(_MD("get_feature","feature"),&FixedSpatialMaterial::get_feature);
+ ClassDB::bind_method(_MD("set_feature","feature","enable"),&FixedSpatialMaterial::set_feature);
+ ClassDB::bind_method(_MD("get_feature","feature"),&FixedSpatialMaterial::get_feature);
- ObjectTypeDB::bind_method(_MD("set_texture","param:Texture","texture"),&FixedSpatialMaterial::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture:Texture","param:Texture"),&FixedSpatialMaterial::get_texture);
+ ClassDB::bind_method(_MD("set_texture","param:Texture","texture"),&FixedSpatialMaterial::set_texture);
+ ClassDB::bind_method(_MD("get_texture:Texture","param:Texture"),&FixedSpatialMaterial::get_texture);
- ObjectTypeDB::bind_method(_MD("set_detail_blend_mode","detail_blend_mode"),&FixedSpatialMaterial::set_detail_blend_mode);
- ObjectTypeDB::bind_method(_MD("get_detail_blend_mode"),&FixedSpatialMaterial::get_detail_blend_mode);
+ ClassDB::bind_method(_MD("set_detail_blend_mode","detail_blend_mode"),&FixedSpatialMaterial::set_detail_blend_mode);
+ ClassDB::bind_method(_MD("get_detail_blend_mode"),&FixedSpatialMaterial::get_detail_blend_mode);
- ObjectTypeDB::bind_method(_MD("set_uv1_scale","scale"),&FixedSpatialMaterial::set_uv1_scale);
- ObjectTypeDB::bind_method(_MD("get_uv1_scale"),&FixedSpatialMaterial::get_uv1_scale);
+ ClassDB::bind_method(_MD("set_uv1_scale","scale"),&FixedSpatialMaterial::set_uv1_scale);
+ ClassDB::bind_method(_MD("get_uv1_scale"),&FixedSpatialMaterial::get_uv1_scale);
- ObjectTypeDB::bind_method(_MD("set_uv1_offset","offset"),&FixedSpatialMaterial::set_uv1_offset);
- ObjectTypeDB::bind_method(_MD("get_uv1_offset"),&FixedSpatialMaterial::get_uv1_offset);
+ ClassDB::bind_method(_MD("set_uv1_offset","offset"),&FixedSpatialMaterial::set_uv1_offset);
+ ClassDB::bind_method(_MD("get_uv1_offset"),&FixedSpatialMaterial::get_uv1_offset);
- ObjectTypeDB::bind_method(_MD("set_uv2_scale","scale"),&FixedSpatialMaterial::set_uv2_scale);
- ObjectTypeDB::bind_method(_MD("get_uv2_scale"),&FixedSpatialMaterial::get_uv2_scale);
+ ClassDB::bind_method(_MD("set_uv2_scale","scale"),&FixedSpatialMaterial::set_uv2_scale);
+ ClassDB::bind_method(_MD("get_uv2_scale"),&FixedSpatialMaterial::get_uv2_scale);
- ObjectTypeDB::bind_method(_MD("set_uv2_offset","offset"),&FixedSpatialMaterial::set_uv2_offset);
- ObjectTypeDB::bind_method(_MD("get_uv2_offset"),&FixedSpatialMaterial::get_uv2_offset);
+ ClassDB::bind_method(_MD("set_uv2_offset","offset"),&FixedSpatialMaterial::set_uv2_offset);
+ ClassDB::bind_method(_MD("get_uv2_offset"),&FixedSpatialMaterial::get_uv2_offset);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags/transparent"),_SCS("set_feature"),_SCS("get_feature"),FEATURE_TRANSPARENT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL,"flags/unshaded"),_SCS("set_flag"),_SCS("get_flag"),FLAG_UNSHADED);
diff --git a/scene/resources/material.h b/scene/resources/material.h
index c2659c4fc4..6b957d0203 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -41,7 +41,7 @@
class Material : public Resource {
- OBJ_TYPE(Material,Resource);
+ GDCLASS(Material,Resource);
RES_BASE_EXTENSION("mtl");
OBJ_SAVE_TYPE( Material );
@@ -59,7 +59,7 @@ public:
class FixedSpatialMaterial : public Material {
- OBJ_TYPE(FixedSpatialMaterial,Material)
+ GDCLASS(FixedSpatialMaterial,Material)
public:
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 58c2d08eec..ed35eb0216 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -1019,31 +1019,31 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
void Mesh::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_morph_target","name"),&Mesh::add_morph_target);
- ObjectTypeDB::bind_method(_MD("get_morph_target_count"),&Mesh::get_morph_target_count);
- ObjectTypeDB::bind_method(_MD("get_morph_target_name","index"),&Mesh::get_morph_target_name);
- ObjectTypeDB::bind_method(_MD("clear_morph_targets"),&Mesh::clear_morph_targets);
- ObjectTypeDB::bind_method(_MD("set_morph_target_mode","mode"),&Mesh::set_morph_target_mode);
- ObjectTypeDB::bind_method(_MD("get_morph_target_mode"),&Mesh::get_morph_target_mode);
-
- ObjectTypeDB::bind_method(_MD("add_surface_from_arrays","primitive","arrays","blend_shapes","compress_flags"),&Mesh::add_surface_from_arrays,DEFVAL(Array()),DEFVAL(ARRAY_COMPRESS_DEFAULT));
- ObjectTypeDB::bind_method(_MD("get_surface_count"),&Mesh::get_surface_count);
- ObjectTypeDB::bind_method(_MD("surface_remove","surf_idx"),&Mesh::surface_remove);
- ObjectTypeDB::bind_method(_MD("surface_get_array_len","surf_idx"),&Mesh::surface_get_array_len);
- ObjectTypeDB::bind_method(_MD("surface_get_array_index_len","surf_idx"),&Mesh::surface_get_array_index_len);
- ObjectTypeDB::bind_method(_MD("surface_get_format","surf_idx"),&Mesh::surface_get_format);
- ObjectTypeDB::bind_method(_MD("surface_get_primitive_type","surf_idx"),&Mesh::surface_get_primitive_type);
- ObjectTypeDB::bind_method(_MD("surface_set_material","surf_idx","material:Material"),&Mesh::surface_set_material);
- ObjectTypeDB::bind_method(_MD("surface_get_material:Material","surf_idx"),&Mesh::surface_get_material);
- ObjectTypeDB::bind_method(_MD("surface_set_name","surf_idx","name"),&Mesh::surface_set_name);
- ObjectTypeDB::bind_method(_MD("surface_get_name","surf_idx"),&Mesh::surface_get_name);
- ObjectTypeDB::bind_method(_MD("center_geometry"),&Mesh::center_geometry);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("center_geometry"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::bind_method(_MD("regen_normalmaps"),&Mesh::regen_normalmaps);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("regen_normalmaps"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
-
- ObjectTypeDB::bind_method(_MD("set_custom_aabb","aabb"),&Mesh::set_custom_aabb);
- ObjectTypeDB::bind_method(_MD("get_custom_aabb"),&Mesh::get_custom_aabb);
+ ClassDB::bind_method(_MD("add_morph_target","name"),&Mesh::add_morph_target);
+ ClassDB::bind_method(_MD("get_morph_target_count"),&Mesh::get_morph_target_count);
+ ClassDB::bind_method(_MD("get_morph_target_name","index"),&Mesh::get_morph_target_name);
+ ClassDB::bind_method(_MD("clear_morph_targets"),&Mesh::clear_morph_targets);
+ ClassDB::bind_method(_MD("set_morph_target_mode","mode"),&Mesh::set_morph_target_mode);
+ ClassDB::bind_method(_MD("get_morph_target_mode"),&Mesh::get_morph_target_mode);
+
+ ClassDB::bind_method(_MD("add_surface_from_arrays","primitive","arrays","blend_shapes","compress_flags"),&Mesh::add_surface_from_arrays,DEFVAL(Array()),DEFVAL(ARRAY_COMPRESS_DEFAULT));
+ ClassDB::bind_method(_MD("get_surface_count"),&Mesh::get_surface_count);
+ ClassDB::bind_method(_MD("surface_remove","surf_idx"),&Mesh::surface_remove);
+ ClassDB::bind_method(_MD("surface_get_array_len","surf_idx"),&Mesh::surface_get_array_len);
+ ClassDB::bind_method(_MD("surface_get_array_index_len","surf_idx"),&Mesh::surface_get_array_index_len);
+ ClassDB::bind_method(_MD("surface_get_format","surf_idx"),&Mesh::surface_get_format);
+ ClassDB::bind_method(_MD("surface_get_primitive_type","surf_idx"),&Mesh::surface_get_primitive_type);
+ ClassDB::bind_method(_MD("surface_set_material","surf_idx","material:Material"),&Mesh::surface_set_material);
+ ClassDB::bind_method(_MD("surface_get_material:Material","surf_idx"),&Mesh::surface_get_material);
+ ClassDB::bind_method(_MD("surface_set_name","surf_idx","name"),&Mesh::surface_set_name);
+ ClassDB::bind_method(_MD("surface_get_name","surf_idx"),&Mesh::surface_get_name);
+ ClassDB::bind_method(_MD("center_geometry"),&Mesh::center_geometry);
+ ClassDB::set_method_flags(get_class_static(),_SCS("center_geometry"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(_MD("regen_normalmaps"),&Mesh::regen_normalmaps);
+ ClassDB::set_method_flags(get_class_static(),_SCS("regen_normalmaps"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+
+ ClassDB::bind_method(_MD("set_custom_aabb","aabb"),&Mesh::set_custom_aabb);
+ ClassDB::bind_method(_MD("get_custom_aabb"),&Mesh::get_custom_aabb);
BIND_CONSTANT( NO_INDEX_ARRAY );
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index 399cd8921f..9be90b6436 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -39,7 +39,7 @@
*/
class Mesh : public Resource {
- OBJ_TYPE( Mesh, Resource );
+ GDCLASS( Mesh, Resource );
RES_BASE_EXTENSION("msh");
public:
diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp
index e06ff6fd52..4a753e6c09 100644
--- a/scene/resources/mesh_data_tool.cpp
+++ b/scene/resources/mesh_data_tool.cpp
@@ -565,62 +565,62 @@ void MeshDataTool::set_material(const Ref<Material> &p_material) {
void MeshDataTool::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("clear"),&MeshDataTool::clear);
- ObjectTypeDB::bind_method(_MD("create_from_surface","mesh","surface"),&MeshDataTool::create_from_surface);
- ObjectTypeDB::bind_method(_MD("commit_to_surface","mesh"),&MeshDataTool::commit_to_surface);
+ ClassDB::bind_method(_MD("clear"),&MeshDataTool::clear);
+ ClassDB::bind_method(_MD("create_from_surface","mesh","surface"),&MeshDataTool::create_from_surface);
+ ClassDB::bind_method(_MD("commit_to_surface","mesh"),&MeshDataTool::commit_to_surface);
- ObjectTypeDB::bind_method(_MD("get_format"),&MeshDataTool::get_format);
+ ClassDB::bind_method(_MD("get_format"),&MeshDataTool::get_format);
- ObjectTypeDB::bind_method(_MD("get_vertex_count"),&MeshDataTool::get_vertex_count);
- ObjectTypeDB::bind_method(_MD("get_edge_count"),&MeshDataTool::get_edge_count);
- ObjectTypeDB::bind_method(_MD("get_face_count"),&MeshDataTool::get_face_count);
+ ClassDB::bind_method(_MD("get_vertex_count"),&MeshDataTool::get_vertex_count);
+ ClassDB::bind_method(_MD("get_edge_count"),&MeshDataTool::get_edge_count);
+ ClassDB::bind_method(_MD("get_face_count"),&MeshDataTool::get_face_count);
- ObjectTypeDB::bind_method(_MD("set_vertex","idx","vertex"),&MeshDataTool::set_vertex);
- ObjectTypeDB::bind_method(_MD("get_vertex","idx"),&MeshDataTool::get_vertex);
+ ClassDB::bind_method(_MD("set_vertex","idx","vertex"),&MeshDataTool::set_vertex);
+ ClassDB::bind_method(_MD("get_vertex","idx"),&MeshDataTool::get_vertex);
- ObjectTypeDB::bind_method(_MD("set_vertex_normal","idx","normal"),&MeshDataTool::set_vertex_normal);
- ObjectTypeDB::bind_method(_MD("get_vertex_normal","idx"),&MeshDataTool::get_vertex_normal);
+ ClassDB::bind_method(_MD("set_vertex_normal","idx","normal"),&MeshDataTool::set_vertex_normal);
+ ClassDB::bind_method(_MD("get_vertex_normal","idx"),&MeshDataTool::get_vertex_normal);
- ObjectTypeDB::bind_method(_MD("set_vertex_tangent","idx","tangent"),&MeshDataTool::set_vertex_tangent);
- ObjectTypeDB::bind_method(_MD("get_vertex_tangent","idx"),&MeshDataTool::get_vertex_tangent);
+ ClassDB::bind_method(_MD("set_vertex_tangent","idx","tangent"),&MeshDataTool::set_vertex_tangent);
+ ClassDB::bind_method(_MD("get_vertex_tangent","idx"),&MeshDataTool::get_vertex_tangent);
- ObjectTypeDB::bind_method(_MD("set_vertex_uv","idx","uv"),&MeshDataTool::set_vertex_uv);
- ObjectTypeDB::bind_method(_MD("get_vertex_uv","idx"),&MeshDataTool::get_vertex_uv);
+ ClassDB::bind_method(_MD("set_vertex_uv","idx","uv"),&MeshDataTool::set_vertex_uv);
+ ClassDB::bind_method(_MD("get_vertex_uv","idx"),&MeshDataTool::get_vertex_uv);
- ObjectTypeDB::bind_method(_MD("set_vertex_uv2","idx","uv2"),&MeshDataTool::set_vertex_uv2);
- ObjectTypeDB::bind_method(_MD("get_vertex_uv2","idx"),&MeshDataTool::get_vertex_uv2);
+ ClassDB::bind_method(_MD("set_vertex_uv2","idx","uv2"),&MeshDataTool::set_vertex_uv2);
+ ClassDB::bind_method(_MD("get_vertex_uv2","idx"),&MeshDataTool::get_vertex_uv2);
- ObjectTypeDB::bind_method(_MD("set_vertex_color","idx","color"),&MeshDataTool::set_vertex_color);
- ObjectTypeDB::bind_method(_MD("get_vertex_color","idx"),&MeshDataTool::get_vertex_color);
+ ClassDB::bind_method(_MD("set_vertex_color","idx","color"),&MeshDataTool::set_vertex_color);
+ ClassDB::bind_method(_MD("get_vertex_color","idx"),&MeshDataTool::get_vertex_color);
- ObjectTypeDB::bind_method(_MD("set_vertex_bones","idx","bones"),&MeshDataTool::set_vertex_bones);
- ObjectTypeDB::bind_method(_MD("get_vertex_bones","idx"),&MeshDataTool::get_vertex_bones);
+ ClassDB::bind_method(_MD("set_vertex_bones","idx","bones"),&MeshDataTool::set_vertex_bones);
+ ClassDB::bind_method(_MD("get_vertex_bones","idx"),&MeshDataTool::get_vertex_bones);
- ObjectTypeDB::bind_method(_MD("set_vertex_weights","idx","weights"),&MeshDataTool::set_vertex_weights);
- ObjectTypeDB::bind_method(_MD("get_vertex_weights","idx"),&MeshDataTool::get_vertex_weights);
+ ClassDB::bind_method(_MD("set_vertex_weights","idx","weights"),&MeshDataTool::set_vertex_weights);
+ ClassDB::bind_method(_MD("get_vertex_weights","idx"),&MeshDataTool::get_vertex_weights);
- ObjectTypeDB::bind_method(_MD("set_vertex_meta","idx","meta"),&MeshDataTool::set_vertex_meta);
- ObjectTypeDB::bind_method(_MD("get_vertex_meta","idx"),&MeshDataTool::get_vertex_meta);
+ ClassDB::bind_method(_MD("set_vertex_meta","idx","meta"),&MeshDataTool::set_vertex_meta);
+ ClassDB::bind_method(_MD("get_vertex_meta","idx"),&MeshDataTool::get_vertex_meta);
- ObjectTypeDB::bind_method(_MD("get_vertex_edges","idx"),&MeshDataTool::get_vertex_edges);
- ObjectTypeDB::bind_method(_MD("get_vertex_faces","idx"),&MeshDataTool::get_vertex_faces);
+ ClassDB::bind_method(_MD("get_vertex_edges","idx"),&MeshDataTool::get_vertex_edges);
+ ClassDB::bind_method(_MD("get_vertex_faces","idx"),&MeshDataTool::get_vertex_faces);
- ObjectTypeDB::bind_method(_MD("get_edge_vertex","idx","vertex"),&MeshDataTool::get_edge_vertex);
- ObjectTypeDB::bind_method(_MD("get_edge_faces","idx","faces"),&MeshDataTool::get_edge_faces);
+ ClassDB::bind_method(_MD("get_edge_vertex","idx","vertex"),&MeshDataTool::get_edge_vertex);
+ ClassDB::bind_method(_MD("get_edge_faces","idx","faces"),&MeshDataTool::get_edge_faces);
- ObjectTypeDB::bind_method(_MD("set_edge_meta","idx","meta"),&MeshDataTool::set_edge_meta);
- ObjectTypeDB::bind_method(_MD("get_edge_meta","idx"),&MeshDataTool::get_edge_meta);
+ ClassDB::bind_method(_MD("set_edge_meta","idx","meta"),&MeshDataTool::set_edge_meta);
+ ClassDB::bind_method(_MD("get_edge_meta","idx"),&MeshDataTool::get_edge_meta);
- ObjectTypeDB::bind_method(_MD("get_face_vertex","idx","vertex"),&MeshDataTool::get_face_vertex);
- ObjectTypeDB::bind_method(_MD("get_face_edge","idx","edge"),&MeshDataTool::get_face_edge);
+ ClassDB::bind_method(_MD("get_face_vertex","idx","vertex"),&MeshDataTool::get_face_vertex);
+ ClassDB::bind_method(_MD("get_face_edge","idx","edge"),&MeshDataTool::get_face_edge);
- ObjectTypeDB::bind_method(_MD("set_face_meta","idx","meta"),&MeshDataTool::set_face_meta);
- ObjectTypeDB::bind_method(_MD("get_face_meta","idx"),&MeshDataTool::get_face_meta);
+ ClassDB::bind_method(_MD("set_face_meta","idx","meta"),&MeshDataTool::set_face_meta);
+ ClassDB::bind_method(_MD("get_face_meta","idx"),&MeshDataTool::get_face_meta);
- ObjectTypeDB::bind_method(_MD("get_face_normal","idx"),&MeshDataTool::get_face_normal);
+ ClassDB::bind_method(_MD("get_face_normal","idx"),&MeshDataTool::get_face_normal);
- ObjectTypeDB::bind_method(_MD("set_material","material:Material"),&MeshDataTool::set_material);
- ObjectTypeDB::bind_method(_MD("get_material","material"),&MeshDataTool::get_material);
+ ClassDB::bind_method(_MD("set_material","material:Material"),&MeshDataTool::set_material);
+ ClassDB::bind_method(_MD("get_material","material"),&MeshDataTool::get_material);
}
MeshDataTool::MeshDataTool(){
diff --git a/scene/resources/mesh_data_tool.h b/scene/resources/mesh_data_tool.h
index c0eb4c4b83..fa9c50d2ec 100644
--- a/scene/resources/mesh_data_tool.h
+++ b/scene/resources/mesh_data_tool.h
@@ -33,7 +33,7 @@
class MeshDataTool : public Reference {
- OBJ_TYPE(MeshDataTool,Reference);
+ GDCLASS(MeshDataTool,Reference);
int format;
diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp
index 329874767a..cc357c4d9b 100644
--- a/scene/resources/mesh_library.cpp
+++ b/scene/resources/mesh_library.cpp
@@ -244,19 +244,19 @@ int MeshLibrary::get_last_unused_item_id() const {
void MeshLibrary::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("create_item","id"),&MeshLibrary::create_item);
- ObjectTypeDB::bind_method(_MD("set_item_name","id","name"),&MeshLibrary::set_item_name);
- ObjectTypeDB::bind_method(_MD("set_item_mesh","id","mesh:Mesh"),&MeshLibrary::set_item_mesh);
- ObjectTypeDB::bind_method(_MD("set_item_navmesh","id","navmesh:NavigationMesh"),&MeshLibrary::set_item_navmesh);
- ObjectTypeDB::bind_method(_MD("set_item_shape","id","shape:Shape"),&MeshLibrary::set_item_shape);
- ObjectTypeDB::bind_method(_MD("get_item_name","id"),&MeshLibrary::get_item_name);
- ObjectTypeDB::bind_method(_MD("get_item_mesh:Mesh","id"),&MeshLibrary::get_item_mesh);
- ObjectTypeDB::bind_method(_MD("get_item_navmesh:NavigationMesh","id"),&MeshLibrary::get_item_navmesh);
- ObjectTypeDB::bind_method(_MD("get_item_shape:Shape","id"),&MeshLibrary::get_item_shape);
- ObjectTypeDB::bind_method(_MD("remove_item","id"),&MeshLibrary::remove_item);
- ObjectTypeDB::bind_method(_MD("clear"),&MeshLibrary::clear);
- ObjectTypeDB::bind_method(_MD("get_item_list"),&MeshLibrary::get_item_list);
- ObjectTypeDB::bind_method(_MD("get_last_unused_item_id"),&MeshLibrary::get_last_unused_item_id);
+ ClassDB::bind_method(_MD("create_item","id"),&MeshLibrary::create_item);
+ ClassDB::bind_method(_MD("set_item_name","id","name"),&MeshLibrary::set_item_name);
+ ClassDB::bind_method(_MD("set_item_mesh","id","mesh:Mesh"),&MeshLibrary::set_item_mesh);
+ ClassDB::bind_method(_MD("set_item_navmesh","id","navmesh:NavigationMesh"),&MeshLibrary::set_item_navmesh);
+ ClassDB::bind_method(_MD("set_item_shape","id","shape:Shape"),&MeshLibrary::set_item_shape);
+ ClassDB::bind_method(_MD("get_item_name","id"),&MeshLibrary::get_item_name);
+ ClassDB::bind_method(_MD("get_item_mesh:Mesh","id"),&MeshLibrary::get_item_mesh);
+ ClassDB::bind_method(_MD("get_item_navmesh:NavigationMesh","id"),&MeshLibrary::get_item_navmesh);
+ ClassDB::bind_method(_MD("get_item_shape:Shape","id"),&MeshLibrary::get_item_shape);
+ ClassDB::bind_method(_MD("remove_item","id"),&MeshLibrary::remove_item);
+ ClassDB::bind_method(_MD("clear"),&MeshLibrary::clear);
+ ClassDB::bind_method(_MD("get_item_list"),&MeshLibrary::get_item_list);
+ ClassDB::bind_method(_MD("get_last_unused_item_id"),&MeshLibrary::get_last_unused_item_id);
}
MeshLibrary::MeshLibrary() {
diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h
index 66b688ab22..bb8012d3ff 100644
--- a/scene/resources/mesh_library.h
+++ b/scene/resources/mesh_library.h
@@ -37,7 +37,7 @@
class MeshLibrary : public Resource {
- OBJ_TYPE(MeshLibrary,Resource);
+ GDCLASS(MeshLibrary,Resource);
RES_BASE_EXTENSION("gt");
struct Item {
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index b96ad155c0..802f58e8ca 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -211,26 +211,26 @@ MultiMesh::TransformFormat MultiMesh::get_transform_format() const{
void MultiMesh::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_mesh","mesh:Mesh"),&MultiMesh::set_mesh);
- ObjectTypeDB::bind_method(_MD("get_mesh:Mesh"),&MultiMesh::get_mesh);
- ObjectTypeDB::bind_method(_MD("set_color_format","format"),&MultiMesh::set_color_format);
- ObjectTypeDB::bind_method(_MD("get_color_format"),&MultiMesh::get_color_format);
- ObjectTypeDB::bind_method(_MD("set_transform_format","format"),&MultiMesh::set_transform_format);
- ObjectTypeDB::bind_method(_MD("get_transform_format"),&MultiMesh::get_transform_format);
-
- ObjectTypeDB::bind_method(_MD("set_instance_count","count"),&MultiMesh::set_instance_count);
- ObjectTypeDB::bind_method(_MD("get_instance_count"),&MultiMesh::get_instance_count);
- ObjectTypeDB::bind_method(_MD("set_instance_transform","instance","transform"),&MultiMesh::set_instance_transform);
- ObjectTypeDB::bind_method(_MD("get_instance_transform","instance"),&MultiMesh::get_instance_transform);
- ObjectTypeDB::bind_method(_MD("set_instance_color","instance","color"),&MultiMesh::set_instance_color);
- ObjectTypeDB::bind_method(_MD("get_instance_color","instance"),&MultiMesh::get_instance_color);
- ObjectTypeDB::bind_method(_MD("get_aabb"),&MultiMesh::get_aabb);
-
-
- ObjectTypeDB::bind_method(_MD("_set_transform_array"),&MultiMesh::_set_transform_array);
- ObjectTypeDB::bind_method(_MD("_get_transform_array"),&MultiMesh::_get_transform_array);
- ObjectTypeDB::bind_method(_MD("_set_color_array"),&MultiMesh::_set_color_array);
- ObjectTypeDB::bind_method(_MD("_get_color_array"),&MultiMesh::_get_color_array);
+ ClassDB::bind_method(_MD("set_mesh","mesh:Mesh"),&MultiMesh::set_mesh);
+ ClassDB::bind_method(_MD("get_mesh:Mesh"),&MultiMesh::get_mesh);
+ ClassDB::bind_method(_MD("set_color_format","format"),&MultiMesh::set_color_format);
+ ClassDB::bind_method(_MD("get_color_format"),&MultiMesh::get_color_format);
+ ClassDB::bind_method(_MD("set_transform_format","format"),&MultiMesh::set_transform_format);
+ ClassDB::bind_method(_MD("get_transform_format"),&MultiMesh::get_transform_format);
+
+ ClassDB::bind_method(_MD("set_instance_count","count"),&MultiMesh::set_instance_count);
+ ClassDB::bind_method(_MD("get_instance_count"),&MultiMesh::get_instance_count);
+ ClassDB::bind_method(_MD("set_instance_transform","instance","transform"),&MultiMesh::set_instance_transform);
+ ClassDB::bind_method(_MD("get_instance_transform","instance"),&MultiMesh::get_instance_transform);
+ ClassDB::bind_method(_MD("set_instance_color","instance","color"),&MultiMesh::set_instance_color);
+ ClassDB::bind_method(_MD("get_instance_color","instance"),&MultiMesh::get_instance_color);
+ ClassDB::bind_method(_MD("get_aabb"),&MultiMesh::get_aabb);
+
+
+ ClassDB::bind_method(_MD("_set_transform_array"),&MultiMesh::_set_transform_array);
+ ClassDB::bind_method(_MD("_get_transform_array"),&MultiMesh::_get_transform_array);
+ ClassDB::bind_method(_MD("_set_color_array"),&MultiMesh::_set_color_array);
+ ClassDB::bind_method(_MD("_get_color_array"),&MultiMesh::_get_color_array);
ADD_PROPERTY(PropertyInfo(Variant::INT,"color_format",PROPERTY_HINT_ENUM,"None,Byte,Float"), _SCS("set_color_format"), _SCS("get_color_format"));
diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h
index 85c8718aa7..ab2ef59214 100644
--- a/scene/resources/multimesh.h
+++ b/scene/resources/multimesh.h
@@ -34,7 +34,7 @@
class MultiMesh : public Resource {
- OBJ_TYPE( MultiMesh, Resource );
+ GDCLASS( MultiMesh, Resource );
RES_BASE_EXTENSION("mmsh");
public:
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 83b61af8fc..7d86513c51 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -148,10 +148,10 @@ Node *SceneState::instance(bool p_gen_edit_state) const {
}
#endif
}
- } else if (ObjectTypeDB::is_type_enabled(snames[n.type])) {
+ } else if (ClassDB::is_class_enabled(snames[n.type])) {
//print_line("created");
//node belongs to this scene and must be created
- Object * obj = ObjectTypeDB::instance(snames[ n.type ]);
+ Object * obj = ClassDB::instance(snames[ n.type ]);
if (!obj || !obj->cast_to<Node>()) {
if (obj) {
memdelete(obj);
@@ -639,7 +639,7 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
// then flag that the node should not be created but reused
if (pack_state_stack.empty()) {
//this node is not part of an instancing process, so save the type
- nd.type=_nm_get_string(p_node->get_type(),name_map);
+ nd.type=_nm_get_string(p_node->get_class(),name_map);
} else {
// this node is part of an instanced process, so do not save the type.
// instead, save that it was instanced
@@ -1674,25 +1674,25 @@ void SceneState::_bind_methods() {
//unbuild API
- ObjectTypeDB::bind_method(_MD("get_node_count"),&SceneState::get_node_count);
- ObjectTypeDB::bind_method(_MD("get_node_type","idx"),&SceneState::get_node_type);
- ObjectTypeDB::bind_method(_MD("get_node_name","idx"),&SceneState::get_node_name);
- ObjectTypeDB::bind_method(_MD("get_node_path","idx","for_parent"),&SceneState::get_node_path,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_node_owner_path","idx"),&SceneState::get_node_owner_path);
- ObjectTypeDB::bind_method(_MD("is_node_instance_placeholder","idx"),&SceneState::is_node_instance_placeholder);
- ObjectTypeDB::bind_method(_MD("get_node_instance_placeholder","idx"),&SceneState::get_node_instance_placeholder);
- ObjectTypeDB::bind_method(_MD("get_node_instance:PackedScene","idx"),&SceneState::get_node_instance);
- ObjectTypeDB::bind_method(_MD("get_node_groups","idx"),&SceneState::_get_node_groups);
- ObjectTypeDB::bind_method(_MD("get_node_property_count","idx"),&SceneState::get_node_property_count);
- ObjectTypeDB::bind_method(_MD("get_node_property_name","idx","prop_idx"),&SceneState::get_node_property_name);
- ObjectTypeDB::bind_method(_MD("get_node_property_value","idx","prop_idx"),&SceneState::get_node_property_value);
- ObjectTypeDB::bind_method(_MD("get_connection_count"),&SceneState::get_connection_count);
- ObjectTypeDB::bind_method(_MD("get_connection_source","idx"),&SceneState::get_connection_source);
- ObjectTypeDB::bind_method(_MD("get_connection_signal","idx"),&SceneState::get_connection_signal);
- ObjectTypeDB::bind_method(_MD("get_connection_target","idx"),&SceneState::get_connection_target);
- ObjectTypeDB::bind_method(_MD("get_connection_method","idx"),&SceneState::get_connection_method);
- ObjectTypeDB::bind_method(_MD("get_connection_flags","idx"),&SceneState::get_connection_flags);
- ObjectTypeDB::bind_method(_MD("get_connection_binds","idx"),&SceneState::get_connection_binds);
+ ClassDB::bind_method(_MD("get_node_count"),&SceneState::get_node_count);
+ ClassDB::bind_method(_MD("get_node_type","idx"),&SceneState::get_node_type);
+ ClassDB::bind_method(_MD("get_node_name","idx"),&SceneState::get_node_name);
+ ClassDB::bind_method(_MD("get_node_path","idx","for_parent"),&SceneState::get_node_path,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_node_owner_path","idx"),&SceneState::get_node_owner_path);
+ ClassDB::bind_method(_MD("is_node_instance_placeholder","idx"),&SceneState::is_node_instance_placeholder);
+ ClassDB::bind_method(_MD("get_node_instance_placeholder","idx"),&SceneState::get_node_instance_placeholder);
+ ClassDB::bind_method(_MD("get_node_instance:PackedScene","idx"),&SceneState::get_node_instance);
+ ClassDB::bind_method(_MD("get_node_groups","idx"),&SceneState::_get_node_groups);
+ ClassDB::bind_method(_MD("get_node_property_count","idx"),&SceneState::get_node_property_count);
+ ClassDB::bind_method(_MD("get_node_property_name","idx","prop_idx"),&SceneState::get_node_property_name);
+ ClassDB::bind_method(_MD("get_node_property_value","idx","prop_idx"),&SceneState::get_node_property_value);
+ ClassDB::bind_method(_MD("get_connection_count"),&SceneState::get_connection_count);
+ ClassDB::bind_method(_MD("get_connection_source","idx"),&SceneState::get_connection_source);
+ ClassDB::bind_method(_MD("get_connection_signal","idx"),&SceneState::get_connection_signal);
+ ClassDB::bind_method(_MD("get_connection_target","idx"),&SceneState::get_connection_target);
+ ClassDB::bind_method(_MD("get_connection_method","idx"),&SceneState::get_connection_method);
+ ClassDB::bind_method(_MD("get_connection_flags","idx"),&SceneState::get_connection_flags);
+ ClassDB::bind_method(_MD("get_connection_binds","idx"),&SceneState::get_connection_binds);
}
SceneState::SceneState() {
@@ -1791,12 +1791,12 @@ void PackedScene::set_path(const String& p_path,bool p_take_over) {
void PackedScene::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("pack","path:Node"),&PackedScene::pack);
- ObjectTypeDB::bind_method(_MD("instance:Node","gen_edit_state"),&PackedScene::instance,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("can_instance"),&PackedScene::can_instance);
- ObjectTypeDB::bind_method(_MD("_set_bundled_scene"),&PackedScene::_set_bundled_scene);
- ObjectTypeDB::bind_method(_MD("_get_bundled_scene"),&PackedScene::_get_bundled_scene);
- ObjectTypeDB::bind_method(_MD("get_state:SceneState"),&PackedScene::get_state);
+ ClassDB::bind_method(_MD("pack","path:Node"),&PackedScene::pack);
+ ClassDB::bind_method(_MD("instance:Node","gen_edit_state"),&PackedScene::instance,DEFVAL(false));
+ ClassDB::bind_method(_MD("can_instance"),&PackedScene::can_instance);
+ ClassDB::bind_method(_MD("_set_bundled_scene"),&PackedScene::_set_bundled_scene);
+ ClassDB::bind_method(_MD("_get_bundled_scene"),&PackedScene::_get_bundled_scene);
+ ClassDB::bind_method(_MD("get_state:SceneState"),&PackedScene::get_state);
ADD_PROPERTY( PropertyInfo(Variant::DICTIONARY,"_bundled"),_SCS("_set_bundled_scene"),_SCS("_get_bundled_scene"));
diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h
index 186324edbe..2eda624dc3 100644
--- a/scene/resources/packed_scene.h
+++ b/scene/resources/packed_scene.h
@@ -35,7 +35,7 @@
class SceneState : public Reference {
- OBJ_TYPE( SceneState, Reference );
+ GDCLASS( SceneState, Reference );
Vector<StringName> names;
@@ -189,7 +189,7 @@ public:
class PackedScene : public Resource {
- OBJ_TYPE(PackedScene, Resource );
+ GDCLASS(PackedScene, Resource );
RES_BASE_EXTENSION("scn");
Ref<SceneState> state;
diff --git a/scene/resources/plane_shape.cpp b/scene/resources/plane_shape.cpp
index c739d24da8..1814eea66c 100644
--- a/scene/resources/plane_shape.cpp
+++ b/scene/resources/plane_shape.cpp
@@ -80,8 +80,8 @@ Plane PlaneShape::get_plane() const {
void PlaneShape::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_plane","plane"),&PlaneShape::set_plane);
- ObjectTypeDB::bind_method(_MD("get_plane"),&PlaneShape::get_plane);
+ ClassDB::bind_method(_MD("set_plane","plane"),&PlaneShape::set_plane);
+ ClassDB::bind_method(_MD("get_plane"),&PlaneShape::get_plane);
ADD_PROPERTY( PropertyInfo(Variant::PLANE,"plane"), _SCS("set_plane"), _SCS("get_plane") );
diff --git a/scene/resources/plane_shape.h b/scene/resources/plane_shape.h
index d911ce78af..88f3a04f05 100644
--- a/scene/resources/plane_shape.h
+++ b/scene/resources/plane_shape.h
@@ -33,7 +33,7 @@
class PlaneShape : public Shape {
- OBJ_TYPE(PlaneShape,Shape);
+ GDCLASS(PlaneShape,Shape);
Plane plane;
protected:
diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp
index a4afe160f4..3dc3e6005a 100644
--- a/scene/resources/polygon_path_finder.cpp
+++ b/scene/resources/polygon_path_finder.cpp
@@ -618,17 +618,17 @@ float PolygonPathFinder::get_point_penalty(int p_point) const {
void PolygonPathFinder::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("setup","points","connections"),&PolygonPathFinder::setup);
- ObjectTypeDB::bind_method(_MD("find_path","from","to"),&PolygonPathFinder::find_path);
- ObjectTypeDB::bind_method(_MD("get_intersections","from","to"),&PolygonPathFinder::get_intersections);
- ObjectTypeDB::bind_method(_MD("get_closest_point","point"),&PolygonPathFinder::get_closest_point);
- ObjectTypeDB::bind_method(_MD("is_point_inside","point"),&PolygonPathFinder::is_point_inside);
- ObjectTypeDB::bind_method(_MD("set_point_penalty","idx","penalty"),&PolygonPathFinder::set_point_penalty);
- ObjectTypeDB::bind_method(_MD("get_point_penalty","idx"),&PolygonPathFinder::get_point_penalty);
-
- ObjectTypeDB::bind_method(_MD("get_bounds"),&PolygonPathFinder::get_bounds);
- ObjectTypeDB::bind_method(_MD("_set_data"),&PolygonPathFinder::_set_data);
- ObjectTypeDB::bind_method(_MD("_get_data"),&PolygonPathFinder::_get_data);
+ ClassDB::bind_method(_MD("setup","points","connections"),&PolygonPathFinder::setup);
+ ClassDB::bind_method(_MD("find_path","from","to"),&PolygonPathFinder::find_path);
+ ClassDB::bind_method(_MD("get_intersections","from","to"),&PolygonPathFinder::get_intersections);
+ ClassDB::bind_method(_MD("get_closest_point","point"),&PolygonPathFinder::get_closest_point);
+ ClassDB::bind_method(_MD("is_point_inside","point"),&PolygonPathFinder::is_point_inside);
+ ClassDB::bind_method(_MD("set_point_penalty","idx","penalty"),&PolygonPathFinder::set_point_penalty);
+ ClassDB::bind_method(_MD("get_point_penalty","idx"),&PolygonPathFinder::get_point_penalty);
+
+ ClassDB::bind_method(_MD("get_bounds"),&PolygonPathFinder::get_bounds);
+ ClassDB::bind_method(_MD("_set_data"),&PolygonPathFinder::_set_data);
+ ClassDB::bind_method(_MD("_get_data"),&PolygonPathFinder::_get_data);
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY,"data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_data"),_SCS("_get_data"));
diff --git a/scene/resources/polygon_path_finder.h b/scene/resources/polygon_path_finder.h
index 2459704ac2..58b8023843 100644
--- a/scene/resources/polygon_path_finder.h
+++ b/scene/resources/polygon_path_finder.h
@@ -33,7 +33,7 @@
class PolygonPathFinder : public Resource {
- OBJ_TYPE(PolygonPathFinder,Resource);
+ GDCLASS(PolygonPathFinder,Resource);
struct Point {
Vector2 pos;
diff --git a/scene/resources/ray_shape.cpp b/scene/resources/ray_shape.cpp
index cbf9c2c179..226062bed3 100644
--- a/scene/resources/ray_shape.cpp
+++ b/scene/resources/ray_shape.cpp
@@ -60,8 +60,8 @@ float RayShape::get_length() const {
void RayShape::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_length","length"),&RayShape::set_length);
- ObjectTypeDB::bind_method(_MD("get_length"),&RayShape::get_length);
+ ClassDB::bind_method(_MD("set_length","length"),&RayShape::set_length);
+ ClassDB::bind_method(_MD("get_length"),&RayShape::get_length);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"length",PROPERTY_HINT_RANGE,"0,4096,0.01"), _SCS("set_length"), _SCS("get_length") );
diff --git a/scene/resources/ray_shape.h b/scene/resources/ray_shape.h
index ee56adde73..9ee59d5f91 100644
--- a/scene/resources/ray_shape.h
+++ b/scene/resources/ray_shape.h
@@ -32,7 +32,7 @@
class RayShape : public Shape {
- OBJ_TYPE(RayShape,Shape);
+ GDCLASS(RayShape,Shape);
float length;
protected:
diff --git a/scene/resources/rectangle_shape_2d.cpp b/scene/resources/rectangle_shape_2d.cpp
index 04a26bc54d..3272125b33 100644
--- a/scene/resources/rectangle_shape_2d.cpp
+++ b/scene/resources/rectangle_shape_2d.cpp
@@ -64,8 +64,8 @@ Rect2 RectangleShape2D::get_rect() const {
void RectangleShape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_extents","extents"),&RectangleShape2D::set_extents);
- ObjectTypeDB::bind_method(_MD("get_extents"),&RectangleShape2D::get_extents);
+ ClassDB::bind_method(_MD("set_extents","extents"),&RectangleShape2D::set_extents);
+ ClassDB::bind_method(_MD("get_extents"),&RectangleShape2D::get_extents);
diff --git a/scene/resources/rectangle_shape_2d.h b/scene/resources/rectangle_shape_2d.h
index 2c9ee04e07..6682b67de0 100644
--- a/scene/resources/rectangle_shape_2d.h
+++ b/scene/resources/rectangle_shape_2d.h
@@ -32,7 +32,7 @@
#include "scene/resources/shape_2d.h"
class RectangleShape2D : public Shape2D {
- OBJ_TYPE( RectangleShape2D, Shape2D );
+ GDCLASS( RectangleShape2D, Shape2D );
Vector2 extents;
void _update_shape();
diff --git a/scene/resources/room.cpp b/scene/resources/room.cpp
index dd833a3f2a..c4d11b94d1 100644
--- a/scene/resources/room.cpp
+++ b/scene/resources/room.cpp
@@ -52,8 +52,8 @@ DVector<Face3> RoomBounds::get_geometry_hint() const {
void RoomBounds::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_geometry_hint","triangles"),&RoomBounds::set_geometry_hint);
- ObjectTypeDB::bind_method(_MD("get_geometry_hint"),&RoomBounds::get_geometry_hint);
+ ClassDB::bind_method(_MD("set_geometry_hint","triangles"),&RoomBounds::set_geometry_hint);
+ ClassDB::bind_method(_MD("get_geometry_hint"),&RoomBounds::get_geometry_hint);
//ADD_PROPERTY( PropertyInfo( Variant::DICTIONARY, "bounds"), _SCS("set_bounds"),_SCS("get_bounds") );
ADD_PROPERTY( PropertyInfo( Variant::VECTOR3_ARRAY, "geometry_hint"),_SCS("set_geometry_hint"),_SCS("get_geometry_hint") );
diff --git a/scene/resources/room.h b/scene/resources/room.h
index 6ecd7e846d..6a8deac8b3 100644
--- a/scene/resources/room.h
+++ b/scene/resources/room.h
@@ -37,7 +37,7 @@
class RoomBounds : public Resource {
- OBJ_TYPE( RoomBounds, Resource );
+ GDCLASS( RoomBounds, Resource );
RES_BASE_EXTENSION("room");
RID area;
diff --git a/scene/resources/sample.cpp b/scene/resources/sample.cpp
index 995dc42901..8ea02ac943 100644
--- a/scene/resources/sample.cpp
+++ b/scene/resources/sample.cpp
@@ -192,23 +192,23 @@ RID Sample::get_rid() const {
void Sample::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("create","format","stereo","length"),&Sample::create);
- ObjectTypeDB::bind_method(_MD("get_format"),&Sample::get_format);
- ObjectTypeDB::bind_method(_MD("is_stereo"),&Sample::is_stereo);
- ObjectTypeDB::bind_method(_MD("get_length"),&Sample::get_length);
- ObjectTypeDB::bind_method(_MD("set_data","data"),&Sample::set_data);
- ObjectTypeDB::bind_method(_MD("get_data"),&Sample::get_data);
- ObjectTypeDB::bind_method(_MD("set_mix_rate","hz"),&Sample::set_mix_rate);
- ObjectTypeDB::bind_method(_MD("get_mix_rate"),&Sample::get_mix_rate);
- ObjectTypeDB::bind_method(_MD("set_loop_format","format"),&Sample::set_loop_format);
- ObjectTypeDB::bind_method(_MD("get_loop_format"),&Sample::get_loop_format);
- ObjectTypeDB::bind_method(_MD("set_loop_begin","pos"),&Sample::set_loop_begin);
- ObjectTypeDB::bind_method(_MD("get_loop_begin"),&Sample::get_loop_begin);
- ObjectTypeDB::bind_method(_MD("set_loop_end","pos"),&Sample::set_loop_end);
- ObjectTypeDB::bind_method(_MD("get_loop_end"),&Sample::get_loop_end);
-
- ObjectTypeDB::bind_method(_MD("_set_data"),&Sample::_set_data);
- ObjectTypeDB::bind_method(_MD("_get_data"),&Sample::_get_data);
+ ClassDB::bind_method(_MD("create","format","stereo","length"),&Sample::create);
+ ClassDB::bind_method(_MD("get_format"),&Sample::get_format);
+ ClassDB::bind_method(_MD("is_stereo"),&Sample::is_stereo);
+ ClassDB::bind_method(_MD("get_length"),&Sample::get_length);
+ ClassDB::bind_method(_MD("set_data","data"),&Sample::set_data);
+ ClassDB::bind_method(_MD("get_data"),&Sample::get_data);
+ ClassDB::bind_method(_MD("set_mix_rate","hz"),&Sample::set_mix_rate);
+ ClassDB::bind_method(_MD("get_mix_rate"),&Sample::get_mix_rate);
+ ClassDB::bind_method(_MD("set_loop_format","format"),&Sample::set_loop_format);
+ ClassDB::bind_method(_MD("get_loop_format"),&Sample::get_loop_format);
+ ClassDB::bind_method(_MD("set_loop_begin","pos"),&Sample::set_loop_begin);
+ ClassDB::bind_method(_MD("get_loop_begin"),&Sample::get_loop_begin);
+ ClassDB::bind_method(_MD("set_loop_end","pos"),&Sample::set_loop_end);
+ ClassDB::bind_method(_MD("get_loop_end"),&Sample::get_loop_end);
+
+ ClassDB::bind_method(_MD("_set_data"),&Sample::_set_data);
+ ClassDB::bind_method(_MD("_get_data"),&Sample::_get_data);
ADD_PROPERTY( PropertyInfo( Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), _SCS("_set_data"), _SCS("_get_data") );
ADD_PROPERTY( PropertyInfo( Variant::BOOL, "stereo"), _SCS(""), _SCS("is_stereo") );
diff --git a/scene/resources/sample.h b/scene/resources/sample.h
index a59c52fd96..c011f63144 100644
--- a/scene/resources/sample.h
+++ b/scene/resources/sample.h
@@ -34,7 +34,7 @@
class Sample : public Resource {
- OBJ_TYPE(Sample, Resource );
+ GDCLASS(Sample, Resource );
RES_BASE_EXTENSION("smp");
public:
diff --git a/scene/resources/sample_library.cpp b/scene/resources/sample_library.cpp
index 7de646b6e8..44895df8fa 100644
--- a/scene/resources/sample_library.cpp
+++ b/scene/resources/sample_library.cpp
@@ -194,18 +194,18 @@ Array SampleLibrary::_get_sample_list() const {
void SampleLibrary::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_sample","name","sample:Sample"),&SampleLibrary::add_sample );
- ObjectTypeDB::bind_method(_MD("get_sample:Sample","name"),&SampleLibrary::get_sample );
- ObjectTypeDB::bind_method(_MD("has_sample","name"),&SampleLibrary::has_sample );
- ObjectTypeDB::bind_method(_MD("remove_sample","name"),&SampleLibrary::remove_sample );
+ ClassDB::bind_method(_MD("add_sample","name","sample:Sample"),&SampleLibrary::add_sample );
+ ClassDB::bind_method(_MD("get_sample:Sample","name"),&SampleLibrary::get_sample );
+ ClassDB::bind_method(_MD("has_sample","name"),&SampleLibrary::has_sample );
+ ClassDB::bind_method(_MD("remove_sample","name"),&SampleLibrary::remove_sample );
- ObjectTypeDB::bind_method(_MD("get_sample_list"),&SampleLibrary::_get_sample_list );
+ ClassDB::bind_method(_MD("get_sample_list"),&SampleLibrary::_get_sample_list );
- ObjectTypeDB::bind_method(_MD("sample_set_volume_db","name","db"),&SampleLibrary::sample_set_volume_db );
- ObjectTypeDB::bind_method(_MD("sample_get_volume_db","name"),&SampleLibrary::sample_get_volume_db );
+ ClassDB::bind_method(_MD("sample_set_volume_db","name","db"),&SampleLibrary::sample_set_volume_db );
+ ClassDB::bind_method(_MD("sample_get_volume_db","name"),&SampleLibrary::sample_get_volume_db );
- ObjectTypeDB::bind_method(_MD("sample_set_pitch_scale","name","pitch"),&SampleLibrary::sample_set_pitch_scale );
- ObjectTypeDB::bind_method(_MD("sample_get_pitch_scale","name"),&SampleLibrary::sample_get_pitch_scale );
+ ClassDB::bind_method(_MD("sample_set_pitch_scale","name","pitch"),&SampleLibrary::sample_set_pitch_scale );
+ ClassDB::bind_method(_MD("sample_get_pitch_scale","name"),&SampleLibrary::sample_get_pitch_scale );
}
diff --git a/scene/resources/sample_library.h b/scene/resources/sample_library.h
index 0cb6186fd5..d09eea64c5 100644
--- a/scene/resources/sample_library.h
+++ b/scene/resources/sample_library.h
@@ -35,7 +35,7 @@
class SampleLibrary : public Resource {
- OBJ_TYPE(SampleLibrary,Resource);
+ GDCLASS(SampleLibrary,Resource);
struct SampleData {
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp
index 799c31e46e..8bbc6ff32b 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/scene_format_text.cpp
@@ -240,7 +240,7 @@ Error ResourceInteractiveLoaderText::poll() {
if ( !ResourceCache::has(path)) { //only if it doesn't exist
- Object *obj = ObjectTypeDB::instance(type);
+ Object *obj = ClassDB::instance(type);
if (!obj) {
error_text+="Can't create sub resource of type: "+type;
@@ -310,7 +310,7 @@ Error ResourceInteractiveLoaderText::poll() {
return error;
}
- Object *obj = ObjectTypeDB::instance(res_type);
+ Object *obj = ClassDB::instance(res_type);
if (!obj) {
error_text+="Can't create sub resource of type: "+res_type;
@@ -1206,7 +1206,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re
{
String title=packed_scene.is_valid()?"[gd_scene ":"[gd_resource ";
if (packed_scene.is_null())
- title+="type=\""+p_resource->get_type()+"\" ";
+ title+="type=\""+p_resource->get_class()+"\" ";
int load_steps=saved_resources.size()+external_resources.size();
//if (packed_scene.is_valid()) {
// load_steps+=packed_scene->get_node_count();
@@ -1235,7 +1235,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re
for(int i=0;i<sorted_er.size();i++) {
String p = sorted_er[i]->get_path();
- f->store_string("[ext_resource path=\""+p+"\" type=\""+sorted_er[i]->get_save_type()+"\" id="+itos(i+1)+"]\n"); //bundled
+ f->store_string("[ext_resource path=\""+p+"\" type=\""+sorted_er[i]->get_save_class()+"\" id="+itos(i+1)+"]\n"); //bundled
}
if (external_resources.size())
@@ -1282,7 +1282,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re
}
int idx = res->get_subindex();
- line+="type=\""+res->get_type()+"\" id="+itos(idx);
+ line+="type=\""+res->get_class()+"\" id="+itos(idx);
f->store_line(line+"]\n");
if (takeover_paths) {
res->set_path(p_path+"::"+itos(idx),true);
@@ -1451,7 +1451,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re
Error ResourceFormatSaverText::save(const String &p_path,const RES& p_resource,uint32_t p_flags) {
- if (p_path.ends_with(".sct") && p_resource->get_type()!="PackedScene") {
+ if (p_path.ends_with(".sct") && p_resource->get_class()!="PackedScene") {
return ERR_FILE_UNRECOGNIZED;
}
@@ -1467,7 +1467,7 @@ bool ResourceFormatSaverText::recognize(const RES& p_resource) const {
}
void ResourceFormatSaverText::get_recognized_extensions(const RES& p_resource,List<String> *p_extensions) const {
- if (p_resource->get_type()=="PackedScene")
+ if (p_resource->get_class()=="PackedScene")
p_extensions->push_back("tscn"); //text scene
else
p_extensions->push_back("tres"); //text resource
diff --git a/scene/resources/scene_preloader.cpp b/scene/resources/scene_preloader.cpp
index 6fa4e059e1..575c188009 100644
--- a/scene/resources/scene_preloader.cpp
+++ b/scene/resources/scene_preloader.cpp
@@ -60,12 +60,12 @@ Node *ScenePreloader::instance() const {
const NodeData &n=nd[i];
- if (!ObjectTypeDB::is_type_enabled(snames[n.type])) {
+ if (!ClassDB::is_class_enabled(snames[n.type])) {
ret_nodes[i]=NULL;
continue;
}
- Object * obj = ObjectTypeDB::instance(snames[ n.type ]);
+ Object * obj = ClassDB::instance(snames[ n.type ]);
ERR_FAIL_COND_V(!obj,NULL);
Node *node = obj->cast_to<Node>();
ERR_FAIL_COND_V(!node,NULL);
@@ -149,7 +149,7 @@ void ScenePreloader::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Ma
NodeData nd;
nd.name=_nm_get_string(p_node->get_name(),name_map);
- nd.type=_nm_get_string(p_node->get_type(),name_map);
+ nd.type=_nm_get_string(p_node->get_class(),name_map);
nd.parent=p_parent_idx;
List<PropertyInfo> plist;
@@ -423,12 +423,12 @@ Dictionary ScenePreloader::_get_bundled_scene() const {
void ScenePreloader::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("load_scene","path"),&ScenePreloader::load_scene);
- ObjectTypeDB::bind_method(_MD("get_scene_path"),&ScenePreloader::get_scene_path);
- ObjectTypeDB::bind_method(_MD("instance:Node"),&ScenePreloader::instance);
- ObjectTypeDB::bind_method(_MD("can_instance"),&ScenePreloader::can_instance);
- ObjectTypeDB::bind_method(_MD("_set_bundled_scene"),&ScenePreloader::_set_bundled_scene);
- ObjectTypeDB::bind_method(_MD("_get_bundled_scene"),&ScenePreloader::_get_bundled_scene);
+ ClassDB::bind_method(_MD("load_scene","path"),&ScenePreloader::load_scene);
+ ClassDB::bind_method(_MD("get_scene_path"),&ScenePreloader::get_scene_path);
+ ClassDB::bind_method(_MD("instance:Node"),&ScenePreloader::instance);
+ ClassDB::bind_method(_MD("can_instance"),&ScenePreloader::can_instance);
+ ClassDB::bind_method(_MD("_set_bundled_scene"),&ScenePreloader::_set_bundled_scene);
+ ClassDB::bind_method(_MD("_get_bundled_scene"),&ScenePreloader::_get_bundled_scene);
ADD_PROPERTY( PropertyInfo(Variant::DICTIONARY,"_bundled",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_BUNDLE),_SCS("_set_bundled_scene"),_SCS("_get_bundled_scene"));
#if 0
diff --git a/scene/resources/scene_preloader.h b/scene/resources/scene_preloader.h
index 6fe975bb7a..315d6be6b1 100644
--- a/scene/resources/scene_preloader.h
+++ b/scene/resources/scene_preloader.h
@@ -34,7 +34,7 @@
class ScenePreloader : public Resource {
- OBJ_TYPE( ScenePreloader, Resource );
+ GDCLASS( ScenePreloader, Resource );
Vector<StringName> names;
Vector<Variant> variants;
diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/segment_shape_2d.cpp
index d0ae791905..71d5a8efa8 100644
--- a/scene/resources/segment_shape_2d.cpp
+++ b/scene/resources/segment_shape_2d.cpp
@@ -82,11 +82,11 @@ Rect2 SegmentShape2D::get_rect() const{
void SegmentShape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_a","a"),&SegmentShape2D::set_a);
- ObjectTypeDB::bind_method(_MD("get_a"),&SegmentShape2D::get_a);
+ ClassDB::bind_method(_MD("set_a","a"),&SegmentShape2D::set_a);
+ ClassDB::bind_method(_MD("get_a"),&SegmentShape2D::get_a);
- ObjectTypeDB::bind_method(_MD("set_b","b"),&SegmentShape2D::set_b);
- ObjectTypeDB::bind_method(_MD("get_b"),&SegmentShape2D::get_b);
+ ClassDB::bind_method(_MD("set_b","b"),&SegmentShape2D::set_b);
+ ClassDB::bind_method(_MD("get_b"),&SegmentShape2D::get_b);
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"a"),_SCS("set_a"),_SCS("get_a") );
@@ -145,8 +145,8 @@ Rect2 RayShape2D::get_rect() const {
void RayShape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_length","length"),&RayShape2D::set_length);
- ObjectTypeDB::bind_method(_MD("get_length"),&RayShape2D::get_length);
+ ClassDB::bind_method(_MD("set_length","length"),&RayShape2D::set_length);
+ ClassDB::bind_method(_MD("get_length"),&RayShape2D::get_length);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"length"),_SCS("set_length"),_SCS("get_length") );
diff --git a/scene/resources/segment_shape_2d.h b/scene/resources/segment_shape_2d.h
index 0a9de96f0f..775bdabe9d 100644
--- a/scene/resources/segment_shape_2d.h
+++ b/scene/resources/segment_shape_2d.h
@@ -32,7 +32,7 @@
#include "scene/resources/shape_2d.h"
class SegmentShape2D : public Shape2D {
- OBJ_TYPE( SegmentShape2D, Shape2D );
+ GDCLASS( SegmentShape2D, Shape2D );
Vector2 a;
Vector2 b;
@@ -57,7 +57,7 @@ public:
class RayShape2D : public Shape2D {
- OBJ_TYPE( RayShape2D, Shape2D );
+ GDCLASS( RayShape2D, Shape2D );
real_t length;
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index 3ce1a00af4..6afbf32c35 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -116,17 +116,17 @@ bool Shader::has_param(const StringName& p_param) const {
void Shader::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_mode"),&Shader::get_mode);
+ ClassDB::bind_method(_MD("get_mode"),&Shader::get_mode);
- ObjectTypeDB::bind_method(_MD("set_code","code"),&Shader::set_code);
- ObjectTypeDB::bind_method(_MD("get_code"),&Shader::get_code);
+ ClassDB::bind_method(_MD("set_code","code"),&Shader::set_code);
+ ClassDB::bind_method(_MD("get_code"),&Shader::get_code);
- ObjectTypeDB::bind_method(_MD("set_default_texture_param","param","texture:Texture"),&Shader::set_default_texture_param);
- ObjectTypeDB::bind_method(_MD("get_default_texture_param:Texture","param"),&Shader::get_default_texture_param);
+ ClassDB::bind_method(_MD("set_default_texture_param","param","texture:Texture"),&Shader::set_default_texture_param);
+ ClassDB::bind_method(_MD("get_default_texture_param:Texture","param"),&Shader::get_default_texture_param);
- ObjectTypeDB::bind_method(_MD("has_param","name"),&Shader::has_param);
+ ClassDB::bind_method(_MD("has_param","name"),&Shader::has_param);
- //ObjectTypeDB::bind_method(_MD("get_param_list"),&Shader::get_fragment_code);
+ //ClassDB::bind_method(_MD("get_param_list"),&Shader::get_fragment_code);
ADD_PROPERTY( PropertyInfo(Variant::STRING, "code",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("set_code"), _SCS("get_code") );
diff --git a/scene/resources/shader.h b/scene/resources/shader.h
index 279cf5b7c9..59d7601d98 100644
--- a/scene/resources/shader.h
+++ b/scene/resources/shader.h
@@ -35,7 +35,7 @@
class Shader : public Resource {
- OBJ_TYPE(Shader,Resource);
+ GDCLASS(Shader,Resource);
OBJ_SAVE_TYPE( Shader );
RES_BASE_EXTENSION("shd");
@@ -102,7 +102,7 @@ VARIANT_ENUM_CAST( Shader::Mode );
class SpatialShader : public Shader {
- OBJ_TYPE(SpatialShader,Shader);
+ GDCLASS(SpatialShader,Shader);
public:
@@ -111,7 +111,7 @@ public:
class CanvasItemShader : public Shader {
- OBJ_TYPE(CanvasItemShader,Shader);
+ GDCLASS(CanvasItemShader,Shader);
public:
@@ -121,7 +121,7 @@ public:
class ParticlesShader : public Shader {
- OBJ_TYPE(ParticlesShader,Shader);
+ GDCLASS(ParticlesShader,Shader);
public:
diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp
index f56aa8dbc1..0c31e1406f 100644
--- a/scene/resources/shader_graph.cpp
+++ b/scene/resources/shader_graph.cpp
@@ -165,106 +165,106 @@ int ShaderGraph::node_count(ShaderType p_which, int p_type)
void ShaderGraph::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_update_shader"),&ShaderGraph::_update_shader);
+ ClassDB::bind_method(_MD("_update_shader"),&ShaderGraph::_update_shader);
- ObjectTypeDB::bind_method(_MD("node_add","shader_type","node_type","id"),&ShaderGraph::node_add);
- ObjectTypeDB::bind_method(_MD("node_remove","shader_type","id"),&ShaderGraph::node_remove);
- ObjectTypeDB::bind_method(_MD("node_set_pos","shader_type","id","pos"),&ShaderGraph::node_set_pos);
- ObjectTypeDB::bind_method(_MD("node_get_pos","shader_type","id"),&ShaderGraph::node_get_pos);
+ ClassDB::bind_method(_MD("node_add","shader_type","node_type","id"),&ShaderGraph::node_add);
+ ClassDB::bind_method(_MD("node_remove","shader_type","id"),&ShaderGraph::node_remove);
+ ClassDB::bind_method(_MD("node_set_pos","shader_type","id","pos"),&ShaderGraph::node_set_pos);
+ ClassDB::bind_method(_MD("node_get_pos","shader_type","id"),&ShaderGraph::node_get_pos);
- ObjectTypeDB::bind_method(_MD("node_get_type","shader_type","id"),&ShaderGraph::node_get_type);
+ ClassDB::bind_method(_MD("node_get_type","shader_type","id"),&ShaderGraph::node_get_type);
- ObjectTypeDB::bind_method(_MD("get_node_list","shader_type"),&ShaderGraph::_get_node_list);
+ ClassDB::bind_method(_MD("get_node_list","shader_type"),&ShaderGraph::_get_node_list);
- ObjectTypeDB::bind_method(_MD("default_set_value","shader_type","id","param_id","value"), &ShaderGraph::default_set_value);
- ObjectTypeDB::bind_method(_MD("default_get_value","shader_type","id","param_id"), &ShaderGraph::default_get_value);
+ ClassDB::bind_method(_MD("default_set_value","shader_type","id","param_id","value"), &ShaderGraph::default_set_value);
+ ClassDB::bind_method(_MD("default_get_value","shader_type","id","param_id"), &ShaderGraph::default_get_value);
- ObjectTypeDB::bind_method(_MD("scalar_const_node_set_value","shader_type","id","value"),&ShaderGraph::scalar_const_node_set_value);
- ObjectTypeDB::bind_method(_MD("scalar_const_node_get_value","shader_type","id"),&ShaderGraph::scalar_const_node_get_value);
+ ClassDB::bind_method(_MD("scalar_const_node_set_value","shader_type","id","value"),&ShaderGraph::scalar_const_node_set_value);
+ ClassDB::bind_method(_MD("scalar_const_node_get_value","shader_type","id"),&ShaderGraph::scalar_const_node_get_value);
- ObjectTypeDB::bind_method(_MD("vec_const_node_set_value","shader_type","id","value"),&ShaderGraph::vec_const_node_set_value);
- ObjectTypeDB::bind_method(_MD("vec_const_node_get_value","shader_type","id"),&ShaderGraph::vec_const_node_get_value);
+ ClassDB::bind_method(_MD("vec_const_node_set_value","shader_type","id","value"),&ShaderGraph::vec_const_node_set_value);
+ ClassDB::bind_method(_MD("vec_const_node_get_value","shader_type","id"),&ShaderGraph::vec_const_node_get_value);
- ObjectTypeDB::bind_method(_MD("rgb_const_node_set_value","shader_type","id","value"),&ShaderGraph::rgb_const_node_set_value);
- ObjectTypeDB::bind_method(_MD("rgb_const_node_get_value","shader_type","id"),&ShaderGraph::rgb_const_node_get_value);
+ ClassDB::bind_method(_MD("rgb_const_node_set_value","shader_type","id","value"),&ShaderGraph::rgb_const_node_set_value);
+ ClassDB::bind_method(_MD("rgb_const_node_get_value","shader_type","id"),&ShaderGraph::rgb_const_node_get_value);
- ObjectTypeDB::bind_method(_MD("xform_const_node_set_value","shader_type","id","value"),&ShaderGraph::xform_const_node_set_value);
- ObjectTypeDB::bind_method(_MD("xform_const_node_get_value","shader_type","id"),&ShaderGraph::xform_const_node_get_value);
+ ClassDB::bind_method(_MD("xform_const_node_set_value","shader_type","id","value"),&ShaderGraph::xform_const_node_set_value);
+ ClassDB::bind_method(_MD("xform_const_node_get_value","shader_type","id"),&ShaderGraph::xform_const_node_get_value);
// void get_node_list(ShaderType p_which,List<int> *p_node_list) const;
- ObjectTypeDB::bind_method(_MD("texture_node_set_filter_size","shader_type","id","filter_size"),&ShaderGraph::texture_node_set_filter_size);
- ObjectTypeDB::bind_method(_MD("texture_node_get_filter_size","shader_type","id"),&ShaderGraph::texture_node_get_filter_size);
+ ClassDB::bind_method(_MD("texture_node_set_filter_size","shader_type","id","filter_size"),&ShaderGraph::texture_node_set_filter_size);
+ ClassDB::bind_method(_MD("texture_node_get_filter_size","shader_type","id"),&ShaderGraph::texture_node_get_filter_size);
- ObjectTypeDB::bind_method(_MD("texture_node_set_filter_strength","shader_type","id","filter_strength"),&ShaderGraph::texture_node_set_filter_strength);
- ObjectTypeDB::bind_method(_MD("texture_node_get_filter_strength","shader_type","id"),&ShaderGraph::texture_node_get_filter_strength);
+ ClassDB::bind_method(_MD("texture_node_set_filter_strength","shader_type","id","filter_strength"),&ShaderGraph::texture_node_set_filter_strength);
+ ClassDB::bind_method(_MD("texture_node_get_filter_strength","shader_type","id"),&ShaderGraph::texture_node_get_filter_strength);
- ObjectTypeDB::bind_method(_MD("scalar_op_node_set_op","shader_type","id","op"),&ShaderGraph::scalar_op_node_set_op);
- ObjectTypeDB::bind_method(_MD("scalar_op_node_get_op","shader_type","id"),&ShaderGraph::scalar_op_node_get_op);
+ ClassDB::bind_method(_MD("scalar_op_node_set_op","shader_type","id","op"),&ShaderGraph::scalar_op_node_set_op);
+ ClassDB::bind_method(_MD("scalar_op_node_get_op","shader_type","id"),&ShaderGraph::scalar_op_node_get_op);
- ObjectTypeDB::bind_method(_MD("vec_op_node_set_op","shader_type","id","op"),&ShaderGraph::vec_op_node_set_op);
- ObjectTypeDB::bind_method(_MD("vec_op_node_get_op","shader_type","id"),&ShaderGraph::vec_op_node_get_op);
+ ClassDB::bind_method(_MD("vec_op_node_set_op","shader_type","id","op"),&ShaderGraph::vec_op_node_set_op);
+ ClassDB::bind_method(_MD("vec_op_node_get_op","shader_type","id"),&ShaderGraph::vec_op_node_get_op);
- ObjectTypeDB::bind_method(_MD("vec_scalar_op_node_set_op","shader_type","id","op"),&ShaderGraph::vec_scalar_op_node_set_op);
- ObjectTypeDB::bind_method(_MD("vec_scalar_op_node_get_op","shader_type","id"),&ShaderGraph::vec_scalar_op_node_get_op);
+ ClassDB::bind_method(_MD("vec_scalar_op_node_set_op","shader_type","id","op"),&ShaderGraph::vec_scalar_op_node_set_op);
+ ClassDB::bind_method(_MD("vec_scalar_op_node_get_op","shader_type","id"),&ShaderGraph::vec_scalar_op_node_get_op);
- ObjectTypeDB::bind_method(_MD("rgb_op_node_set_op","shader_type","id","op"),&ShaderGraph::rgb_op_node_set_op);
- ObjectTypeDB::bind_method(_MD("rgb_op_node_get_op","shader_type","id"),&ShaderGraph::rgb_op_node_get_op);
+ ClassDB::bind_method(_MD("rgb_op_node_set_op","shader_type","id","op"),&ShaderGraph::rgb_op_node_set_op);
+ ClassDB::bind_method(_MD("rgb_op_node_get_op","shader_type","id"),&ShaderGraph::rgb_op_node_get_op);
- ObjectTypeDB::bind_method(_MD("xform_vec_mult_node_set_no_translation","shader_type","id","disable"),&ShaderGraph::xform_vec_mult_node_set_no_translation);
- ObjectTypeDB::bind_method(_MD("xform_vec_mult_node_get_no_translation","shader_type","id"),&ShaderGraph::xform_vec_mult_node_get_no_translation);
+ ClassDB::bind_method(_MD("xform_vec_mult_node_set_no_translation","shader_type","id","disable"),&ShaderGraph::xform_vec_mult_node_set_no_translation);
+ ClassDB::bind_method(_MD("xform_vec_mult_node_get_no_translation","shader_type","id"),&ShaderGraph::xform_vec_mult_node_get_no_translation);
- ObjectTypeDB::bind_method(_MD("scalar_func_node_set_function","shader_type","id","func"),&ShaderGraph::scalar_func_node_set_function);
- ObjectTypeDB::bind_method(_MD("scalar_func_node_get_function","shader_type","id"),&ShaderGraph::scalar_func_node_get_function);
+ ClassDB::bind_method(_MD("scalar_func_node_set_function","shader_type","id","func"),&ShaderGraph::scalar_func_node_set_function);
+ ClassDB::bind_method(_MD("scalar_func_node_get_function","shader_type","id"),&ShaderGraph::scalar_func_node_get_function);
- ObjectTypeDB::bind_method(_MD("vec_func_node_set_function","shader_type","id","func"),&ShaderGraph::vec_func_node_set_function);
- ObjectTypeDB::bind_method(_MD("vec_func_node_get_function","shader_type","id"),&ShaderGraph::vec_func_node_get_function);
+ ClassDB::bind_method(_MD("vec_func_node_set_function","shader_type","id","func"),&ShaderGraph::vec_func_node_set_function);
+ ClassDB::bind_method(_MD("vec_func_node_get_function","shader_type","id"),&ShaderGraph::vec_func_node_get_function);
- ObjectTypeDB::bind_method(_MD("input_node_set_name","shader_type","id","name"),&ShaderGraph::input_node_set_name);
- ObjectTypeDB::bind_method(_MD("input_node_get_name","shader_type","id"),&ShaderGraph::input_node_get_name);
+ ClassDB::bind_method(_MD("input_node_set_name","shader_type","id","name"),&ShaderGraph::input_node_set_name);
+ ClassDB::bind_method(_MD("input_node_get_name","shader_type","id"),&ShaderGraph::input_node_get_name);
- ObjectTypeDB::bind_method(_MD("scalar_input_node_set_value","shader_type","id","value"),&ShaderGraph::scalar_input_node_set_value);
- ObjectTypeDB::bind_method(_MD("scalar_input_node_get_value","shader_type","id"),&ShaderGraph::scalar_input_node_get_value);
+ ClassDB::bind_method(_MD("scalar_input_node_set_value","shader_type","id","value"),&ShaderGraph::scalar_input_node_set_value);
+ ClassDB::bind_method(_MD("scalar_input_node_get_value","shader_type","id"),&ShaderGraph::scalar_input_node_get_value);
- ObjectTypeDB::bind_method(_MD("vec_input_node_set_value","shader_type","id","value"),&ShaderGraph::vec_input_node_set_value);
- ObjectTypeDB::bind_method(_MD("vec_input_node_get_value","shader_type","id"),&ShaderGraph::vec_input_node_get_value);
+ ClassDB::bind_method(_MD("vec_input_node_set_value","shader_type","id","value"),&ShaderGraph::vec_input_node_set_value);
+ ClassDB::bind_method(_MD("vec_input_node_get_value","shader_type","id"),&ShaderGraph::vec_input_node_get_value);
- ObjectTypeDB::bind_method(_MD("rgb_input_node_set_value","shader_type","id","value"),&ShaderGraph::rgb_input_node_set_value);
- ObjectTypeDB::bind_method(_MD("rgb_input_node_get_value","shader_type","id"),&ShaderGraph::rgb_input_node_get_value);
+ ClassDB::bind_method(_MD("rgb_input_node_set_value","shader_type","id","value"),&ShaderGraph::rgb_input_node_set_value);
+ ClassDB::bind_method(_MD("rgb_input_node_get_value","shader_type","id"),&ShaderGraph::rgb_input_node_get_value);
- ObjectTypeDB::bind_method(_MD("xform_input_node_set_value","shader_type","id","value"),&ShaderGraph::xform_input_node_set_value);
- ObjectTypeDB::bind_method(_MD("xform_input_node_get_value","shader_type","id"),&ShaderGraph::xform_input_node_get_value);
+ ClassDB::bind_method(_MD("xform_input_node_set_value","shader_type","id","value"),&ShaderGraph::xform_input_node_set_value);
+ ClassDB::bind_method(_MD("xform_input_node_get_value","shader_type","id"),&ShaderGraph::xform_input_node_get_value);
- ObjectTypeDB::bind_method(_MD("texture_input_node_set_value","shader_type","id","value:Texture"),&ShaderGraph::texture_input_node_set_value);
- ObjectTypeDB::bind_method(_MD("texture_input_node_get_value:Texture","shader_type","id"),&ShaderGraph::texture_input_node_get_value);
+ ClassDB::bind_method(_MD("texture_input_node_set_value","shader_type","id","value:Texture"),&ShaderGraph::texture_input_node_set_value);
+ ClassDB::bind_method(_MD("texture_input_node_get_value:Texture","shader_type","id"),&ShaderGraph::texture_input_node_get_value);
- ObjectTypeDB::bind_method(_MD("cubemap_input_node_set_value","shader_type","id","value:CubeMap"),&ShaderGraph::cubemap_input_node_set_value);
- ObjectTypeDB::bind_method(_MD("cubemap_input_node_get_value:CubeMap","shader_type","id"),&ShaderGraph::cubemap_input_node_get_value);
+ ClassDB::bind_method(_MD("cubemap_input_node_set_value","shader_type","id","value:CubeMap"),&ShaderGraph::cubemap_input_node_set_value);
+ ClassDB::bind_method(_MD("cubemap_input_node_get_value:CubeMap","shader_type","id"),&ShaderGraph::cubemap_input_node_get_value);
- ObjectTypeDB::bind_method(_MD("comment_node_set_text","shader_type","id","text"),&ShaderGraph::comment_node_set_text);
- ObjectTypeDB::bind_method(_MD("comment_node_get_text","shader_type","id"),&ShaderGraph::comment_node_get_text);
+ ClassDB::bind_method(_MD("comment_node_set_text","shader_type","id","text"),&ShaderGraph::comment_node_set_text);
+ ClassDB::bind_method(_MD("comment_node_get_text","shader_type","id"),&ShaderGraph::comment_node_get_text);
- ObjectTypeDB::bind_method(_MD("color_ramp_node_set_ramp","shader_type","id","colors","offsets"),&ShaderGraph::color_ramp_node_set_ramp);
- ObjectTypeDB::bind_method(_MD("color_ramp_node_get_colors","shader_type","id"),&ShaderGraph::color_ramp_node_get_colors);
- ObjectTypeDB::bind_method(_MD("color_ramp_node_get_offsets","shader_type","id"),&ShaderGraph::color_ramp_node_get_offsets);
+ ClassDB::bind_method(_MD("color_ramp_node_set_ramp","shader_type","id","colors","offsets"),&ShaderGraph::color_ramp_node_set_ramp);
+ ClassDB::bind_method(_MD("color_ramp_node_get_colors","shader_type","id"),&ShaderGraph::color_ramp_node_get_colors);
+ ClassDB::bind_method(_MD("color_ramp_node_get_offsets","shader_type","id"),&ShaderGraph::color_ramp_node_get_offsets);
- ObjectTypeDB::bind_method(_MD("curve_map_node_set_points","shader_type","id","points"),&ShaderGraph::curve_map_node_set_points);
- ObjectTypeDB::bind_method(_MD("curve_map_node_get_points","shader_type","id"),&ShaderGraph::curve_map_node_get_points);
+ ClassDB::bind_method(_MD("curve_map_node_set_points","shader_type","id","points"),&ShaderGraph::curve_map_node_set_points);
+ ClassDB::bind_method(_MD("curve_map_node_get_points","shader_type","id"),&ShaderGraph::curve_map_node_get_points);
- ObjectTypeDB::bind_method(_MD("connect_node:Error","shader_type","src_id","src_slot","dst_id","dst_slot"),&ShaderGraph::connect_node);
- ObjectTypeDB::bind_method(_MD("is_node_connected","shader_type","src_id","src_slot","dst_id","dst_slot"),&ShaderGraph::is_node_connected);
- ObjectTypeDB::bind_method(_MD("disconnect_node","shader_type","src_id","src_slot","dst_id","dst_slot"),&ShaderGraph::disconnect_node);
- ObjectTypeDB::bind_method(_MD("get_node_connections","shader_type"),&ShaderGraph::_get_connections);
+ ClassDB::bind_method(_MD("connect_node:Error","shader_type","src_id","src_slot","dst_id","dst_slot"),&ShaderGraph::connect_node);
+ ClassDB::bind_method(_MD("is_node_connected","shader_type","src_id","src_slot","dst_id","dst_slot"),&ShaderGraph::is_node_connected);
+ ClassDB::bind_method(_MD("disconnect_node","shader_type","src_id","src_slot","dst_id","dst_slot"),&ShaderGraph::disconnect_node);
+ ClassDB::bind_method(_MD("get_node_connections","shader_type"),&ShaderGraph::_get_connections);
- ObjectTypeDB::bind_method(_MD("clear","shader_type"),&ShaderGraph::clear);
+ ClassDB::bind_method(_MD("clear","shader_type"),&ShaderGraph::clear);
- ObjectTypeDB::bind_method(_MD("node_set_state","shader_type","id","state"),&ShaderGraph::node_set_state);
- ObjectTypeDB::bind_method(_MD("node_get_state:Variant","shader_type","id"),&ShaderGraph::node_get_state);
+ ClassDB::bind_method(_MD("node_set_state","shader_type","id","state"),&ShaderGraph::node_set_state);
+ ClassDB::bind_method(_MD("node_get_state:Variant","shader_type","id"),&ShaderGraph::node_get_state);
- ObjectTypeDB::bind_method(_MD("_set_data"),&ShaderGraph::_set_data);
- ObjectTypeDB::bind_method(_MD("_get_data"),&ShaderGraph::_get_data);
+ ClassDB::bind_method(_MD("_set_data"),&ShaderGraph::_set_data);
+ ClassDB::bind_method(_MD("_get_data"),&ShaderGraph::_get_data);
ADD_PROPERTY( PropertyInfo(Variant::DICTIONARY,"_data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_data"),_SCS("_get_data"));
@@ -399,21 +399,21 @@ void ShaderGraph::_bind_methods() {
#if 0
- ObjectTypeDB::bind_method(_MD("node_add"),&ShaderGraph::node_add );
- ObjectTypeDB::bind_method(_MD("node_remove"),&ShaderGraph::node_remove );
- ObjectTypeDB::bind_method(_MD("node_set_param"),&ShaderGraph::node_set_param );
- ObjectTypeDB::bind_method(_MD("node_set_pos"),&ShaderGraph::node_set_pos );
+ ClassDB::bind_method(_MD("node_add"),&ShaderGraph::node_add );
+ ClassDB::bind_method(_MD("node_remove"),&ShaderGraph::node_remove );
+ ClassDB::bind_method(_MD("node_set_param"),&ShaderGraph::node_set_param );
+ ClassDB::bind_method(_MD("node_set_pos"),&ShaderGraph::node_set_pos );
- ObjectTypeDB::bind_method(_MD("node_get_pos"),&ShaderGraph::node_get_pos );
- ObjectTypeDB::bind_method(_MD("node_get_param"),&ShaderGraph::node_get_param);
- ObjectTypeDB::bind_method(_MD("node_get_type"),&ShaderGraph::node_get_type);
+ ClassDB::bind_method(_MD("node_get_pos"),&ShaderGraph::node_get_pos );
+ ClassDB::bind_method(_MD("node_get_param"),&ShaderGraph::node_get_param);
+ ClassDB::bind_method(_MD("node_get_type"),&ShaderGraph::node_get_type);
- ObjectTypeDB::bind_method(_MD("connect"),&ShaderGraph::connect );
- ObjectTypeDB::bind_method(_MD("disconnect"),&ShaderGraph::disconnect );
+ ClassDB::bind_method(_MD("connect"),&ShaderGraph::connect );
+ ClassDB::bind_method(_MD("disconnect"),&ShaderGraph::disconnect );
- ObjectTypeDB::bind_method(_MD("get_connections"),&ShaderGraph::_get_connections_helper );
+ ClassDB::bind_method(_MD("get_connections"),&ShaderGraph::_get_connections_helper );
- ObjectTypeDB::bind_method(_MD("clear"),&ShaderGraph::clear );
+ ClassDB::bind_method(_MD("clear"),&ShaderGraph::clear );
BIND_CONSTANT( NODE_IN ); ///< param 0: name
BIND_CONSTANT( NODE_OUT ); ///< param 0: name
diff --git a/scene/resources/shader_graph.h b/scene/resources/shader_graph.h
index c8d0d3d715..57893f27c0 100644
--- a/scene/resources/shader_graph.h
+++ b/scene/resources/shader_graph.h
@@ -36,7 +36,7 @@
class ShaderGraph : public Shader {
- OBJ_TYPE( ShaderGraph, Shader );
+ GDCLASS( ShaderGraph, Shader );
RES_BASE_EXTENSION("sgp");
public:
@@ -418,7 +418,7 @@ VARIANT_ENUM_CAST( ShaderGraph::GraphError );
class MaterialShaderGraph : public ShaderGraph {
- OBJ_TYPE( MaterialShaderGraph, ShaderGraph );
+ GDCLASS( MaterialShaderGraph, ShaderGraph );
public:
@@ -430,7 +430,7 @@ public:
class CanvasItemShaderGraph : public ShaderGraph {
- OBJ_TYPE( CanvasItemShaderGraph, ShaderGraph );
+ GDCLASS( CanvasItemShaderGraph, ShaderGraph );
public:
diff --git a/scene/resources/shape.h b/scene/resources/shape.h
index 8d8e3d35c5..94a8ec7075 100644
--- a/scene/resources/shape.h
+++ b/scene/resources/shape.h
@@ -34,7 +34,7 @@ class Mesh;
class Shape : public Resource {
- OBJ_TYPE( Shape, Resource );
+ GDCLASS( Shape, Resource );
OBJ_SAVE_TYPE( Shape );
RES_BASE_EXTENSION("shp");
RID shape;
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp
index 969aeb973f..4e2af89c05 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/shape_2d.cpp
@@ -104,12 +104,12 @@ Variant Shape2D::collide_and_get_contacts(const Matrix32& p_local_xform, const
void Shape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_custom_solver_bias","bias"),&Shape2D::set_custom_solver_bias);
- ObjectTypeDB::bind_method(_MD("get_custom_solver_bias"),&Shape2D::get_custom_solver_bias);
- ObjectTypeDB::bind_method(_MD("collide","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide);
- ObjectTypeDB::bind_method(_MD("collide_with_motion","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion);
- ObjectTypeDB::bind_method(_MD("collide_and_get_contacts:Variant","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide_and_get_contacts);
- ObjectTypeDB::bind_method(_MD("collide_with_motion_and_get_contacts:Variant","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion_and_get_contacts);
+ ClassDB::bind_method(_MD("set_custom_solver_bias","bias"),&Shape2D::set_custom_solver_bias);
+ ClassDB::bind_method(_MD("get_custom_solver_bias"),&Shape2D::get_custom_solver_bias);
+ ClassDB::bind_method(_MD("collide","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide);
+ ClassDB::bind_method(_MD("collide_with_motion","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion);
+ ClassDB::bind_method(_MD("collide_and_get_contacts:Variant","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide_and_get_contacts);
+ ClassDB::bind_method(_MD("collide_with_motion_and_get_contacts:Variant","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion_and_get_contacts);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"custom_solver_bias",PROPERTY_HINT_RANGE,"0,1,0.001"),_SCS("set_custom_solver_bias"),_SCS("get_custom_solver_bias"));
}
diff --git a/scene/resources/shape_2d.h b/scene/resources/shape_2d.h
index 758824a4b7..ea89b31057 100644
--- a/scene/resources/shape_2d.h
+++ b/scene/resources/shape_2d.h
@@ -32,7 +32,7 @@
#include "resource.h"
class Shape2D : public Resource {
- OBJ_TYPE( Shape2D, Resource );
+ GDCLASS( Shape2D, Resource );
OBJ_SAVE_TYPE( Shape2D );
RID shape;
diff --git a/scene/resources/shape_line_2d.cpp b/scene/resources/shape_line_2d.cpp
index a86e4f050f..b2270d00c0 100644
--- a/scene/resources/shape_line_2d.cpp
+++ b/scene/resources/shape_line_2d.cpp
@@ -90,11 +90,11 @@ Rect2 LineShape2D::get_rect() const{
void LineShape2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_normal","normal"),&LineShape2D::set_normal);
- ObjectTypeDB::bind_method(_MD("get_normal"),&LineShape2D::get_normal);
+ ClassDB::bind_method(_MD("set_normal","normal"),&LineShape2D::set_normal);
+ ClassDB::bind_method(_MD("get_normal"),&LineShape2D::get_normal);
- ObjectTypeDB::bind_method(_MD("set_d","d"),&LineShape2D::set_d);
- ObjectTypeDB::bind_method(_MD("get_d"),&LineShape2D::get_d);
+ ClassDB::bind_method(_MD("set_d","d"),&LineShape2D::set_d);
+ ClassDB::bind_method(_MD("get_d"),&LineShape2D::get_d);
ADD_PROPERTY( PropertyInfo(Variant::VECTOR2,"normal"),_SCS("set_normal"),_SCS("get_normal") );
ADD_PROPERTY( PropertyInfo(Variant::REAL,"d"),_SCS("set_d"),_SCS("get_d") );
diff --git a/scene/resources/shape_line_2d.h b/scene/resources/shape_line_2d.h
index 160dc17b4b..abad5f6a24 100644
--- a/scene/resources/shape_line_2d.h
+++ b/scene/resources/shape_line_2d.h
@@ -32,7 +32,7 @@
#include "scene/resources/shape_2d.h"
class LineShape2D : public Shape2D {
- OBJ_TYPE( LineShape2D, Shape2D );
+ GDCLASS( LineShape2D, Shape2D );
Vector2 normal;
real_t d;
diff --git a/scene/resources/sky_box.cpp b/scene/resources/sky_box.cpp
index e8017cb084..95e3053bc3 100644
--- a/scene/resources/sky_box.cpp
+++ b/scene/resources/sky_box.cpp
@@ -16,8 +16,8 @@ SkyBox::RadianceSize SkyBox::get_radiance_size() const {
void SkyBox::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_radiance_size","size"),&SkyBox::set_radiance_size);
- ObjectTypeDB::bind_method(_MD("get_radiance_size"),&SkyBox::get_radiance_size);
+ ClassDB::bind_method(_MD("set_radiance_size","size"),&SkyBox::set_radiance_size);
+ ClassDB::bind_method(_MD("get_radiance_size"),&SkyBox::get_radiance_size);
ADD_PROPERTY(PropertyInfo(Variant::INT,"radiance_size",PROPERTY_HINT_ENUM,"256,512,1024,2048"),_SCS("set_radiance_size"),_SCS("get_radiance_size"));
@@ -113,8 +113,8 @@ RID ImageSkyBox::get_rid() const {
void ImageSkyBox::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_image_path","image","path"),&ImageSkyBox::set_image_path);
- ObjectTypeDB::bind_method(_MD("get_image_path","image"),&ImageSkyBox::get_image_path);
+ ClassDB::bind_method(_MD("set_image_path","image","path"),&ImageSkyBox::set_image_path);
+ ClassDB::bind_method(_MD("get_image_path","image"),&ImageSkyBox::get_image_path);
List<String> extensions;
ImageLoader::get_recognized_extensions(&extensions);
diff --git a/scene/resources/sky_box.h b/scene/resources/sky_box.h
index 3a3dd1b2de..a3caf15aa7 100644
--- a/scene/resources/sky_box.h
+++ b/scene/resources/sky_box.h
@@ -4,7 +4,7 @@
#include "scene/resources/texture.h"
class SkyBox : public Resource {
- OBJ_TYPE(SkyBox,Resource);
+ GDCLASS(SkyBox,Resource);
public:
@@ -32,7 +32,7 @@ VARIANT_ENUM_CAST(SkyBox::RadianceSize)
class ImageSkyBox : public SkyBox {
- OBJ_TYPE(ImageSkyBox,SkyBox);
+ GDCLASS(ImageSkyBox,SkyBox);
public:
diff --git a/scene/resources/space_2d.cpp b/scene/resources/space_2d.cpp
index e95bfd69c8..3f0d2824ce 100644
--- a/scene/resources/space_2d.cpp
+++ b/scene/resources/space_2d.cpp
@@ -48,8 +48,8 @@ bool Space2D::is_active() const {
void Space2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_active","active"),&Space2D::set_active);
- ObjectTypeDB::bind_method(_MD("is_active"),&Space2D::is_active);
+ ClassDB::bind_method(_MD("set_active","active"),&Space2D::set_active);
+ ClassDB::bind_method(_MD("is_active"),&Space2D::is_active);
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"active"),_SCS("set_active"),_SCS("is_active") );
diff --git a/scene/resources/space_2d.h b/scene/resources/space_2d.h
index b1577dcbe4..82aef89c07 100644
--- a/scene/resources/space_2d.h
+++ b/scene/resources/space_2d.h
@@ -35,7 +35,7 @@
class Space2D : public Resource {
- OBJ_TYPE(Space2D,Resource);
+ GDCLASS(Space2D,Resource);
bool active;
RID space;
protected:
diff --git a/scene/resources/sphere_shape.cpp b/scene/resources/sphere_shape.cpp
index 5f632b1404..bcfb164b4c 100644
--- a/scene/resources/sphere_shape.cpp
+++ b/scene/resources/sphere_shape.cpp
@@ -75,8 +75,8 @@ float SphereShape::get_radius() const {
void SphereShape::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_radius","radius"),&SphereShape::set_radius);
- ObjectTypeDB::bind_method(_MD("get_radius"),&SphereShape::get_radius);
+ ClassDB::bind_method(_MD("set_radius","radius"),&SphereShape::set_radius);
+ ClassDB::bind_method(_MD("get_radius"),&SphereShape::get_radius);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"radius",PROPERTY_HINT_RANGE,"0,4096,0.01"), _SCS("set_radius"), _SCS("get_radius"));
diff --git a/scene/resources/sphere_shape.h b/scene/resources/sphere_shape.h
index 96a84ce48f..990564be80 100644
--- a/scene/resources/sphere_shape.h
+++ b/scene/resources/sphere_shape.h
@@ -34,7 +34,7 @@
class SphereShape : public Shape {
- OBJ_TYPE(SphereShape,Shape);
+ GDCLASS(SphereShape,Shape);
float radius;
protected:
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index cdb663b8f1..146e53300d 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -70,20 +70,20 @@ Size2 StyleBox::get_center_size() const {
void StyleBox::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("test_mask","point","rect"),&StyleBox::test_mask);
+ ClassDB::bind_method(_MD("test_mask","point","rect"),&StyleBox::test_mask);
- ObjectTypeDB::bind_method(_MD("set_default_margin","margin","offset"),&StyleBox::set_default_margin);
- ObjectTypeDB::bind_method(_MD("get_default_margin","margin"),&StyleBox::get_default_margin);
+ ClassDB::bind_method(_MD("set_default_margin","margin","offset"),&StyleBox::set_default_margin);
+ ClassDB::bind_method(_MD("get_default_margin","margin"),&StyleBox::get_default_margin);
-// ObjectTypeDB::bind_method(_MD("set_default_margin"),&StyleBox::set_default_margin);
-// ObjectTypeDB::bind_method(_MD("get_default_margin"),&StyleBox::get_default_margin);
+// ClassDB::bind_method(_MD("set_default_margin"),&StyleBox::set_default_margin);
+// ClassDB::bind_method(_MD("get_default_margin"),&StyleBox::get_default_margin);
- ObjectTypeDB::bind_method(_MD("get_margin","margin"),&StyleBox::get_margin);
- ObjectTypeDB::bind_method(_MD("get_minimum_size"),&StyleBox::get_minimum_size);
- ObjectTypeDB::bind_method(_MD("get_center_size"),&StyleBox::get_center_size);
- ObjectTypeDB::bind_method(_MD("get_offset"),&StyleBox::get_offset);
+ ClassDB::bind_method(_MD("get_margin","margin"),&StyleBox::get_margin);
+ ClassDB::bind_method(_MD("get_minimum_size"),&StyleBox::get_minimum_size);
+ ClassDB::bind_method(_MD("get_center_size"),&StyleBox::get_center_size);
+ ClassDB::bind_method(_MD("get_offset"),&StyleBox::get_offset);
- ObjectTypeDB::bind_method(_MD("draw","canvas_item","rect"),&StyleBox::draw);
+ ClassDB::bind_method(_MD("draw","canvas_item","rect"),&StyleBox::draw);
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin/left", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_LEFT );
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "content_margin/right", PROPERTY_HINT_RANGE,"-1,2048,1" ), _SCS("set_default_margin"),_SCS("get_default_margin"), MARGIN_RIGHT );
@@ -208,23 +208,23 @@ Color StyleBoxTexture::get_modulate() const {
void StyleBoxTexture::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_texture","texture:Texture"),&StyleBoxTexture::set_texture);
- ObjectTypeDB::bind_method(_MD("get_texture:Texture"),&StyleBoxTexture::get_texture);
+ ClassDB::bind_method(_MD("set_texture","texture:Texture"),&StyleBoxTexture::set_texture);
+ ClassDB::bind_method(_MD("get_texture:Texture"),&StyleBoxTexture::get_texture);
- ObjectTypeDB::bind_method(_MD("set_margin_size","margin","size"),&StyleBoxTexture::set_margin_size);
- ObjectTypeDB::bind_method(_MD("get_margin_size","margin"),&StyleBoxTexture::get_margin_size);
+ ClassDB::bind_method(_MD("set_margin_size","margin","size"),&StyleBoxTexture::set_margin_size);
+ ClassDB::bind_method(_MD("get_margin_size","margin"),&StyleBoxTexture::get_margin_size);
- ObjectTypeDB::bind_method(_MD("set_expand_margin_size","margin","size"),&StyleBoxTexture::set_expand_margin_size);
- ObjectTypeDB::bind_method(_MD("get_expand_margin_size","margin"),&StyleBoxTexture::get_expand_margin_size);
+ ClassDB::bind_method(_MD("set_expand_margin_size","margin","size"),&StyleBoxTexture::set_expand_margin_size);
+ ClassDB::bind_method(_MD("get_expand_margin_size","margin"),&StyleBoxTexture::get_expand_margin_size);
- ObjectTypeDB::bind_method(_MD("set_region_rect","region"),&StyleBoxTexture::set_region_rect);
- ObjectTypeDB::bind_method(_MD("get_region_rect"),&StyleBoxTexture::get_region_rect);
+ ClassDB::bind_method(_MD("set_region_rect","region"),&StyleBoxTexture::set_region_rect);
+ ClassDB::bind_method(_MD("get_region_rect"),&StyleBoxTexture::get_region_rect);
- ObjectTypeDB::bind_method(_MD("set_draw_center","enable"),&StyleBoxTexture::set_draw_center);
- ObjectTypeDB::bind_method(_MD("get_draw_center"),&StyleBoxTexture::get_draw_center);
+ ClassDB::bind_method(_MD("set_draw_center","enable"),&StyleBoxTexture::set_draw_center);
+ ClassDB::bind_method(_MD("get_draw_center"),&StyleBoxTexture::get_draw_center);
- ObjectTypeDB::bind_method(_MD("set_modulate","color"),&StyleBoxTexture::set_modulate);
- ObjectTypeDB::bind_method(_MD("get_modulate"),&StyleBoxTexture::get_modulate);
+ ClassDB::bind_method(_MD("set_modulate","color"),&StyleBoxTexture::set_modulate);
+ ClassDB::bind_method(_MD("get_modulate"),&StyleBoxTexture::get_modulate);
ADD_SIGNAL(MethodInfo("texture_changed"));
@@ -386,18 +386,18 @@ float StyleBoxFlat::get_style_margin(Margin p_margin) const {
}
void StyleBoxFlat::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_bg_color","color"),&StyleBoxFlat::set_bg_color);
- ObjectTypeDB::bind_method(_MD("get_bg_color"),&StyleBoxFlat::get_bg_color);
- ObjectTypeDB::bind_method(_MD("set_light_color","color"),&StyleBoxFlat::set_light_color);
- ObjectTypeDB::bind_method(_MD("get_light_color"),&StyleBoxFlat::get_light_color);
- ObjectTypeDB::bind_method(_MD("set_dark_color","color"),&StyleBoxFlat::set_dark_color);
- ObjectTypeDB::bind_method(_MD("get_dark_color"),&StyleBoxFlat::get_dark_color);
- ObjectTypeDB::bind_method(_MD("set_border_size","size"),&StyleBoxFlat::set_border_size);
- ObjectTypeDB::bind_method(_MD("get_border_size"),&StyleBoxFlat::get_border_size);
- ObjectTypeDB::bind_method(_MD("set_border_blend","blend"),&StyleBoxFlat::set_border_blend);
- ObjectTypeDB::bind_method(_MD("get_border_blend"),&StyleBoxFlat::get_border_blend);
- ObjectTypeDB::bind_method(_MD("set_draw_center","size"),&StyleBoxFlat::set_draw_center);
- ObjectTypeDB::bind_method(_MD("get_draw_center"),&StyleBoxFlat::get_draw_center);
+ ClassDB::bind_method(_MD("set_bg_color","color"),&StyleBoxFlat::set_bg_color);
+ ClassDB::bind_method(_MD("get_bg_color"),&StyleBoxFlat::get_bg_color);
+ ClassDB::bind_method(_MD("set_light_color","color"),&StyleBoxFlat::set_light_color);
+ ClassDB::bind_method(_MD("get_light_color"),&StyleBoxFlat::get_light_color);
+ ClassDB::bind_method(_MD("set_dark_color","color"),&StyleBoxFlat::set_dark_color);
+ ClassDB::bind_method(_MD("get_dark_color"),&StyleBoxFlat::get_dark_color);
+ ClassDB::bind_method(_MD("set_border_size","size"),&StyleBoxFlat::set_border_size);
+ ClassDB::bind_method(_MD("get_border_size"),&StyleBoxFlat::get_border_size);
+ ClassDB::bind_method(_MD("set_border_blend","blend"),&StyleBoxFlat::set_border_blend);
+ ClassDB::bind_method(_MD("get_border_blend"),&StyleBoxFlat::get_border_blend);
+ ClassDB::bind_method(_MD("set_draw_center","size"),&StyleBoxFlat::set_draw_center);
+ ClassDB::bind_method(_MD("get_draw_center"),&StyleBoxFlat::get_draw_center);
ADD_PROPERTY( PropertyInfo( Variant::COLOR, "bg_color"), _SCS("set_bg_color"),_SCS("get_bg_color") );
ADD_PROPERTY( PropertyInfo( Variant::COLOR, "light_color"),_SCS("set_light_color"),_SCS("get_light_color"));
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h
index 8d3ba3a360..f8b02724ee 100644
--- a/scene/resources/style_box.h
+++ b/scene/resources/style_box.h
@@ -37,7 +37,7 @@
*/
class StyleBox : public Resource {
- OBJ_TYPE( StyleBox, Resource );
+ GDCLASS( StyleBox, Resource );
RES_BASE_EXTENSION("sbx");
OBJ_SAVE_TYPE( StyleBox );
float margin[4];
@@ -65,7 +65,7 @@ public:
class StyleBoxEmpty : public StyleBox {
- OBJ_TYPE( StyleBoxEmpty, StyleBox );
+ GDCLASS( StyleBoxEmpty, StyleBox );
virtual float get_style_margin(Margin p_margin) const { return 0; }
public:
@@ -76,7 +76,7 @@ public:
class StyleBoxTexture : public StyleBox {
- OBJ_TYPE( StyleBoxTexture, StyleBox );
+ GDCLASS( StyleBoxTexture, StyleBox );
float expand_margin[4];
@@ -123,7 +123,7 @@ public:
class StyleBoxFlat : public StyleBox {
- OBJ_TYPE( StyleBoxFlat, StyleBox );
+ GDCLASS( StyleBoxFlat, StyleBox );
Color bg_color;
Color light_color;
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index bcfacc62fa..2ed620c097 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -860,25 +860,25 @@ void SurfaceTool::clear() {
void SurfaceTool::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("begin","primitive"),&SurfaceTool::begin);
- ObjectTypeDB::bind_method(_MD("add_vertex","vertex"),&SurfaceTool::add_vertex);
- ObjectTypeDB::bind_method(_MD("add_color","color"),&SurfaceTool::add_color);
- ObjectTypeDB::bind_method(_MD("add_normal","normal"),&SurfaceTool::add_normal);
- ObjectTypeDB::bind_method(_MD("add_tangent","tangent"),&SurfaceTool::add_tangent);
- ObjectTypeDB::bind_method(_MD("add_uv","uv"),&SurfaceTool::add_uv);
- ObjectTypeDB::bind_method(_MD("add_uv2","uv2"),&SurfaceTool::add_uv2);
- ObjectTypeDB::bind_method(_MD("add_bones","bones"),&SurfaceTool::add_bones);
- ObjectTypeDB::bind_method(_MD("add_weights","weights"),&SurfaceTool::add_weights);
- ObjectTypeDB::bind_method(_MD("add_smooth_group","smooth"),&SurfaceTool::add_smooth_group);
- ObjectTypeDB::bind_method(_MD("add_triangle_fan", "vertexes", "uvs", "colors", "uv2s", "normals", "tangents"),&SurfaceTool::add_triangle_fan, DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Color>()), DEFVAL(Vector<Vector2>()),DEFVAL(Vector<Vector3>()), DEFVAL(Vector<Plane>()));
- ObjectTypeDB::bind_method(_MD("set_material","material:Material"),&SurfaceTool::set_material);
- ObjectTypeDB::bind_method(_MD("index"),&SurfaceTool::index);
- ObjectTypeDB::bind_method(_MD("deindex"),&SurfaceTool::deindex);
- ///ObjectTypeDB::bind_method(_MD("generate_flat_normals"),&SurfaceTool::generate_flat_normals);
- ObjectTypeDB::bind_method(_MD("generate_normals"),&SurfaceTool::generate_normals);
- ObjectTypeDB::bind_method(_MD("add_index", "index"), &SurfaceTool::add_index);
- ObjectTypeDB::bind_method(_MD("commit:Mesh","existing:Mesh"),&SurfaceTool::commit,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("clear"),&SurfaceTool::clear);
+ ClassDB::bind_method(_MD("begin","primitive"),&SurfaceTool::begin);
+ ClassDB::bind_method(_MD("add_vertex","vertex"),&SurfaceTool::add_vertex);
+ ClassDB::bind_method(_MD("add_color","color"),&SurfaceTool::add_color);
+ ClassDB::bind_method(_MD("add_normal","normal"),&SurfaceTool::add_normal);
+ ClassDB::bind_method(_MD("add_tangent","tangent"),&SurfaceTool::add_tangent);
+ ClassDB::bind_method(_MD("add_uv","uv"),&SurfaceTool::add_uv);
+ ClassDB::bind_method(_MD("add_uv2","uv2"),&SurfaceTool::add_uv2);
+ ClassDB::bind_method(_MD("add_bones","bones"),&SurfaceTool::add_bones);
+ ClassDB::bind_method(_MD("add_weights","weights"),&SurfaceTool::add_weights);
+ ClassDB::bind_method(_MD("add_smooth_group","smooth"),&SurfaceTool::add_smooth_group);
+ ClassDB::bind_method(_MD("add_triangle_fan", "vertexes", "uvs", "colors", "uv2s", "normals", "tangents"),&SurfaceTool::add_triangle_fan, DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Color>()), DEFVAL(Vector<Vector2>()),DEFVAL(Vector<Vector3>()), DEFVAL(Vector<Plane>()));
+ ClassDB::bind_method(_MD("set_material","material:Material"),&SurfaceTool::set_material);
+ ClassDB::bind_method(_MD("index"),&SurfaceTool::index);
+ ClassDB::bind_method(_MD("deindex"),&SurfaceTool::deindex);
+ ///ClassDB::bind_method(_MD("generate_flat_normals"),&SurfaceTool::generate_flat_normals);
+ ClassDB::bind_method(_MD("generate_normals"),&SurfaceTool::generate_normals);
+ ClassDB::bind_method(_MD("add_index", "index"), &SurfaceTool::add_index);
+ ClassDB::bind_method(_MD("commit:Mesh","existing:Mesh"),&SurfaceTool::commit,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("clear"),&SurfaceTool::clear);
}
diff --git a/scene/resources/surface_tool.h b/scene/resources/surface_tool.h
index 5fa300a046..f859efbfe5 100644
--- a/scene/resources/surface_tool.h
+++ b/scene/resources/surface_tool.h
@@ -35,7 +35,7 @@
class SurfaceTool : public Reference {
- OBJ_TYPE(SurfaceTool, Reference );
+ GDCLASS(SurfaceTool, Reference );
public:
struct Vertex {
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index c9c9d679b6..462341a751 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -63,16 +63,16 @@ bool Texture::get_rect_region(const Rect2& p_rect, const Rect2& p_src_rect,Rect2
void Texture::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_width"),&Texture::get_width);
- ObjectTypeDB::bind_method(_MD("get_height"),&Texture::get_height);
- ObjectTypeDB::bind_method(_MD("get_size"),&Texture::get_size);
- ObjectTypeDB::bind_method(_MD("get_rid"),&Texture::get_rid);
- ObjectTypeDB::bind_method(_MD("has_alpha"),&Texture::has_alpha);
- ObjectTypeDB::bind_method(_MD("set_flags","flags"),&Texture::set_flags);
- ObjectTypeDB::bind_method(_MD("get_flags"),&Texture::get_flags);
- ObjectTypeDB::bind_method(_MD("draw","canvas_item","pos","modulate","transpose"),&Texture::draw,DEFVAL(Color(1,1,1)),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("draw_rect","canvas_item","rect","tile","modulate","transpose"),&Texture::draw_rect,DEFVAL(Color(1,1,1)),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("draw_rect_region","canvas_item","rect","src_rect","modulate","transpose"),&Texture::draw_rect_region,DEFVAL(Color(1,1,1)),DEFVAL(false));
+ ClassDB::bind_method(_MD("get_width"),&Texture::get_width);
+ ClassDB::bind_method(_MD("get_height"),&Texture::get_height);
+ ClassDB::bind_method(_MD("get_size"),&Texture::get_size);
+ ClassDB::bind_method(_MD("get_rid"),&Texture::get_rid);
+ ClassDB::bind_method(_MD("has_alpha"),&Texture::has_alpha);
+ ClassDB::bind_method(_MD("set_flags","flags"),&Texture::set_flags);
+ ClassDB::bind_method(_MD("get_flags"),&Texture::get_flags);
+ ClassDB::bind_method(_MD("draw","canvas_item","pos","modulate","transpose"),&Texture::draw,DEFVAL(Color(1,1,1)),DEFVAL(false));
+ ClassDB::bind_method(_MD("draw_rect","canvas_item","rect","tile","modulate","transpose"),&Texture::draw_rect,DEFVAL(Color(1,1,1)),DEFVAL(false));
+ ClassDB::bind_method(_MD("draw_rect_region","canvas_item","rect","src_rect","modulate","transpose"),&Texture::draw_rect_region,DEFVAL(Color(1,1,1)),DEFVAL(false));
BIND_CONSTANT( FLAG_MIPMAPS );
BIND_CONSTANT( FLAG_REPEAT );
@@ -407,27 +407,27 @@ void ImageTexture::_set_data(Dictionary p_data) {
void ImageTexture::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("create","width","height","format","flags"),&ImageTexture::create,DEFVAL(FLAGS_DEFAULT));
- ObjectTypeDB::bind_method(_MD("create_from_image","image","flags"),&ImageTexture::create_from_image,DEFVAL(FLAGS_DEFAULT));
- ObjectTypeDB::bind_method(_MD("get_format"),&ImageTexture::get_format);
- ObjectTypeDB::bind_method(_MD("load","path"),&ImageTexture::load);
- ObjectTypeDB::bind_method(_MD("set_data","image"),&ImageTexture::set_data);
- ObjectTypeDB::bind_method(_MD("get_data","cube_side"),&ImageTexture::get_data);
- ObjectTypeDB::bind_method(_MD("set_storage","mode"),&ImageTexture::set_storage);
- ObjectTypeDB::bind_method(_MD("get_storage"),&ImageTexture::get_storage);
- ObjectTypeDB::bind_method(_MD("set_lossy_storage_quality","quality"),&ImageTexture::set_lossy_storage_quality);
- ObjectTypeDB::bind_method(_MD("get_lossy_storage_quality"),&ImageTexture::get_lossy_storage_quality);
- ObjectTypeDB::bind_method(_MD("fix_alpha_edges"),&ImageTexture::fix_alpha_edges);
- ObjectTypeDB::bind_method(_MD("premultiply_alpha"),&ImageTexture::premultiply_alpha);
- ObjectTypeDB::bind_method(_MD("normal_to_xy"),&ImageTexture::normal_to_xy);
- ObjectTypeDB::bind_method(_MD("shrink_x2_and_keep_size"),&ImageTexture::shrink_x2_and_keep_size);
-
- ObjectTypeDB::bind_method(_MD("set_size_override","size"),&ImageTexture::set_size_override);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("fix_alpha_edges"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("premultiply_alpha"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("normal_to_xy"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::set_method_flags(get_type_static(),_SCS("shrink_x2_and_keep_size"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::bind_method(_MD("_reload_hook","rid"),&ImageTexture::_reload_hook);
+ ClassDB::bind_method(_MD("create","width","height","format","flags"),&ImageTexture::create,DEFVAL(FLAGS_DEFAULT));
+ ClassDB::bind_method(_MD("create_from_image","image","flags"),&ImageTexture::create_from_image,DEFVAL(FLAGS_DEFAULT));
+ ClassDB::bind_method(_MD("get_format"),&ImageTexture::get_format);
+ ClassDB::bind_method(_MD("load","path"),&ImageTexture::load);
+ ClassDB::bind_method(_MD("set_data","image"),&ImageTexture::set_data);
+ ClassDB::bind_method(_MD("get_data","cube_side"),&ImageTexture::get_data);
+ ClassDB::bind_method(_MD("set_storage","mode"),&ImageTexture::set_storage);
+ ClassDB::bind_method(_MD("get_storage"),&ImageTexture::get_storage);
+ ClassDB::bind_method(_MD("set_lossy_storage_quality","quality"),&ImageTexture::set_lossy_storage_quality);
+ ClassDB::bind_method(_MD("get_lossy_storage_quality"),&ImageTexture::get_lossy_storage_quality);
+ ClassDB::bind_method(_MD("fix_alpha_edges"),&ImageTexture::fix_alpha_edges);
+ ClassDB::bind_method(_MD("premultiply_alpha"),&ImageTexture::premultiply_alpha);
+ ClassDB::bind_method(_MD("normal_to_xy"),&ImageTexture::normal_to_xy);
+ ClassDB::bind_method(_MD("shrink_x2_and_keep_size"),&ImageTexture::shrink_x2_and_keep_size);
+
+ ClassDB::bind_method(_MD("set_size_override","size"),&ImageTexture::set_size_override);
+ ClassDB::set_method_flags(get_class_static(),_SCS("fix_alpha_edges"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::set_method_flags(get_class_static(),_SCS("premultiply_alpha"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::set_method_flags(get_class_static(),_SCS("normal_to_xy"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::set_method_flags(get_class_static(),_SCS("shrink_x2_and_keep_size"),METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::bind_method(_MD("_reload_hook","rid"),&ImageTexture::_reload_hook);
BIND_CONSTANT( STORAGE_RAW );
@@ -549,14 +549,14 @@ Rect2 AtlasTexture::get_margin() const {
void AtlasTexture::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_atlas","atlas:Texture"),&AtlasTexture::set_atlas);
- ObjectTypeDB::bind_method(_MD("get_atlas:Texture"),&AtlasTexture::get_atlas);
+ ClassDB::bind_method(_MD("set_atlas","atlas:Texture"),&AtlasTexture::set_atlas);
+ ClassDB::bind_method(_MD("get_atlas:Texture"),&AtlasTexture::get_atlas);
- ObjectTypeDB::bind_method(_MD("set_region","region"),&AtlasTexture::set_region);
- ObjectTypeDB::bind_method(_MD("get_region"),&AtlasTexture::get_region);
+ ClassDB::bind_method(_MD("set_region","region"),&AtlasTexture::set_region);
+ ClassDB::bind_method(_MD("get_region"),&AtlasTexture::get_region);
- ObjectTypeDB::bind_method(_MD("set_margin","margin"),&AtlasTexture::set_margin);
- ObjectTypeDB::bind_method(_MD("get_margin"),&AtlasTexture::get_margin);
+ ClassDB::bind_method(_MD("set_margin","margin"),&AtlasTexture::set_margin);
+ ClassDB::bind_method(_MD("get_margin"),&AtlasTexture::get_margin);
ADD_SIGNAL(MethodInfo("atlas_changed"));
@@ -804,18 +804,18 @@ Ref<Texture> LargeTexture::get_piece_texture(int p_idx) const{
void LargeTexture::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_piece","ofs","texture:Texture"),&LargeTexture::add_piece);
- ObjectTypeDB::bind_method(_MD("set_piece_offset", "idx", "ofs"),&LargeTexture::set_piece_offset);
- ObjectTypeDB::bind_method(_MD("set_piece_texture","idx", "texture:Texture"),&LargeTexture::set_piece_texture);
- ObjectTypeDB::bind_method(_MD("set_size","size"),&LargeTexture::set_size);
- ObjectTypeDB::bind_method(_MD("clear"),&LargeTexture::clear);
+ ClassDB::bind_method(_MD("add_piece","ofs","texture:Texture"),&LargeTexture::add_piece);
+ ClassDB::bind_method(_MD("set_piece_offset", "idx", "ofs"),&LargeTexture::set_piece_offset);
+ ClassDB::bind_method(_MD("set_piece_texture","idx", "texture:Texture"),&LargeTexture::set_piece_texture);
+ ClassDB::bind_method(_MD("set_size","size"),&LargeTexture::set_size);
+ ClassDB::bind_method(_MD("clear"),&LargeTexture::clear);
- ObjectTypeDB::bind_method(_MD("get_piece_count"),&LargeTexture::get_piece_count);
- ObjectTypeDB::bind_method(_MD("get_piece_offset","idx"),&LargeTexture::get_piece_offset);
- ObjectTypeDB::bind_method(_MD("get_piece_texture:Texture","idx"),&LargeTexture::get_piece_texture);
+ ClassDB::bind_method(_MD("get_piece_count"),&LargeTexture::get_piece_count);
+ ClassDB::bind_method(_MD("get_piece_offset","idx"),&LargeTexture::get_piece_offset);
+ ClassDB::bind_method(_MD("get_piece_texture:Texture","idx"),&LargeTexture::get_piece_texture);
- ObjectTypeDB::bind_method(_MD("_set_data","data"),&LargeTexture::_set_data);
- ObjectTypeDB::bind_method(_MD("_get_data"),&LargeTexture::_get_data);
+ ClassDB::bind_method(_MD("_set_data","data"),&LargeTexture::_set_data);
+ ClassDB::bind_method(_MD("_get_data"),&LargeTexture::_get_data);
ADD_PROPERTY( PropertyInfo( Variant::ARRAY, "_data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_data"),_SCS("_get_data") );
@@ -1048,18 +1048,18 @@ void CubeMap::_get_property_list( List<PropertyInfo> *p_list) const {
void CubeMap::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_width"),&CubeMap::get_width);
- ObjectTypeDB::bind_method(_MD("get_height"),&CubeMap::get_height);
- ObjectTypeDB::bind_method(_MD("get_rid"),&CubeMap::get_rid);
- ObjectTypeDB::bind_method(_MD("set_flags","flags"),&CubeMap::set_flags);
- ObjectTypeDB::bind_method(_MD("get_flags"),&CubeMap::get_flags);
-
- ObjectTypeDB::bind_method(_MD("set_side","side","image"),&CubeMap::set_side);
- ObjectTypeDB::bind_method(_MD("get_side","side"),&CubeMap::get_side);
- ObjectTypeDB::bind_method(_MD("set_storage","mode"),&CubeMap::set_storage);
- ObjectTypeDB::bind_method(_MD("get_storage"),&CubeMap::get_storage);
- ObjectTypeDB::bind_method(_MD("set_lossy_storage_quality","quality"),&CubeMap::set_lossy_storage_quality);
- ObjectTypeDB::bind_method(_MD("get_lossy_storage_quality"),&CubeMap::get_lossy_storage_quality);
+ ClassDB::bind_method(_MD("get_width"),&CubeMap::get_width);
+ ClassDB::bind_method(_MD("get_height"),&CubeMap::get_height);
+ ClassDB::bind_method(_MD("get_rid"),&CubeMap::get_rid);
+ ClassDB::bind_method(_MD("set_flags","flags"),&CubeMap::set_flags);
+ ClassDB::bind_method(_MD("get_flags"),&CubeMap::get_flags);
+
+ ClassDB::bind_method(_MD("set_side","side","image"),&CubeMap::set_side);
+ ClassDB::bind_method(_MD("get_side","side"),&CubeMap::get_side);
+ ClassDB::bind_method(_MD("set_storage","mode"),&CubeMap::set_storage);
+ ClassDB::bind_method(_MD("get_storage"),&CubeMap::get_storage);
+ ClassDB::bind_method(_MD("set_lossy_storage_quality","quality"),&CubeMap::set_lossy_storage_quality);
+ ClassDB::bind_method(_MD("get_lossy_storage_quality"),&CubeMap::get_lossy_storage_quality);
BIND_CONSTANT( STORAGE_RAW );
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 945541e102..aac3514af3 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -41,7 +41,7 @@
class Texture : public Resource {
- OBJ_TYPE( Texture, Resource );
+ GDCLASS( Texture, Resource );
OBJ_SAVE_TYPE( Texture ); //children are all saved as Texture, so they can be exchanged
protected:
@@ -85,7 +85,7 @@ VARIANT_ENUM_CAST( Texture::Flags );
class ImageTexture : public Texture {
- OBJ_TYPE( ImageTexture, Texture );
+ GDCLASS( ImageTexture, Texture );
RES_BASE_EXTENSION("tex");
public:
enum Storage {
@@ -164,7 +164,7 @@ VARIANT_ENUM_CAST( ImageTexture::Storage );
class AtlasTexture : public Texture {
- OBJ_TYPE( AtlasTexture, Texture );
+ GDCLASS( AtlasTexture, Texture );
RES_BASE_EXTENSION("atex");
protected:
@@ -205,7 +205,7 @@ public:
class LargeTexture : public Texture {
- OBJ_TYPE( LargeTexture, Texture );
+ GDCLASS( LargeTexture, Texture );
RES_BASE_EXTENSION("ltex");
protected:
@@ -256,7 +256,7 @@ public:
class CubeMap : public Resource {
- OBJ_TYPE( CubeMap, Resource );
+ GDCLASS( CubeMap, Resource );
RES_BASE_EXTENSION("cbm");
public:
enum Storage {
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index da9056541c..2e3afbf057 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -664,48 +664,48 @@ void Theme::get_type_list(List<StringName> *p_list) const {
void Theme::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_icon","name","type","texture:Texture"),&Theme::set_icon);
- ObjectTypeDB::bind_method(_MD("get_icon:Texture","name","type"),&Theme::get_icon);
- ObjectTypeDB::bind_method(_MD("has_icon","name","type"),&Theme::has_icon);
- ObjectTypeDB::bind_method(_MD("clear_icon","name","type"),&Theme::clear_icon);
- ObjectTypeDB::bind_method(_MD("get_icon_list","type"),&Theme::_get_icon_list);
+ ClassDB::bind_method(_MD("set_icon","name","type","texture:Texture"),&Theme::set_icon);
+ ClassDB::bind_method(_MD("get_icon:Texture","name","type"),&Theme::get_icon);
+ ClassDB::bind_method(_MD("has_icon","name","type"),&Theme::has_icon);
+ ClassDB::bind_method(_MD("clear_icon","name","type"),&Theme::clear_icon);
+ ClassDB::bind_method(_MD("get_icon_list","type"),&Theme::_get_icon_list);
- ObjectTypeDB::bind_method(_MD("set_stylebox","name","type","texture:StyleBox"),&Theme::set_stylebox);
- ObjectTypeDB::bind_method(_MD("get_stylebox:StyleBox","name","type"),&Theme::get_stylebox);
- ObjectTypeDB::bind_method(_MD("has_stylebox","name","type"),&Theme::has_stylebox);
- ObjectTypeDB::bind_method(_MD("clear_stylebox","name","type"),&Theme::clear_stylebox);
- ObjectTypeDB::bind_method(_MD("get_stylebox_list","type"),&Theme::_get_stylebox_list);
- ObjectTypeDB::bind_method(_MD("get_stylebox_types"),&Theme::_get_stylebox_types);
+ ClassDB::bind_method(_MD("set_stylebox","name","type","texture:StyleBox"),&Theme::set_stylebox);
+ ClassDB::bind_method(_MD("get_stylebox:StyleBox","name","type"),&Theme::get_stylebox);
+ ClassDB::bind_method(_MD("has_stylebox","name","type"),&Theme::has_stylebox);
+ ClassDB::bind_method(_MD("clear_stylebox","name","type"),&Theme::clear_stylebox);
+ ClassDB::bind_method(_MD("get_stylebox_list","type"),&Theme::_get_stylebox_list);
+ ClassDB::bind_method(_MD("get_stylebox_types"),&Theme::_get_stylebox_types);
- ObjectTypeDB::bind_method(_MD("set_font","name","type","font:Font"),&Theme::set_font);
- ObjectTypeDB::bind_method(_MD("get_font:Font","name","type"),&Theme::get_font);
- ObjectTypeDB::bind_method(_MD("has_font","name","type"),&Theme::has_font);
- ObjectTypeDB::bind_method(_MD("clear_font","name","type"),&Theme::clear_font);
- ObjectTypeDB::bind_method(_MD("get_font_list","type"),&Theme::_get_font_list);
+ ClassDB::bind_method(_MD("set_font","name","type","font:Font"),&Theme::set_font);
+ ClassDB::bind_method(_MD("get_font:Font","name","type"),&Theme::get_font);
+ ClassDB::bind_method(_MD("has_font","name","type"),&Theme::has_font);
+ ClassDB::bind_method(_MD("clear_font","name","type"),&Theme::clear_font);
+ ClassDB::bind_method(_MD("get_font_list","type"),&Theme::_get_font_list);
- ObjectTypeDB::bind_method(_MD("set_color","name","type","color"),&Theme::set_color);
- ObjectTypeDB::bind_method(_MD("get_color","name","type"),&Theme::get_color);
- ObjectTypeDB::bind_method(_MD("has_color","name","type"),&Theme::has_color);
- ObjectTypeDB::bind_method(_MD("clear_color","name","type"),&Theme::clear_color);
- ObjectTypeDB::bind_method(_MD("get_color_list","type"),&Theme::_get_color_list);
+ ClassDB::bind_method(_MD("set_color","name","type","color"),&Theme::set_color);
+ ClassDB::bind_method(_MD("get_color","name","type"),&Theme::get_color);
+ ClassDB::bind_method(_MD("has_color","name","type"),&Theme::has_color);
+ ClassDB::bind_method(_MD("clear_color","name","type"),&Theme::clear_color);
+ ClassDB::bind_method(_MD("get_color_list","type"),&Theme::_get_color_list);
- ObjectTypeDB::bind_method(_MD("set_constant","name","type","constant"),&Theme::set_constant);
- ObjectTypeDB::bind_method(_MD("get_constant","name","type"),&Theme::get_constant);
- ObjectTypeDB::bind_method(_MD("has_constant","name","type"),&Theme::has_constant);
- ObjectTypeDB::bind_method(_MD("clear_constant","name","type"),&Theme::clear_constant);
- ObjectTypeDB::bind_method(_MD("get_constant_list","type"),&Theme::_get_constant_list);
+ ClassDB::bind_method(_MD("set_constant","name","type","constant"),&Theme::set_constant);
+ ClassDB::bind_method(_MD("get_constant","name","type"),&Theme::get_constant);
+ ClassDB::bind_method(_MD("has_constant","name","type"),&Theme::has_constant);
+ ClassDB::bind_method(_MD("clear_constant","name","type"),&Theme::clear_constant);
+ ClassDB::bind_method(_MD("get_constant_list","type"),&Theme::_get_constant_list);
- ObjectTypeDB::bind_method(_MD("set_default_font","font"),&Theme::set_default_theme_font);
- ObjectTypeDB::bind_method(_MD("get_default_font"),&Theme::get_default_theme_font);
+ ClassDB::bind_method(_MD("set_default_font","font"),&Theme::set_default_theme_font);
+ ClassDB::bind_method(_MD("get_default_font"),&Theme::get_default_theme_font);
- ObjectTypeDB::bind_method(_MD("get_type_list","type"),&Theme::_get_type_list);
+ ClassDB::bind_method(_MD("get_type_list","type"),&Theme::_get_type_list);
- ObjectTypeDB::bind_method(_MD("_emit_theme_changed"),&Theme::_emit_theme_changed);
+ ClassDB::bind_method(_MD("_emit_theme_changed"),&Theme::_emit_theme_changed);
- ObjectTypeDB::bind_method("copy_default_theme",&Theme::copy_default_theme);
+ ClassDB::bind_method("copy_default_theme",&Theme::copy_default_theme);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"default_font",PROPERTY_HINT_RESOURCE_TYPE,"Font"),_SCS("set_default_font"),_SCS("get_default_font"));
diff --git a/scene/resources/theme.h b/scene/resources/theme.h
index 1bce5e1213..94ac910e9f 100644
--- a/scene/resources/theme.h
+++ b/scene/resources/theme.h
@@ -41,7 +41,7 @@
*/
class Theme : public Resource {
- OBJ_TYPE( Theme, Resource );
+ GDCLASS( Theme, Resource );
RES_BASE_EXTENSION("thm");
static Ref<Theme> default_theme;
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index e9c5ac12bb..1811dee384 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -407,37 +407,37 @@ void TileSet::clear() {
void TileSet::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("create_tile","id"),&TileSet::create_tile);
- ObjectTypeDB::bind_method(_MD("tile_set_name","id","name"),&TileSet::tile_set_name);
- ObjectTypeDB::bind_method(_MD("tile_get_name","id"),&TileSet::tile_get_name);
- ObjectTypeDB::bind_method(_MD("tile_set_texture","id","texture:Texture"),&TileSet::tile_set_texture);
- ObjectTypeDB::bind_method(_MD("tile_get_texture:Texture","id"),&TileSet::tile_get_texture);
- ObjectTypeDB::bind_method(_MD("tile_set_material","id","material:CanvasItemMaterial"),&TileSet::tile_set_material);
- ObjectTypeDB::bind_method(_MD("tile_get_material:CanvasItemMaterial","id"),&TileSet::tile_get_material);
- ObjectTypeDB::bind_method(_MD("tile_set_texture_offset","id","texture_offset"),&TileSet::tile_set_texture_offset);
- ObjectTypeDB::bind_method(_MD("tile_get_texture_offset","id"),&TileSet::tile_get_texture_offset);
- ObjectTypeDB::bind_method(_MD("tile_set_shape_offset","id","shape_offset"),&TileSet::tile_set_shape_offset);
- ObjectTypeDB::bind_method(_MD("tile_get_shape_offset","id"),&TileSet::tile_get_shape_offset);
- ObjectTypeDB::bind_method(_MD("tile_set_region","id","region"),&TileSet::tile_set_region);
- ObjectTypeDB::bind_method(_MD("tile_get_region","id"),&TileSet::tile_get_region);
- ObjectTypeDB::bind_method(_MD("tile_set_shape","id","shape:Shape2D"),&TileSet::tile_set_shape);
- ObjectTypeDB::bind_method(_MD("tile_get_shape:Shape2D","id"),&TileSet::tile_get_shape);
- ObjectTypeDB::bind_method(_MD("tile_set_shapes","id","shapes"),&TileSet::_tile_set_shapes);
- ObjectTypeDB::bind_method(_MD("tile_get_shapes","id"),&TileSet::_tile_get_shapes);
- ObjectTypeDB::bind_method(_MD("tile_set_navigation_polygon","id","navigation_polygon:NavigationPolygon"),&TileSet::tile_set_navigation_polygon);
- ObjectTypeDB::bind_method(_MD("tile_get_navigation_polygon:NavigationPolygon","id"),&TileSet::tile_get_navigation_polygon);
- ObjectTypeDB::bind_method(_MD("tile_set_navigation_polygon_offset","id","navigation_polygon_offset"),&TileSet::tile_set_navigation_polygon_offset);
- ObjectTypeDB::bind_method(_MD("tile_get_navigation_polygon_offset","id"),&TileSet::tile_get_navigation_polygon_offset);
- ObjectTypeDB::bind_method(_MD("tile_set_light_occluder","id","light_occluder:OccluderPolygon2D"),&TileSet::tile_set_light_occluder);
- ObjectTypeDB::bind_method(_MD("tile_get_light_occluder:OccluderPolygon2D","id"),&TileSet::tile_get_light_occluder);
- ObjectTypeDB::bind_method(_MD("tile_set_occluder_offset","id","occluder_offset"),&TileSet::tile_set_occluder_offset);
- ObjectTypeDB::bind_method(_MD("tile_get_occluder_offset","id"),&TileSet::tile_get_occluder_offset);
-
- ObjectTypeDB::bind_method(_MD("remove_tile","id"),&TileSet::remove_tile);
- ObjectTypeDB::bind_method(_MD("clear"),&TileSet::clear);
- ObjectTypeDB::bind_method(_MD("get_last_unused_tile_id"),&TileSet::get_last_unused_tile_id);
- ObjectTypeDB::bind_method(_MD("find_tile_by_name","name"),&TileSet::find_tile_by_name);
- ObjectTypeDB::bind_method(_MD("get_tiles_ids", "name"), &TileSet::_get_tiles_ids);
+ ClassDB::bind_method(_MD("create_tile","id"),&TileSet::create_tile);
+ ClassDB::bind_method(_MD("tile_set_name","id","name"),&TileSet::tile_set_name);
+ ClassDB::bind_method(_MD("tile_get_name","id"),&TileSet::tile_get_name);
+ ClassDB::bind_method(_MD("tile_set_texture","id","texture:Texture"),&TileSet::tile_set_texture);
+ ClassDB::bind_method(_MD("tile_get_texture:Texture","id"),&TileSet::tile_get_texture);
+ ClassDB::bind_method(_MD("tile_set_material","id","material:CanvasItemMaterial"),&TileSet::tile_set_material);
+ ClassDB::bind_method(_MD("tile_get_material:CanvasItemMaterial","id"),&TileSet::tile_get_material);
+ ClassDB::bind_method(_MD("tile_set_texture_offset","id","texture_offset"),&TileSet::tile_set_texture_offset);
+ ClassDB::bind_method(_MD("tile_get_texture_offset","id"),&TileSet::tile_get_texture_offset);
+ ClassDB::bind_method(_MD("tile_set_shape_offset","id","shape_offset"),&TileSet::tile_set_shape_offset);
+ ClassDB::bind_method(_MD("tile_get_shape_offset","id"),&TileSet::tile_get_shape_offset);
+ ClassDB::bind_method(_MD("tile_set_region","id","region"),&TileSet::tile_set_region);
+ ClassDB::bind_method(_MD("tile_get_region","id"),&TileSet::tile_get_region);
+ ClassDB::bind_method(_MD("tile_set_shape","id","shape:Shape2D"),&TileSet::tile_set_shape);
+ ClassDB::bind_method(_MD("tile_get_shape:Shape2D","id"),&TileSet::tile_get_shape);
+ ClassDB::bind_method(_MD("tile_set_shapes","id","shapes"),&TileSet::_tile_set_shapes);
+ ClassDB::bind_method(_MD("tile_get_shapes","id"),&TileSet::_tile_get_shapes);
+ ClassDB::bind_method(_MD("tile_set_navigation_polygon","id","navigation_polygon:NavigationPolygon"),&TileSet::tile_set_navigation_polygon);
+ ClassDB::bind_method(_MD("tile_get_navigation_polygon:NavigationPolygon","id"),&TileSet::tile_get_navigation_polygon);
+ ClassDB::bind_method(_MD("tile_set_navigation_polygon_offset","id","navigation_polygon_offset"),&TileSet::tile_set_navigation_polygon_offset);
+ ClassDB::bind_method(_MD("tile_get_navigation_polygon_offset","id"),&TileSet::tile_get_navigation_polygon_offset);
+ ClassDB::bind_method(_MD("tile_set_light_occluder","id","light_occluder:OccluderPolygon2D"),&TileSet::tile_set_light_occluder);
+ ClassDB::bind_method(_MD("tile_get_light_occluder:OccluderPolygon2D","id"),&TileSet::tile_get_light_occluder);
+ ClassDB::bind_method(_MD("tile_set_occluder_offset","id","occluder_offset"),&TileSet::tile_set_occluder_offset);
+ ClassDB::bind_method(_MD("tile_get_occluder_offset","id"),&TileSet::tile_get_occluder_offset);
+
+ ClassDB::bind_method(_MD("remove_tile","id"),&TileSet::remove_tile);
+ ClassDB::bind_method(_MD("clear"),&TileSet::clear);
+ ClassDB::bind_method(_MD("get_last_unused_tile_id"),&TileSet::get_last_unused_tile_id);
+ ClassDB::bind_method(_MD("find_tile_by_name","name"),&TileSet::find_tile_by_name);
+ ClassDB::bind_method(_MD("get_tiles_ids", "name"), &TileSet::_get_tiles_ids);
}
diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h
index e0ae0330b2..ce40e5ebe3 100644
--- a/scene/resources/tile_set.h
+++ b/scene/resources/tile_set.h
@@ -37,7 +37,7 @@
class TileSet : public Resource {
- OBJ_TYPE( TileSet, Resource );
+ GDCLASS( TileSet, Resource );
struct Data {
diff --git a/scene/resources/video_stream.h b/scene/resources/video_stream.h
index ce01a766ca..bcd25c0336 100644
--- a/scene/resources/video_stream.h
+++ b/scene/resources/video_stream.h
@@ -35,7 +35,7 @@
class VideoStreamPlayback : public Resource {
- OBJ_TYPE(VideoStreamPlayback,Resource);
+ GDCLASS(VideoStreamPlayback,Resource);
protected:
static void _bind_methods();
@@ -77,7 +77,7 @@ public:
class VideoStream : public Resource {
- OBJ_TYPE( VideoStream, Resource );
+ GDCLASS( VideoStream, Resource );
OBJ_SAVE_TYPE( VideoStream ); //children are all saved as AudioStream, so they can be exchanged
public:
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp
index e75c4821d7..e89a460558 100644
--- a/scene/resources/world.cpp
+++ b/scene/resources/world.cpp
@@ -314,12 +314,12 @@ PhysicsDirectSpaceState *World::get_direct_space_state() {
void World::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_space"),&World::get_space);
- ObjectTypeDB::bind_method(_MD("get_scenario"),&World::get_scenario);
- ObjectTypeDB::bind_method(_MD("get_sound_space"),&World::get_sound_space);
- ObjectTypeDB::bind_method(_MD("set_environment","env:Environment"),&World::set_environment);
- ObjectTypeDB::bind_method(_MD("get_environment:Environment"),&World::get_environment);
- ObjectTypeDB::bind_method(_MD("get_direct_space_state:PhysicsDirectSpaceState"),&World::get_direct_space_state);
+ ClassDB::bind_method(_MD("get_space"),&World::get_space);
+ ClassDB::bind_method(_MD("get_scenario"),&World::get_scenario);
+ ClassDB::bind_method(_MD("get_sound_space"),&World::get_sound_space);
+ ClassDB::bind_method(_MD("set_environment","env:Environment"),&World::set_environment);
+ ClassDB::bind_method(_MD("get_environment:Environment"),&World::get_environment);
+ ClassDB::bind_method(_MD("get_direct_space_state:PhysicsDirectSpaceState"),&World::get_direct_space_state);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"environment",PROPERTY_HINT_RESOURCE_TYPE,"Environment"),_SCS("set_environment"),_SCS("get_environment"));
}
diff --git a/scene/resources/world.h b/scene/resources/world.h
index 84d69482bd..8244261243 100644
--- a/scene/resources/world.h
+++ b/scene/resources/world.h
@@ -40,7 +40,7 @@ class Camera;
class VisibilityNotifier;
class World : public Resource {
- OBJ_TYPE(World, Resource);
+ GDCLASS(World, Resource);
RES_BASE_EXTENSION("wrd");
private:
RID space;
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index 8c39d70b2d..46434bfd60 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -382,11 +382,11 @@ RID World2D::get_sound_space() {
void World2D::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_canvas"),&World2D::get_canvas);
- ObjectTypeDB::bind_method(_MD("get_space"),&World2D::get_space);
- ObjectTypeDB::bind_method(_MD("get_sound_space"),&World2D::get_sound_space);
+ ClassDB::bind_method(_MD("get_canvas"),&World2D::get_canvas);
+ ClassDB::bind_method(_MD("get_space"),&World2D::get_space);
+ ClassDB::bind_method(_MD("get_sound_space"),&World2D::get_sound_space);
- ObjectTypeDB::bind_method(_MD("get_direct_space_state:Physics2DDirectSpaceState"),&World2D::get_direct_space_state);
+ ClassDB::bind_method(_MD("get_direct_space_state:Physics2DDirectSpaceState"),&World2D::get_direct_space_state);
}
diff --git a/scene/resources/world_2d.h b/scene/resources/world_2d.h
index 91ddc8f600..a9110b3bd9 100644
--- a/scene/resources/world_2d.h
+++ b/scene/resources/world_2d.h
@@ -39,7 +39,7 @@ class Viewport;
class World2D : public Resource {
- OBJ_TYPE( World2D, Resource );
+ GDCLASS( World2D, Resource );
RID canvas;
RID space;