summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-02 23:03:46 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-02 23:03:46 -0300
commit118eed485e8f928a5a0dab530ae93211afa10525 (patch)
tree83efb5cbcebb7046e5b64dfe1712475a7d3b7f14
parentce26eb74bca48f16e9a34b4eb1c34e50dfc5daae (diff)
ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
-rw-r--r--bin/tests/test_math.cpp2
-rw-r--r--bin/tests/test_physics.cpp4
-rw-r--r--bin/tests/test_physics_2d.cpp6
-rw-r--r--core/bind/core_bind.cpp671
-rw-r--r--core/bind/core_bind.h58
-rw-r--r--core/compressed_translation.cpp2
-rw-r--r--core/compressed_translation.h2
-rw-r--r--core/func_ref.cpp6
-rw-r--r--core/func_ref.h2
-rw-r--r--core/globals.cpp30
-rw-r--r--core/globals.h2
-rw-r--r--core/helper/value_evaluator.h2
-rw-r--r--core/input_map.cpp26
-rw-r--r--core/input_map.h2
-rw-r--r--core/io/config_file.cpp16
-rw-r--r--core/io/config_file.h2
-rw-r--r--core/io/http_client.cpp52
-rw-r--r--core/io/http_client.h2
-rw-r--r--core/io/ip.cpp14
-rw-r--r--core/io/ip.h2
-rw-r--r--core/io/networked_multiplayer_peer.cpp16
-rw-r--r--core/io/networked_multiplayer_peer.h2
-rw-r--r--core/io/packet_peer.cpp14
-rw-r--r--core/io/packet_peer.h4
-rw-r--r--core/io/packet_peer_udp.cpp18
-rw-r--r--core/io/packet_peer_udp.h2
-rw-r--r--core/io/pck_packer.cpp6
-rw-r--r--core/io/pck_packer.h2
-rw-r--r--core/io/resource_format_binary.cpp14
-rw-r--r--core/io/resource_format_xml.cpp18
-rw-r--r--core/io/resource_loader.cpp14
-rw-r--r--core/io/resource_loader.h2
-rw-r--r--core/io/stream_peer.cpp90
-rw-r--r--core/io/stream_peer.h4
-rw-r--r--core/io/stream_peer_ssl.cpp8
-rw-r--r--core/io/stream_peer_ssl.h2
-rw-r--r--core/io/stream_peer_tcp.cpp14
-rw-r--r--core/io/stream_peer_tcp.h2
-rw-r--r--core/io/tcp_server.cpp10
-rw-r--r--core/io/tcp_server.h2
-rw-r--r--core/io/xml_parser.cpp34
-rw-r--r--core/io/xml_parser.h2
-rw-r--r--core/make_binders.py8
-rw-r--r--core/math/a_star.cpp26
-rw-r--r--core/math/a_star.h2
-rw-r--r--core/math/triangle_mesh.h2
-rw-r--r--core/message_queue.cpp6
-rw-r--r--core/method_bind.h4
-rw-r--r--core/object.cpp136
-rw-r--r--core/object.h140
-rw-r--r--core/object_type_db.cpp258
-rw-r--r--core/object_type_db.h106
-rw-r--r--core/os/input.cpp66
-rw-r--r--core/os/input.h2
-rw-r--r--core/os/main_loop.cpp12
-rw-r--r--core/os/main_loop.h2
-rw-r--r--core/os/os.cpp2
-rw-r--r--core/packed_data_container.cpp24
-rw-r--r--core/packed_data_container.h4
-rw-r--r--core/path_remap.cpp10
-rw-r--r--core/path_remap.h2
-rw-r--r--core/reference.cpp8
-rw-r--r--core/reference.h4
-rw-r--r--core/register_core_types.cpp90
-rw-r--r--core/resource.cpp52
-rw-r--r--core/resource.h6
-rw-r--r--core/script_debugger_remote.cpp4
-rw-r--r--core/script_language.cpp14
-rw-r--r--core/script_language.h2
-rw-r--r--core/translation.cpp30
-rw-r--r--core/translation.h4
-rw-r--r--core/undo_redo.cpp26
-rw-r--r--core/undo_redo.h2
-rw-r--r--core/variant.cpp4
-rw-r--r--drivers/png/resource_saver_png.cpp2
-rw-r--r--drivers/unix/ip_unix.h2
-rw-r--r--main/input_default.h2
-rw-r--r--main/main.cpp28
-rw-r--r--main/performance.cpp2
-rw-r--r--main/performance.h2
-rw-r--r--modules/chibi/event_stream_chibi.cpp2
-rw-r--r--modules/chibi/event_stream_chibi.h4
-rw-r--r--modules/dds/texture_loader_dds.cpp2
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp12
-rw-r--r--modules/enet/networked_multiplayer_enet.h2
-rw-r--r--modules/enet/register_types.cpp2
-rw-r--r--modules/etc1/texture_loader_pkm.cpp2
-rw-r--r--modules/gdscript/gd_compiler.cpp4
-rw-r--r--modules/gdscript/gd_editor.cpp110
-rw-r--r--modules/gdscript/gd_function.cpp16
-rw-r--r--modules/gdscript/gd_function.h2
-rw-r--r--modules/gdscript/gd_functions.cpp2
-rw-r--r--modules/gdscript/gd_parser.cpp4
-rw-r--r--modules/gdscript/gd_script.cpp18
-rw-r--r--modules/gdscript/gd_script.h4
-rw-r--r--modules/gdscript/register_types.cpp6
-rw-r--r--modules/gridmap/grid_map.cpp80
-rw-r--r--modules/gridmap/grid_map.h2
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp20
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h4
-rw-r--r--modules/gridmap/register_types.cpp2
-rw-r--r--modules/mpc/audio_stream_mpc.cpp4
-rw-r--r--modules/mpc/audio_stream_mpc.h4
-rw-r--r--modules/mpc/register_types.cpp2
-rw-r--r--modules/openssl/register_types.cpp2
-rw-r--r--modules/opus/audio_stream_opus.h4
-rw-r--r--modules/opus/register_types.cpp2
-rw-r--r--modules/pvr/texture_loader_pvr.cpp2
-rw-r--r--modules/regex/regex.cpp32
-rw-r--r--modules/regex/regex.h4
-rw-r--r--modules/regex/register_types.cpp4
-rw-r--r--modules/theora/register_types.cpp2
-rw-r--r--modules/theora/video_stream_theora.h4
-rw-r--r--modules/visual_script/register_types.cpp104
-rw-r--r--modules/visual_script/visual_script.cpp136
-rw-r--r--modules/visual_script/visual_script.h8
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp6
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.h2
-rw-r--r--modules/visual_script/visual_script_editor.cpp132
-rw-r--r--modules/visual_script/visual_script_editor.h2
-rw-r--r--modules/visual_script/visual_script_expression.h2
-rw-r--r--modules/visual_script/visual_script_flow_control.cpp22
-rw-r--r--modules/visual_script/visual_script_flow_control.h16
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp152
-rw-r--r--modules/visual_script/visual_script_func_nodes.h8
-rw-r--r--modules/visual_script/visual_script_nodes.cpp142
-rw-r--r--modules/visual_script/visual_script_nodes.h50
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp32
-rw-r--r--modules/visual_script/visual_script_yield_nodes.h4
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.h4
-rw-r--r--modules/vorbis/register_types.cpp2
-rw-r--r--modules/webm/register_types.cpp2
-rw-r--r--modules/webm/video_stream_webm.h4
-rw-r--r--platform/android/export/export.cpp2
-rw-r--r--platform/android/godot_android.cpp2
-rw-r--r--platform/android/java_class_wrapper.cpp2
-rw-r--r--platform/android/java_class_wrapper.h6
-rw-r--r--platform/android/java_glue.cpp2
-rw-r--r--platform/bb10/export/export.cpp2
-rw-r--r--platform/bb10/payment_service.cpp8
-rw-r--r--platform/bb10/payment_service.h2
-rw-r--r--platform/iphone/game_center.h2
-rw-r--r--platform/iphone/game_center.mm24
-rw-r--r--platform/iphone/icloud.h2
-rw-r--r--platform/iphone/icloud.mm16
-rw-r--r--platform/iphone/in_app_store.h2
-rw-r--r--platform/iphone/in_app_store.mm12
-rw-r--r--platform/iphone/ios.h2
-rw-r--r--platform/iphone/ios.mm2
-rw-r--r--platform/javascript/audio_server_javascript.h2
-rw-r--r--platform/javascript/export/export.cpp2
-rw-r--r--platform/javascript/javascript_eval.h2
-rw-r--r--platform/osx/export/export.cpp2
-rw-r--r--platform/uwp/export/export.cpp2
-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
-rw-r--r--servers/audio/audio_server_sw.h2
-rw-r--r--servers/audio_server.cpp92
-rw-r--r--servers/audio_server.h2
-rw-r--r--servers/physics/body_sw.h2
-rw-r--r--servers/physics/physics_server_sw.h2
-rw-r--r--servers/physics/space_sw.h2
-rw-r--r--servers/physics_2d/body_2d_sw.h2
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h2
-rw-r--r--servers/physics_2d/space_2d_sw.h2
-rw-r--r--servers/physics_2d_server.cpp310
-rw-r--r--servers/physics_2d_server.h12
-rw-r--r--servers/physics_server.cpp336
-rw-r--r--servers/physics_server.h10
-rw-r--r--servers/register_server_types.cpp18
-rw-r--r--servers/spatial_sound/spatial_sound_server_sw.h2
-rw-r--r--servers/spatial_sound_2d/spatial_sound_2d_server_sw.h2
-rw-r--r--servers/spatial_sound_2d_server.h2
-rw-r--r--servers/spatial_sound_server.h2
-rw-r--r--servers/visual_server.cpp22
-rw-r--r--servers/visual_server.h2
-rw-r--r--tools/doc/doc_data.cpp22
-rw-r--r--tools/doc/doc_dump.cpp16
-rw-r--r--tools/editor/animation_editor.cpp72
-rw-r--r--tools/editor/animation_editor.h2
-rw-r--r--tools/editor/array_property_edit.cpp8
-rw-r--r--tools/editor/array_property_edit.h2
-rw-r--r--tools/editor/asset_library_editor_plugin.cpp50
-rw-r--r--tools/editor/asset_library_editor_plugin.h10
-rw-r--r--tools/editor/call_dialog.cpp18
-rw-r--r--tools/editor/call_dialog.h2
-rw-r--r--tools/editor/code_editor.cpp50
-rw-r--r--tools/editor/code_editor.h8
-rw-r--r--tools/editor/connections_dialog.cpp40
-rw-r--r--tools/editor/connections_dialog.h4
-rw-r--r--tools/editor/create_dialog.cpp72
-rw-r--r--tools/editor/create_dialog.h4
-rw-r--r--tools/editor/dependency_editor.cpp10
-rw-r--r--tools/editor/dependency_editor.h10
-rw-r--r--tools/editor/editor_asset_installer.cpp2
-rw-r--r--tools/editor/editor_asset_installer.h2
-rw-r--r--tools/editor/editor_autoload_settings.cpp20
-rw-r--r--tools/editor/editor_autoload_settings.h2
-rw-r--r--tools/editor/editor_data.cpp14
-rw-r--r--tools/editor/editor_data.h2
-rw-r--r--tools/editor/editor_dir_dialog.cpp8
-rw-r--r--tools/editor/editor_dir_dialog.h2
-rw-r--r--tools/editor/editor_file_dialog.cpp108
-rw-r--r--tools/editor/editor_file_dialog.h4
-rw-r--r--tools/editor/editor_file_system.cpp40
-rw-r--r--tools/editor/editor_file_system.h4
-rw-r--r--tools/editor/editor_help.cpp46
-rw-r--r--tools/editor/editor_help.h10
-rw-r--r--tools/editor/editor_import_export.cpp108
-rw-r--r--tools/editor/editor_import_export.h10
-rw-r--r--tools/editor/editor_log.cpp6
-rw-r--r--tools/editor/editor_log.h2
-rw-r--r--tools/editor/editor_name_dialog.cpp2
-rw-r--r--tools/editor/editor_name_dialog.h2
-rw-r--r--tools/editor/editor_node.cpp214
-rw-r--r--tools/editor/editor_node.h2
-rw-r--r--tools/editor/editor_path.cpp20
-rw-r--r--tools/editor/editor_path.h2
-rw-r--r--tools/editor/editor_plugin.cpp96
-rw-r--r--tools/editor/editor_plugin.h2
-rw-r--r--tools/editor/editor_plugin_settings.cpp4
-rw-r--r--tools/editor/editor_plugin_settings.h2
-rw-r--r--tools/editor/editor_profiler.cpp20
-rw-r--r--tools/editor/editor_profiler.h2
-rw-r--r--tools/editor/editor_reimport_dialog.h2
-rw-r--r--tools/editor/editor_resource_preview.cpp20
-rw-r--r--tools/editor/editor_resource_preview.h4
-rw-r--r--tools/editor/editor_run_native.cpp2
-rw-r--r--tools/editor/editor_run_native.h2
-rw-r--r--tools/editor/editor_run_script.cpp4
-rw-r--r--tools/editor/editor_run_script.h2
-rw-r--r--tools/editor/editor_settings.cpp18
-rw-r--r--tools/editor/editor_settings.h2
-rw-r--r--tools/editor/editor_sub_scene.cpp10
-rw-r--r--tools/editor/editor_sub_scene.h2
-rw-r--r--tools/editor/file_type_cache.h2
-rw-r--r--tools/editor/fileserver/editor_file_server.h2
-rw-r--r--tools/editor/filesystem_dock.cpp54
-rw-r--r--tools/editor/filesystem_dock.h2
-rw-r--r--tools/editor/groups_editor.cpp6
-rw-r--r--tools/editor/groups_editor.h2
-rw-r--r--tools/editor/inspector_dock.h2
-rw-r--r--tools/editor/io_plugins/editor_bitmask_import_plugin.cpp14
-rw-r--r--tools/editor/io_plugins/editor_bitmask_import_plugin.h4
-rw-r--r--tools/editor/io_plugins/editor_export_scene.h2
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp20
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.h2
-rw-r--r--tools/editor/io_plugins/editor_import_collada.h2
-rw-r--r--tools/editor/io_plugins/editor_mesh_import_plugin.cpp14
-rw-r--r--tools/editor/io_plugins/editor_mesh_import_plugin.h2
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp14
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.h4
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp42
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.h8
-rw-r--r--tools/editor/io_plugins/editor_scene_importer_fbxconv.h2
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp20
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.h6
-rw-r--r--tools/editor/io_plugins/editor_translation_import_plugin.cpp12
-rw-r--r--tools/editor/io_plugins/editor_translation_import_plugin.h2
-rw-r--r--tools/editor/multi_node_edit.h2
-rw-r--r--tools/editor/node_dock.cpp4
-rw-r--r--tools/editor/node_dock.h2
-rw-r--r--tools/editor/output_strings.cpp4
-rw-r--r--tools/editor/output_strings.h2
-rw-r--r--tools/editor/pane_drag.cpp2
-rw-r--r--tools/editor/pane_drag.h2
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp76
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.h4
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.cpp36
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.h4
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.h4
-rw-r--r--tools/editor/plugins/camera_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/camera_editor_plugin.h4
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp52
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.h8
-rw-r--r--tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/collision_polygon_2d_editor_plugin.h4
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.h4
-rw-r--r--tools/editor/plugins/collision_shape_2d_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/collision_shape_2d_editor_plugin.h4
-rw-r--r--tools/editor/plugins/color_ramp_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/color_ramp_editor_plugin.h2
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.h4
-rw-r--r--tools/editor/plugins/editor_preview_plugins.cpp14
-rw-r--r--tools/editor/plugins/gi_probe_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/gi_probe_editor_plugin.h2
-rw-r--r--tools/editor/plugins/item_list_editor_plugin.cpp16
-rw-r--r--tools/editor/plugins/item_list_editor_plugin.h10
-rw-r--r--tools/editor/plugins/light_occluder_2d_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/light_occluder_2d_editor_plugin.h4
-rw-r--r--tools/editor/plugins/material_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/material_editor_plugin.h4
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.h4
-rw-r--r--tools/editor/plugins/mesh_instance_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/mesh_instance_editor_plugin.h4
-rw-r--r--tools/editor/plugins/multimesh_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/multimesh_editor_plugin.h4
-rw-r--r--tools/editor/plugins/navigation_polygon_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/navigation_polygon_editor_plugin.h4
-rw-r--r--tools/editor/plugins/particles_2d_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/particles_2d_editor_plugin.h2
-rw-r--r--tools/editor/plugins/particles_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/particles_editor_plugin.h4
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.h4
-rw-r--r--tools/editor/plugins/path_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/path_editor_plugin.h4
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.cpp28
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.h4
-rw-r--r--tools/editor/plugins/resource_preloader_editor_plugin.cpp28
-rw-r--r--tools/editor/plugins/resource_preloader_editor_plugin.h4
-rw-r--r--tools/editor/plugins/rich_text_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/rich_text_editor_plugin.h4
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/sample_editor_plugin.h4
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp24
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.h4
-rw-r--r--tools/editor/plugins/sample_player_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/sample_player_editor_plugin.h4
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp96
-rw-r--r--tools/editor/plugins/script_editor_plugin.h8
-rw-r--r--tools/editor/plugins/script_text_editor.cpp40
-rw-r--r--tools/editor/plugins/script_text_editor.h2
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/shader_editor_plugin.h6
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp96
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.h10
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp48
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.h10
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.cpp46
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.h4
-rw-r--r--tools/editor/plugins/stream_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/stream_editor_plugin.h4
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.h4
-rw-r--r--tools/editor/plugins/texture_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/texture_editor_plugin.h4
-rw-r--r--tools/editor/plugins/texture_region_editor_plugin.cpp32
-rw-r--r--tools/editor/plugins/texture_region_editor_plugin.h4
-rw-r--r--tools/editor/plugins/theme_editor_plugin.cpp14
-rw-r--r--tools/editor/plugins/theme_editor_plugin.h4
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp30
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.h4
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.h4
-rw-r--r--tools/editor/progress_dialog.cpp8
-rw-r--r--tools/editor/progress_dialog.h4
-rw-r--r--tools/editor/project_export.cpp76
-rw-r--r--tools/editor/project_export.h4
-rw-r--r--tools/editor/project_manager.cpp60
-rw-r--r--tools/editor/project_manager.h4
-rw-r--r--tools/editor/project_settings.cpp70
-rw-r--r--tools/editor/project_settings.h2
-rw-r--r--tools/editor/property_editor.cpp130
-rw-r--r--tools/editor/property_editor.h8
-rw-r--r--tools/editor/property_selector.cpp24
-rw-r--r--tools/editor/property_selector.h2
-rw-r--r--tools/editor/quick_open.cpp8
-rw-r--r--tools/editor/quick_open.h2
-rw-r--r--tools/editor/reparent_dialog.cpp4
-rw-r--r--tools/editor/reparent_dialog.h2
-rw-r--r--tools/editor/resources_dock.cpp20
-rw-r--r--tools/editor/resources_dock.h2
-rw-r--r--tools/editor/run_settings_dialog.cpp4
-rw-r--r--tools/editor/run_settings_dialog.h2
-rw-r--r--tools/editor/scene_tree_dock.cpp62
-rw-r--r--tools/editor/scene_tree_dock.h2
-rw-r--r--tools/editor/scene_tree_editor.cpp76
-rw-r--r--tools/editor/scene_tree_editor.h4
-rw-r--r--tools/editor/script_create_dialog.cpp12
-rw-r--r--tools/editor/script_create_dialog.h2
-rw-r--r--tools/editor/script_editor_debugger.cpp70
-rw-r--r--tools/editor/script_editor_debugger.h2
-rw-r--r--tools/editor/settings_config_dialog.cpp20
-rw-r--r--tools/editor/settings_config_dialog.h2
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp16
-rw-r--r--tools/editor/spatial_editor_gizmos.h48
751 files changed, 8311 insertions, 8075 deletions
diff --git a/bin/tests/test_math.cpp b/bin/tests/test_math.cpp
index 9329002f76..2ffef83f79 100644
--- a/bin/tests/test_math.cpp
+++ b/bin/tests/test_math.cpp
@@ -518,7 +518,7 @@ MainLoop* test() {
Vector<int> hashes;
List<StringName> tl;
- ObjectTypeDB::get_type_list(&tl);
+ ClassDB::get_class_list(&tl);
for (List<StringName>::Element *E=tl.front();E;E=E->next()) {
diff --git a/bin/tests/test_physics.cpp b/bin/tests/test_physics.cpp
index 3a8ca65734..8a270f721f 100644
--- a/bin/tests/test_physics.cpp
+++ b/bin/tests/test_physics.cpp
@@ -40,7 +40,7 @@
class TestPhysicsMainLoop : public MainLoop {
- OBJ_TYPE( TestPhysicsMainLoop, MainLoop );
+ GDCLASS( TestPhysicsMainLoop, MainLoop );
enum {
LINK_COUNT = 20,
@@ -81,7 +81,7 @@ protected:
static void _bind_methods() {
- ObjectTypeDB::bind_method("body_changed_transform",&TestPhysicsMainLoop::body_changed_transform);
+ ClassDB::bind_method("body_changed_transform",&TestPhysicsMainLoop::body_changed_transform);
}
RID create_body(PhysicsServer::ShapeType p_shape, PhysicsServer::BodyMode p_body,const Transform p_location,bool p_active_default=true,const Transform&p_shape_xform=Transform()) {
diff --git a/bin/tests/test_physics_2d.cpp b/bin/tests/test_physics_2d.cpp
index f369c361d3..93d707b26a 100644
--- a/bin/tests/test_physics_2d.cpp
+++ b/bin/tests/test_physics_2d.cpp
@@ -42,7 +42,7 @@ static const unsigned char convex_png[]={
class TestPhysics2DMainLoop : public MainLoop {
- OBJ_TYPE( TestPhysics2DMainLoop, MainLoop );
+ GDCLASS( TestPhysics2DMainLoop, MainLoop );
RID circle_img;
@@ -354,8 +354,8 @@ protected:
static void _bind_methods() {
- ObjectTypeDB::bind_method(_MD("_body_moved"),&TestPhysics2DMainLoop::_body_moved);
- ObjectTypeDB::bind_method(_MD("_ray_query_callback"),&TestPhysics2DMainLoop::_ray_query_callback);
+ ClassDB::bind_method(_MD("_body_moved"),&TestPhysics2DMainLoop::_body_moved);
+ ClassDB::bind_method(_MD("_ray_query_callback"),&TestPhysics2DMainLoop::_ray_query_callback);
}
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 3d93ec9fa5..02f3c4c5f3 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -114,13 +114,13 @@ Ref<ResourceImportMetadata> _ResourceLoader::load_import_metadata(const String&
void _ResourceLoader::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("load_interactive:ResourceInteractiveLoader","path","type_hint"),&_ResourceLoader::load_interactive,DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("load:Resource","path","type_hint", "p_no_cache"),&_ResourceLoader::load,DEFVAL(""), DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("load_import_metadata:ResourceImportMetadata","path"),&_ResourceLoader::load_import_metadata);
- ObjectTypeDB::bind_method(_MD("get_recognized_extensions_for_type","type"),&_ResourceLoader::get_recognized_extensions_for_type);
- ObjectTypeDB::bind_method(_MD("set_abort_on_missing_resources","abort"),&_ResourceLoader::set_abort_on_missing_resources);
- ObjectTypeDB::bind_method(_MD("get_dependencies","path"),&_ResourceLoader::get_dependencies);
- ObjectTypeDB::bind_method(_MD("has","path"),&_ResourceLoader::has);
+ ClassDB::bind_method(_MD("load_interactive:ResourceInteractiveLoader","path","type_hint"),&_ResourceLoader::load_interactive,DEFVAL(""));
+ ClassDB::bind_method(_MD("load:Resource","path","type_hint", "p_no_cache"),&_ResourceLoader::load,DEFVAL(""), DEFVAL(false));
+ ClassDB::bind_method(_MD("load_import_metadata:ResourceImportMetadata","path"),&_ResourceLoader::load_import_metadata);
+ ClassDB::bind_method(_MD("get_recognized_extensions_for_type","type"),&_ResourceLoader::get_recognized_extensions_for_type);
+ ClassDB::bind_method(_MD("set_abort_on_missing_resources","abort"),&_ResourceLoader::set_abort_on_missing_resources);
+ ClassDB::bind_method(_MD("get_dependencies","path"),&_ResourceLoader::get_dependencies);
+ ClassDB::bind_method(_MD("has","path"),&_ResourceLoader::has);
}
_ResourceLoader::_ResourceLoader() {
@@ -153,8 +153,8 @@ _ResourceSaver *_ResourceSaver::singleton=NULL;
void _ResourceSaver::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("save","path","resource:Resource","flags"),&_ResourceSaver::save,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_recognized_extensions","type"),&_ResourceSaver::get_recognized_extensions);
+ ClassDB::bind_method(_MD("save","path","resource:Resource","flags"),&_ResourceSaver::save,DEFVAL(0));
+ ClassDB::bind_method(_MD("get_recognized_extensions","type"),&_ResourceSaver::get_recognized_extensions);
BIND_CONSTANT(FLAG_RELATIVE_PATHS);
BIND_CONSTANT(FLAG_BUNDLE_RESOURCES);
@@ -836,7 +836,7 @@ void _OS::print_all_textures_by_size() {
for (List<Ref<Resource> >::Element *E=rsrc.front();E;E=E->next()) {
- if (!E->get()->is_type("ImageTexture"))
+ if (!E->get()->is_class("ImageTexture"))
continue;
Size2 size = E->get()->call("get_size");
@@ -878,18 +878,18 @@ void _OS::print_resources_by_type(const Vector<String>& p_types) {
bool found = false;
for (int i=0; i<p_types.size(); i++) {
- if (r->is_type(p_types[i]))
+ if (r->is_class(p_types[i]))
found = true;
}
if (!found)
continue;
- if (!type_count.has(r->get_type())) {
- type_count[r->get_type()]=0;
+ if (!type_count.has(r->get_class())) {
+ type_count[r->get_class()]=0;
}
- type_count[r->get_type()]++;
+ type_count[r->get_class()]++;
}
};
@@ -1027,154 +1027,154 @@ _OS *_OS::singleton=NULL;
void _OS::_bind_methods() {
- //ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&_OS::get_mouse_pos);
- //ObjectTypeDB::bind_method(_MD("is_mouse_grab_enabled"),&_OS::is_mouse_grab_enabled);
-
- ObjectTypeDB::bind_method(_MD("set_clipboard","clipboard"),&_OS::set_clipboard);
- ObjectTypeDB::bind_method(_MD("get_clipboard"),&_OS::get_clipboard);
-
- ObjectTypeDB::bind_method(_MD("set_video_mode","size","fullscreen","resizable","screen"),&_OS::set_video_mode,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_video_mode_size","screen"),&_OS::get_video_mode,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("is_video_mode_fullscreen","screen"),&_OS::is_video_mode_fullscreen,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("is_video_mode_resizable","screen"),&_OS::is_video_mode_resizable,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_fullscreen_mode_list","screen"),&_OS::get_fullscreen_mode_list,DEFVAL(0));
-
-
- ObjectTypeDB::bind_method(_MD("get_screen_count"),&_OS::get_screen_count);
- ObjectTypeDB::bind_method(_MD("get_current_screen"),&_OS::get_current_screen);
- ObjectTypeDB::bind_method(_MD("set_current_screen","screen"),&_OS::set_current_screen);
- ObjectTypeDB::bind_method(_MD("get_screen_position","screen"),&_OS::get_screen_position,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_screen_size","screen"),&_OS::get_screen_size,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_screen_dpi","screen"),&_OS::get_screen_dpi,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_window_position"),&_OS::get_window_position);
- ObjectTypeDB::bind_method(_MD("set_window_position","position"),&_OS::set_window_position);
- ObjectTypeDB::bind_method(_MD("get_window_size"),&_OS::get_window_size);
- ObjectTypeDB::bind_method(_MD("set_window_size","size"),&_OS::set_window_size);
- ObjectTypeDB::bind_method(_MD("set_window_fullscreen","enabled"),&_OS::set_window_fullscreen);
- ObjectTypeDB::bind_method(_MD("is_window_fullscreen"),&_OS::is_window_fullscreen);
- ObjectTypeDB::bind_method(_MD("set_window_resizable","enabled"),&_OS::set_window_resizable);
- ObjectTypeDB::bind_method(_MD("is_window_resizable"),&_OS::is_window_resizable);
- ObjectTypeDB::bind_method(_MD("set_window_minimized", "enabled"),&_OS::set_window_minimized);
- ObjectTypeDB::bind_method(_MD("is_window_minimized"),&_OS::is_window_minimized);
- ObjectTypeDB::bind_method(_MD("set_window_maximized", "enabled"),&_OS::set_window_maximized);
- ObjectTypeDB::bind_method(_MD("is_window_maximized"),&_OS::is_window_maximized);
- ObjectTypeDB::bind_method(_MD("request_attention"), &_OS::request_attention);
-
- ObjectTypeDB::bind_method(_MD("set_borderless_window", "borderless"), &_OS::set_borderless_window);
- ObjectTypeDB::bind_method(_MD("get_borderless_window"), &_OS::get_borderless_window);
-
- ObjectTypeDB::bind_method(_MD("set_screen_orientation","orientation"),&_OS::set_screen_orientation);
- ObjectTypeDB::bind_method(_MD("get_screen_orientation"),&_OS::get_screen_orientation);
-
- ObjectTypeDB::bind_method(_MD("set_keep_screen_on","enabled"),&_OS::set_keep_screen_on);
- ObjectTypeDB::bind_method(_MD("is_keep_screen_on"),&_OS::is_keep_screen_on);
-
- ObjectTypeDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second);
- ObjectTypeDB::bind_method(_MD("get_iterations_per_second"),&_OS::get_iterations_per_second);
- ObjectTypeDB::bind_method(_MD("set_target_fps","target_fps"),&_OS::set_target_fps);
- ObjectTypeDB::bind_method(_MD("get_target_fps"),&_OS::get_target_fps);
-
- ObjectTypeDB::bind_method(_MD("set_time_scale","time_scale"),&_OS::set_time_scale);
- ObjectTypeDB::bind_method(_MD("get_time_scale"),&_OS::get_time_scale);
-
- ObjectTypeDB::bind_method(_MD("has_touchscreen_ui_hint"),&_OS::has_touchscreen_ui_hint);
-
- ObjectTypeDB::bind_method(_MD("set_window_title","title"),&_OS::set_window_title);
-
- ObjectTypeDB::bind_method(_MD("set_low_processor_usage_mode","enable"),&_OS::set_low_processor_usage_mode);
- ObjectTypeDB::bind_method(_MD("is_in_low_processor_usage_mode"),&_OS::is_in_low_processor_usage_mode);
-
- ObjectTypeDB::bind_method(_MD("get_processor_count"),&_OS::get_processor_count);
-
- ObjectTypeDB::bind_method(_MD("get_executable_path"),&_OS::get_executable_path);
- ObjectTypeDB::bind_method(_MD("execute","path","arguments","blocking","output"),&_OS::execute,DEFVAL(Array()));
- ObjectTypeDB::bind_method(_MD("kill","pid"),&_OS::kill);
- ObjectTypeDB::bind_method(_MD("shell_open","uri"),&_OS::shell_open);
- ObjectTypeDB::bind_method(_MD("get_process_ID"),&_OS::get_process_ID);
-
- ObjectTypeDB::bind_method(_MD("get_environment","environment"),&_OS::get_environment);
- ObjectTypeDB::bind_method(_MD("has_environment","environment"),&_OS::has_environment);
-
- ObjectTypeDB::bind_method(_MD("get_name"),&_OS::get_name);
- ObjectTypeDB::bind_method(_MD("get_cmdline_args"),&_OS::get_cmdline_args);
- ObjectTypeDB::bind_method(_MD("get_main_loop"),&_OS::get_main_loop);
-
- ObjectTypeDB::bind_method(_MD("get_datetime","utc"),&_OS::get_datetime,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_date","utc"),&_OS::get_date,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_time","utc"),&_OS::get_time,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_time_zone_info"),&_OS::get_time_zone_info);
- ObjectTypeDB::bind_method(_MD("get_unix_time"),&_OS::get_unix_time);
- ObjectTypeDB::bind_method(_MD("get_datetime_from_unix_time", "unix_time_val"),
+ //ClassDB::bind_method(_MD("get_mouse_pos"),&_OS::get_mouse_pos);
+ //ClassDB::bind_method(_MD("is_mouse_grab_enabled"),&_OS::is_mouse_grab_enabled);
+
+ ClassDB::bind_method(_MD("set_clipboard","clipboard"),&_OS::set_clipboard);
+ ClassDB::bind_method(_MD("get_clipboard"),&_OS::get_clipboard);
+
+ ClassDB::bind_method(_MD("set_video_mode","size","fullscreen","resizable","screen"),&_OS::set_video_mode,DEFVAL(0));
+ ClassDB::bind_method(_MD("get_video_mode_size","screen"),&_OS::get_video_mode,DEFVAL(0));
+ ClassDB::bind_method(_MD("is_video_mode_fullscreen","screen"),&_OS::is_video_mode_fullscreen,DEFVAL(0));
+ ClassDB::bind_method(_MD("is_video_mode_resizable","screen"),&_OS::is_video_mode_resizable,DEFVAL(0));
+ ClassDB::bind_method(_MD("get_fullscreen_mode_list","screen"),&_OS::get_fullscreen_mode_list,DEFVAL(0));
+
+
+ ClassDB::bind_method(_MD("get_screen_count"),&_OS::get_screen_count);
+ ClassDB::bind_method(_MD("get_current_screen"),&_OS::get_current_screen);
+ ClassDB::bind_method(_MD("set_current_screen","screen"),&_OS::set_current_screen);
+ ClassDB::bind_method(_MD("get_screen_position","screen"),&_OS::get_screen_position,DEFVAL(0));
+ ClassDB::bind_method(_MD("get_screen_size","screen"),&_OS::get_screen_size,DEFVAL(0));
+ ClassDB::bind_method(_MD("get_screen_dpi","screen"),&_OS::get_screen_dpi,DEFVAL(0));
+ ClassDB::bind_method(_MD("get_window_position"),&_OS::get_window_position);
+ ClassDB::bind_method(_MD("set_window_position","position"),&_OS::set_window_position);
+ ClassDB::bind_method(_MD("get_window_size"),&_OS::get_window_size);
+ ClassDB::bind_method(_MD("set_window_size","size"),&_OS::set_window_size);
+ ClassDB::bind_method(_MD("set_window_fullscreen","enabled"),&_OS::set_window_fullscreen);
+ ClassDB::bind_method(_MD("is_window_fullscreen"),&_OS::is_window_fullscreen);
+ ClassDB::bind_method(_MD("set_window_resizable","enabled"),&_OS::set_window_resizable);
+ ClassDB::bind_method(_MD("is_window_resizable"),&_OS::is_window_resizable);
+ ClassDB::bind_method(_MD("set_window_minimized", "enabled"),&_OS::set_window_minimized);
+ ClassDB::bind_method(_MD("is_window_minimized"),&_OS::is_window_minimized);
+ ClassDB::bind_method(_MD("set_window_maximized", "enabled"),&_OS::set_window_maximized);
+ ClassDB::bind_method(_MD("is_window_maximized"),&_OS::is_window_maximized);
+ ClassDB::bind_method(_MD("request_attention"), &_OS::request_attention);
+
+ ClassDB::bind_method(_MD("set_borderless_window", "borderless"), &_OS::set_borderless_window);
+ ClassDB::bind_method(_MD("get_borderless_window"), &_OS::get_borderless_window);
+
+ ClassDB::bind_method(_MD("set_screen_orientation","orientation"),&_OS::set_screen_orientation);
+ ClassDB::bind_method(_MD("get_screen_orientation"),&_OS::get_screen_orientation);
+
+ ClassDB::bind_method(_MD("set_keep_screen_on","enabled"),&_OS::set_keep_screen_on);
+ ClassDB::bind_method(_MD("is_keep_screen_on"),&_OS::is_keep_screen_on);
+
+ ClassDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second);
+ ClassDB::bind_method(_MD("get_iterations_per_second"),&_OS::get_iterations_per_second);
+ ClassDB::bind_method(_MD("set_target_fps","target_fps"),&_OS::set_target_fps);
+ ClassDB::bind_method(_MD("get_target_fps"),&_OS::get_target_fps);
+
+ ClassDB::bind_method(_MD("set_time_scale","time_scale"),&_OS::set_time_scale);
+ ClassDB::bind_method(_MD("get_time_scale"),&_OS::get_time_scale);
+
+ ClassDB::bind_method(_MD("has_touchscreen_ui_hint"),&_OS::has_touchscreen_ui_hint);
+
+ ClassDB::bind_method(_MD("set_window_title","title"),&_OS::set_window_title);
+
+ ClassDB::bind_method(_MD("set_low_processor_usage_mode","enable"),&_OS::set_low_processor_usage_mode);
+ ClassDB::bind_method(_MD("is_in_low_processor_usage_mode"),&_OS::is_in_low_processor_usage_mode);
+
+ ClassDB::bind_method(_MD("get_processor_count"),&_OS::get_processor_count);
+
+ ClassDB::bind_method(_MD("get_executable_path"),&_OS::get_executable_path);
+ ClassDB::bind_method(_MD("execute","path","arguments","blocking","output"),&_OS::execute,DEFVAL(Array()));
+ ClassDB::bind_method(_MD("kill","pid"),&_OS::kill);
+ ClassDB::bind_method(_MD("shell_open","uri"),&_OS::shell_open);
+ ClassDB::bind_method(_MD("get_process_ID"),&_OS::get_process_ID);
+
+ ClassDB::bind_method(_MD("get_environment","environment"),&_OS::get_environment);
+ ClassDB::bind_method(_MD("has_environment","environment"),&_OS::has_environment);
+
+ ClassDB::bind_method(_MD("get_name"),&_OS::get_name);
+ ClassDB::bind_method(_MD("get_cmdline_args"),&_OS::get_cmdline_args);
+ ClassDB::bind_method(_MD("get_main_loop"),&_OS::get_main_loop);
+
+ ClassDB::bind_method(_MD("get_datetime","utc"),&_OS::get_datetime,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_date","utc"),&_OS::get_date,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_time","utc"),&_OS::get_time,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_time_zone_info"),&_OS::get_time_zone_info);
+ ClassDB::bind_method(_MD("get_unix_time"),&_OS::get_unix_time);
+ ClassDB::bind_method(_MD("get_datetime_from_unix_time", "unix_time_val"),
&_OS::get_datetime_from_unix_time);
- ObjectTypeDB::bind_method(_MD("get_unix_time_from_datetime", "datetime"),
+ ClassDB::bind_method(_MD("get_unix_time_from_datetime", "datetime"),
&_OS::get_unix_time_from_datetime);
- ObjectTypeDB::bind_method(_MD("get_system_time_secs"), &_OS::get_system_time_secs);
+ ClassDB::bind_method(_MD("get_system_time_secs"), &_OS::get_system_time_secs);
- ObjectTypeDB::bind_method(_MD("set_icon","icon"),&_OS::set_icon);
+ ClassDB::bind_method(_MD("set_icon","icon"),&_OS::set_icon);
- ObjectTypeDB::bind_method(_MD("delay_usec","usec"),&_OS::delay_usec);
- ObjectTypeDB::bind_method(_MD("delay_msec","msec"),&_OS::delay_msec);
- ObjectTypeDB::bind_method(_MD("get_ticks_msec"),&_OS::get_ticks_msec);
- ObjectTypeDB::bind_method(_MD("get_splash_tick_msec"),&_OS::get_splash_tick_msec);
- ObjectTypeDB::bind_method(_MD("get_locale"),&_OS::get_locale);
- ObjectTypeDB::bind_method(_MD("get_latin_keyboard_variant"),&_OS::get_latin_keyboard_variant);
- ObjectTypeDB::bind_method(_MD("get_model_name"),&_OS::get_model_name);
+ ClassDB::bind_method(_MD("delay_usec","usec"),&_OS::delay_usec);
+ ClassDB::bind_method(_MD("delay_msec","msec"),&_OS::delay_msec);
+ ClassDB::bind_method(_MD("get_ticks_msec"),&_OS::get_ticks_msec);
+ ClassDB::bind_method(_MD("get_splash_tick_msec"),&_OS::get_splash_tick_msec);
+ ClassDB::bind_method(_MD("get_locale"),&_OS::get_locale);
+ ClassDB::bind_method(_MD("get_latin_keyboard_variant"),&_OS::get_latin_keyboard_variant);
+ ClassDB::bind_method(_MD("get_model_name"),&_OS::get_model_name);
- ObjectTypeDB::bind_method(_MD("get_custom_level"),&_OS::get_custom_level);
+ ClassDB::bind_method(_MD("get_custom_level"),&_OS::get_custom_level);
- ObjectTypeDB::bind_method(_MD("can_draw"),&_OS::can_draw);
- ObjectTypeDB::bind_method(_MD("get_frames_drawn"),&_OS::get_frames_drawn);
- ObjectTypeDB::bind_method(_MD("is_stdout_verbose"),&_OS::is_stdout_verbose);
+ ClassDB::bind_method(_MD("can_draw"),&_OS::can_draw);
+ ClassDB::bind_method(_MD("get_frames_drawn"),&_OS::get_frames_drawn);
+ ClassDB::bind_method(_MD("is_stdout_verbose"),&_OS::is_stdout_verbose);
- ObjectTypeDB::bind_method(_MD("can_use_threads"),&_OS::can_use_threads);
+ ClassDB::bind_method(_MD("can_use_threads"),&_OS::can_use_threads);
- ObjectTypeDB::bind_method(_MD("is_debug_build"),&_OS::is_debug_build);
+ ClassDB::bind_method(_MD("is_debug_build"),&_OS::is_debug_build);
- //ObjectTypeDB::bind_method(_MD("get_mouse_button_state"),&_OS::get_mouse_button_state);
+ //ClassDB::bind_method(_MD("get_mouse_button_state"),&_OS::get_mouse_button_state);
- ObjectTypeDB::bind_method(_MD("dump_memory_to_file","file"),&_OS::dump_memory_to_file);
- ObjectTypeDB::bind_method(_MD("dump_resources_to_file","file"),&_OS::dump_resources_to_file);
- ObjectTypeDB::bind_method(_MD("has_virtual_keyboard"),&_OS::has_virtual_keyboard);
- ObjectTypeDB::bind_method(_MD("show_virtual_keyboard", "existing_text"),&_OS::show_virtual_keyboard,DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("hide_virtual_keyboard"),&_OS::hide_virtual_keyboard);
- ObjectTypeDB::bind_method(_MD("print_resources_in_use","short"),&_OS::print_resources_in_use,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("print_all_resources","tofile"),&_OS::print_all_resources,DEFVAL(""));
+ ClassDB::bind_method(_MD("dump_memory_to_file","file"),&_OS::dump_memory_to_file);
+ ClassDB::bind_method(_MD("dump_resources_to_file","file"),&_OS::dump_resources_to_file);
+ ClassDB::bind_method(_MD("has_virtual_keyboard"),&_OS::has_virtual_keyboard);
+ ClassDB::bind_method(_MD("show_virtual_keyboard", "existing_text"),&_OS::show_virtual_keyboard,DEFVAL(""));
+ ClassDB::bind_method(_MD("hide_virtual_keyboard"),&_OS::hide_virtual_keyboard);
+ ClassDB::bind_method(_MD("print_resources_in_use","short"),&_OS::print_resources_in_use,DEFVAL(false));
+ ClassDB::bind_method(_MD("print_all_resources","tofile"),&_OS::print_all_resources,DEFVAL(""));
- ObjectTypeDB::bind_method(_MD("get_static_memory_usage"),&_OS::get_static_memory_usage);
- ObjectTypeDB::bind_method(_MD("get_static_memory_peak_usage"),&_OS::get_static_memory_peak_usage);
- ObjectTypeDB::bind_method(_MD("get_dynamic_memory_usage"),&_OS::get_dynamic_memory_usage);
+ ClassDB::bind_method(_MD("get_static_memory_usage"),&_OS::get_static_memory_usage);
+ ClassDB::bind_method(_MD("get_static_memory_peak_usage"),&_OS::get_static_memory_peak_usage);
+ ClassDB::bind_method(_MD("get_dynamic_memory_usage"),&_OS::get_dynamic_memory_usage);
- ObjectTypeDB::bind_method(_MD("get_data_dir"),&_OS::get_data_dir);
- ObjectTypeDB::bind_method(_MD("get_system_dir","dir"),&_OS::get_system_dir);
- ObjectTypeDB::bind_method(_MD("get_unique_ID"),&_OS::get_unique_ID);
+ ClassDB::bind_method(_MD("get_data_dir"),&_OS::get_data_dir);
+ ClassDB::bind_method(_MD("get_system_dir","dir"),&_OS::get_system_dir);
+ ClassDB::bind_method(_MD("get_unique_ID"),&_OS::get_unique_ID);
- ObjectTypeDB::bind_method(_MD("is_ok_left_and_cancel_right"),&_OS::is_ok_left_and_cancel_right);
+ ClassDB::bind_method(_MD("is_ok_left_and_cancel_right"),&_OS::is_ok_left_and_cancel_right);
- ObjectTypeDB::bind_method(_MD("get_frames_per_second"),&_OS::get_frames_per_second);
+ ClassDB::bind_method(_MD("get_frames_per_second"),&_OS::get_frames_per_second);
- ObjectTypeDB::bind_method(_MD("print_all_textures_by_size"),&_OS::print_all_textures_by_size);
- ObjectTypeDB::bind_method(_MD("print_resources_by_type","types"),&_OS::print_resources_by_type);
+ ClassDB::bind_method(_MD("print_all_textures_by_size"),&_OS::print_all_textures_by_size);
+ ClassDB::bind_method(_MD("print_resources_by_type","types"),&_OS::print_resources_by_type);
- ObjectTypeDB::bind_method(_MD("native_video_play","path","volume","audio_track","subtitle_track"),&_OS::native_video_play);
- ObjectTypeDB::bind_method(_MD("native_video_is_playing"),&_OS::native_video_is_playing);
- ObjectTypeDB::bind_method(_MD("native_video_stop"),&_OS::native_video_stop);
- ObjectTypeDB::bind_method(_MD("native_video_pause"),&_OS::native_video_pause);
- ObjectTypeDB::bind_method(_MD("native_video_unpause"),&_OS::native_video_unpause);
+ ClassDB::bind_method(_MD("native_video_play","path","volume","audio_track","subtitle_track"),&_OS::native_video_play);
+ ClassDB::bind_method(_MD("native_video_is_playing"),&_OS::native_video_is_playing);
+ ClassDB::bind_method(_MD("native_video_stop"),&_OS::native_video_stop);
+ ClassDB::bind_method(_MD("native_video_pause"),&_OS::native_video_pause);
+ ClassDB::bind_method(_MD("native_video_unpause"),&_OS::native_video_unpause);
- ObjectTypeDB::bind_method(_MD("get_scancode_string","code"),&_OS::get_scancode_string);
- ObjectTypeDB::bind_method(_MD("is_scancode_unicode","code"),&_OS::is_scancode_unicode);
- ObjectTypeDB::bind_method(_MD("find_scancode_from_string","string"),&_OS::find_scancode_from_string);
+ ClassDB::bind_method(_MD("get_scancode_string","code"),&_OS::get_scancode_string);
+ ClassDB::bind_method(_MD("is_scancode_unicode","code"),&_OS::is_scancode_unicode);
+ ClassDB::bind_method(_MD("find_scancode_from_string","string"),&_OS::find_scancode_from_string);
- ObjectTypeDB::bind_method(_MD("set_use_file_access_save_and_swap","enabled"),&_OS::set_use_file_access_save_and_swap);
+ ClassDB::bind_method(_MD("set_use_file_access_save_and_swap","enabled"),&_OS::set_use_file_access_save_and_swap);
- ObjectTypeDB::bind_method(_MD("alert","text","title"),&_OS::alert,DEFVAL("Alert!"));
+ ClassDB::bind_method(_MD("alert","text","title"),&_OS::alert,DEFVAL("Alert!"));
- ObjectTypeDB::bind_method(_MD("set_thread_name","name"),&_OS::set_thread_name);
+ ClassDB::bind_method(_MD("set_thread_name","name"),&_OS::set_thread_name);
- ObjectTypeDB::bind_method(_MD("set_use_vsync","enable"),&_OS::set_use_vsync);
- ObjectTypeDB::bind_method(_MD("is_vsync_enabled"),&_OS::is_vsync_enabled);
+ ClassDB::bind_method(_MD("set_use_vsync","enable"),&_OS::set_use_vsync);
+ ClassDB::bind_method(_MD("is_vsync_enabled"),&_OS::is_vsync_enabled);
- ObjectTypeDB::bind_method(_MD("get_engine_version"),&_OS::get_engine_version);
+ ClassDB::bind_method(_MD("get_engine_version"),&_OS::get_engine_version);
BIND_CONSTANT( DAY_SUNDAY );
BIND_CONSTANT( DAY_MONDAY );
@@ -1396,29 +1396,29 @@ int _Geometry::get_uv84_normal_bit(const Vector3& p_vector) {
void _Geometry::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("build_box_planes","extents"),&_Geometry::build_box_planes);
- ObjectTypeDB::bind_method(_MD("build_cylinder_planes","radius","height","sides","axis"),&_Geometry::build_cylinder_planes,DEFVAL(Vector3::AXIS_Z));
- ObjectTypeDB::bind_method(_MD("build_capsule_planes","radius","height","sides","lats","axis"),&_Geometry::build_capsule_planes,DEFVAL(Vector3::AXIS_Z));
- ObjectTypeDB::bind_method(_MD("segment_intersects_circle","segment_from","segment_to","circle_pos","circle_radius"),&_Geometry::segment_intersects_circle);
- ObjectTypeDB::bind_method(_MD("segment_intersects_segment_2d","from_a","to_a","from_b","to_b"),&_Geometry::segment_intersects_segment_2d);
+ ClassDB::bind_method(_MD("build_box_planes","extents"),&_Geometry::build_box_planes);
+ ClassDB::bind_method(_MD("build_cylinder_planes","radius","height","sides","axis"),&_Geometry::build_cylinder_planes,DEFVAL(Vector3::AXIS_Z));
+ ClassDB::bind_method(_MD("build_capsule_planes","radius","height","sides","lats","axis"),&_Geometry::build_capsule_planes,DEFVAL(Vector3::AXIS_Z));
+ ClassDB::bind_method(_MD("segment_intersects_circle","segment_from","segment_to","circle_pos","circle_radius"),&_Geometry::segment_intersects_circle);
+ ClassDB::bind_method(_MD("segment_intersects_segment_2d","from_a","to_a","from_b","to_b"),&_Geometry::segment_intersects_segment_2d);
- ObjectTypeDB::bind_method(_MD("get_closest_points_between_segments_2d","p1","q1","p2","q2"),&_Geometry::get_closest_points_between_segments_2d);
- ObjectTypeDB::bind_method(_MD("get_closest_points_between_segments","p1","p2","q1","q2"),&_Geometry::get_closest_points_between_segments);
+ ClassDB::bind_method(_MD("get_closest_points_between_segments_2d","p1","q1","p2","q2"),&_Geometry::get_closest_points_between_segments_2d);
+ ClassDB::bind_method(_MD("get_closest_points_between_segments","p1","p2","q1","q2"),&_Geometry::get_closest_points_between_segments);
- ObjectTypeDB::bind_method(_MD("get_closest_point_to_segment","point","s1","s2"),&_Geometry::get_closest_point_to_segment);
+ ClassDB::bind_method(_MD("get_closest_point_to_segment","point","s1","s2"),&_Geometry::get_closest_point_to_segment);
- ObjectTypeDB::bind_method(_MD("get_uv84_normal_bit","normal"),&_Geometry::get_uv84_normal_bit);
+ ClassDB::bind_method(_MD("get_uv84_normal_bit","normal"),&_Geometry::get_uv84_normal_bit);
- ObjectTypeDB::bind_method(_MD("ray_intersects_triangle","from","dir","a","b","c"),&_Geometry::ray_intersects_triangle);
- ObjectTypeDB::bind_method(_MD("segment_intersects_triangle","from","to","a","b","c"),&_Geometry::segment_intersects_triangle);
- ObjectTypeDB::bind_method(_MD("segment_intersects_sphere","from","to","spos","sradius"),&_Geometry::segment_intersects_sphere);
- ObjectTypeDB::bind_method(_MD("segment_intersects_cylinder","from","to","height","radius"),&_Geometry::segment_intersects_cylinder);
- ObjectTypeDB::bind_method(_MD("segment_intersects_convex","from","to","planes"),&_Geometry::segment_intersects_convex);
- ObjectTypeDB::bind_method(_MD("point_is_inside_triangle","point","a","b","c"),&_Geometry::point_is_inside_triangle);
+ ClassDB::bind_method(_MD("ray_intersects_triangle","from","dir","a","b","c"),&_Geometry::ray_intersects_triangle);
+ ClassDB::bind_method(_MD("segment_intersects_triangle","from","to","a","b","c"),&_Geometry::segment_intersects_triangle);
+ ClassDB::bind_method(_MD("segment_intersects_sphere","from","to","spos","sradius"),&_Geometry::segment_intersects_sphere);
+ ClassDB::bind_method(_MD("segment_intersects_cylinder","from","to","height","radius"),&_Geometry::segment_intersects_cylinder);
+ ClassDB::bind_method(_MD("segment_intersects_convex","from","to","planes"),&_Geometry::segment_intersects_convex);
+ ClassDB::bind_method(_MD("point_is_inside_triangle","point","a","b","c"),&_Geometry::point_is_inside_triangle);
- ObjectTypeDB::bind_method(_MD("triangulate_polygon","polygon"),&_Geometry::triangulate_polygon);
+ ClassDB::bind_method(_MD("triangulate_polygon","polygon"),&_Geometry::triangulate_polygon);
- ObjectTypeDB::bind_method(_MD("make_atlas","sizes"),&_Geometry::make_atlas);
+ ClassDB::bind_method(_MD("make_atlas","sizes"),&_Geometry::make_atlas);
}
@@ -1793,51 +1793,51 @@ Variant _File::get_var() const {
void _File::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("open_encrypted","path","mode_flags","key"),&_File::open_encrypted);
- ObjectTypeDB::bind_method(_MD("open_encrypted_with_pass","path","mode_flags","pass"),&_File::open_encrypted_pass);
-
- ObjectTypeDB::bind_method(_MD("open","path","flags"),&_File::open);
- ObjectTypeDB::bind_method(_MD("close"),&_File::close);
- ObjectTypeDB::bind_method(_MD("is_open"),&_File::is_open);
- ObjectTypeDB::bind_method(_MD("seek","pos"),&_File::seek);
- ObjectTypeDB::bind_method(_MD("seek_end","pos"),&_File::seek_end,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_pos"),&_File::get_pos);
- ObjectTypeDB::bind_method(_MD("get_len"),&_File::get_len);
- ObjectTypeDB::bind_method(_MD("eof_reached"),&_File::eof_reached);
- ObjectTypeDB::bind_method(_MD("get_8"),&_File::get_8);
- ObjectTypeDB::bind_method(_MD("get_16"),&_File::get_16);
- ObjectTypeDB::bind_method(_MD("get_32"),&_File::get_32);
- ObjectTypeDB::bind_method(_MD("get_64"),&_File::get_64);
- ObjectTypeDB::bind_method(_MD("get_float"),&_File::get_float);
- ObjectTypeDB::bind_method(_MD("get_double"),&_File::get_double);
- ObjectTypeDB::bind_method(_MD("get_real"),&_File::get_real);
- ObjectTypeDB::bind_method(_MD("get_buffer","len"),&_File::get_buffer);
- ObjectTypeDB::bind_method(_MD("get_line"),&_File::get_line);
- ObjectTypeDB::bind_method(_MD("get_as_text"),&_File::get_as_text);
- ObjectTypeDB::bind_method(_MD("get_md5","path"),&_File::get_md5);
- ObjectTypeDB::bind_method(_MD("get_sha256","path"),&_File::get_sha256);
- ObjectTypeDB::bind_method(_MD("get_endian_swap"),&_File::get_endian_swap);
- ObjectTypeDB::bind_method(_MD("set_endian_swap","enable"),&_File::set_endian_swap);
- ObjectTypeDB::bind_method(_MD("get_error:Error"),&_File::get_error);
- ObjectTypeDB::bind_method(_MD("get_var"),&_File::get_var);
- ObjectTypeDB::bind_method(_MD("get_csv_line","delim"),&_File::get_csv_line,DEFVAL(","));
-
- ObjectTypeDB::bind_method(_MD("store_8","value"),&_File::store_8);
- ObjectTypeDB::bind_method(_MD("store_16","value"),&_File::store_16);
- ObjectTypeDB::bind_method(_MD("store_32","value"),&_File::store_32);
- ObjectTypeDB::bind_method(_MD("store_64","value"),&_File::store_64);
- ObjectTypeDB::bind_method(_MD("store_float","value"),&_File::store_float);
- ObjectTypeDB::bind_method(_MD("store_double","value"),&_File::store_double);
- ObjectTypeDB::bind_method(_MD("store_real","value"),&_File::store_real);
- ObjectTypeDB::bind_method(_MD("store_buffer","buffer"),&_File::store_buffer);
- ObjectTypeDB::bind_method(_MD("store_line","line"),&_File::store_line);
- ObjectTypeDB::bind_method(_MD("store_string","string"),&_File::store_string);
- ObjectTypeDB::bind_method(_MD("store_var","value"),&_File::store_var);
-
- ObjectTypeDB::bind_method(_MD("store_pascal_string","string"),&_File::store_pascal_string);
- ObjectTypeDB::bind_method(_MD("get_pascal_string"),&_File::get_pascal_string);
-
- ObjectTypeDB::bind_method(_MD("file_exists","path"),&_File::file_exists);
+ ClassDB::bind_method(_MD("open_encrypted","path","mode_flags","key"),&_File::open_encrypted);
+ ClassDB::bind_method(_MD("open_encrypted_with_pass","path","mode_flags","pass"),&_File::open_encrypted_pass);
+
+ ClassDB::bind_method(_MD("open","path","flags"),&_File::open);
+ ClassDB::bind_method(_MD("close"),&_File::close);
+ ClassDB::bind_method(_MD("is_open"),&_File::is_open);
+ ClassDB::bind_method(_MD("seek","pos"),&_File::seek);
+ ClassDB::bind_method(_MD("seek_end","pos"),&_File::seek_end,DEFVAL(0));
+ ClassDB::bind_method(_MD("get_pos"),&_File::get_pos);
+ ClassDB::bind_method(_MD("get_len"),&_File::get_len);
+ ClassDB::bind_method(_MD("eof_reached"),&_File::eof_reached);
+ ClassDB::bind_method(_MD("get_8"),&_File::get_8);
+ ClassDB::bind_method(_MD("get_16"),&_File::get_16);
+ ClassDB::bind_method(_MD("get_32"),&_File::get_32);
+ ClassDB::bind_method(_MD("get_64"),&_File::get_64);
+ ClassDB::bind_method(_MD("get_float"),&_File::get_float);
+ ClassDB::bind_method(_MD("get_double"),&_File::get_double);
+ ClassDB::bind_method(_MD("get_real"),&_File::get_real);
+ ClassDB::bind_method(_MD("get_buffer","len"),&_File::get_buffer);
+ ClassDB::bind_method(_MD("get_line"),&_File::get_line);
+ ClassDB::bind_method(_MD("get_as_text"),&_File::get_as_text);
+ ClassDB::bind_method(_MD("get_md5","path"),&_File::get_md5);
+ ClassDB::bind_method(_MD("get_sha256","path"),&_File::get_sha256);
+ ClassDB::bind_method(_MD("get_endian_swap"),&_File::get_endian_swap);
+ ClassDB::bind_method(_MD("set_endian_swap","enable"),&_File::set_endian_swap);
+ ClassDB::bind_method(_MD("get_error:Error"),&_File::get_error);
+ ClassDB::bind_method(_MD("get_var"),&_File::get_var);
+ ClassDB::bind_method(_MD("get_csv_line","delim"),&_File::get_csv_line,DEFVAL(","));
+
+ ClassDB::bind_method(_MD("store_8","value"),&_File::store_8);
+ ClassDB::bind_method(_MD("store_16","value"),&_File::store_16);
+ ClassDB::bind_method(_MD("store_32","value"),&_File::store_32);
+ ClassDB::bind_method(_MD("store_64","value"),&_File::store_64);
+ ClassDB::bind_method(_MD("store_float","value"),&_File::store_float);
+ ClassDB::bind_method(_MD("store_double","value"),&_File::store_double);
+ ClassDB::bind_method(_MD("store_real","value"),&_File::store_real);
+ ClassDB::bind_method(_MD("store_buffer","buffer"),&_File::store_buffer);
+ ClassDB::bind_method(_MD("store_line","line"),&_File::store_line);
+ ClassDB::bind_method(_MD("store_string","string"),&_File::store_string);
+ ClassDB::bind_method(_MD("store_var","value"),&_File::store_var);
+
+ ClassDB::bind_method(_MD("store_pascal_string","string"),&_File::store_pascal_string);
+ ClassDB::bind_method(_MD("get_pascal_string"),&_File::get_pascal_string);
+
+ ClassDB::bind_method(_MD("file_exists","path"),&_File::file_exists);
BIND_CONSTANT( READ );
BIND_CONSTANT( WRITE );
@@ -2011,24 +2011,24 @@ Error _Directory::remove(String p_name){
void _Directory::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("open:Error","path"),&_Directory::open);
- ObjectTypeDB::bind_method(_MD("list_dir_begin"),&_Directory::list_dir_begin);
- ObjectTypeDB::bind_method(_MD("get_next"),&_Directory::get_next);
- ObjectTypeDB::bind_method(_MD("current_is_dir"),&_Directory::current_is_dir);
- ObjectTypeDB::bind_method(_MD("list_dir_end"),&_Directory::list_dir_end);
- ObjectTypeDB::bind_method(_MD("get_drive_count"),&_Directory::get_drive_count);
- ObjectTypeDB::bind_method(_MD("get_drive","idx"),&_Directory::get_drive);
- ObjectTypeDB::bind_method(_MD("change_dir:Error","todir"),&_Directory::change_dir);
- ObjectTypeDB::bind_method(_MD("get_current_dir"),&_Directory::get_current_dir);
- ObjectTypeDB::bind_method(_MD("make_dir:Error","path"),&_Directory::make_dir);
- ObjectTypeDB::bind_method(_MD("make_dir_recursive:Error","path"),&_Directory::make_dir_recursive);
- ObjectTypeDB::bind_method(_MD("file_exists","path"),&_Directory::file_exists);
- ObjectTypeDB::bind_method(_MD("dir_exists","path"),&_Directory::dir_exists);
-// ObjectTypeDB::bind_method(_MD("get_modified_time","file"),&_Directory::get_modified_time);
- ObjectTypeDB::bind_method(_MD("get_space_left"),&_Directory::get_space_left);
- ObjectTypeDB::bind_method(_MD("copy:Error","from","to"),&_Directory::copy);
- ObjectTypeDB::bind_method(_MD("rename:Error","from","to"),&_Directory::rename);
- ObjectTypeDB::bind_method(_MD("remove:Error","path"),&_Directory::remove);
+ ClassDB::bind_method(_MD("open:Error","path"),&_Directory::open);
+ ClassDB::bind_method(_MD("list_dir_begin"),&_Directory::list_dir_begin);
+ ClassDB::bind_method(_MD("get_next"),&_Directory::get_next);
+ ClassDB::bind_method(_MD("current_is_dir"),&_Directory::current_is_dir);
+ ClassDB::bind_method(_MD("list_dir_end"),&_Directory::list_dir_end);
+ ClassDB::bind_method(_MD("get_drive_count"),&_Directory::get_drive_count);
+ ClassDB::bind_method(_MD("get_drive","idx"),&_Directory::get_drive);
+ ClassDB::bind_method(_MD("change_dir:Error","todir"),&_Directory::change_dir);
+ ClassDB::bind_method(_MD("get_current_dir"),&_Directory::get_current_dir);
+ ClassDB::bind_method(_MD("make_dir:Error","path"),&_Directory::make_dir);
+ ClassDB::bind_method(_MD("make_dir_recursive:Error","path"),&_Directory::make_dir_recursive);
+ ClassDB::bind_method(_MD("file_exists","path"),&_Directory::file_exists);
+ ClassDB::bind_method(_MD("dir_exists","path"),&_Directory::dir_exists);
+// ClassDB::bind_method(_MD("get_modified_time","file"),&_Directory::get_modified_time);
+ ClassDB::bind_method(_MD("get_space_left"),&_Directory::get_space_left);
+ ClassDB::bind_method(_MD("copy:Error","from","to"),&_Directory::copy);
+ ClassDB::bind_method(_MD("rename:Error","from","to"),&_Directory::rename);
+ ClassDB::bind_method(_MD("remove:Error","path"),&_Directory::remove);
}
@@ -2168,14 +2168,14 @@ String _Marshalls::base64_to_utf8(const String& p_str) {
void _Marshalls::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("variant_to_base64:String","variant"),&_Marshalls::variant_to_base64);
- ObjectTypeDB::bind_method(_MD("base64_to_variant:Variant","base64_str"),&_Marshalls::base64_to_variant);
+ ClassDB::bind_method(_MD("variant_to_base64:String","variant"),&_Marshalls::variant_to_base64);
+ ClassDB::bind_method(_MD("base64_to_variant:Variant","base64_str"),&_Marshalls::base64_to_variant);
- ObjectTypeDB::bind_method(_MD("raw_to_base64:String","array"),&_Marshalls::raw_to_base64);
- ObjectTypeDB::bind_method(_MD("base64_to_raw:RawArray","base64_str"),&_Marshalls::base64_to_raw);
+ ClassDB::bind_method(_MD("raw_to_base64:String","array"),&_Marshalls::raw_to_base64);
+ ClassDB::bind_method(_MD("base64_to_raw:RawArray","base64_str"),&_Marshalls::base64_to_raw);
- ObjectTypeDB::bind_method(_MD("utf8_to_base64:String","utf8_str"),&_Marshalls::utf8_to_base64);
- ObjectTypeDB::bind_method(_MD("base64_to_utf8:String","base64_str"),&_Marshalls::base64_to_utf8);
+ ClassDB::bind_method(_MD("utf8_to_base64:String","utf8_str"),&_Marshalls::utf8_to_base64);
+ ClassDB::bind_method(_MD("base64_to_utf8:String","base64_str"),&_Marshalls::base64_to_utf8);
};
@@ -2199,8 +2199,8 @@ Error _Semaphore::post() {
void _Semaphore::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("wait:Error"),&_Semaphore::wait);
- ObjectTypeDB::bind_method(_MD("post:Error"),&_Semaphore::post);
+ ClassDB::bind_method(_MD("wait:Error"),&_Semaphore::wait);
+ ClassDB::bind_method(_MD("post:Error"),&_Semaphore::post);
}
@@ -2236,9 +2236,9 @@ void _Mutex::unlock(){
void _Mutex::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("lock"),&_Mutex::lock);
- ObjectTypeDB::bind_method(_MD("try_lock:Error"),&_Mutex::try_lock);
- ObjectTypeDB::bind_method(_MD("unlock"),&_Mutex::unlock);
+ ClassDB::bind_method(_MD("lock"),&_Mutex::lock);
+ ClassDB::bind_method(_MD("try_lock:Error"),&_Mutex::try_lock);
+ ClassDB::bind_method(_MD("unlock"),&_Mutex::unlock);
}
@@ -2358,10 +2358,10 @@ Variant _Thread::wait_to_finish() {
void _Thread::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("start:Error","instance","method","userdata","priority"),&_Thread::start,DEFVAL(Variant()),DEFVAL(PRIORITY_NORMAL));
- ObjectTypeDB::bind_method(_MD("get_id"),&_Thread::get_id);
- ObjectTypeDB::bind_method(_MD("is_active"),&_Thread::is_active);
- ObjectTypeDB::bind_method(_MD("wait_to_finish:Variant"),&_Thread::wait_to_finish);
+ ClassDB::bind_method(_MD("start:Error","instance","method","userdata","priority"),&_Thread::start,DEFVAL(Variant()),DEFVAL(PRIORITY_NORMAL));
+ ClassDB::bind_method(_MD("get_id"),&_Thread::get_id);
+ ClassDB::bind_method(_MD("is_active"),&_Thread::is_active);
+ ClassDB::bind_method(_MD("wait_to_finish:Variant"),&_Thread::wait_to_finish);
BIND_CONSTANT( PRIORITY_LOW );
BIND_CONSTANT( PRIORITY_NORMAL );
@@ -2382,3 +2382,204 @@ _Thread::~_Thread() {
}
ERR_FAIL_COND(active==true);
}
+/////////////////////////////////////
+
+
+StringArray _ClassDB::get_class_list() const {
+
+ List<StringName> classes;
+ ClassDB::get_class_list(&classes);
+
+ StringArray ret;
+ ret.resize(classes.size());
+ int idx=0;
+ for (List<StringName>::Element *E=classes.front();E;E=E->next()) {
+ ret.set(idx++,E->get());
+ }
+
+ return ret;
+
+}
+StringArray _ClassDB::get_inheriters_from_class( const StringName& p_class) const {
+
+ List<StringName> classes;
+ ClassDB::get_inheriters_from_class(p_class,&classes);
+
+ StringArray ret;
+ ret.resize(classes.size());
+ int idx=0;
+ for (List<StringName>::Element *E=classes.front();E;E=E->next()) {
+ ret.set(idx++,E->get());
+ }
+
+ return ret;
+}
+StringName _ClassDB::get_parent_class(const StringName& p_class) const {
+
+ return ClassDB::get_parent_class(p_class);
+}
+bool _ClassDB::class_exists(const StringName &p_class) const {
+
+ return ClassDB::class_exists(p_class);
+}
+bool _ClassDB::is_parent_class(const StringName &p_class,const StringName& p_inherits) const {
+
+ return ClassDB::is_parent_class(p_class,p_inherits);
+}
+bool _ClassDB::can_instance(const StringName &p_class) const {
+
+ return ClassDB::can_instance(p_class);
+}
+Variant _ClassDB::instance(const StringName &p_class) const {
+
+ Object *obj = ClassDB::instance(p_class);
+ if (!obj)
+ return Variant();
+
+ Reference *r = obj->cast_to<Reference>();
+ if (r) {
+ return REF(r);
+ } else {
+ return obj;
+ }
+}
+
+bool _ClassDB::has_signal(StringName p_class,StringName p_signal) const {
+
+ return ClassDB::has_signal(p_class,p_signal);
+}
+Dictionary _ClassDB::get_signal(StringName p_class,StringName p_signal) const {
+
+ MethodInfo signal;
+ if (ClassDB::get_signal(p_class,p_signal,&signal)) {
+ return signal.operator Dictionary();
+ } else {
+ return Dictionary();
+ }
+
+}
+Array _ClassDB::get_signal_list(StringName p_class,bool p_no_inheritance) const {
+
+ List<MethodInfo> signals;
+ ClassDB::get_signal_list(p_class,&signals,p_no_inheritance);
+ Array ret;
+
+ for (List<MethodInfo>::Element *E=signals.front();E;E=E->next()) {
+ ret.push_back(E->get().operator Dictionary());
+ }
+
+ return ret;
+}
+
+Array _ClassDB::get_property_list(StringName p_class, bool p_no_inheritance) const {
+
+ List<PropertyInfo> plist;
+ ClassDB::get_property_list(p_class,&plist,p_no_inheritance);
+ Array ret;
+ for (List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) {
+ ret.push_back(E->get().operator Dictionary());
+ }
+
+ return ret;
+
+
+}
+
+bool _ClassDB::has_method(StringName p_class,StringName p_method,bool p_no_inheritance) const {
+
+ return ClassDB::has_method(p_class,p_method,p_no_inheritance);
+}
+
+
+Array _ClassDB::get_method_list(StringName p_class,bool p_no_inheritance) const {
+
+ List<MethodInfo> methods;
+ ClassDB::get_method_list(p_class,&methods,p_no_inheritance);
+ Array ret;
+
+ for (List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
+ ret.push_back(E->get().operator Dictionary());
+ }
+
+ return ret;
+}
+
+StringArray _ClassDB::get_integer_constant_list(const StringName& p_class, bool p_no_inheritance) const {
+
+ List<String> constants;
+ ClassDB::get_integer_constant_list(p_class,&constants,p_no_inheritance);
+
+ StringArray ret;
+ ret.resize(constants.size());
+ int idx=0;
+ for (List<String>::Element *E=constants.front();E;E=E->next()) {
+ ret.set(idx++,E->get());
+ }
+
+ return ret;
+}
+
+bool _ClassDB::has_integer_constant(const StringName& p_class, const StringName &p_name) const {
+
+ bool success;
+ ClassDB::get_integer_constant(p_class,p_name,&success);
+ return success;
+}
+
+int _ClassDB::get_integer_constant(const StringName& p_class, const StringName &p_name) const {
+
+ bool found;
+ int c = ClassDB::get_integer_constant(p_class,p_name,&found);
+ ERR_FAIL_COND_V(!found,0);
+ return c;
+
+}
+StringName _ClassDB::get_category(const StringName& p_node) const {
+
+ return ClassDB::get_category(p_node);
+}
+
+bool _ClassDB::is_class_enabled(StringName p_class) const {
+
+ return ClassDB::is_class_enabled(p_class);
+}
+
+void _ClassDB::_bind_methods() {
+
+ ClassDB::bind_method(_MD("get_class_list"),&_ClassDB::get_class_list);
+ ClassDB::bind_method(_MD("get_inheriters_from_class","class"),&_ClassDB::get_inheriters_from_class);
+ ClassDB::bind_method(_MD("get_parent_class","class"),&_ClassDB::get_parent_class);
+ ClassDB::bind_method(_MD("class_exists","class"),&_ClassDB::class_exists);
+ ClassDB::bind_method(_MD("is_parent_class","class","inherits"),&_ClassDB::is_parent_class);
+ ClassDB::bind_method(_MD("can_instance","class"),&_ClassDB::can_instance);
+ ClassDB::bind_method(_MD("instance","class"),&_ClassDB::instance);
+
+ ClassDB::bind_method(_MD("has_signal","class","signal"),&_ClassDB::has_signal);
+ ClassDB::bind_method(_MD("get_signal","class","signal"),&_ClassDB::get_signal);
+ ClassDB::bind_method(_MD("get_signal_list","class","no_inheritance"),&_ClassDB::get_signal_list,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("get_property_list","class","no_inheritance"),&_ClassDB::get_property_list,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("has_method","class","method","no_inheritance"),&_ClassDB::has_method,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("get_method_list","class","no_inheritance"),&_ClassDB::get_method_list,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("get_integer_constant_list","class","no_inheritance"),&_ClassDB::get_integer_constant_list,DEFVAL(false));
+
+ ClassDB::bind_method(_MD("has_integer_constant","class","name"),&_ClassDB::has_integer_constant);
+ ClassDB::bind_method(_MD("get_integer_constant","class","name"),&_ClassDB::get_integer_constant);
+
+ ClassDB::bind_method(_MD("get_category","class"),&_ClassDB::get_category);
+ ClassDB::bind_method(_MD("is_class_enabled","class"),&_ClassDB::is_class_enabled);
+
+
+}
+
+_ClassDB::_ClassDB(){
+
+
+}
+_ClassDB::~_ClassDB(){
+
+
+}
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 968e7f92c7..9a4f26a12d 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -38,7 +38,7 @@
class _ResourceLoader : public Object {
- OBJ_TYPE(_ResourceLoader,Object);
+ GDCLASS(_ResourceLoader,Object);
protected:
@@ -60,7 +60,7 @@ public:
};
class _ResourceSaver : public Object {
- OBJ_TYPE(_ResourceSaver,Object);
+ GDCLASS(_ResourceSaver,Object);
protected:
@@ -90,7 +90,7 @@ public:
class MainLoop;
class _OS : public Object {
- OBJ_TYPE(_OS,Object);
+ GDCLASS(_OS,Object);
protected:
@@ -333,7 +333,7 @@ VARIANT_ENUM_CAST(_OS::ScreenOrientation);
class _Geometry : public Object {
- OBJ_TYPE(_Geometry, Object);
+ GDCLASS(_Geometry, Object);
static _Geometry *singleton;
protected:
@@ -371,7 +371,7 @@ public:
class _File : public Reference {
- OBJ_TYPE(_File,Reference);
+ GDCLASS(_File,Reference);
FileAccess *f;
bool eswap;
protected:
@@ -460,7 +460,7 @@ public:
class _Directory : public Reference {
- OBJ_TYPE(_Directory,Reference);
+ GDCLASS(_Directory,Reference);
DirAccess *d;
protected:
@@ -501,7 +501,7 @@ public:
class _Marshalls : public Reference {
- OBJ_TYPE(_Marshalls,Reference);
+ GDCLASS(_Marshalls,Reference);
static _Marshalls* singleton;
@@ -530,7 +530,7 @@ public:
class _Mutex : public Reference {
- OBJ_TYPE(_Mutex,Reference);
+ GDCLASS(_Mutex,Reference);
Mutex *mutex;
static void _bind_methods();
@@ -546,7 +546,7 @@ public:
class _Semaphore : public Reference {
- OBJ_TYPE(_Semaphore,Reference);
+ GDCLASS(_Semaphore,Reference);
Semaphore *semaphore;
static void _bind_methods();
@@ -561,7 +561,7 @@ public:
class _Thread : public Reference {
- OBJ_TYPE(_Thread,Reference);
+ GDCLASS(_Thread,Reference);
protected:
@@ -591,4 +591,42 @@ public:
~_Thread();
};
+class _ClassDB : public Object {
+
+ GDCLASS(_ClassDB,Object)
+
+protected:
+ static void _bind_methods();
+public:
+
+ StringArray get_class_list() const;
+ StringArray get_inheriters_from_class( const StringName& p_class) const;
+ StringName get_parent_class(const StringName& p_class) const;
+ bool class_exists(const StringName &p_class) const;
+ bool is_parent_class(const StringName &p_class,const StringName& p_inherits) const;
+ bool can_instance(const StringName &p_class) const;
+ Variant instance(const StringName &p_class) const;
+
+ bool has_signal(StringName p_class,StringName p_signal) const;
+ Dictionary get_signal(StringName p_class,StringName p_signal) const;
+ Array get_signal_list(StringName p_class,bool p_no_inheritance=false) const;
+
+ Array get_property_list(StringName p_class, bool p_no_inheritance=false) const;
+
+ bool has_method(StringName p_class,StringName p_method,bool p_no_inheritance=false) const;
+
+
+ Array get_method_list(StringName p_class,bool p_no_inheritance=false) const;
+
+ StringArray get_integer_constant_list(const StringName& p_class, bool p_no_inheritance=false) const;
+ bool has_integer_constant(const StringName& p_class, const StringName &p_name) const;
+ int get_integer_constant(const StringName& p_class, const StringName &p_name) const;
+ StringName get_category(const StringName& p_node) const;
+
+ bool is_class_enabled(StringName p_class) const;
+
+ _ClassDB();
+ ~_ClassDB();
+};
+
#endif // CORE_BIND_H
diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp
index 1725ce9946..9b39eeb2c1 100644
--- a/core/compressed_translation.cpp
+++ b/core/compressed_translation.cpp
@@ -526,7 +526,7 @@ void PHashTranslation::_get_property_list( List<PropertyInfo> *p_list) const{
}
void PHashTranslation::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("generate","from:Translation"),&PHashTranslation::generate);
+ ClassDB::bind_method(_MD("generate","from:Translation"),&PHashTranslation::generate);
}
PHashTranslation::PHashTranslation()
diff --git a/core/compressed_translation.h b/core/compressed_translation.h
index a7b539816a..218a59c05d 100644
--- a/core/compressed_translation.h
+++ b/core/compressed_translation.h
@@ -33,7 +33,7 @@
class PHashTranslation : public Translation {
- OBJ_TYPE(PHashTranslation,Translation);
+ GDCLASS(PHashTranslation,Translation);
//this translation uses a sort of modified perfect hash algorithm
diff --git a/core/func_ref.cpp b/core/func_ref.cpp
index e6a87995e5..1e8c229810 100644
--- a/core/func_ref.cpp
+++ b/core/func_ref.cpp
@@ -61,12 +61,12 @@ void FuncRef::_bind_methods() {
MethodInfo mi;
mi.name="call_func";
Vector<Variant> defargs;
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call_func:Variant",&FuncRef::call_func,mi,defargs);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call_func:Variant",&FuncRef::call_func,mi,defargs);
}
- ObjectTypeDB::bind_method(_MD("set_instance","instance"),&FuncRef::set_instance);
- ObjectTypeDB::bind_method(_MD("set_function","name"),&FuncRef::set_function);
+ ClassDB::bind_method(_MD("set_instance","instance"),&FuncRef::set_instance);
+ ClassDB::bind_method(_MD("set_function","name"),&FuncRef::set_function);
}
diff --git a/core/func_ref.h b/core/func_ref.h
index c3090631b2..0c9bca4680 100644
--- a/core/func_ref.h
+++ b/core/func_ref.h
@@ -33,7 +33,7 @@
class FuncRef : public Reference{
- OBJ_TYPE(FuncRef,Reference);
+ GDCLASS(FuncRef,Reference);
ObjectID id;
StringName function;
diff --git a/core/globals.cpp b/core/globals.cpp
index 5f47bfef2d..8b335b8a0d 100644
--- a/core/globals.cpp
+++ b/core/globals.cpp
@@ -1420,21 +1420,21 @@ bool Globals::is_using_datapack() const {
void Globals::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("has","name"),&Globals::has);
- ObjectTypeDB::bind_method(_MD("set_order","name","pos"),&Globals::set_order);
- ObjectTypeDB::bind_method(_MD("get_order","name"),&Globals::get_order);
- ObjectTypeDB::bind_method(_MD("set_persisting","name","enable"),&Globals::set_persisting);
- ObjectTypeDB::bind_method(_MD("is_persisting","name"),&Globals::is_persisting);
- ObjectTypeDB::bind_method(_MD("add_property_info", "hint"),&Globals::_add_property_info_bind);
- ObjectTypeDB::bind_method(_MD("clear","name"),&Globals::clear);
- ObjectTypeDB::bind_method(_MD("localize_path","path"),&Globals::localize_path);
- ObjectTypeDB::bind_method(_MD("globalize_path","path"),&Globals::globalize_path);
- ObjectTypeDB::bind_method(_MD("save"),&Globals::save);
- ObjectTypeDB::bind_method(_MD("has_singleton","name"),&Globals::has_singleton);
- ObjectTypeDB::bind_method(_MD("get_singleton","name"),&Globals::get_singleton_object);
- ObjectTypeDB::bind_method(_MD("load_resource_pack","pack"),&Globals::_load_resource_pack);
-
- ObjectTypeDB::bind_method(_MD("save_custom","file"),&Globals::_save_custom_bnd);
+ ClassDB::bind_method(_MD("has","name"),&Globals::has);
+ ClassDB::bind_method(_MD("set_order","name","pos"),&Globals::set_order);
+ ClassDB::bind_method(_MD("get_order","name"),&Globals::get_order);
+ ClassDB::bind_method(_MD("set_persisting","name","enable"),&Globals::set_persisting);
+ ClassDB::bind_method(_MD("is_persisting","name"),&Globals::is_persisting);
+ ClassDB::bind_method(_MD("add_property_info", "hint"),&Globals::_add_property_info_bind);
+ ClassDB::bind_method(_MD("clear","name"),&Globals::clear);
+ ClassDB::bind_method(_MD("localize_path","path"),&Globals::localize_path);
+ ClassDB::bind_method(_MD("globalize_path","path"),&Globals::globalize_path);
+ ClassDB::bind_method(_MD("save"),&Globals::save);
+ ClassDB::bind_method(_MD("has_singleton","name"),&Globals::has_singleton);
+ ClassDB::bind_method(_MD("get_singleton","name"),&Globals::get_singleton_object);
+ ClassDB::bind_method(_MD("load_resource_pack","pack"),&Globals::_load_resource_pack);
+
+ ClassDB::bind_method(_MD("save_custom","file"),&Globals::_save_custom_bnd);
}
diff --git a/core/globals.h b/core/globals.h
index f9d732ef15..67937c56d8 100644
--- a/core/globals.h
+++ b/core/globals.h
@@ -39,7 +39,7 @@
class Globals : public Object {
- OBJ_TYPE( Globals, Object );
+ GDCLASS( Globals, Object );
_THREAD_SAFE_CLASS_
public:
diff --git a/core/helper/value_evaluator.h b/core/helper/value_evaluator.h
index 5d38bd4cb4..9ea03db4c6 100644
--- a/core/helper/value_evaluator.h
+++ b/core/helper/value_evaluator.h
@@ -33,7 +33,7 @@
class ValueEvaluator : public Object {
- OBJ_TYPE(ValueEvaluator, Object);
+ GDCLASS(ValueEvaluator, Object);
public:
virtual double eval(const String& p_text) {
return p_text.to_double();
diff --git a/core/input_map.cpp b/core/input_map.cpp
index 748e084a45..439bf4b766 100644
--- a/core/input_map.cpp
+++ b/core/input_map.cpp
@@ -34,19 +34,19 @@ InputMap *InputMap::singleton=NULL;
void InputMap::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("has_action","action"),&InputMap::has_action);
- ObjectTypeDB::bind_method(_MD("get_action_id","action"),&InputMap::get_action_id);
- ObjectTypeDB::bind_method(_MD("get_action_from_id","id"),&InputMap::get_action_from_id);
- ObjectTypeDB::bind_method(_MD("get_actions"),&InputMap::_get_actions);
- ObjectTypeDB::bind_method(_MD("add_action","action"),&InputMap::add_action);
- ObjectTypeDB::bind_method(_MD("erase_action","action"),&InputMap::erase_action);
-
- ObjectTypeDB::bind_method(_MD("action_add_event","action","event"),&InputMap::action_add_event);
- ObjectTypeDB::bind_method(_MD("action_has_event","action","event"),&InputMap::action_has_event);
- ObjectTypeDB::bind_method(_MD("action_erase_event","action","event"),&InputMap::action_erase_event);
- ObjectTypeDB::bind_method(_MD("get_action_list","action"),&InputMap::_get_action_list);
- ObjectTypeDB::bind_method(_MD("event_is_action","event","action"),&InputMap::event_is_action);
- ObjectTypeDB::bind_method(_MD("load_from_globals"),&InputMap::load_from_globals);
+ ClassDB::bind_method(_MD("has_action","action"),&InputMap::has_action);
+ ClassDB::bind_method(_MD("get_action_id","action"),&InputMap::get_action_id);
+ ClassDB::bind_method(_MD("get_action_from_id","id"),&InputMap::get_action_from_id);
+ ClassDB::bind_method(_MD("get_actions"),&InputMap::_get_actions);
+ ClassDB::bind_method(_MD("add_action","action"),&InputMap::add_action);
+ ClassDB::bind_method(_MD("erase_action","action"),&InputMap::erase_action);
+
+ ClassDB::bind_method(_MD("action_add_event","action","event"),&InputMap::action_add_event);
+ ClassDB::bind_method(_MD("action_has_event","action","event"),&InputMap::action_has_event);
+ ClassDB::bind_method(_MD("action_erase_event","action","event"),&InputMap::action_erase_event);
+ ClassDB::bind_method(_MD("get_action_list","action"),&InputMap::_get_action_list);
+ ClassDB::bind_method(_MD("event_is_action","event","action"),&InputMap::event_is_action);
+ ClassDB::bind_method(_MD("load_from_globals"),&InputMap::load_from_globals);
}
diff --git a/core/input_map.h b/core/input_map.h
index efc3a751aa..306845fc89 100644
--- a/core/input_map.h
+++ b/core/input_map.h
@@ -34,7 +34,7 @@
class InputMap : public Object {
- OBJ_TYPE( InputMap, Object );
+ GDCLASS( InputMap, Object );
public:
struct Action {
int id;
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index 1cf600a0cf..6039a77337 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -206,17 +206,17 @@ Error ConfigFile::load(const String& p_path) {
void ConfigFile::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_value","section","key","value"),&ConfigFile::set_value);
- ObjectTypeDB::bind_method(_MD("get_value:Variant","section","key","default"),&ConfigFile::get_value,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("set_value","section","key","value"),&ConfigFile::set_value);
+ ClassDB::bind_method(_MD("get_value:Variant","section","key","default"),&ConfigFile::get_value,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("has_section","section"),&ConfigFile::has_section);
- ObjectTypeDB::bind_method(_MD("has_section_key","section","key"),&ConfigFile::has_section_key);
+ ClassDB::bind_method(_MD("has_section","section"),&ConfigFile::has_section);
+ ClassDB::bind_method(_MD("has_section_key","section","key"),&ConfigFile::has_section_key);
- ObjectTypeDB::bind_method(_MD("get_sections"),&ConfigFile::_get_sections);
- ObjectTypeDB::bind_method(_MD("get_section_keys","section"),&ConfigFile::_get_section_keys);
+ ClassDB::bind_method(_MD("get_sections"),&ConfigFile::_get_sections);
+ ClassDB::bind_method(_MD("get_section_keys","section"),&ConfigFile::_get_section_keys);
- ObjectTypeDB::bind_method(_MD("load:Error","path"),&ConfigFile::load);
- ObjectTypeDB::bind_method(_MD("save:Error","path"),&ConfigFile::save);
+ ClassDB::bind_method(_MD("load:Error","path"),&ConfigFile::load);
+ ClassDB::bind_method(_MD("save:Error","path"),&ConfigFile::save);
}
diff --git a/core/io/config_file.h b/core/io/config_file.h
index 6481f05222..bd71fa62c6 100644
--- a/core/io/config_file.h
+++ b/core/io/config_file.h
@@ -34,7 +34,7 @@
class ConfigFile : public Reference {
- OBJ_TYPE(ConfigFile,Reference);
+ GDCLASS(ConfigFile,Reference);
Map< String, Map<String, Variant> > values;
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 4f14a1fc4d..4051ae302f 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -639,32 +639,32 @@ Error HTTPClient::_get_http_data(uint8_t* p_buffer, int p_bytes,int &r_received)
void HTTPClient::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPClient::set_ip_type);
- ObjectTypeDB::bind_method(_MD("connect:Error","host","port","use_ssl","verify_host"),&HTTPClient::connect,DEFVAL(false),DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("set_connection","connection:StreamPeer"),&HTTPClient::set_connection);
- ObjectTypeDB::bind_method(_MD("get_connection:StreamPeer"),&HTTPClient::get_connection);
- ObjectTypeDB::bind_method(_MD("request_raw","method","url","headers","body"),&HTTPClient::request_raw);
- ObjectTypeDB::bind_method(_MD("request","method","url","headers","body"),&HTTPClient::request,DEFVAL(String()));
- ObjectTypeDB::bind_method(_MD("send_body_text","body"),&HTTPClient::send_body_text);
- ObjectTypeDB::bind_method(_MD("send_body_data","body"),&HTTPClient::send_body_data);
- ObjectTypeDB::bind_method(_MD("close"),&HTTPClient::close);
-
- ObjectTypeDB::bind_method(_MD("has_response"),&HTTPClient::has_response);
- ObjectTypeDB::bind_method(_MD("is_response_chunked"),&HTTPClient::is_response_chunked);
- ObjectTypeDB::bind_method(_MD("get_response_code"),&HTTPClient::get_response_code);
- ObjectTypeDB::bind_method(_MD("get_response_headers"),&HTTPClient::_get_response_headers);
- ObjectTypeDB::bind_method(_MD("get_response_headers_as_dictionary"),&HTTPClient::_get_response_headers_as_dictionary);
- ObjectTypeDB::bind_method(_MD("get_response_body_length"),&HTTPClient::get_response_body_length);
- ObjectTypeDB::bind_method(_MD("read_response_body_chunk"),&HTTPClient::read_response_body_chunk);
- ObjectTypeDB::bind_method(_MD("set_read_chunk_size","bytes"),&HTTPClient::set_read_chunk_size);
-
- ObjectTypeDB::bind_method(_MD("set_blocking_mode","enabled"),&HTTPClient::set_blocking_mode);
- ObjectTypeDB::bind_method(_MD("is_blocking_mode_enabled"),&HTTPClient::is_blocking_mode_enabled);
-
- ObjectTypeDB::bind_method(_MD("get_status"),&HTTPClient::get_status);
- ObjectTypeDB::bind_method(_MD("poll:Error"),&HTTPClient::poll);
-
- ObjectTypeDB::bind_method(_MD("query_string_from_dict:String","fields"),&HTTPClient::query_string_from_dict);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPClient::set_ip_type);
+ ClassDB::bind_method(_MD("connect:Error","host","port","use_ssl","verify_host"),&HTTPClient::connect,DEFVAL(false),DEFVAL(true));
+ ClassDB::bind_method(_MD("set_connection","connection:StreamPeer"),&HTTPClient::set_connection);
+ ClassDB::bind_method(_MD("get_connection:StreamPeer"),&HTTPClient::get_connection);
+ ClassDB::bind_method(_MD("request_raw","method","url","headers","body"),&HTTPClient::request_raw);
+ ClassDB::bind_method(_MD("request","method","url","headers","body"),&HTTPClient::request,DEFVAL(String()));
+ ClassDB::bind_method(_MD("send_body_text","body"),&HTTPClient::send_body_text);
+ ClassDB::bind_method(_MD("send_body_data","body"),&HTTPClient::send_body_data);
+ ClassDB::bind_method(_MD("close"),&HTTPClient::close);
+
+ ClassDB::bind_method(_MD("has_response"),&HTTPClient::has_response);
+ ClassDB::bind_method(_MD("is_response_chunked"),&HTTPClient::is_response_chunked);
+ ClassDB::bind_method(_MD("get_response_code"),&HTTPClient::get_response_code);
+ ClassDB::bind_method(_MD("get_response_headers"),&HTTPClient::_get_response_headers);
+ ClassDB::bind_method(_MD("get_response_headers_as_dictionary"),&HTTPClient::_get_response_headers_as_dictionary);
+ ClassDB::bind_method(_MD("get_response_body_length"),&HTTPClient::get_response_body_length);
+ ClassDB::bind_method(_MD("read_response_body_chunk"),&HTTPClient::read_response_body_chunk);
+ ClassDB::bind_method(_MD("set_read_chunk_size","bytes"),&HTTPClient::set_read_chunk_size);
+
+ ClassDB::bind_method(_MD("set_blocking_mode","enabled"),&HTTPClient::set_blocking_mode);
+ ClassDB::bind_method(_MD("is_blocking_mode_enabled"),&HTTPClient::is_blocking_mode_enabled);
+
+ ClassDB::bind_method(_MD("get_status"),&HTTPClient::get_status);
+ ClassDB::bind_method(_MD("poll:Error"),&HTTPClient::poll);
+
+ ClassDB::bind_method(_MD("query_string_from_dict:String","fields"),&HTTPClient::query_string_from_dict);
BIND_CONSTANT( METHOD_GET );
diff --git a/core/io/http_client.h b/core/io/http_client.h
index ef0a687cdd..2e78882303 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -37,7 +37,7 @@
class HTTPClient : public Reference {
- OBJ_TYPE(HTTPClient,Reference);
+ GDCLASS(HTTPClient,Reference);
public:
enum ResponseCode {
diff --git a/core/io/ip.cpp b/core/io/ip.cpp
index b057d72e49..0eb1f221c9 100644
--- a/core/io/ip.cpp
+++ b/core/io/ip.cpp
@@ -218,13 +218,13 @@ Array IP::_get_local_addresses() const {
void IP::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("resolve_hostname","host","ip_type"),&IP::resolve_hostname,DEFVAL(IP::TYPE_ANY));
- ObjectTypeDB::bind_method(_MD("resolve_hostname_queue_item","host","ip_type"),&IP::resolve_hostname_queue_item,DEFVAL(IP::TYPE_ANY));
- ObjectTypeDB::bind_method(_MD("get_resolve_item_status","id"),&IP::get_resolve_item_status);
- ObjectTypeDB::bind_method(_MD("get_resolve_item_address","id"),&IP::get_resolve_item_address);
- ObjectTypeDB::bind_method(_MD("erase_resolve_item","id"),&IP::erase_resolve_item);
- ObjectTypeDB::bind_method(_MD("get_local_addresses"),&IP::_get_local_addresses);
- ObjectTypeDB::bind_method(_MD("clear_cache"),&IP::clear_cache, DEFVAL(""));
+ ClassDB::bind_method(_MD("resolve_hostname","host","ip_type"),&IP::resolve_hostname,DEFVAL(IP::TYPE_ANY));
+ ClassDB::bind_method(_MD("resolve_hostname_queue_item","host","ip_type"),&IP::resolve_hostname_queue_item,DEFVAL(IP::TYPE_ANY));
+ ClassDB::bind_method(_MD("get_resolve_item_status","id"),&IP::get_resolve_item_status);
+ ClassDB::bind_method(_MD("get_resolve_item_address","id"),&IP::get_resolve_item_address);
+ ClassDB::bind_method(_MD("erase_resolve_item","id"),&IP::erase_resolve_item);
+ ClassDB::bind_method(_MD("get_local_addresses"),&IP::_get_local_addresses);
+ ClassDB::bind_method(_MD("clear_cache"),&IP::clear_cache, DEFVAL(""));
BIND_CONSTANT( RESOLVER_STATUS_NONE );
BIND_CONSTANT( RESOLVER_STATUS_WAITING );
diff --git a/core/io/ip.h b/core/io/ip.h
index 0a0e75fe7b..3e028f2613 100644
--- a/core/io/ip.h
+++ b/core/io/ip.h
@@ -36,7 +36,7 @@
struct _IP_ResolverPrivate;
class IP : public Object {
- OBJ_TYPE( IP, Object );
+ GDCLASS( IP, Object );
OBJ_CATEGORY("Networking");
public:
diff --git a/core/io/networked_multiplayer_peer.cpp b/core/io/networked_multiplayer_peer.cpp
index 47e5f3729c..6133401a8c 100644
--- a/core/io/networked_multiplayer_peer.cpp
+++ b/core/io/networked_multiplayer_peer.cpp
@@ -3,18 +3,18 @@
void NetworkedMultiplayerPeer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_transfer_mode","mode"), &NetworkedMultiplayerPeer::set_transfer_mode );
- ObjectTypeDB::bind_method(_MD("set_target_peer","id"), &NetworkedMultiplayerPeer::set_target_peer );
+ ClassDB::bind_method(_MD("set_transfer_mode","mode"), &NetworkedMultiplayerPeer::set_transfer_mode );
+ ClassDB::bind_method(_MD("set_target_peer","id"), &NetworkedMultiplayerPeer::set_target_peer );
- ObjectTypeDB::bind_method(_MD("get_packet_peer"), &NetworkedMultiplayerPeer::get_packet_peer );
+ ClassDB::bind_method(_MD("get_packet_peer"), &NetworkedMultiplayerPeer::get_packet_peer );
- ObjectTypeDB::bind_method(_MD("poll"), &NetworkedMultiplayerPeer::poll );
+ ClassDB::bind_method(_MD("poll"), &NetworkedMultiplayerPeer::poll );
- ObjectTypeDB::bind_method(_MD("get_connection_status"), &NetworkedMultiplayerPeer::get_connection_status );
- ObjectTypeDB::bind_method(_MD("get_unique_id"), &NetworkedMultiplayerPeer::get_unique_id );
+ ClassDB::bind_method(_MD("get_connection_status"), &NetworkedMultiplayerPeer::get_connection_status );
+ ClassDB::bind_method(_MD("get_unique_id"), &NetworkedMultiplayerPeer::get_unique_id );
- ObjectTypeDB::bind_method(_MD("set_refuse_new_connections","enable"), &NetworkedMultiplayerPeer::set_refuse_new_connections );
- ObjectTypeDB::bind_method(_MD("is_refusing_new_connections"), &NetworkedMultiplayerPeer::is_refusing_new_connections );
+ ClassDB::bind_method(_MD("set_refuse_new_connections","enable"), &NetworkedMultiplayerPeer::set_refuse_new_connections );
+ ClassDB::bind_method(_MD("is_refusing_new_connections"), &NetworkedMultiplayerPeer::is_refusing_new_connections );
BIND_CONSTANT( TRANSFER_MODE_UNRELIABLE );
BIND_CONSTANT( TRANSFER_MODE_UNRELIABLE_ORDERED );
diff --git a/core/io/networked_multiplayer_peer.h b/core/io/networked_multiplayer_peer.h
index 485200a9a9..a59d9367d1 100644
--- a/core/io/networked_multiplayer_peer.h
+++ b/core/io/networked_multiplayer_peer.h
@@ -5,7 +5,7 @@
class NetworkedMultiplayerPeer : public PacketPeer {
- OBJ_TYPE(NetworkedMultiplayerPeer,PacketPeer);
+ GDCLASS(NetworkedMultiplayerPeer,PacketPeer);
protected:
static void _bind_methods();
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index fc95aa0b1e..1d05e95010 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -126,12 +126,12 @@ Error PacketPeer::_get_packet_error() const {
void PacketPeer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_var:Variant"),&PacketPeer::_bnd_get_var);
- ObjectTypeDB::bind_method(_MD("put_var", "var:Variant"),&PacketPeer::put_var);
- ObjectTypeDB::bind_method(_MD("get_packet"),&PacketPeer::_get_packet);
- ObjectTypeDB::bind_method(_MD("put_packet:Error", "buffer"),&PacketPeer::_put_packet);
- ObjectTypeDB::bind_method(_MD("get_packet_error:Error"),&PacketPeer::_get_packet_error);
- ObjectTypeDB::bind_method(_MD("get_available_packet_count"),&PacketPeer::get_available_packet_count);
+ ClassDB::bind_method(_MD("get_var:Variant"),&PacketPeer::_bnd_get_var);
+ ClassDB::bind_method(_MD("put_var", "var:Variant"),&PacketPeer::put_var);
+ ClassDB::bind_method(_MD("get_packet"),&PacketPeer::_get_packet);
+ ClassDB::bind_method(_MD("put_packet:Error", "buffer"),&PacketPeer::_put_packet);
+ ClassDB::bind_method(_MD("get_packet_error:Error"),&PacketPeer::_get_packet_error);
+ ClassDB::bind_method(_MD("get_available_packet_count"),&PacketPeer::get_available_packet_count);
};
/***************/
@@ -145,7 +145,7 @@ void PacketPeerStream::_set_stream_peer(REF p_peer) {
void PacketPeerStream::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_stream_peer","peer:StreamPeer"),&PacketPeerStream::_set_stream_peer);
+ ClassDB::bind_method(_MD("set_stream_peer","peer:StreamPeer"),&PacketPeerStream::_set_stream_peer);
}
Error PacketPeerStream::_poll_buffer() const {
diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h
index ec2f46b82d..7aa8d8d456 100644
--- a/core/io/packet_peer.h
+++ b/core/io/packet_peer.h
@@ -34,7 +34,7 @@
#include "ring_buffer.h"
class PacketPeer : public Reference {
- OBJ_TYPE( PacketPeer, Reference );
+ GDCLASS( PacketPeer, Reference );
Variant _bnd_get_var() const;
void _bnd_put_var(const Variant& p_var);
@@ -71,7 +71,7 @@ public:
class PacketPeerStream : public PacketPeer {
- OBJ_TYPE(PacketPeerStream,PacketPeer);
+ GDCLASS(PacketPeerStream,PacketPeer);
//the way the buffers work sucks, will change later
diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp
index 6216176e77..91d1fc5f98 100644
--- a/core/io/packet_peer_udp.cpp
+++ b/core/io/packet_peer_udp.cpp
@@ -58,15 +58,15 @@ void PacketPeerUDP::set_ip_type(IP::Type p_type) {
void PacketPeerUDP::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&PacketPeerUDP::set_ip_type);
- ObjectTypeDB::bind_method(_MD("listen:Error","port", "recv_buf_size"),&PacketPeerUDP::listen,DEFVAL(65536));
- ObjectTypeDB::bind_method(_MD("close"),&PacketPeerUDP::close);
- ObjectTypeDB::bind_method(_MD("wait:Error"),&PacketPeerUDP::wait);
- ObjectTypeDB::bind_method(_MD("is_listening"),&PacketPeerUDP::is_listening);
- ObjectTypeDB::bind_method(_MD("get_packet_ip"),&PacketPeerUDP::_get_packet_ip);
- //ObjectTypeDB::bind_method(_MD("get_packet_address"),&PacketPeerUDP::_get_packet_address);
- ObjectTypeDB::bind_method(_MD("get_packet_port"),&PacketPeerUDP::get_packet_port);
- ObjectTypeDB::bind_method(_MD("set_send_address","host","port"),&PacketPeerUDP::_set_send_address);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&PacketPeerUDP::set_ip_type);
+ ClassDB::bind_method(_MD("listen:Error","port", "recv_buf_size"),&PacketPeerUDP::listen,DEFVAL(65536));
+ ClassDB::bind_method(_MD("close"),&PacketPeerUDP::close);
+ ClassDB::bind_method(_MD("wait:Error"),&PacketPeerUDP::wait);
+ ClassDB::bind_method(_MD("is_listening"),&PacketPeerUDP::is_listening);
+ ClassDB::bind_method(_MD("get_packet_ip"),&PacketPeerUDP::_get_packet_ip);
+ //ClassDB::bind_method(_MD("get_packet_address"),&PacketPeerUDP::_get_packet_address);
+ ClassDB::bind_method(_MD("get_packet_port"),&PacketPeerUDP::get_packet_port);
+ ClassDB::bind_method(_MD("set_send_address","host","port"),&PacketPeerUDP::_set_send_address);
}
diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h
index 5f80ea08fc..17a2817f34 100644
--- a/core/io/packet_peer_udp.h
+++ b/core/io/packet_peer_udp.h
@@ -34,7 +34,7 @@
#include "io/packet_peer.h"
class PacketPeerUDP : public PacketPeer {
- OBJ_TYPE(PacketPeerUDP,PacketPeer);
+ GDCLASS(PacketPeerUDP,PacketPeer);
protected:
diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp
index 6d35acf182..a9f357a7c8 100644
--- a/core/io/pck_packer.cpp
+++ b/core/io/pck_packer.cpp
@@ -52,9 +52,9 @@ static void _pad(FileAccess* p_file, int p_bytes) {
void PCKPacker::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("pck_start","pck_name","alignment"),&PCKPacker::pck_start);
- ObjectTypeDB::bind_method(_MD("add_file","pck_path","source_path"),&PCKPacker::add_file);
- ObjectTypeDB::bind_method(_MD("flush","verbose"),&PCKPacker::flush);
+ ClassDB::bind_method(_MD("pck_start","pck_name","alignment"),&PCKPacker::pck_start);
+ ClassDB::bind_method(_MD("add_file","pck_path","source_path"),&PCKPacker::add_file);
+ ClassDB::bind_method(_MD("flush","verbose"),&PCKPacker::flush);
};
diff --git a/core/io/pck_packer.h b/core/io/pck_packer.h
index 2ed5c050c6..a4eba04f2d 100644
--- a/core/io/pck_packer.h
+++ b/core/io/pck_packer.h
@@ -32,7 +32,7 @@ class FileAccess;
class PCKPacker : public Reference {
- OBJ_TYPE(PCKPacker, Reference);
+ GDCLASS(PCKPacker, Reference);
FileAccess* file;
int alignment;
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 109d2d811e..953192306f 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -700,7 +700,7 @@ Error ResourceInteractiveLoaderBinary::poll(){
String t = get_unicode_string();
- Object *obj = ObjectTypeDB::instance(t);
+ Object *obj = ClassDB::instance(t);
if (!obj) {
error=ERR_FILE_CORRUPT;
ERR_EXPLAIN(local_path+":Resource of unrecognized type in file: "+t);
@@ -711,7 +711,7 @@ Error ResourceInteractiveLoaderBinary::poll(){
if (!r) {
error=ERR_FILE_CORRUPT;
memdelete(obj); //bye
- ERR_EXPLAIN(local_path+":Resoucre type in resource field not a resource, type is: "+obj->get_type());
+ ERR_EXPLAIN(local_path+":Resoucre type in resource field not a resource, type is: "+obj->get_class());
ERR_FAIL_COND_V(!r,ERR_FILE_CORRUPT);
}
@@ -1064,7 +1064,7 @@ void ResourceFormatLoaderBinary::get_recognized_extensions_for_type(const String
}
List<String> extensions;
- ObjectTypeDB::get_extensions_for_type(p_type,&extensions);
+ ClassDB::get_extensions_for_type(p_type,&extensions);
extensions.sort();
@@ -1077,7 +1077,7 @@ void ResourceFormatLoaderBinary::get_recognized_extensions_for_type(const String
void ResourceFormatLoaderBinary::get_recognized_extensions(List<String> *p_extensions) const{
List<String> extensions;
- ObjectTypeDB::get_resource_base_extensions(&extensions);
+ ClassDB::get_resource_base_extensions(&extensions);
extensions.sort();
for(List<String>::Element *E=extensions.front();E;E=E->next()) {
@@ -2002,7 +2002,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_
}
//f->store_32(saved_resources.size()+external_resources.size()); // load steps -not needed
- save_unicode_string(p_resource->get_type());
+ save_unicode_string(p_resource->get_class());
uint64_t md_at = f->get_pos();
f->store_64(0); //offset to impoty metadata
for(int i=0;i<14;i++)
@@ -2019,7 +2019,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_
ResourceData &rd = resources.push_back(ResourceData())->get();
- rd.type=E->get()->get_type();
+ rd.type=E->get()->get_class();
List<PropertyInfo> property_list;
E->get()->get_property_list( &property_list );
@@ -2064,7 +2064,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_
for(int i=0;i<save_order.size();i++) {
- save_unicode_string(save_order[i]->get_save_type());
+ save_unicode_string(save_order[i]->get_save_class());
String path = save_order[i]->get_path();
path=relative_paths?local_path.path_to_file(path):path;
save_unicode_string(path);
diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp
index 7174c40fdf..c90adf4f57 100644
--- a/core/io/resource_format_xml.cpp
+++ b/core/io/resource_format_xml.cpp
@@ -1518,7 +1518,7 @@ Error ResourceInteractiveLoaderXML::poll() {
type=resource_type;
}
- Object *obj = ObjectTypeDB::instance(type);
+ Object *obj = ClassDB::instance(type);
if (!obj) {
error=ERR_FILE_CORRUPT;
ERR_EXPLAIN(local_path+":"+itos(get_current_line())+": Object of unrecognized type in file: "+type);
@@ -1529,7 +1529,7 @@ Error ResourceInteractiveLoaderXML::poll() {
if (!r) {
error=ERR_FILE_CORRUPT;
memdelete(obj); //bye
- ERR_EXPLAIN(local_path+":"+itos(get_current_line())+": Object type in resource field not a resource, type is: "+obj->get_type());
+ ERR_EXPLAIN(local_path+":"+itos(get_current_line())+": Object type in resource field not a resource, type is: "+obj->get_class());
ERR_FAIL_COND_V(!r,ERR_FILE_CORRUPT);
}
@@ -1940,7 +1940,7 @@ void ResourceFormatLoaderXML::get_recognized_extensions_for_type(const String& p
}
List<String> extensions;
- ObjectTypeDB::get_extensions_for_type(p_type,&extensions);
+ ClassDB::get_extensions_for_type(p_type,&extensions);
extensions.sort();
@@ -1958,7 +1958,7 @@ void ResourceFormatLoaderXML::get_recognized_extensions_for_type(const String& p
void ResourceFormatLoaderXML::get_recognized_extensions(List<String> *p_extensions) const{
List<String> extensions;
- ObjectTypeDB::get_resource_base_extensions(&extensions);
+ ClassDB::get_resource_base_extensions(&extensions);
extensions.sort();
for(List<String>::Element *E=extensions.front();E;E=E->next()) {
@@ -2225,7 +2225,7 @@ void ResourceFormatSaverXMLInstance::write_property(const String& p_name,const V
params="external=\""+itos(external_resources[res])+"\"";
} else {
- params="resource_type=\""+res->get_save_type()+"\"";
+ params="resource_type=\""+res->get_save_class()+"\"";
if (res->get_path().length() && res->get_path().find("::")==-1) {
@@ -2734,7 +2734,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
write_string("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>",false); //no escape
write_string("\n",false);
- enter_tag("resource_file","type=\""+p_resource->get_type()+"\" subresource_count=\""+itos(saved_resources.size()+external_resources.size())+"\" version=\""+itos(VERSION_MAJOR)+"."+itos(VERSION_MINOR)+"\" version_name=\""+VERSION_FULL_NAME+"\"");
+ enter_tag("resource_file","type=\""+p_resource->get_class()+"\" subresource_count=\""+itos(saved_resources.size()+external_resources.size())+"\" version=\""+itos(VERSION_MAJOR)+"."+itos(VERSION_MINOR)+"\" version_name=\""+VERSION_FULL_NAME+"\"");
write_string("\n",false);
for(Map<RES,int>::Element *E=external_resources.front();E;E=E->next()) {
@@ -2742,7 +2742,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
write_tabs();
String p = E->key()->get_path();
- enter_tag("ext_resource","path=\""+p+"\" type=\""+E->key()->get_save_type()+"\" index=\""+itos(E->get())+"\""); //bundled
+ enter_tag("ext_resource","path=\""+p+"\" type=\""+E->key()->get_save_class()+"\" index=\""+itos(E->get())+"\""); //bundled
exit_tag("ext_resource"); //bundled
write_string("\n",false);
}
@@ -2775,7 +2775,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
if (main)
enter_tag("main_resource",""); //bundled
else if (res->get_path().length() && res->get_path().find("::") == -1 )
- enter_tag("resource","type=\""+res->get_type()+"\" path=\""+res->get_path()+"\""); //bundled
+ enter_tag("resource","type=\""+res->get_class()+"\" path=\""+res->get_path()+"\""); //bundled
else {
if (res->get_subindex()==0) {
@@ -2789,7 +2789,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
}
int idx = res->get_subindex();
- enter_tag("resource","type=\""+res->get_type()+"\" path=\"local://"+itos(idx)+"\"");
+ enter_tag("resource","type=\""+res->get_class()+"\" path=\"local://"+itos(idx)+"\"");
if (takeover_paths) {
res->set_path(p_path+"::"+itos(idx),true);
}
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 87e5d72a10..f299a75d85 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -78,16 +78,16 @@ void ResourceLoader::get_recognized_extensions_for_type(const String& p_type,Lis
void ResourceInteractiveLoader::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_resource"),&ResourceInteractiveLoader::get_resource);
- ObjectTypeDB::bind_method(_MD("poll"),&ResourceInteractiveLoader::poll);
- ObjectTypeDB::bind_method(_MD("wait"),&ResourceInteractiveLoader::wait);
- ObjectTypeDB::bind_method(_MD("get_stage"),&ResourceInteractiveLoader::get_stage);
- ObjectTypeDB::bind_method(_MD("get_stage_count"),&ResourceInteractiveLoader::get_stage_count);
+ ClassDB::bind_method(_MD("get_resource"),&ResourceInteractiveLoader::get_resource);
+ ClassDB::bind_method(_MD("poll"),&ResourceInteractiveLoader::poll);
+ ClassDB::bind_method(_MD("wait"),&ResourceInteractiveLoader::wait);
+ ClassDB::bind_method(_MD("get_stage"),&ResourceInteractiveLoader::get_stage);
+ ClassDB::bind_method(_MD("get_stage_count"),&ResourceInteractiveLoader::get_stage_count);
}
class ResourceInteractiveLoaderDefault : public ResourceInteractiveLoader {
- OBJ_TYPE( ResourceInteractiveLoaderDefault, ResourceInteractiveLoader );
+ GDCLASS( ResourceInteractiveLoaderDefault, ResourceInteractiveLoader );
public:
Ref<Resource> resource;
@@ -285,7 +285,7 @@ String ResourceLoader::find_complete_path(const String& p_path,const String& p_t
for(List<String>::Element *E=candidates.front();E;E=E->next()) {
String rt = get_resource_type(E->get());
- if (ObjectTypeDB::is_type(rt,p_type)) {
+ if (ClassDB::is_parent_class(rt,p_type)) {
return E->get();
}
}
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h
index de54dbde66..7979bd02a7 100644
--- a/core/io/resource_loader.h
+++ b/core/io/resource_loader.h
@@ -37,7 +37,7 @@
class ResourceInteractiveLoader : public Reference {
- OBJ_TYPE(ResourceInteractiveLoader,Reference);
+ GDCLASS(ResourceInteractiveLoader,Reference);
protected:
static void _bind_methods();
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index bc519147d7..218e17278e 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -389,57 +389,57 @@ Variant StreamPeer::get_var(){
void StreamPeer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("put_data","data"),&StreamPeer::_put_data);
- ObjectTypeDB::bind_method(_MD("put_partial_data","data"),&StreamPeer::_put_partial_data);
-
- ObjectTypeDB::bind_method(_MD("get_data","bytes"),&StreamPeer::_get_data);
- ObjectTypeDB::bind_method(_MD("get_partial_data","bytes"),&StreamPeer::_get_partial_data);
-
- ObjectTypeDB::bind_method(_MD("get_available_bytes"),&StreamPeer::get_available_bytes);
-
- ObjectTypeDB::bind_method(_MD("set_big_endian","enable"),&StreamPeer::set_big_endian);
- ObjectTypeDB::bind_method(_MD("is_big_endian_enabled"),&StreamPeer::is_big_endian_enabled);
-
- ObjectTypeDB::bind_method(_MD("put_8","val"),&StreamPeer::put_8);
- ObjectTypeDB::bind_method(_MD("put_u8","val"),&StreamPeer::put_u8);
- ObjectTypeDB::bind_method(_MD("put_16","val"),&StreamPeer::put_16);
- ObjectTypeDB::bind_method(_MD("put_u16","val"),&StreamPeer::put_u16);
- ObjectTypeDB::bind_method(_MD("put_32","val"),&StreamPeer::put_32);
- ObjectTypeDB::bind_method(_MD("put_u32","val"),&StreamPeer::put_u32);
- ObjectTypeDB::bind_method(_MD("put_64","val"),&StreamPeer::put_64);
- ObjectTypeDB::bind_method(_MD("put_u64","val"),&StreamPeer::put_u64);
- ObjectTypeDB::bind_method(_MD("put_float","val"),&StreamPeer::put_float);
- ObjectTypeDB::bind_method(_MD("put_double","val"),&StreamPeer::put_double);
- ObjectTypeDB::bind_method(_MD("put_utf8_string","val"),&StreamPeer::put_utf8_string);
- ObjectTypeDB::bind_method(_MD("put_var","val:Variant"),&StreamPeer::put_var);
-
- ObjectTypeDB::bind_method(_MD("get_8"),&StreamPeer::get_8);
- ObjectTypeDB::bind_method(_MD("get_u8"),&StreamPeer::get_u8);
- ObjectTypeDB::bind_method(_MD("get_16"),&StreamPeer::get_16);
- ObjectTypeDB::bind_method(_MD("get_u16"),&StreamPeer::get_u16);
- ObjectTypeDB::bind_method(_MD("get_32"),&StreamPeer::get_32);
- ObjectTypeDB::bind_method(_MD("get_u32"),&StreamPeer::get_u32);
- ObjectTypeDB::bind_method(_MD("get_64"),&StreamPeer::get_64);
- ObjectTypeDB::bind_method(_MD("get_u64"),&StreamPeer::get_u64);
- ObjectTypeDB::bind_method(_MD("get_float"),&StreamPeer::get_float);
- ObjectTypeDB::bind_method(_MD("get_double"),&StreamPeer::get_double);
- ObjectTypeDB::bind_method(_MD("get_string","bytes"),&StreamPeer::get_string);
- ObjectTypeDB::bind_method(_MD("get_utf8_string","bytes"),&StreamPeer::get_utf8_string);
- ObjectTypeDB::bind_method(_MD("get_var:Variant"),&StreamPeer::get_var);
+ ClassDB::bind_method(_MD("put_data","data"),&StreamPeer::_put_data);
+ ClassDB::bind_method(_MD("put_partial_data","data"),&StreamPeer::_put_partial_data);
+
+ ClassDB::bind_method(_MD("get_data","bytes"),&StreamPeer::_get_data);
+ ClassDB::bind_method(_MD("get_partial_data","bytes"),&StreamPeer::_get_partial_data);
+
+ ClassDB::bind_method(_MD("get_available_bytes"),&StreamPeer::get_available_bytes);
+
+ ClassDB::bind_method(_MD("set_big_endian","enable"),&StreamPeer::set_big_endian);
+ ClassDB::bind_method(_MD("is_big_endian_enabled"),&StreamPeer::is_big_endian_enabled);
+
+ ClassDB::bind_method(_MD("put_8","val"),&StreamPeer::put_8);
+ ClassDB::bind_method(_MD("put_u8","val"),&StreamPeer::put_u8);
+ ClassDB::bind_method(_MD("put_16","val"),&StreamPeer::put_16);
+ ClassDB::bind_method(_MD("put_u16","val"),&StreamPeer::put_u16);
+ ClassDB::bind_method(_MD("put_32","val"),&StreamPeer::put_32);
+ ClassDB::bind_method(_MD("put_u32","val"),&StreamPeer::put_u32);
+ ClassDB::bind_method(_MD("put_64","val"),&StreamPeer::put_64);
+ ClassDB::bind_method(_MD("put_u64","val"),&StreamPeer::put_u64);
+ ClassDB::bind_method(_MD("put_float","val"),&StreamPeer::put_float);
+ ClassDB::bind_method(_MD("put_double","val"),&StreamPeer::put_double);
+ ClassDB::bind_method(_MD("put_utf8_string","val"),&StreamPeer::put_utf8_string);
+ ClassDB::bind_method(_MD("put_var","val:Variant"),&StreamPeer::put_var);
+
+ ClassDB::bind_method(_MD("get_8"),&StreamPeer::get_8);
+ ClassDB::bind_method(_MD("get_u8"),&StreamPeer::get_u8);
+ ClassDB::bind_method(_MD("get_16"),&StreamPeer::get_16);
+ ClassDB::bind_method(_MD("get_u16"),&StreamPeer::get_u16);
+ ClassDB::bind_method(_MD("get_32"),&StreamPeer::get_32);
+ ClassDB::bind_method(_MD("get_u32"),&StreamPeer::get_u32);
+ ClassDB::bind_method(_MD("get_64"),&StreamPeer::get_64);
+ ClassDB::bind_method(_MD("get_u64"),&StreamPeer::get_u64);
+ ClassDB::bind_method(_MD("get_float"),&StreamPeer::get_float);
+ ClassDB::bind_method(_MD("get_double"),&StreamPeer::get_double);
+ ClassDB::bind_method(_MD("get_string","bytes"),&StreamPeer::get_string);
+ ClassDB::bind_method(_MD("get_utf8_string","bytes"),&StreamPeer::get_utf8_string);
+ ClassDB::bind_method(_MD("get_var:Variant"),&StreamPeer::get_var);
}
////////////////////////////////
void StreamPeerBuffer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("seek","pos"),&StreamPeerBuffer::seek);
- ObjectTypeDB::bind_method(_MD("get_size"),&StreamPeerBuffer::get_size);
- ObjectTypeDB::bind_method(_MD("get_pos"),&StreamPeerBuffer::get_pos);
- ObjectTypeDB::bind_method(_MD("resize","size"),&StreamPeerBuffer::resize);
- ObjectTypeDB::bind_method(_MD("set_data_array","data"),&StreamPeerBuffer::set_data_array);
- ObjectTypeDB::bind_method(_MD("get_data_array"),&StreamPeerBuffer::get_data_array);
- ObjectTypeDB::bind_method(_MD("clear"),&StreamPeerBuffer::clear);
- ObjectTypeDB::bind_method(_MD("duplicate:StreamPeerBuffer"),&StreamPeerBuffer::duplicate);
+ ClassDB::bind_method(_MD("seek","pos"),&StreamPeerBuffer::seek);
+ ClassDB::bind_method(_MD("get_size"),&StreamPeerBuffer::get_size);
+ ClassDB::bind_method(_MD("get_pos"),&StreamPeerBuffer::get_pos);
+ ClassDB::bind_method(_MD("resize","size"),&StreamPeerBuffer::resize);
+ ClassDB::bind_method(_MD("set_data_array","data"),&StreamPeerBuffer::set_data_array);
+ ClassDB::bind_method(_MD("get_data_array"),&StreamPeerBuffer::get_data_array);
+ ClassDB::bind_method(_MD("clear"),&StreamPeerBuffer::clear);
+ ClassDB::bind_method(_MD("duplicate:StreamPeerBuffer"),&StreamPeerBuffer::duplicate);
}
diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h
index 1c415ed5a9..232a908dd7 100644
--- a/core/io/stream_peer.h
+++ b/core/io/stream_peer.h
@@ -32,7 +32,7 @@
#include "reference.h"
class StreamPeer : public Reference {
- OBJ_TYPE( StreamPeer, Reference );
+ GDCLASS( StreamPeer, Reference );
OBJ_CATEGORY("Networking");
protected:
static void _bind_methods();
@@ -94,7 +94,7 @@ public:
class StreamPeerBuffer : public StreamPeer {
- OBJ_TYPE(StreamPeerBuffer,StreamPeer);
+ GDCLASS(StreamPeerBuffer,StreamPeer);
DVector<uint8_t> data;
int pointer;
diff --git a/core/io/stream_peer_ssl.cpp b/core/io/stream_peer_ssl.cpp
index a936791561..639d848110 100644
--- a/core/io/stream_peer_ssl.cpp
+++ b/core/io/stream_peer_ssl.cpp
@@ -57,10 +57,10 @@ bool StreamPeerSSL::is_available() {
void StreamPeerSSL::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("accept:Error","stream:StreamPeer"),&StreamPeerSSL::accept);
- ObjectTypeDB::bind_method(_MD("connect:Error","stream:StreamPeer","validate_certs","for_hostname"),&StreamPeerSSL::connect,DEFVAL(false),DEFVAL(String()));
- ObjectTypeDB::bind_method(_MD("get_status"),&StreamPeerSSL::get_status);
- ObjectTypeDB::bind_method(_MD("disconnect"),&StreamPeerSSL::disconnect);
+ ClassDB::bind_method(_MD("accept:Error","stream:StreamPeer"),&StreamPeerSSL::accept);
+ ClassDB::bind_method(_MD("connect:Error","stream:StreamPeer","validate_certs","for_hostname"),&StreamPeerSSL::connect,DEFVAL(false),DEFVAL(String()));
+ ClassDB::bind_method(_MD("get_status"),&StreamPeerSSL::get_status);
+ ClassDB::bind_method(_MD("disconnect"),&StreamPeerSSL::disconnect);
BIND_CONSTANT( STATUS_DISCONNECTED );
BIND_CONSTANT( STATUS_CONNECTED );
BIND_CONSTANT( STATUS_ERROR_NO_CERTIFICATE );
diff --git a/core/io/stream_peer_ssl.h b/core/io/stream_peer_ssl.h
index 2e9ba52644..b36534fcfa 100644
--- a/core/io/stream_peer_ssl.h
+++ b/core/io/stream_peer_ssl.h
@@ -32,7 +32,7 @@
#include "io/stream_peer.h"
class StreamPeerSSL : public StreamPeer {
- OBJ_TYPE(StreamPeerSSL,StreamPeer);
+ GDCLASS(StreamPeerSSL,StreamPeer);
public:
typedef void (*LoadCertsFromMemory)(const ByteArray& p_certs);
diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp
index 52cc11a4a4..2218057cf7 100644
--- a/core/io/stream_peer_tcp.cpp
+++ b/core/io/stream_peer_tcp.cpp
@@ -52,13 +52,13 @@ void StreamPeerTCP::set_ip_type(IP::Type p_type) {
void StreamPeerTCP::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&StreamPeerTCP::set_ip_type);
- ObjectTypeDB::bind_method(_MD("connect","host","port"),&StreamPeerTCP::_connect);
- ObjectTypeDB::bind_method(_MD("is_connected"),&StreamPeerTCP::is_connected);
- ObjectTypeDB::bind_method(_MD("get_status"),&StreamPeerTCP::get_status);
- ObjectTypeDB::bind_method(_MD("get_connected_host"),&StreamPeerTCP::get_connected_host);
- ObjectTypeDB::bind_method(_MD("get_connected_port"),&StreamPeerTCP::get_connected_port);
- ObjectTypeDB::bind_method(_MD("disconnect"),&StreamPeerTCP::disconnect);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&StreamPeerTCP::set_ip_type);
+ ClassDB::bind_method(_MD("connect","host","port"),&StreamPeerTCP::_connect);
+ ClassDB::bind_method(_MD("is_connected"),&StreamPeerTCP::is_connected);
+ ClassDB::bind_method(_MD("get_status"),&StreamPeerTCP::get_status);
+ ClassDB::bind_method(_MD("get_connected_host"),&StreamPeerTCP::get_connected_host);
+ ClassDB::bind_method(_MD("get_connected_port"),&StreamPeerTCP::get_connected_port);
+ ClassDB::bind_method(_MD("disconnect"),&StreamPeerTCP::disconnect);
BIND_CONSTANT( STATUS_NONE );
BIND_CONSTANT( STATUS_CONNECTING );
diff --git a/core/io/stream_peer_tcp.h b/core/io/stream_peer_tcp.h
index abc5947fff..8f6dfaf3f8 100644
--- a/core/io/stream_peer_tcp.h
+++ b/core/io/stream_peer_tcp.h
@@ -36,7 +36,7 @@
class StreamPeerTCP : public StreamPeer {
- OBJ_TYPE( StreamPeerTCP, StreamPeer );
+ GDCLASS( StreamPeerTCP, StreamPeer );
OBJ_CATEGORY("Networking");
public:
diff --git a/core/io/tcp_server.cpp b/core/io/tcp_server.cpp
index 431b17321b..751dfbadca 100644
--- a/core/io/tcp_server.cpp
+++ b/core/io/tcp_server.cpp
@@ -61,11 +61,11 @@ void TCP_Server::set_ip_type(IP::Type p_type) {
void TCP_Server::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&TCP_Server::set_ip_type);
- ObjectTypeDB::bind_method(_MD("listen","port","accepted_hosts"),&TCP_Server::_listen,DEFVAL(DVector<String>()));
- ObjectTypeDB::bind_method(_MD("is_connection_available"),&TCP_Server::is_connection_available);
- ObjectTypeDB::bind_method(_MD("take_connection"),&TCP_Server::take_connection);
- ObjectTypeDB::bind_method(_MD("stop"),&TCP_Server::stop);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&TCP_Server::set_ip_type);
+ ClassDB::bind_method(_MD("listen","port","accepted_hosts"),&TCP_Server::_listen,DEFVAL(DVector<String>()));
+ ClassDB::bind_method(_MD("is_connection_available"),&TCP_Server::is_connection_available);
+ ClassDB::bind_method(_MD("take_connection"),&TCP_Server::take_connection);
+ ClassDB::bind_method(_MD("stop"),&TCP_Server::stop);
}
diff --git a/core/io/tcp_server.h b/core/io/tcp_server.h
index 14153a3324..5fd65575f6 100644
--- a/core/io/tcp_server.h
+++ b/core/io/tcp_server.h
@@ -35,7 +35,7 @@
class TCP_Server : public Reference {
- OBJ_TYPE( TCP_Server, Reference );
+ GDCLASS( TCP_Server, Reference );
protected:
IP::Type ip_type;
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp
index 9e194d1053..0322f23056 100644
--- a/core/io/xml_parser.cpp
+++ b/core/io/xml_parser.cpp
@@ -379,23 +379,23 @@ Error XMLParser::seek(uint64_t p_pos) {
void XMLParser::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("read"),&XMLParser::read);
- ObjectTypeDB::bind_method(_MD("get_node_type"),&XMLParser::get_node_type);
- ObjectTypeDB::bind_method(_MD("get_node_name"),&XMLParser::get_node_name);
- ObjectTypeDB::bind_method(_MD("get_node_data"),&XMLParser::get_node_data);
- ObjectTypeDB::bind_method(_MD("get_node_offset"),&XMLParser::get_node_offset);
- ObjectTypeDB::bind_method(_MD("get_attribute_count"),&XMLParser::get_attribute_count);
- ObjectTypeDB::bind_method(_MD("get_attribute_name","idx"),&XMLParser::get_attribute_name);
- ObjectTypeDB::bind_method(_MD("get_attribute_value","idx"),(String (XMLParser::*)(int) const) &XMLParser::get_attribute_value);
- ObjectTypeDB::bind_method(_MD("has_attribute","name"),&XMLParser::has_attribute);
- ObjectTypeDB::bind_method(_MD("get_named_attribute_value","name"), (String (XMLParser::*)(const String&) const) &XMLParser::get_attribute_value);
- ObjectTypeDB::bind_method(_MD("get_named_attribute_value_safe","name"), &XMLParser::get_attribute_value_safe);
- ObjectTypeDB::bind_method(_MD("is_empty"),&XMLParser::is_empty);
- ObjectTypeDB::bind_method(_MD("get_current_line"),&XMLParser::get_current_line);
- ObjectTypeDB::bind_method(_MD("skip_section"),&XMLParser::skip_section);
- ObjectTypeDB::bind_method(_MD("seek","pos"),&XMLParser::seek);
- ObjectTypeDB::bind_method(_MD("open","file"),&XMLParser::open);
- ObjectTypeDB::bind_method(_MD("open_buffer","buffer"),&XMLParser::open_buffer);
+ ClassDB::bind_method(_MD("read"),&XMLParser::read);
+ ClassDB::bind_method(_MD("get_node_type"),&XMLParser::get_node_type);
+ ClassDB::bind_method(_MD("get_node_name"),&XMLParser::get_node_name);
+ ClassDB::bind_method(_MD("get_node_data"),&XMLParser::get_node_data);
+ ClassDB::bind_method(_MD("get_node_offset"),&XMLParser::get_node_offset);
+ ClassDB::bind_method(_MD("get_attribute_count"),&XMLParser::get_attribute_count);
+ ClassDB::bind_method(_MD("get_attribute_name","idx"),&XMLParser::get_attribute_name);
+ ClassDB::bind_method(_MD("get_attribute_value","idx"),(String (XMLParser::*)(int) const) &XMLParser::get_attribute_value);
+ ClassDB::bind_method(_MD("has_attribute","name"),&XMLParser::has_attribute);
+ ClassDB::bind_method(_MD("get_named_attribute_value","name"), (String (XMLParser::*)(const String&) const) &XMLParser::get_attribute_value);
+ ClassDB::bind_method(_MD("get_named_attribute_value_safe","name"), &XMLParser::get_attribute_value_safe);
+ ClassDB::bind_method(_MD("is_empty"),&XMLParser::is_empty);
+ ClassDB::bind_method(_MD("get_current_line"),&XMLParser::get_current_line);
+ ClassDB::bind_method(_MD("skip_section"),&XMLParser::skip_section);
+ ClassDB::bind_method(_MD("seek","pos"),&XMLParser::seek);
+ ClassDB::bind_method(_MD("open","file"),&XMLParser::open);
+ ClassDB::bind_method(_MD("open_buffer","buffer"),&XMLParser::open_buffer);
BIND_CONSTANT( NODE_NONE );
BIND_CONSTANT( NODE_ELEMENT );
diff --git a/core/io/xml_parser.h b/core/io/xml_parser.h
index e1f059bf8c..7f80751156 100644
--- a/core/io/xml_parser.h
+++ b/core/io/xml_parser.h
@@ -40,7 +40,7 @@
class XMLParser : public Reference {
- OBJ_TYPE( XMLParser, Reference );
+ GDCLASS( XMLParser, Reference );
public:
//! Enumeration of all supported source text file formats
enum SourceFormat {
diff --git a/core/make_binders.py b/core/make_binders.py
index ef71c4264b..74b5e9fda3 100644
--- a/core/make_binders.py
+++ b/core/make_binders.py
@@ -17,8 +17,8 @@ public:
return Variant::NIL;
}
#endif
- virtual String get_instance_type() const {
- return T::get_type_static();
+ virtual String get_instance_class() const {
+ return T::get_class_static();
}
virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Variant::CallError& r_error) {
@@ -97,7 +97,7 @@ public:
return Variant::NIL;
}
#endif
- virtual String get_instance_type() const {
+ virtual String get_instance_class() const {
return type_name;
}
@@ -159,7 +159,7 @@ MethodBind* create_method_bind($ifret R$ $ifnoret void$ (T::*p_method)($arg, P@$
} u;
u.sm=p_method;
a->method=u.dm;
- a->type_name=T::get_type_static();
+ a->type_name=T::get_class_static();
return a;
}
#endif
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 0b45577b58..29f61834b4 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -407,23 +407,23 @@ DVector<int> AStar::get_id_path(int p_from_id, int p_to_id) {
void AStar::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_available_point_id"),&AStar::get_available_point_id);
- ObjectTypeDB::bind_method(_MD("add_point","id","pos","weight_scale"),&AStar::add_point,DEFVAL(1.0));
- ObjectTypeDB::bind_method(_MD("get_point_pos","id"),&AStar::get_point_pos);
- ObjectTypeDB::bind_method(_MD("get_point_weight_scale","id"),&AStar::get_point_weight_scale);
- ObjectTypeDB::bind_method(_MD("remove_point","id"),&AStar::remove_point);
+ ClassDB::bind_method(_MD("get_available_point_id"),&AStar::get_available_point_id);
+ ClassDB::bind_method(_MD("add_point","id","pos","weight_scale"),&AStar::add_point,DEFVAL(1.0));
+ ClassDB::bind_method(_MD("get_point_pos","id"),&AStar::get_point_pos);
+ ClassDB::bind_method(_MD("get_point_weight_scale","id"),&AStar::get_point_weight_scale);
+ ClassDB::bind_method(_MD("remove_point","id"),&AStar::remove_point);
- ObjectTypeDB::bind_method(_MD("connect_points","id","to_id"),&AStar::connect_points);
- ObjectTypeDB::bind_method(_MD("disconnect_points","id","to_id"),&AStar::disconnect_points);
- ObjectTypeDB::bind_method(_MD("are_points_connected","id","to_id"),&AStar::are_points_connected);
+ ClassDB::bind_method(_MD("connect_points","id","to_id"),&AStar::connect_points);
+ ClassDB::bind_method(_MD("disconnect_points","id","to_id"),&AStar::disconnect_points);
+ ClassDB::bind_method(_MD("are_points_connected","id","to_id"),&AStar::are_points_connected);
- ObjectTypeDB::bind_method(_MD("clear"),&AStar::clear);
+ ClassDB::bind_method(_MD("clear"),&AStar::clear);
- ObjectTypeDB::bind_method(_MD("get_closest_point","to_pos"),&AStar::get_closest_point);
- ObjectTypeDB::bind_method(_MD("get_closest_pos_in_segment","to_pos"),&AStar::get_closest_pos_in_segment);
+ ClassDB::bind_method(_MD("get_closest_point","to_pos"),&AStar::get_closest_point);
+ ClassDB::bind_method(_MD("get_closest_pos_in_segment","to_pos"),&AStar::get_closest_pos_in_segment);
- ObjectTypeDB::bind_method(_MD("get_point_path","from_id","to_id"),&AStar::get_point_path);
- ObjectTypeDB::bind_method(_MD("get_id_path","from_id","to_id"),&AStar::get_id_path);
+ ClassDB::bind_method(_MD("get_point_path","from_id","to_id"),&AStar::get_point_path);
+ ClassDB::bind_method(_MD("get_id_path","from_id","to_id"),&AStar::get_id_path);
}
diff --git a/core/math/a_star.h b/core/math/a_star.h
index f9ffc477fc..66a983a6ce 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -37,7 +37,7 @@
class AStar: public Reference {
- OBJ_TYPE(AStar,Reference)
+ GDCLASS(AStar,Reference)
uint64_t pass;
diff --git a/core/math/triangle_mesh.h b/core/math/triangle_mesh.h
index a310f7e32b..d42f9c8dde 100644
--- a/core/math/triangle_mesh.h
+++ b/core/math/triangle_mesh.h
@@ -33,7 +33,7 @@
#include "face3.h"
class TriangleMesh : public Reference {
- OBJ_TYPE( TriangleMesh, Reference);
+ GDCLASS( TriangleMesh, Reference);
struct Triangle {
diff --git a/core/message_queue.cpp b/core/message_queue.cpp
index d17321f026..11fe2337f6 100644
--- a/core/message_queue.cpp
+++ b/core/message_queue.cpp
@@ -45,7 +45,7 @@ Error MessageQueue::push_call(ObjectID p_id,const StringName& p_method,const Var
if ((buffer_end+room_needed) >= buffer_size) {
String type;
if (ObjectDB::get_instance(p_id))
- type=ObjectDB::get_instance(p_id)->get_type();
+ type=ObjectDB::get_instance(p_id)->get_class();
print_line("failed method: "+type+":"+p_method+" target ID: "+itos(p_id));
statistics();
@@ -98,7 +98,7 @@ Error MessageQueue::push_set(ObjectID p_id, const StringName& p_prop, const Vari
if ((buffer_end+room_needed) >= buffer_size) {
String type;
if (ObjectDB::get_instance(p_id))
- type=ObjectDB::get_instance(p_id)->get_type();
+ type=ObjectDB::get_instance(p_id)->get_class();
print_line("failed set: "+type+":"+p_prop+" target ID: "+itos(p_id));
statistics();
@@ -133,7 +133,7 @@ Error MessageQueue::push_notification(ObjectID p_id, int p_notification) {
if ((buffer_end+room_needed) >= buffer_size) {
String type;
if (ObjectDB::get_instance(p_id))
- type=ObjectDB::get_instance(p_id)->get_type();
+ type=ObjectDB::get_instance(p_id)->get_class();
print_line("failed notification: "+itos(p_notification)+" target ID: "+itos(p_id));
statistics();
diff --git a/core/method_bind.h b/core/method_bind.h
index 168b2e72a1..7b59e6a6b0 100644
--- a/core/method_bind.h
+++ b/core/method_bind.h
@@ -231,7 +231,7 @@ public:
#endif
void set_hint_flags(uint32_t p_hint) { hint_flags=p_hint; }
uint32_t get_hint_flags() const { return hint_flags|(is_const()?METHOD_FLAG_CONST:0)|(is_vararg()?METHOD_FLAG_VARARG:0); }
- virtual String get_instance_type() const=0;
+ virtual String get_instance_class() const=0;
_FORCE_INLINE_ int get_argument_count() const { return argument_count; };
@@ -328,7 +328,7 @@ public:
void set_method(NativeCall p_method) { call_method=p_method; }
virtual bool is_const() const { return false; }
- virtual String get_instance_type() const { return T::get_type_static(); }
+ virtual String get_instance_class() const { return T::get_class_static(); }
virtual bool is_vararg() const { return true; }
diff --git a/core/object.cpp b/core/object.cpp
index a755a3abb1..82377013e1 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -341,15 +341,15 @@ bool Object::_predelete() {
_predelete_ok=1;
notification(NOTIFICATION_PREDELETE,true);
if (_predelete_ok) {
- _type_ptr=NULL; //must restore so destructors can access type ptr correctly
+ _class_ptr=NULL; //must restore so destructors can access class ptr correctly
}
return _predelete_ok;
}
void Object::_postinitialize() {
- _type_ptr=_get_type_namev();
- _initialize_typev();
+ _class_ptr=_get_class_namev();
+ _initialize_classv();
notification(NOTIFICATION_POSTINITIALIZE);
}
@@ -373,7 +373,7 @@ void Object::set(const String& p_name, const Variant& p_value) {
// return;
bool success;
- ObjectTypeDB::set_property(this,p_name,p_value,success);
+ ClassDB::set_property(this,p_name,p_value,success);
if (success) {
return;
}
@@ -409,7 +409,7 @@ void Object::set(const StringName& p_name, const Variant& p_value, bool *r_valid
//try built-in setgetter
{
- if (ObjectTypeDB::set_property(this,p_name,p_value,r_valid)) {
+ if (ClassDB::set_property(this,p_name,p_value,r_valid)) {
//if (r_valid)
// *r_valid=true;
return;
@@ -460,7 +460,7 @@ Variant Object::get(const StringName& p_name, bool *r_valid) const{
//try built-in setgetter
{
- if (ObjectTypeDB::get_property(const_cast<Object*>(this),p_name,ret)) {
+ if (ClassDB::get_property(const_cast<Object*>(this),p_name,ret)) {
if (r_valid)
*r_valid=true;
return ret;
@@ -504,7 +504,7 @@ Variant Object::get(const String& p_name) const {
return ret;
bool success;
- ObjectTypeDB::get_property(const_cast<Object*>(this),p_name,ret,success);
+ ClassDB::get_property(const_cast<Object*>(this),p_name,ret,success);
if (success) {
return ret;
}
@@ -535,7 +535,7 @@ void Object::get_property_list(List<PropertyInfo> *p_list,bool p_reversed) const
if (!_use_builtin_script())
return;
- if (!is_type("Script")) // can still be set, but this is for userfriendlyness
+ if (!is_class("Script")) // can still be set, but this is for userfriendlyness
p_list->push_back( PropertyInfo( Variant::OBJECT, "script/script", PROPERTY_HINT_RESOURCE_TYPE, "Script",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_STORE_IF_NONZERO));
if (!metadata.empty())
p_list->push_back( PropertyInfo( Variant::DICTIONARY, "__meta__", PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_STORE_IF_NONZERO));
@@ -552,7 +552,7 @@ void Object::_validate_property(PropertyInfo& property) const {
void Object::get_method_list(List<MethodInfo> *p_list) const {
- ObjectTypeDB::get_method_list(get_type_name(),p_list);
+ ClassDB::get_method_list(get_class_name(),p_list);
if (script_instance) {
script_instance->get_method_list(p_list);
}
@@ -697,7 +697,7 @@ void Object::call_multilevel(const StringName& p_method,const Variant** p_args,i
}
- MethodBind *method=ObjectTypeDB::get_method(get_type_name(),p_method);
+ MethodBind *method=ClassDB::get_method(get_class_name(),p_method);
if (method) {
@@ -710,7 +710,7 @@ void Object::call_multilevel(const StringName& p_method,const Variant** p_args,i
void Object::call_multilevel_reversed(const StringName& p_method,const Variant** p_args,int p_argcount) {
- MethodBind *method=ObjectTypeDB::get_method(get_type_name(),p_method);
+ MethodBind *method=ClassDB::get_method(get_class_name(),p_method);
Variant::CallError error;
OBJ_DEBUG_LOCK
@@ -744,7 +744,7 @@ bool Object::has_method(const StringName& p_method) const {
return true;
}
- MethodBind *method=ObjectTypeDB::get_method(get_type_name(),p_method);
+ MethodBind *method=ClassDB::get_method(get_class_name(),p_method);
if (method) {
return true;
@@ -821,7 +821,7 @@ Variant Object::call(const StringName& p_name, VARIANT_ARG_DECLARE) {
return ret;
}
- MethodBind *method=ObjectTypeDB::get_method(get_type_name(),p_name);
+ MethodBind *method=ClassDB::get_method(get_type_name(),p_name);
if (method) {
@@ -888,7 +888,7 @@ void Object::call_multilevel(const StringName& p_name, VARIANT_ARG_DECLARE) {
}
- MethodBind *method=ObjectTypeDB::get_method(get_type_name(),p_name);
+ MethodBind *method=ClassDB::get_method(get_type_name(),p_name);
if (method) {
@@ -971,7 +971,7 @@ Variant Object::call(const StringName& p_method,const Variant** p_args,int p_arg
}
}
- MethodBind *method=ObjectTypeDB::get_method(get_type_name(),p_method);
+ MethodBind *method=ClassDB::get_method(get_class_name(),p_method);
if (method) {
@@ -1138,7 +1138,7 @@ void Object::get_meta_list(List<String> *p_list) const {
void Object::add_user_signal(const MethodInfo& p_signal) {
ERR_FAIL_COND(p_signal.name=="");
- ERR_FAIL_COND( ObjectTypeDB::has_signal(get_type_name(),p_signal.name ) );
+ ERR_FAIL_COND( ClassDB::has_signal(get_class_name(),p_signal.name ) );
ERR_FAIL_COND(signal_map.has(p_signal.name));
Signal s;
s.user=p_signal;
@@ -1216,7 +1216,7 @@ void Object::emit_signal(const StringName& p_name,const Variant** p_args,int p_a
Signal *s = signal_map.getptr(p_name);
if (!s) {
#ifdef DEBUG_ENABLED
- bool signal_is_valid = ObjectTypeDB::has_signal(get_type_name(),p_name);
+ bool signal_is_valid = ClassDB::has_signal(get_class_name(),p_name);
//check in script
if (!signal_is_valid && !script.is_null() && !Ref<Script>(script)->has_script_signal(p_name)) {
ERR_EXPLAIN("Can't emit non-existing signal " + String("\"")+p_name+"\".");
@@ -1281,7 +1281,7 @@ void Object::emit_signal(const StringName& p_name,const Variant** p_args,int p_a
target->call( c.method, args, argc,ce );
if (ce.error!=Variant::CallError::CALL_OK) {
- if (ce.error==Variant::CallError::CALL_ERROR_INVALID_METHOD && !ObjectTypeDB::type_exists( target->get_type_name() ) ) {
+ if (ce.error==Variant::CallError::CALL_ERROR_INVALID_METHOD && !ClassDB::class_exists( target->get_class_name() ) ) {
//most likely object is not initialized yet, do not throw error.
} else {
ERR_PRINTS("Error calling method from signal '"+String(p_name)+"': "+Variant::get_call_error_text(target,c.method,args,argc,ce));
@@ -1415,7 +1415,7 @@ void Object::get_signal_list(List<MethodInfo> *p_signals ) const {
Ref<Script>(script)->get_script_signal_list(p_signals);
}
- ObjectTypeDB::get_signal_list(get_type_name(),p_signals);
+ ClassDB::get_signal_list(get_class_name(),p_signals);
//find maybe usersignals?
const StringName *S=NULL;
@@ -1489,13 +1489,13 @@ Error Object::connect(const StringName& p_signal, Object *p_to_object, const Str
Signal *s = signal_map.getptr(p_signal);
if (!s) {
- bool signal_is_valid = ObjectTypeDB::has_signal(get_type_name(),p_signal);
+ bool signal_is_valid = ClassDB::has_signal(get_class_name(),p_signal);
//check in script
if (!signal_is_valid && !script.is_null() && Ref<Script>(script)->has_script_signal(p_signal))
signal_is_valid=true;
if (!signal_is_valid) {
- ERR_EXPLAIN("In Object of type '"+String(get_type())+"': Attempt to connect nonexistent signal '"+p_signal+"' to method '"+p_to_object->get_type()+"."+p_to_method+"'");
+ ERR_EXPLAIN("In Object of type '"+String(get_class())+"': Attempt to connect nonexistent signal '"+p_signal+"' to method '"+p_to_object->get_class()+"."+p_to_method+"'");
ERR_FAIL_COND_V(!signal_is_valid,ERR_INVALID_PARAMETER);
}
signal_map[p_signal]=Signal();
@@ -1529,7 +1529,7 @@ bool Object::is_connected(const StringName& p_signal, Object *p_to_object, const
ERR_FAIL_NULL_V(p_to_object,false);
const Signal *s = signal_map.getptr(p_signal);
if (!s) {
- bool signal_is_valid = ObjectTypeDB::has_signal(get_type_name(),p_signal);
+ bool signal_is_valid = ClassDB::has_signal(get_class_name(),p_signal);
if (signal_is_valid)
return false;
@@ -1571,7 +1571,7 @@ void Object::disconnect(const StringName& p_signal, Object *p_to_object, const S
p_to_object->connections.erase(s->slot_map[target].cE);
s->slot_map.erase(target);
- if (s->slot_map.empty() && ObjectTypeDB::has_signal(get_type_name(),p_signal )) {
+ if (s->slot_map.empty() && ClassDB::has_signal(get_class_name(),p_signal )) {
//not user signal, delete
signal_map.erase(p_signal);
}
@@ -1588,12 +1588,12 @@ Variant Object::_get_bind(const String& p_name) const {
return get(p_name);
}
-void Object::initialize_type() {
+void Object::initialize_class() {
static bool initialized=false;
if (initialized)
return;
- ObjectTypeDB::_add_type<Object>();
+ ClassDB::_add_class<Object>();
_bind_methods();
initialized=true;
}
@@ -1672,31 +1672,31 @@ void Object::clear_internal_resource_paths() {
void Object::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_type"),&Object::get_type);
- ObjectTypeDB::bind_method(_MD("is_type","type"),&Object::is_type);
- ObjectTypeDB::bind_method(_MD("set","property","value"),&Object::_set_bind);
- ObjectTypeDB::bind_method(_MD("get","property"),&Object::_get_bind);
- ObjectTypeDB::bind_method(_MD("get_property_list"),&Object::_get_property_list_bind);
- ObjectTypeDB::bind_method(_MD("get_method_list"),&Object::_get_method_list_bind);
- ObjectTypeDB::bind_method(_MD("notification","what","reversed"),&Object::notification,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("get_instance_ID"),&Object::get_instance_ID);
+ ClassDB::bind_method(_MD("get_class"),&Object::get_class);
+ ClassDB::bind_method(_MD("is_class","type"),&Object::is_class);
+ ClassDB::bind_method(_MD("set","property","value"),&Object::_set_bind);
+ ClassDB::bind_method(_MD("get","property"),&Object::_get_bind);
+ ClassDB::bind_method(_MD("get_property_list"),&Object::_get_property_list_bind);
+ ClassDB::bind_method(_MD("get_method_list"),&Object::_get_method_list_bind);
+ ClassDB::bind_method(_MD("notification","what","reversed"),&Object::notification,DEFVAL(false));
+ ClassDB::bind_method(_MD("get_instance_ID"),&Object::get_instance_ID);
- ObjectTypeDB::bind_method(_MD("set_script","script:Script"),&Object::set_script);
- ObjectTypeDB::bind_method(_MD("get_script:Script"),&Object::get_script);
+ ClassDB::bind_method(_MD("set_script","script:Script"),&Object::set_script);
+ ClassDB::bind_method(_MD("get_script:Script"),&Object::get_script);
- ObjectTypeDB::bind_method(_MD("set_meta","name","value"),&Object::set_meta);
- ObjectTypeDB::bind_method(_MD("get_meta","name","value"),&Object::get_meta);
- ObjectTypeDB::bind_method(_MD("has_meta","name"),&Object::has_meta);
- ObjectTypeDB::bind_method(_MD("get_meta_list"),&Object::_get_meta_list_bind);
+ ClassDB::bind_method(_MD("set_meta","name","value"),&Object::set_meta);
+ ClassDB::bind_method(_MD("get_meta","name","value"),&Object::get_meta);
+ ClassDB::bind_method(_MD("has_meta","name"),&Object::has_meta);
+ ClassDB::bind_method(_MD("get_meta_list"),&Object::_get_meta_list_bind);
//todo reimplement this per language so all 5 arguments can be called
-// ObjectTypeDB::bind_method(_MD("call","method","arg1","arg2","arg3","arg4"),&Object::_call_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()));
-// ObjectTypeDB::bind_method(_MD("call_deferred","method","arg1","arg2","arg3","arg4"),&Object::_call_deferred_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()));
+// ClassDB::bind_method(_MD("call","method","arg1","arg2","arg3","arg4"),&Object::_call_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()));
+// ClassDB::bind_method(_MD("call_deferred","method","arg1","arg2","arg3","arg4"),&Object::_call_deferred_bind,DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()),DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("add_user_signal","signal","arguments"),&Object::_add_user_signal,DEFVAL(Array()));
- ObjectTypeDB::bind_method(_MD("has_user_signal","signal"),&Object::_has_user_signal);
-// ObjectTypeDB::bind_method(_MD("emit_signal","signal","arguments"),&Object::_emit_signal,DEFVAL(Array()));
+ ClassDB::bind_method(_MD("add_user_signal","signal","arguments"),&Object::_add_user_signal,DEFVAL(Array()));
+ ClassDB::bind_method(_MD("has_user_signal","signal"),&Object::_has_user_signal);
+// ClassDB::bind_method(_MD("emit_signal","signal","arguments"),&Object::_emit_signal,DEFVAL(Array()));
{
@@ -1704,7 +1704,7 @@ void Object::_bind_methods() {
mi.name="emit_signal";
mi.arguments.push_back( PropertyInfo( Variant::STRING, "signal"));
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"emit_signal",&Object::_emit_signal,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"emit_signal",&Object::_emit_signal,mi);
}
{
@@ -1714,7 +1714,7 @@ void Object::_bind_methods() {
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call:Variant",&Object::_call_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call:Variant",&Object::_call_bind,mi);
}
{
@@ -1722,32 +1722,32 @@ void Object::_bind_methods() {
mi.name="call_deferred";
mi.arguments.push_back( PropertyInfo( Variant::STRING, "method"));
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call_deferred",&Object::_call_deferred_bind,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"call_deferred",&Object::_call_deferred_bind,mi);
}
- ObjectTypeDB::bind_method(_MD("callv:Variant","method","arg_array"),&Object::callv);
+ ClassDB::bind_method(_MD("callv:Variant","method","arg_array"),&Object::callv);
- ObjectTypeDB::bind_method(_MD("has_method","method"),&Object::has_method);
+ ClassDB::bind_method(_MD("has_method","method"),&Object::has_method);
- ObjectTypeDB::bind_method(_MD("get_signal_list"),&Object::_get_signal_list);
- ObjectTypeDB::bind_method(_MD("get_signal_connection_list","signal"),&Object::_get_signal_connection_list);
+ ClassDB::bind_method(_MD("get_signal_list"),&Object::_get_signal_list);
+ ClassDB::bind_method(_MD("get_signal_connection_list","signal"),&Object::_get_signal_connection_list);
- ObjectTypeDB::bind_method(_MD("connect","signal","target:Object","method","binds","flags"),&Object::connect,DEFVAL(Array()),DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("disconnect","signal","target:Object","method"),&Object::disconnect);
- ObjectTypeDB::bind_method(_MD("is_connected","signal","target:Object","method"),&Object::is_connected);
+ ClassDB::bind_method(_MD("connect","signal","target:Object","method","binds","flags"),&Object::connect,DEFVAL(Array()),DEFVAL(0));
+ ClassDB::bind_method(_MD("disconnect","signal","target:Object","method"),&Object::disconnect);
+ ClassDB::bind_method(_MD("is_connected","signal","target:Object","method"),&Object::is_connected);
- ObjectTypeDB::bind_method(_MD("set_block_signals","enable"),&Object::set_block_signals);
- ObjectTypeDB::bind_method(_MD("is_blocking_signals"),&Object::is_blocking_signals);
- ObjectTypeDB::bind_method(_MD("set_message_translation","enable"),&Object::set_message_translation);
- ObjectTypeDB::bind_method(_MD("can_translate_messages"),&Object::can_translate_messages);
- ObjectTypeDB::bind_method(_MD("property_list_changed_notify"),&Object::property_list_changed_notify);
+ ClassDB::bind_method(_MD("set_block_signals","enable"),&Object::set_block_signals);
+ ClassDB::bind_method(_MD("is_blocking_signals"),&Object::is_blocking_signals);
+ ClassDB::bind_method(_MD("set_message_translation","enable"),&Object::set_message_translation);
+ ClassDB::bind_method(_MD("can_translate_messages"),&Object::can_translate_messages);
+ ClassDB::bind_method(_MD("property_list_changed_notify"),&Object::property_list_changed_notify);
- ObjectTypeDB::bind_method(_MD("XL_MESSAGE","message"),&Object::XL_MESSAGE);
- ObjectTypeDB::bind_method(_MD("tr","message"),&Object::tr);
+ ClassDB::bind_method(_MD("XL_MESSAGE","message"),&Object::XL_MESSAGE);
+ ClassDB::bind_method(_MD("tr","message"),&Object::tr);
- ObjectTypeDB::bind_method(_MD("is_queued_for_deletion"),&Object::is_queued_for_deletion);
+ ClassDB::bind_method(_MD("is_queued_for_deletion"),&Object::is_queued_for_deletion);
- ObjectTypeDB::add_virtual_method("Object",MethodInfo("free"),false);
+ ClassDB::add_virtual_method("Object",MethodInfo("free"),false);
ADD_SIGNAL( MethodInfo("script_changed"));
@@ -1815,7 +1815,7 @@ void Object::get_translatable_strings(List<String> *p_strings) const {
Variant::Type Object::get_static_property_type(const StringName& p_property, bool *r_valid) const {
bool valid;
- Variant::Type t = ObjectTypeDB::get_property_type(get_type_name(),p_property,&valid);
+ Variant::Type t = ClassDB::get_property_type(get_class_name(),p_property,&valid);
if (valid) {
if (r_valid)
*r_valid=true;
@@ -1857,7 +1857,7 @@ uint32_t Object::get_edited_version() const {
Object::Object() {
- _type_ptr=NULL;
+ _class_ptr=NULL;
_block_signals=false;
_predelete_ok=0;
_instance_ID=0;
@@ -2004,11 +2004,11 @@ void ObjectDB::cleanup() {
while((K=instances.next(K))) {
String node_name;
- if (instances[*K]->is_type("Node"))
+ if (instances[*K]->is_class("Node"))
node_name=" - Node Name: "+String(instances[*K]->call("get_name"));
- if (instances[*K]->is_type("Resoucre"))
+ if (instances[*K]->is_class("Resoucre"))
node_name=" - Resource Name: "+String(instances[*K]->call("get_name"))+" Path: "+String(instances[*K]->call("get_path"));
- print_line("Leaked Instance: "+String(instances[*K]->get_type())+":"+itos(*K)+node_name);
+ print_line("Leaked Instance: "+String(instances[*K]->get_class())+":"+itos(*K)+node_name);
}
}
}
diff --git a/core/object.h b/core/object.h
index 6e2aa9e494..8ed5bcdf25 100644
--- a/core/object.h
+++ b/core/object.h
@@ -108,13 +108,13 @@ enum PropertyUsageFlags {
-#define ADD_SIGNAL( m_signal ) ObjectTypeDB::add_signal( get_type_static(), m_signal )
-#define ADD_PROPERTY( m_property, m_setter, m_getter ) ObjectTypeDB::add_property( get_type_static(), m_property, m_setter, m_getter )
-#define ADD_PROPERTYI( m_property, m_setter, m_getter, m_index ) ObjectTypeDB::add_property( get_type_static(), m_property, m_setter, m_getter, m_index )
-#define ADD_PROPERTYNZ( m_property, m_setter, m_getter ) ObjectTypeDB::add_property( get_type_static(), (m_property).added_usage(PROPERTY_USAGE_STORE_IF_NONZERO), m_setter, m_getter )
-#define ADD_PROPERTYINZ( m_property, m_setter, m_getter, m_index ) ObjectTypeDB::add_property( get_type_static(), (m_property).added_usage(PROPERTY_USAGE_STORE_IF_NONZERO), m_setter, m_getter, m_index )
-#define ADD_PROPERTYNO( m_property, m_setter, m_getter ) ObjectTypeDB::add_property( get_type_static(), (m_property).added_usage(PROPERTY_USAGE_STORE_IF_NONONE), m_setter, m_getter )
-#define ADD_PROPERTYINO( m_property, m_setter, m_getter, m_index ) ObjectTypeDB::add_property( get_type_static(), (m_property).added_usage(PROPERTY_USAGE_STORE_IF_NONONE), m_setter, m_getter, m_index )
+#define ADD_SIGNAL( m_signal ) ClassDB::add_signal( get_class_static(), m_signal )
+#define ADD_PROPERTY( m_property, m_setter, m_getter ) ClassDB::add_property( get_class_static(), m_property, m_setter, m_getter )
+#define ADD_PROPERTYI( m_property, m_setter, m_getter, m_index ) ClassDB::add_property( get_class_static(), m_property, m_setter, m_getter, m_index )
+#define ADD_PROPERTYNZ( m_property, m_setter, m_getter ) ClassDB::add_property( get_class_static(), (m_property).added_usage(PROPERTY_USAGE_STORE_IF_NONZERO), m_setter, m_getter )
+#define ADD_PROPERTYINZ( m_property, m_setter, m_getter, m_index ) ClassDB::add_property( get_class_static(), (m_property).added_usage(PROPERTY_USAGE_STORE_IF_NONZERO), m_setter, m_getter, m_index )
+#define ADD_PROPERTYNO( m_property, m_setter, m_getter ) ClassDB::add_property( get_class_static(), (m_property).added_usage(PROPERTY_USAGE_STORE_IF_NONONE), m_setter, m_getter )
+#define ADD_PROPERTYINO( m_property, m_setter, m_getter, m_index ) ClassDB::add_property( get_class_static(), (m_property).added_usage(PROPERTY_USAGE_STORE_IF_NONONE), m_setter, m_getter, m_index )
struct PropertyInfo {
@@ -175,7 +175,7 @@ struct MethodInfo {
};
// old cast_to
-//if ( is_type(T::get_type_static()) )
+//if ( is_type(T::get_class_static()) )
//return static_cast<T*>(this);
////else
//return NULL;
@@ -196,33 +196,33 @@ private:
-#define OBJ_TYPE( m_type, m_inherits )\
+#define GDCLASS( m_class, m_inherits )\
private:\
- void operator=(const m_type& p_rval) {}\
- mutable StringName _type_name;\
- friend class ObjectTypeDB;\
+ void operator=(const m_class& p_rval) {}\
+ mutable StringName _class_name;\
+ friend class ClassDB;\
public:\
-virtual String get_type() const { \
- return String(#m_type);\
+virtual String get_class() const { \
+ return String(#m_class);\
}\
-virtual const StringName* _get_type_namev() const { \
- if (!_type_name)\
- _type_name=get_type_static();\
- return &_type_name;\
+virtual const StringName* _get_class_namev() const { \
+ if (!_class_name)\
+ _class_name=get_class_static();\
+ return &_class_name;\
}\
-static _FORCE_INLINE_ void* get_type_ptr_static() { \
+static _FORCE_INLINE_ void* get_class_ptr_static() { \
static int ptr;\
return &ptr;\
}\
-static _FORCE_INLINE_ String get_type_static() { \
- return String(#m_type);\
+static _FORCE_INLINE_ String get_class_static() { \
+ return String(#m_class);\
}\
-static _FORCE_INLINE_ String get_parent_type_static() { \
- return m_inherits::get_type_static();\
+static _FORCE_INLINE_ String get_parent_class_static() { \
+ return m_inherits::get_class_static();\
}\
static void get_inheritance_list_static(List<String>* p_inheritance_list) { \
m_inherits::get_inheritance_list_static(p_inheritance_list);\
- p_inheritance_list->push_back(String(#m_type));\
+ p_inheritance_list->push_back(String(#m_class));\
}\
static String get_category_static() { \
String category = m_inherits::get_category_static();\
@@ -236,85 +236,85 @@ static String get_category_static() { \
static String inherits_static() {\
return String(#m_inherits);\
}\
-virtual bool is_type(const String& p_type) const { return (p_type==(#m_type))?true:m_inherits::is_type(p_type); }\
-virtual bool is_type_ptr(void *p_ptr) const { return (p_ptr==get_type_ptr_static())?true:m_inherits::is_type_ptr(p_ptr); }\
+virtual bool is_class(const String& p_class) const { return (p_class==(#m_class))?true:m_inherits::is_class(p_class); }\
+virtual bool is_class_ptr(void *p_ptr) const { return (p_ptr==get_class_ptr_static())?true:m_inherits::is_class_ptr(p_ptr); }\
\
\
static void get_valid_parents_static(List<String> *p_parents) {\
\
- if (m_type::_get_valid_parents_static!=m_inherits::_get_valid_parents_static) { \
- m_type::_get_valid_parents_static(p_parents);\
+ if (m_class::_get_valid_parents_static!=m_inherits::_get_valid_parents_static) { \
+ m_class::_get_valid_parents_static(p_parents);\
}\
\
m_inherits::get_valid_parents_static(p_parents);\
}\
protected:\
_FORCE_INLINE_ static void (*_get_bind_methods())() {\
- return &m_type::_bind_methods;\
+ return &m_class::_bind_methods;\
}\
public:\
-static void initialize_type() {\
+static void initialize_class() {\
static bool initialized=false;\
if (initialized)\
return;\
- m_inherits::initialize_type();\
- ObjectTypeDB::_add_type<m_type>();\
- if (m_type::_get_bind_methods() != m_inherits::_get_bind_methods())\
+ m_inherits::initialize_class();\
+ ClassDB::_add_class<m_class>();\
+ if (m_class::_get_bind_methods() != m_inherits::_get_bind_methods())\
_bind_methods();\
initialized=true;\
}\
protected:\
-virtual void _initialize_typev() {\
- initialize_type();\
+virtual void _initialize_classv() {\
+ initialize_class();\
}\
_FORCE_INLINE_ bool (Object::* (_get_get() const))(const StringName& p_name,Variant&) const {\
- return (bool (Object::*)(const StringName&,Variant&)const) &m_type::_get;\
+ return (bool (Object::*)(const StringName&,Variant&)const) &m_class::_get;\
}\
virtual bool _getv(const StringName& p_name, Variant& r_ret) const { \
- if (m_type::_get_get() != m_inherits::_get_get()) {\
+ if (m_class::_get_get() != m_inherits::_get_get()) {\
if (_get(p_name,r_ret))\
return true;\
}\
return m_inherits::_getv(p_name,r_ret);\
}\
_FORCE_INLINE_ bool (Object::* (_get_set() const))(const StringName& p_name,const Variant &p_property) {\
- return (bool (Object::*)(const StringName&, const Variant&))&m_type::_set;\
+ return (bool (Object::*)(const StringName&, const Variant&))&m_class::_set;\
}\
virtual bool _setv(const StringName& p_name,const Variant &p_property) { \
if (m_inherits::_setv(p_name,p_property)) return true;\
- if (m_type::_get_set() != m_inherits::_get_set()) {\
+ if (m_class::_get_set() != m_inherits::_get_set()) {\
return _set(p_name,p_property);\
\
}\
return false;\
}\
_FORCE_INLINE_ void (Object::* (_get_get_property_list() const))(List<PropertyInfo> *p_list) const{\
- return (void (Object::*)(List<PropertyInfo>*)const)&m_type::_get_property_list;\
+ return (void (Object::*)(List<PropertyInfo>*)const)&m_class::_get_property_list;\
}\
virtual void _get_property_listv(List<PropertyInfo> *p_list,bool p_reversed) const { \
if (!p_reversed) {\
m_inherits::_get_property_listv(p_list,p_reversed);\
}\
- p_list->push_back( PropertyInfo(Variant::NIL,get_type_static(),PROPERTY_HINT_NONE,String(),PROPERTY_USAGE_CATEGORY));\
+ p_list->push_back( PropertyInfo(Variant::NIL,get_class_static(),PROPERTY_HINT_NONE,String(),PROPERTY_USAGE_CATEGORY));\
if (!_is_gpl_reversed())\
- ObjectTypeDB::get_property_list(#m_type,p_list,true,this);\
- if (m_type::_get_get_property_list() != m_inherits::_get_get_property_list()) {\
+ ClassDB::get_property_list(#m_class,p_list,true,this);\
+ if (m_class::_get_get_property_list() != m_inherits::_get_get_property_list()) {\
_get_property_list(p_list);\
}\
if (_is_gpl_reversed())\
- ObjectTypeDB::get_property_list(#m_type,p_list,true,this);\
+ ClassDB::get_property_list(#m_class,p_list,true,this);\
if (p_reversed) {\
m_inherits::_get_property_listv(p_list,p_reversed);\
}\
\
}\
_FORCE_INLINE_ void (Object::* (_get_notification() const))(int){\
- return (void (Object::*)(int)) &m_type::_notification;\
+ return (void (Object::*)(int)) &m_class::_notification;\
}\
virtual void _notificationv(int p_notification,bool p_reversed) { \
if (!p_reversed) \
m_inherits::_notificationv(p_notification,p_reversed);\
- if (m_type::_get_notification() != m_inherits::_get_notification()) {\
+ if (m_class::_get_notification() != m_inherits::_get_notification()) {\
_notification(p_notification);\
}\
if (p_reversed)\
@@ -329,9 +329,9 @@ protected:\
_FORCE_INLINE_ static String _get_category() { return m_category; }\
private:
-#define OBJ_SAVE_TYPE(m_type) \
+#define OBJ_SAVE_TYPE(m_class) \
public: \
-virtual String get_save_type() const { return #m_type; }\
+virtual String get_save_class() const { return #m_class; }\
private:
class ScriptInstance;
@@ -415,8 +415,8 @@ friend void postinitialize_handler(Object*);
ScriptInstance *script_instance;
RefPtr script;
Dictionary metadata;
- mutable StringName _type_name;
- mutable const StringName* _type_ptr;
+ mutable StringName _class_name;
+ mutable const StringName* _class_ptr;
void _add_user_signal(const String& p_name, const Array& p_pargs=Array());
bool _has_user_signal(const StringName& p_name) const;
@@ -431,7 +431,7 @@ friend void postinitialize_handler(Object*);
protected:
virtual bool _use_builtin_script() const { return false; }
- virtual void _initialize_typev() { initialize_type(); }
+ virtual void _initialize_classv() { initialize_class(); }
virtual bool _setv(const StringName& p_name,const Variant &p_property) { return false; };
virtual bool _getv(const StringName& p_name,Variant &r_property) const { return false; };
virtual void _get_property_listv(List<PropertyInfo> *p_list,bool p_reversed) const {};
@@ -474,10 +474,10 @@ protected:
Variant _call_deferred_bind(const Variant** p_args, int p_argcount, Variant::CallError& r_error);
- virtual const StringName* _get_type_namev() const {
- if (!_type_name)
- _type_name=get_type_static();
- return &_type_name;
+ virtual const StringName* _get_class_namev() const {
+ if (!_class_name)
+ _class_name=get_class_static();
+ return &_class_name;
}
DVector<String> _get_meta_list_bind() const;
@@ -486,11 +486,11 @@ protected:
void _clear_internal_resource_paths(const Variant &p_var);
-friend class ObjectTypeDB;
+friend class ClassDB;
virtual void _validate_property(PropertyInfo& property) const;
public: //should be protected, but bug in clang++
- static void initialize_type();
+ static void initialize_class();
_FORCE_INLINE_ static void register_custom_data_to_otdb() {};
public:
@@ -500,7 +500,7 @@ public:
#else
_FORCE_INLINE_ void _change_notify(const char *p_what="") { }
#endif
- static void* get_type_ptr_static() {
+ static void* get_class_ptr_static() {
static int ptr;
return &ptr;
}
@@ -521,7 +521,7 @@ public:
#else
if (!this)
return NULL;
- if (is_type_ptr(T::get_type_ptr_static()))
+ if (is_class_ptr(T::get_class_ptr_static()))
return static_cast<T*>(this);
else
return NULL;
@@ -536,7 +536,7 @@ public:
#else
if (!this)
return NULL;
- if (is_type_ptr(T::get_type_ptr_static()))
+ if (is_class_ptr(T::get_class_ptr_static()))
return static_cast<const T*>(this);
else
return NULL;
@@ -552,24 +552,24 @@ public:
/* TYPE API */
static void get_inheritance_list_static(List<String>* p_inheritance_list) { p_inheritance_list->push_back("Object"); }
- static String get_type_static() { return "Object"; }
- static String get_parent_type_static() { return String(); }
+ static String get_class_static() { return "Object"; }
+ static String get_parent_class_static() { return String(); }
static String get_category_static() { return String(); }
- virtual String get_type() const { return "Object"; }
- virtual String get_save_type() const { return get_type(); } //type stored when saving
+ virtual String get_class() const { return "Object"; }
+ virtual String get_save_class() const { return get_class(); } //class stored when saving
- virtual bool is_type(const String& p_type) const { return (p_type=="Object"); }
- virtual bool is_type_ptr(void *p_ptr) const { return get_type_ptr_static()==p_ptr; }
+ virtual bool is_class(const String& p_class) const { return (p_class=="Object"); }
+ virtual bool is_class_ptr(void *p_ptr) const { return get_class_ptr_static()==p_ptr; }
- _FORCE_INLINE_ const StringName& get_type_name() const {
- if (!_type_ptr) {
- return *_get_type_namev();
+ _FORCE_INLINE_ const StringName& get_class_name() const {
+ if (!_class_ptr) {
+ return *_get_class_namev();
} else {
- return *_type_ptr;
+ return *_class_ptr;
}
}
diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp
index 0256e391d1..498d222a66 100644
--- a/core/object_type_db.cpp
+++ b/core/object_type_db.cpp
@@ -190,92 +190,92 @@ MethodDefinition _MD(const char* p_name,const char *p_arg1,const char *p_arg2,co
#endif
-ObjectTypeDB::APIType ObjectTypeDB::current_api=API_CORE;
+ClassDB::APIType ClassDB::current_api=API_CORE;
-void ObjectTypeDB::set_current_api(APIType p_api) {
+void ClassDB::set_current_api(APIType p_api) {
current_api=p_api;
}
-HashMap<StringName,ObjectTypeDB::TypeInfo,StringNameHasher> ObjectTypeDB::types;
-HashMap<StringName,StringName,StringNameHasher> ObjectTypeDB::resource_base_extensions;
-HashMap<StringName,StringName,StringNameHasher> ObjectTypeDB::compat_types;
+HashMap<StringName,ClassDB::ClassInfo,StringNameHasher> ClassDB::classes;
+HashMap<StringName,StringName,StringNameHasher> ClassDB::resource_base_extensions;
+HashMap<StringName,StringName,StringNameHasher> ClassDB::compat_classes;
-ObjectTypeDB::TypeInfo::TypeInfo() {
+ClassDB::ClassInfo::ClassInfo() {
creation_func=NULL;
inherits_ptr=NULL;
disabled=false;
}
-ObjectTypeDB::TypeInfo::~TypeInfo() {
+ClassDB::ClassInfo::~ClassInfo() {
}
-bool ObjectTypeDB::is_type(const StringName &p_type,const StringName& p_inherits) {
+bool ClassDB::is_parent_class(const StringName &p_class,const StringName& p_inherits) {
OBJTYPE_LOCK;
- StringName inherits=p_type;
+ StringName inherits=p_class;
while (inherits.operator String().length()) {
if (inherits==p_inherits)
return true;
- inherits=type_inherits_from(inherits);
+ inherits=get_parent_class(inherits);
}
return false;
}
-void ObjectTypeDB::get_type_list( List<StringName> *p_types) {
+void ClassDB::get_class_list( List<StringName> *p_classes) {
OBJTYPE_LOCK;
const StringName *k=NULL;
- while((k=types.next(k))) {
+ while((k=classes.next(k))) {
- p_types->push_back(*k);
+ p_classes->push_back(*k);
}
- p_types->sort();
+ p_classes->sort();
}
-void ObjectTypeDB::get_inheriters_from( const StringName& p_type,List<StringName> *p_types) {
+void ClassDB::get_inheriters_from_class( const StringName& p_class,List<StringName> *p_classes) {
OBJTYPE_LOCK;
const StringName *k=NULL;
- while((k=types.next(k))) {
+ while((k=classes.next(k))) {
- if (*k!=p_type && is_type(*k,p_type))
- p_types->push_back(*k);
+ if (*k!=p_class && is_parent_class(*k,p_class))
+ p_classes->push_back(*k);
}
}
-StringName ObjectTypeDB::type_inherits_from(const StringName& p_type) {
+StringName ClassDB::get_parent_class(const StringName& p_class) {
OBJTYPE_LOCK;
- TypeInfo *ti = types.getptr(p_type);
+ ClassInfo *ti = classes.getptr(p_class);
ERR_FAIL_COND_V(!ti,"");
return ti->inherits;
}
-ObjectTypeDB::APIType ObjectTypeDB::get_api_type(const StringName &p_type) {
+ClassDB::APIType ClassDB::get_api_type(const StringName &p_class) {
OBJTYPE_LOCK;
- TypeInfo *ti = types.getptr(p_type);
+ ClassInfo *ti = classes.getptr(p_class);
ERR_FAIL_COND_V(!ti,API_NONE);
return ti->api;
}
-uint64_t ObjectTypeDB::get_api_hash(APIType p_api) {
+uint64_t ClassDB::get_api_hash(APIType p_api) {
#ifdef DEBUG_METHODS_ENABLED
@@ -285,7 +285,7 @@ uint64_t ObjectTypeDB::get_api_hash(APIType p_api) {
const StringName *k=NULL;
- while((k=types.next(k))) {
+ while((k=classes.next(k))) {
names.push_back(*k);
}
@@ -294,7 +294,7 @@ uint64_t ObjectTypeDB::get_api_hash(APIType p_api) {
for (List<StringName>::Element *E=names.front();E;E=E->next()) {
- TypeInfo *t = types.getptr(E->get());
+ ClassInfo *t = classes.getptr(E->get());
ERR_FAIL_COND_V(!t,0);
if (t->api!=p_api)
continue;
@@ -431,26 +431,26 @@ uint64_t ObjectTypeDB::get_api_hash(APIType p_api) {
}
-bool ObjectTypeDB::type_exists(const StringName &p_type) {
+bool ClassDB::class_exists(const StringName &p_class) {
OBJTYPE_LOCK;
- return types.has(p_type);
+ return classes.has(p_class);
}
-void ObjectTypeDB::add_compatibility_type(const StringName& p_type,const StringName& p_fallback) {
+void ClassDB::add_compatibility_class(const StringName& p_class,const StringName& p_fallback) {
- compat_types[p_type]=p_fallback;
+ compat_classes[p_class]=p_fallback;
}
-Object *ObjectTypeDB::instance(const StringName &p_type) {
+Object *ClassDB::instance(const StringName &p_class) {
- TypeInfo *ti;
+ ClassInfo *ti;
{
OBJTYPE_LOCK;
- ti=types.getptr(p_type);
+ ti=classes.getptr(p_class);
if (!ti || ti->disabled || !ti->creation_func) {
- if (compat_types.has(p_type)) {
- ti=types.getptr(compat_types[p_type]);
+ if (compat_classes.has(p_class)) {
+ ti=classes.getptr(compat_classes[p_class]);
}
}
ERR_FAIL_COND_V(!ti,NULL);
@@ -460,34 +460,34 @@ Object *ObjectTypeDB::instance(const StringName &p_type) {
return ti->creation_func();
}
-bool ObjectTypeDB::can_instance(const StringName &p_type) {
+bool ClassDB::can_instance(const StringName &p_class) {
OBJTYPE_LOCK;
- TypeInfo *ti = types.getptr(p_type);
+ ClassInfo *ti = classes.getptr(p_class);
ERR_FAIL_COND_V(!ti,false);
return (!ti->disabled && ti->creation_func!=NULL);
}
-void ObjectTypeDB::_add_type2(const StringName& p_type, const StringName& p_inherits) {
+void ClassDB::_add_class2(const StringName& p_class, const StringName& p_inherits) {
OBJTYPE_LOCK;
- StringName name = p_type;
+ StringName name = p_class;
- ERR_FAIL_COND(types.has(name));
+ ERR_FAIL_COND(classes.has(name));
- types[name]=TypeInfo();
- TypeInfo &ti=types[name];
+ classes[name]=ClassInfo();
+ ClassInfo &ti=classes[name];
ti.name=name;
ti.inherits=p_inherits;
ti.api=current_api;
if (ti.inherits) {
- ERR_FAIL_COND( !types.has(ti.inherits) ); //it MUST be registered.
- ti.inherits_ptr = &types[ti.inherits];
+ ERR_FAIL_COND( !classes.has(ti.inherits) ); //it MUST be registered.
+ ti.inherits_ptr = &classes[ti.inherits];
} else {
ti.inherits_ptr=NULL;
@@ -496,12 +496,12 @@ void ObjectTypeDB::_add_type2(const StringName& p_type, const StringName& p_inhe
}
-void ObjectTypeDB::get_method_list(StringName p_type,List<MethodInfo> *p_methods,bool p_no_inheritance) {
+void ClassDB::get_method_list(StringName p_class,List<MethodInfo> *p_methods,bool p_no_inheritance) {
OBJTYPE_LOCK;
- TypeInfo *type=types.getptr(p_type);
+ ClassInfo *type=classes.getptr(p_class);
while(type) {
@@ -570,11 +570,11 @@ void ObjectTypeDB::get_method_list(StringName p_type,List<MethodInfo> *p_methods
}
-MethodBind *ObjectTypeDB::get_method(StringName p_type, StringName p_name) {
+MethodBind *ClassDB::get_method(StringName p_class, StringName p_name) {
OBJTYPE_LOCK;
- TypeInfo *type=types.getptr(p_type);
+ ClassInfo *type=classes.getptr(p_class);
while(type) {
@@ -587,11 +587,11 @@ MethodBind *ObjectTypeDB::get_method(StringName p_type, StringName p_name) {
}
-void ObjectTypeDB::bind_integer_constant(const StringName& p_type, const StringName &p_name, int p_constant) {
+void ClassDB::bind_integer_constant(const StringName& p_class, const StringName &p_name, int p_constant) {
OBJTYPE_LOCK;
- TypeInfo *type=types.getptr(p_type);
+ ClassInfo *type=classes.getptr(p_class);
if (!type) {
ERR_FAIL_COND(!type);
@@ -609,11 +609,11 @@ void ObjectTypeDB::bind_integer_constant(const StringName& p_type, const StringN
}
-void ObjectTypeDB::get_integer_constant_list(const StringName& p_type, List<String> *p_constants, bool p_no_inheritance) {
+void ClassDB::get_integer_constant_list(const StringName& p_class, List<String> *p_constants, bool p_no_inheritance) {
OBJTYPE_LOCK;
- TypeInfo *type=types.getptr(p_type);
+ ClassInfo *type=classes.getptr(p_class);
while(type) {
@@ -637,12 +637,12 @@ void ObjectTypeDB::get_integer_constant_list(const StringName& p_type, List<Stri
}
-int ObjectTypeDB::get_integer_constant(const StringName& p_type, const StringName &p_name, bool *p_success) {
+int ClassDB::get_integer_constant(const StringName& p_class, const StringName &p_name, bool *p_success) {
OBJTYPE_LOCK;
- TypeInfo *type=types.getptr(p_type);
+ ClassInfo *type=classes.getptr(p_class);
while(type) {
@@ -664,18 +664,18 @@ int ObjectTypeDB::get_integer_constant(const StringName& p_type, const StringNam
return 0;
}
-void ObjectTypeDB::add_signal(StringName p_type,const MethodInfo& p_signal) {
+void ClassDB::add_signal(StringName p_class,const MethodInfo& p_signal) {
- TypeInfo *type=types.getptr(p_type);
+ ClassInfo *type=classes.getptr(p_class);
ERR_FAIL_COND(!type);
- TypeInfo *check=type;
+ ClassInfo *check=type;
StringName sname = p_signal.name;
#ifdef DEBUG_METHODS_ENABLED
while(check) {
if (check->signal_map.has(sname)) {
- ERR_EXPLAIN("Type "+String(p_type)+" already has signal: "+String(sname));
+ ERR_EXPLAIN("Type "+String(p_class)+" already has signal: "+String(sname));
ERR_FAIL();
}
check=check->inherits_ptr;
@@ -686,12 +686,12 @@ void ObjectTypeDB::add_signal(StringName p_type,const MethodInfo& p_signal) {
}
-void ObjectTypeDB::get_signal_list(StringName p_type,List<MethodInfo> *p_signals,bool p_no_inheritance) {
+void ClassDB::get_signal_list(StringName p_class,List<MethodInfo> *p_signals,bool p_no_inheritance) {
- TypeInfo *type=types.getptr(p_type);
+ ClassInfo *type=classes.getptr(p_class);
ERR_FAIL_COND(!type);
- TypeInfo *check=type;
+ ClassInfo *check=type;
while(check) {
@@ -710,10 +710,10 @@ void ObjectTypeDB::get_signal_list(StringName p_type,List<MethodInfo> *p_signals
}
-bool ObjectTypeDB::has_signal(StringName p_type,StringName p_signal) {
+bool ClassDB::has_signal(StringName p_class,StringName p_signal) {
- TypeInfo *type=types.getptr(p_type);
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_class);
+ ClassInfo *check=type;
while(check) {
if (check->signal_map.has(p_signal))
return true;
@@ -723,10 +723,10 @@ bool ObjectTypeDB::has_signal(StringName p_type,StringName p_signal) {
return false;
}
-bool ObjectTypeDB::get_signal(StringName p_type,StringName p_signal,MethodInfo *r_signal) {
+bool ClassDB::get_signal(StringName p_class,StringName p_signal,MethodInfo *r_signal) {
- TypeInfo *type=types.getptr(p_type);
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_class);
+ ClassInfo *check=type;
while(check) {
if (check->signal_map.has(p_signal)) {
if (r_signal) {
@@ -740,23 +740,23 @@ bool ObjectTypeDB::get_signal(StringName p_type,StringName p_signal,MethodInfo *
return false;
}
-void ObjectTypeDB::add_property(StringName p_type,const PropertyInfo& p_pinfo, const StringName& p_setter, const StringName& p_getter, int p_index) {
+void ClassDB::add_property(StringName p_class,const PropertyInfo& p_pinfo, const StringName& p_setter, const StringName& p_getter, int p_index) {
- TypeInfo *type=types.getptr(p_type);
+ ClassInfo *type=classes.getptr(p_class);
ERR_FAIL_COND(!type);
MethodBind *mb_set=NULL;
if (p_setter) {
- mb_set = get_method(p_type,p_setter);
+ mb_set = get_method(p_class,p_setter);
#ifdef DEBUG_METHODS_ENABLED
if (!mb_set) {
- ERR_EXPLAIN("Invalid Setter: "+p_type+"::"+p_setter+" for property: "+p_pinfo.name);
+ ERR_EXPLAIN("Invalid Setter: "+p_class+"::"+p_setter+" for property: "+p_pinfo.name);
ERR_FAIL_COND(!mb_set);
} else {
int exp_args=1+(p_index>=0?1:0);
if (mb_set->get_argument_count()!=exp_args) {
- ERR_EXPLAIN("Invalid Function for Setter: "+p_type+"::"+p_setter+" for property: "+p_pinfo.name);
+ ERR_EXPLAIN("Invalid Function for Setter: "+p_class+"::"+p_setter+" for property: "+p_pinfo.name);
ERR_FAIL();
}
@@ -767,17 +767,17 @@ void ObjectTypeDB::add_property(StringName p_type,const PropertyInfo& p_pinfo, c
MethodBind *mb_get=NULL;
if (p_getter) {
- MethodBind *mb_get = get_method(p_type,p_getter);
+ MethodBind *mb_get = get_method(p_class,p_getter);
#ifdef DEBUG_METHODS_ENABLED
if (!mb_get) {
- ERR_EXPLAIN("Invalid Getter: "+p_type+"::"+p_getter+" for property: "+p_pinfo.name);
+ ERR_EXPLAIN("Invalid Getter: "+p_class+"::"+p_getter+" for property: "+p_pinfo.name);
ERR_FAIL_COND(!mb_get);
} else {
int exp_args=0+(p_index>=0?1:0);
if (mb_get->get_argument_count()!=exp_args) {
- ERR_EXPLAIN("Invalid Function for Getter: "+p_type+"::"+p_getter+" for property: "+p_pinfo.name);
+ ERR_EXPLAIN("Invalid Function for Getter: "+p_class+"::"+p_getter+" for property: "+p_pinfo.name);
ERR_FAIL();
}
@@ -791,7 +791,7 @@ void ObjectTypeDB::add_property(StringName p_type,const PropertyInfo& p_pinfo, c
#ifdef DEBUG_METHODS_ENABLED
if (type->property_setget.has(p_pinfo.name)) {
- ERR_EXPLAIN("Object already has property: "+p_type);
+ ERR_EXPLAIN("Object already has property: "+p_class);
ERR_FAIL();
}
#endif
@@ -810,10 +810,10 @@ void ObjectTypeDB::add_property(StringName p_type,const PropertyInfo& p_pinfo, c
}
-void ObjectTypeDB::get_property_list(StringName p_type, List<PropertyInfo> *p_list, bool p_no_inheritance,const Object *p_validator) {
+void ClassDB::get_property_list(StringName p_class, List<PropertyInfo> *p_list, bool p_no_inheritance,const Object *p_validator) {
- TypeInfo *type=types.getptr(p_type);
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_class);
+ ClassInfo *check=type;
while(check) {
for(List<PropertyInfo>::Element *E=check->property_list.front();E;E=E->next()) {
@@ -834,11 +834,11 @@ void ObjectTypeDB::get_property_list(StringName p_type, List<PropertyInfo> *p_li
}
}
-bool ObjectTypeDB::set_property(Object* p_object,const StringName& p_property, const Variant& p_value,bool *r_valid) {
+bool ClassDB::set_property(Object* p_object,const StringName& p_property, const Variant& p_value,bool *r_valid) {
- TypeInfo *type=types.getptr(p_object->get_type_name());
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_object->get_class_name());
+ ClassInfo *check=type;
while(check) {
const PropertySetGet *psg = check->property_setget.getptr(p_property);
if (psg) {
@@ -882,10 +882,10 @@ bool ObjectTypeDB::set_property(Object* p_object,const StringName& p_property, c
return false;
}
-bool ObjectTypeDB::get_property(Object* p_object,const StringName& p_property, Variant& r_value) {
+bool ClassDB::get_property(Object* p_object,const StringName& p_property, Variant& r_value) {
- TypeInfo *type=types.getptr(p_object->get_type_name());
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_object->get_class_name());
+ ClassInfo *check=type;
while(check) {
const PropertySetGet *psg = check->property_setget.getptr(p_property);
if (psg) {
@@ -925,10 +925,10 @@ bool ObjectTypeDB::get_property(Object* p_object,const StringName& p_property, V
return false;
}
-Variant::Type ObjectTypeDB::get_property_type(const StringName& p_type, const StringName& p_property,bool *r_is_valid) {
+Variant::Type ClassDB::get_property_type(const StringName& p_class, const StringName& p_property,bool *r_is_valid) {
- TypeInfo *type=types.getptr(p_type);
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_class);
+ ClassInfo *check=type;
while(check) {
const PropertySetGet *psg = check->property_setget.getptr(p_property);
if (psg) {
@@ -949,10 +949,10 @@ Variant::Type ObjectTypeDB::get_property_type(const StringName& p_type, const St
}
-void ObjectTypeDB::set_method_flags(StringName p_type,StringName p_method,int p_flags) {
+void ClassDB::set_method_flags(StringName p_class,StringName p_method,int p_flags) {
- TypeInfo *type=types.getptr(p_type);
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_class);
+ ClassInfo *check=type;
ERR_FAIL_COND(!check);
ERR_FAIL_COND(!check->method_map.has(p_method));
check->method_map[p_method]->set_hint_flags(p_flags);
@@ -960,10 +960,10 @@ void ObjectTypeDB::set_method_flags(StringName p_type,StringName p_method,int p_
}
-bool ObjectTypeDB::has_method(StringName p_type,StringName p_method,bool p_no_inheritance) {
+bool ClassDB::has_method(StringName p_class,StringName p_method,bool p_no_inheritance) {
- TypeInfo *type=types.getptr(p_type);
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_class);
+ ClassInfo *check=type;
while(check) {
if (check->method_map.has(p_method))
return true;
@@ -976,10 +976,10 @@ bool ObjectTypeDB::has_method(StringName p_type,StringName p_method,bool p_no_in
}
-bool ObjectTypeDB::get_setter_and_type_for_property(const StringName& p_class, const StringName& p_prop, StringName& r_class, StringName& r_setter) {
+bool ClassDB::get_setter_and_type_for_property(const StringName& p_class, const StringName& p_prop, StringName& r_class, StringName& r_setter) {
- TypeInfo *type=types.getptr(p_class);
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_class);
+ ClassInfo *check=type;
while(check) {
if (check->property_setget.has(p_prop)) {
@@ -996,10 +996,10 @@ bool ObjectTypeDB::get_setter_and_type_for_property(const StringName& p_class, c
}
#ifdef DEBUG_METHODS_ENABLED
-MethodBind* ObjectTypeDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind , const MethodDefinition &method_name, const Variant **p_defs, int p_defcount) {
+MethodBind* ClassDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind , const MethodDefinition &method_name, const Variant **p_defs, int p_defcount) {
StringName mdname=method_name.name;
#else
-MethodBind* ObjectTypeDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind , const char *method_name, const Variant **p_defs, int p_defcount) {
+MethodBind* ClassDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind , const char *method_name, const Variant **p_defs, int p_defcount) {
StringName mdname=StaticCString::create(method_name);
#endif
@@ -1015,9 +1015,9 @@ MethodBind* ObjectTypeDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind , c
ERR_FAIL_COND_V(!p_bind,NULL);
p_bind->set_name(mdname);
- String instance_type=p_bind->get_instance_type();
+ String instance_type=p_bind->get_instance_class();
- TypeInfo *type=types.getptr(instance_type);
+ ClassInfo *type=classes.getptr(instance_type);
if (!type) {
ERR_PRINTS("Couldn't bind method '"+mdname+"' for instance: "+instance_type);
memdelete(p_bind);
@@ -1052,27 +1052,27 @@ MethodBind* ObjectTypeDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind , c
}
-void ObjectTypeDB::add_virtual_method(const StringName& p_type, const MethodInfo& p_method , bool p_virtual) {
- ERR_FAIL_COND(!types.has(p_type));
+void ClassDB::add_virtual_method(const StringName& p_class, const MethodInfo& p_method , bool p_virtual) {
+ ERR_FAIL_COND(!classes.has(p_class));
#ifdef DEBUG_METHODS_ENABLED
MethodInfo mi=p_method;
if (p_virtual)
mi.flags|=METHOD_FLAG_VIRTUAL;
- types[p_type].virtual_methods.push_back(mi);
+ classes[p_class].virtual_methods.push_back(mi);
#endif
}
-void ObjectTypeDB::get_virtual_methods(const StringName& p_type, List<MethodInfo> * p_methods , bool p_no_inheritance) {
+void ClassDB::get_virtual_methods(const StringName& p_class, List<MethodInfo> * p_methods , bool p_no_inheritance) {
- ERR_FAIL_COND(!types.has(p_type));
+ ERR_FAIL_COND(!classes.has(p_class));
#ifdef DEBUG_METHODS_ENABLED
- TypeInfo *type=types.getptr(p_type);
- TypeInfo *check=type;
+ ClassInfo *type=classes.getptr(p_class);
+ ClassInfo *check=type;
while(check) {
for(List<MethodInfo>::Element *E=check->virtual_methods.front();E;E=E->next()) {
@@ -1088,18 +1088,18 @@ void ObjectTypeDB::get_virtual_methods(const StringName& p_type, List<MethodInfo
}
-void ObjectTypeDB::set_type_enabled(StringName p_type,bool p_enable) {
+void ClassDB::set_class_enabled(StringName p_class,bool p_enable) {
- ERR_FAIL_COND(!types.has(p_type));
- types[p_type].disabled=!p_enable;
+ ERR_FAIL_COND(!classes.has(p_class));
+ classes[p_class].disabled=!p_enable;
}
-bool ObjectTypeDB::is_type_enabled(StringName p_type) {
+bool ClassDB::is_class_enabled(StringName p_class) {
- TypeInfo *ti=types.getptr(p_type);
+ ClassInfo *ti=classes.getptr(p_class);
if (!ti || !ti->creation_func) {
- if (compat_types.has(p_type)) {
- ti=types.getptr(compat_types[p_type]);
+ if (compat_classes.has(p_class)) {
+ ti=classes.getptr(compat_classes[p_class]);
}
}
@@ -1107,25 +1107,25 @@ bool ObjectTypeDB::is_type_enabled(StringName p_type) {
return !ti->disabled;
}
-StringName ObjectTypeDB::get_category(const StringName& p_node) {
+StringName ClassDB::get_category(const StringName& p_node) {
- ERR_FAIL_COND_V(!types.has(p_node),StringName());
+ ERR_FAIL_COND_V(!classes.has(p_node),StringName());
#ifdef DEBUG_ENABLED
- return types[p_node].category;
+ return classes[p_node].category;
#else
return StringName();
#endif
}
-void ObjectTypeDB::add_resource_base_extension(const StringName& p_extension,const StringName& p_type) {
+void ClassDB::add_resource_base_extension(const StringName& p_extension,const StringName& p_class) {
if (resource_base_extensions.has(p_extension))
return;
- resource_base_extensions[p_extension]=p_type;
+ resource_base_extensions[p_extension]=p_class;
}
-void ObjectTypeDB::get_resource_base_extensions(List<String> *p_extensions) {
+void ClassDB::get_resource_base_extensions(List<String> *p_extensions) {
const StringName *K=NULL;
@@ -1135,21 +1135,21 @@ void ObjectTypeDB::get_resource_base_extensions(List<String> *p_extensions) {
}
}
-void ObjectTypeDB::get_extensions_for_type(const StringName& p_type,List<String> *p_extensions) {
+void ClassDB::get_extensions_for_type(const StringName& p_class,List<String> *p_extensions) {
const StringName *K=NULL;
while((K=resource_base_extensions.next(K))) {
StringName cmp = resource_base_extensions[*K];
- if (is_type(cmp,p_type))
+ if (is_parent_class(cmp,p_class))
p_extensions->push_back(*K);
}
}
-Mutex *ObjectTypeDB::lock=NULL;
+Mutex *ClassDB::lock=NULL;
-void ObjectTypeDB::init() {
+void ClassDB::init() {
#ifndef NO_THREADS
@@ -1157,7 +1157,7 @@ void ObjectTypeDB::init() {
#endif
}
-void ObjectTypeDB::cleanup() {
+void ClassDB::cleanup() {
#ifndef NO_THREADS
@@ -1169,9 +1169,9 @@ void ObjectTypeDB::cleanup() {
const StringName *k=NULL;
- while((k=types.next(k))) {
+ while((k=classes.next(k))) {
- TypeInfo &ti=types[*k];
+ ClassInfo &ti=classes[*k];
const StringName *m=NULL;
while((m=ti.method_map.next(m))) {
@@ -1179,9 +1179,9 @@ void ObjectTypeDB::cleanup() {
memdelete( ti.method_map[*m] );
}
}
- types.clear();
+ classes.clear();
resource_base_extensions.clear();
- compat_types.clear();
+ compat_classes.clear();
}
//
diff --git a/core/object_type_db.h b/core/object_type_db.h
index f2c95e328b..ca52f6ca89 100644
--- a/core/object_type_db.h
+++ b/core/object_type_db.h
@@ -108,7 +108,7 @@ static _FORCE_INLINE_ const char* _MD(const char* m_name, ...) { return m_name;
#endif
-class ObjectTypeDB {
+class ClassDB {
public:
enum APIType {
API_CORE,
@@ -126,10 +126,10 @@ public:
Variant::Type type;
};
- struct TypeInfo {
+ struct ClassInfo {
APIType api;
- TypeInfo *inherits_ptr;
+ ClassInfo *inherits_ptr;
HashMap<StringName,MethodBind*,StringNameHasher> method_map;
HashMap<StringName,int,StringNameHasher> constant_map;
HashMap<StringName,MethodInfo,StringNameHasher> signal_map;
@@ -147,8 +147,8 @@ public:
StringName name;
bool disabled;
Object* (*creation_func)();
- TypeInfo();
- ~TypeInfo();
+ ClassInfo();
+ ~ClassInfo();
};
template<class T>
@@ -157,9 +157,9 @@ public:
}
static Mutex *lock;
- static HashMap<StringName,TypeInfo,StringNameHasher> types;
+ static HashMap<StringName,ClassInfo,StringNameHasher> classes;
static HashMap<StringName,StringName,StringNameHasher> resource_base_extensions;
- static HashMap<StringName,StringName,StringNameHasher> compat_types;
+ static HashMap<StringName,StringName,StringNameHasher> compat_classes;
#ifdef DEBUG_METHODS_ENABLED
static MethodBind* bind_methodfi(uint32_t p_flags, MethodBind *p_bind , const MethodDefinition &method_name, const Variant **p_defs, int p_defcount);
@@ -170,25 +170,25 @@ public:
static APIType current_api;
- static void _add_type2(const StringName& p_type, const StringName& p_inherits);
+ static void _add_class2(const StringName& p_class, const StringName& p_inherits);
public:
// DO NOT USE THIS!!!!!! NEEDS TO BE PUBLIC BUT DO NOT USE NO MATTER WHAT!!!
template<class T>
- static void _add_type() {
+ static void _add_class() {
- _add_type2(T::get_type_static(),T::get_parent_type_static());
+ _add_class2(T::get_class_static(),T::get_parent_class_static());
#if 0
GLOBAL_LOCK_FUNCTION;
- StringName name = T::get_type_static();
+ StringName name = T::get_class_static();
ERR_FAIL_COND(types.has(name));
types[name]=TypeInfo();
TypeInfo &ti=types[name];
ti.name=name;
- ti.inherits=T::get_parent_type_static();
+ ti.inherits=T::get_parent_class_static();
if (ti.inherits) {
@@ -202,21 +202,21 @@ public:
}
template<class T>
- static void register_type() {
+ static void register_class() {
GLOBAL_LOCK_FUNCTION;
- T::initialize_type();
- TypeInfo *t=types.getptr(T::get_type_static());
+ T::initialize_class();
+ ClassInfo *t=classes.getptr(T::get_class_static());
ERR_FAIL_COND(!t);
t->creation_func=&creator<T>;
T::register_custom_data_to_otdb();
}
template<class T>
- static void register_virtual_type() {
+ static void register_virtual_class() {
GLOBAL_LOCK_FUNCTION;
- T::initialize_type();
+ T::initialize_class();
//nothing
}
@@ -227,24 +227,24 @@ public:
}
template<class T>
- static void register_create_type() {
+ static void register_custom_instance_class() {
GLOBAL_LOCK_FUNCTION;
- T::initialize_type();
- TypeInfo *t=types.getptr(T::get_type_static());
+ T::initialize_class();
+ ClassInfo *t=classes.getptr(T::get_class_static());
ERR_FAIL_COND(!t);
t->creation_func=&_create_ptr_func<T>;
T::register_custom_data_to_otdb();
}
- static void get_type_list( List<StringName> *p_types);
- static void get_inheriters_from( const StringName& p_type,List<StringName> *p_types);
- static StringName type_inherits_from(const StringName& p_type);
- static bool type_exists(const StringName &p_type);
- static bool is_type(const StringName &p_type,const StringName& p_inherits);
- static bool can_instance(const StringName &p_type);
- static Object *instance(const StringName &p_type);
- static APIType get_api_type(const StringName &p_type);
+ static void get_class_list( List<StringName> *p_classes);
+ static void get_inheriters_from_class( const StringName& p_class,List<StringName> *p_classes);
+ static StringName get_parent_class(const StringName& p_class);
+ static bool class_exists(const StringName &p_class);
+ static bool is_parent_class(const StringName &p_class,const StringName& p_inherits);
+ static bool can_instance(const StringName &p_class);
+ static Object *instance(const StringName &p_class);
+ static APIType get_api_type(const StringName &p_class);
static uint64_t get_api_hash(APIType p_api);
@@ -444,9 +444,9 @@ public:
bind->set_name(p_name);
bind->set_default_arguments(p_default_args);
- String instance_type=bind->get_instance_type();
+ String instance_type=bind->get_instance_class();
- TypeInfo *type=types.getptr(instance_type);
+ ClassInfo *type=classes.getptr(instance_type);
if (!type) {
memdelete(bind);
ERR_FAIL_COND_V(!type,NULL);
@@ -471,44 +471,44 @@ public:
}
- static void add_signal(StringName p_type,const MethodInfo& p_signal);
- static bool has_signal(StringName p_type,StringName p_signal);
- static bool get_signal(StringName p_type,StringName p_signal,MethodInfo *r_signal);
- static void get_signal_list(StringName p_type,List<MethodInfo> *p_signals,bool p_no_inheritance=false);
+ static void add_signal(StringName p_class,const MethodInfo& p_signal);
+ static bool has_signal(StringName p_class,StringName p_signal);
+ static bool get_signal(StringName p_class,StringName p_signal,MethodInfo *r_signal);
+ static void get_signal_list(StringName p_class,List<MethodInfo> *p_signals,bool p_no_inheritance=false);
- static void add_property(StringName p_type,const PropertyInfo& p_pinfo, const StringName& p_setter, const StringName& p_getter, int p_index=-1);
- static void get_property_list(StringName p_type, List<PropertyInfo> *p_list, bool p_no_inheritance=false, const Object *p_validator=NULL);
+ static void add_property(StringName p_class,const PropertyInfo& p_pinfo, const StringName& p_setter, const StringName& p_getter, int p_index=-1);
+ static void get_property_list(StringName p_class, List<PropertyInfo> *p_list, bool p_no_inheritance=false, const Object *p_validator=NULL);
static bool set_property(Object* p_object, const StringName& p_property, const Variant& p_value, bool *r_valid=NULL);
static bool get_property(Object* p_object,const StringName& p_property, Variant& r_value);
- static Variant::Type get_property_type(const StringName& p_type, const StringName& p_property,bool *r_is_valid=NULL);
+ static Variant::Type get_property_type(const StringName& p_class, const StringName& p_property,bool *r_is_valid=NULL);
- static bool has_method(StringName p_type,StringName p_method,bool p_no_inheritance=false);
- static void set_method_flags(StringName p_type,StringName p_method,int p_flags);
+ static bool has_method(StringName p_class,StringName p_method,bool p_no_inheritance=false);
+ static void set_method_flags(StringName p_class,StringName p_method,int p_flags);
- static void get_method_list(StringName p_type,List<MethodInfo> *p_methods,bool p_no_inheritance=false);
- static MethodBind *get_method(StringName p_type, StringName p_name);
+ static void get_method_list(StringName p_class,List<MethodInfo> *p_methods,bool p_no_inheritance=false);
+ static MethodBind *get_method(StringName p_class, StringName p_name);
- static void add_virtual_method(const StringName& p_type,const MethodInfo& p_method,bool p_virtual=true );
- static void get_virtual_methods(const StringName& p_type,List<MethodInfo> * p_methods,bool p_no_inheritance=false );
+ static void add_virtual_method(const StringName& p_class,const MethodInfo& p_method,bool p_virtual=true );
+ static void get_virtual_methods(const StringName& p_class,List<MethodInfo> * p_methods,bool p_no_inheritance=false );
- static void bind_integer_constant(const StringName& p_type, const StringName &p_name, int p_constant);
- static void get_integer_constant_list(const StringName& p_type, List<String> *p_constants, bool p_no_inheritance=false);
- static int get_integer_constant(const StringName& p_type, const StringName &p_name, bool *p_success=NULL);
+ static void bind_integer_constant(const StringName& p_class, const StringName &p_name, int p_constant);
+ static void get_integer_constant_list(const StringName& p_class, List<String> *p_constants, bool p_no_inheritance=false);
+ static int get_integer_constant(const StringName& p_class, const StringName &p_name, bool *p_success=NULL);
static StringName get_category(const StringName& p_node);
static bool get_setter_and_type_for_property(const StringName& p_class, const StringName& p_prop, StringName& r_class, StringName& r_setter);
- static void set_type_enabled(StringName p_type,bool p_enable);
- static bool is_type_enabled(StringName p_type);
+ static void set_class_enabled(StringName p_class,bool p_enable);
+ static bool is_class_enabled(StringName p_class);
- static void add_resource_base_extension(const StringName& p_extension,const StringName& p_type);
+ static void add_resource_base_extension(const StringName& p_extension,const StringName& p_class);
static void get_resource_base_extensions(List<String> *p_extensions);
- static void get_extensions_for_type(const StringName& p_type,List<String> *p_extensions);
+ static void get_extensions_for_type(const StringName& p_class,List<String> *p_extensions);
- static void add_compatibility_type(const StringName& p_type,const StringName& p_fallback);
+ static void add_compatibility_class(const StringName& p_class,const StringName& p_fallback);
static void init();
static void set_current_api(APIType p_api);
@@ -517,12 +517,12 @@ public:
#define BIND_CONSTANT(m_constant)\
- ObjectTypeDB::bind_integer_constant( get_type_static() , #m_constant, m_constant);
+ ClassDB::bind_integer_constant( get_class_static() , #m_constant, m_constant);
#ifdef TOOLS_ENABLED
#define BIND_VMETHOD(m_method)\
- ObjectTypeDB::add_virtual_method( get_type_static() , m_method );
+ ClassDB::add_virtual_method( get_class_static() , m_method );
#else
diff --git a/core/os/input.cpp b/core/os/input.cpp
index 8bcb7959b9..c662fafe79 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -49,39 +49,39 @@ Input::MouseMode Input::get_mouse_mode() const {
void Input::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("is_key_pressed","scancode"),&Input::is_key_pressed);
- ObjectTypeDB::bind_method(_MD("is_mouse_button_pressed","button"),&Input::is_mouse_button_pressed);
- ObjectTypeDB::bind_method(_MD("is_joy_button_pressed","device","button"),&Input::is_joy_button_pressed);
- ObjectTypeDB::bind_method(_MD("is_action_pressed","action"),&Input::is_action_pressed);
- ObjectTypeDB::bind_method(_MD("is_action_just_pressed","action"),&Input::is_action_just_pressed);
- ObjectTypeDB::bind_method(_MD("is_action_just_released","action"),&Input::is_action_just_released);
- ObjectTypeDB::bind_method(_MD("add_joy_mapping","mapping", "update_existing"),&Input::add_joy_mapping, DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("remove_joy_mapping","guid"),&Input::remove_joy_mapping);
- ObjectTypeDB::bind_method(_MD("is_joy_known","device"),&Input::is_joy_known);
- ObjectTypeDB::bind_method(_MD("get_joy_axis","device","axis"),&Input::get_joy_axis);
- ObjectTypeDB::bind_method(_MD("get_joy_name","device"),&Input::get_joy_name);
- ObjectTypeDB::bind_method(_MD("get_joy_guid","device"),&Input::get_joy_guid);
- ObjectTypeDB::bind_method(_MD("get_connected_joysticks"),&Input::get_connected_joysticks);
- ObjectTypeDB::bind_method(_MD("get_joy_vibration_strength", "device"), &Input::get_joy_vibration_strength);
- ObjectTypeDB::bind_method(_MD("get_joy_vibration_duration", "device"), &Input::get_joy_vibration_duration);
- ObjectTypeDB::bind_method(_MD("get_joy_button_string", "button_index"), &Input::get_joy_button_string);
- ObjectTypeDB::bind_method(_MD("get_joy_button_index_from_string", "button"), &Input::get_joy_button_index_from_string);
- ObjectTypeDB::bind_method(_MD("get_joy_axis_string", "axis_index"), &Input::get_joy_axis_string);
- ObjectTypeDB::bind_method(_MD("get_joy_axis_index_from_string", "axis"), &Input::get_joy_axis_index_from_string);
- ObjectTypeDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration);
- ObjectTypeDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer);
- ObjectTypeDB::bind_method(_MD("get_magnetometer"),&Input::get_magnetometer);
- ObjectTypeDB::bind_method(_MD("get_gyroscope"),&Input::get_gyroscope);
- //ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&Input::get_mouse_pos); - this is not the function you want
- ObjectTypeDB::bind_method(_MD("get_mouse_speed"),&Input::get_mouse_speed);
- ObjectTypeDB::bind_method(_MD("get_mouse_button_mask"),&Input::get_mouse_button_mask);
- ObjectTypeDB::bind_method(_MD("set_mouse_mode","mode"),&Input::set_mouse_mode);
- ObjectTypeDB::bind_method(_MD("get_mouse_mode"),&Input::get_mouse_mode);
- ObjectTypeDB::bind_method(_MD("warp_mouse_pos","to"),&Input::warp_mouse_pos);
- ObjectTypeDB::bind_method(_MD("action_press","action"),&Input::action_press);
- ObjectTypeDB::bind_method(_MD("action_release","action"),&Input::action_release);
- ObjectTypeDB::bind_method(_MD("set_custom_mouse_cursor","image:Texture","hotspot"),&Input::set_custom_mouse_cursor,DEFVAL(Vector2()));
+ ClassDB::bind_method(_MD("is_key_pressed","scancode"),&Input::is_key_pressed);
+ ClassDB::bind_method(_MD("is_mouse_button_pressed","button"),&Input::is_mouse_button_pressed);
+ ClassDB::bind_method(_MD("is_joy_button_pressed","device","button"),&Input::is_joy_button_pressed);
+ ClassDB::bind_method(_MD("is_action_pressed","action"),&Input::is_action_pressed);
+ ClassDB::bind_method(_MD("is_action_just_pressed","action"),&Input::is_action_just_pressed);
+ ClassDB::bind_method(_MD("is_action_just_released","action"),&Input::is_action_just_released);
+ ClassDB::bind_method(_MD("add_joy_mapping","mapping", "update_existing"),&Input::add_joy_mapping, DEFVAL(false));
+ ClassDB::bind_method(_MD("remove_joy_mapping","guid"),&Input::remove_joy_mapping);
+ ClassDB::bind_method(_MD("is_joy_known","device"),&Input::is_joy_known);
+ ClassDB::bind_method(_MD("get_joy_axis","device","axis"),&Input::get_joy_axis);
+ ClassDB::bind_method(_MD("get_joy_name","device"),&Input::get_joy_name);
+ ClassDB::bind_method(_MD("get_joy_guid","device"),&Input::get_joy_guid);
+ ClassDB::bind_method(_MD("get_connected_joysticks"),&Input::get_connected_joysticks);
+ ClassDB::bind_method(_MD("get_joy_vibration_strength", "device"), &Input::get_joy_vibration_strength);
+ ClassDB::bind_method(_MD("get_joy_vibration_duration", "device"), &Input::get_joy_vibration_duration);
+ ClassDB::bind_method(_MD("get_joy_button_string", "button_index"), &Input::get_joy_button_string);
+ ClassDB::bind_method(_MD("get_joy_button_index_from_string", "button"), &Input::get_joy_button_index_from_string);
+ ClassDB::bind_method(_MD("get_joy_axis_string", "axis_index"), &Input::get_joy_axis_string);
+ ClassDB::bind_method(_MD("get_joy_axis_index_from_string", "axis"), &Input::get_joy_axis_index_from_string);
+ ClassDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0));
+ ClassDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration);
+ ClassDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer);
+ ClassDB::bind_method(_MD("get_magnetometer"),&Input::get_magnetometer);
+ ClassDB::bind_method(_MD("get_gyroscope"),&Input::get_gyroscope);
+ //ClassDB::bind_method(_MD("get_mouse_pos"),&Input::get_mouse_pos); - this is not the function you want
+ ClassDB::bind_method(_MD("get_mouse_speed"),&Input::get_mouse_speed);
+ ClassDB::bind_method(_MD("get_mouse_button_mask"),&Input::get_mouse_button_mask);
+ ClassDB::bind_method(_MD("set_mouse_mode","mode"),&Input::set_mouse_mode);
+ ClassDB::bind_method(_MD("get_mouse_mode"),&Input::get_mouse_mode);
+ ClassDB::bind_method(_MD("warp_mouse_pos","to"),&Input::warp_mouse_pos);
+ ClassDB::bind_method(_MD("action_press","action"),&Input::action_press);
+ ClassDB::bind_method(_MD("action_release","action"),&Input::action_release);
+ ClassDB::bind_method(_MD("set_custom_mouse_cursor","image:Texture","hotspot"),&Input::set_custom_mouse_cursor,DEFVAL(Vector2()));
BIND_CONSTANT( MOUSE_MODE_VISIBLE );
BIND_CONSTANT( MOUSE_MODE_HIDDEN );
diff --git a/core/os/input.h b/core/os/input.h
index bbbf2c6fc1..a137820972 100644
--- a/core/os/input.h
+++ b/core/os/input.h
@@ -35,7 +35,7 @@
class Input : public Object {
- OBJ_TYPE( Input, Object );
+ GDCLASS( Input, Object );
static Input *singleton;
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index bb25448788..600a61e93d 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -31,12 +31,12 @@
void MainLoop::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("input_event","ev"),&MainLoop::input_event);
- ObjectTypeDB::bind_method(_MD("input_text","text"),&MainLoop::input_text);
- ObjectTypeDB::bind_method(_MD("init"),&MainLoop::init);
- ObjectTypeDB::bind_method(_MD("iteration","delta"),&MainLoop::iteration);
- ObjectTypeDB::bind_method(_MD("idle","delta"),&MainLoop::idle);
- ObjectTypeDB::bind_method(_MD("finish"),&MainLoop::finish);
+ ClassDB::bind_method(_MD("input_event","ev"),&MainLoop::input_event);
+ ClassDB::bind_method(_MD("input_text","text"),&MainLoop::input_text);
+ ClassDB::bind_method(_MD("init"),&MainLoop::init);
+ ClassDB::bind_method(_MD("iteration","delta"),&MainLoop::iteration);
+ ClassDB::bind_method(_MD("idle","delta"),&MainLoop::idle);
+ ClassDB::bind_method(_MD("finish"),&MainLoop::finish);
BIND_VMETHOD( MethodInfo("_input_event",PropertyInfo(Variant::INPUT_EVENT,"ev")) );
BIND_VMETHOD( MethodInfo("_input_text",PropertyInfo(Variant::STRING,"text")) );
diff --git a/core/os/main_loop.h b/core/os/main_loop.h
index c52b1dbf4c..6506a280a3 100644
--- a/core/os/main_loop.h
+++ b/core/os/main_loop.h
@@ -37,7 +37,7 @@
*/
class MainLoop : public Object {
- OBJ_TYPE( MainLoop, Object );
+ GDCLASS( MainLoop, Object );
OBJ_CATEGORY("Main Loop");
Ref<Script> init_script;
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 2640b69996..f615e54430 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -198,7 +198,7 @@ static void _OS_printres(Object *p_obj) {
if (!res)
return;
- String str = itos(res->get_instance_ID())+String(res->get_type())+":"+String(res->get_name())+" - "+res->get_path();
+ String str = itos(res->get_instance_ID())+String(res->get_class())+":"+String(res->get_name())+" - "+res->get_path();
if (_OSPRF)
_OSPRF->store_line(str);
else
diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp
index 3e54d94203..8bf77b735a 100644
--- a/core/packed_data_container.cpp
+++ b/core/packed_data_container.cpp
@@ -382,13 +382,13 @@ Variant PackedDataContainer::_iter_get(const Variant& p_iter){
void PackedDataContainer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_set_data"),&PackedDataContainer::_set_data);
- ObjectTypeDB::bind_method(_MD("_get_data"),&PackedDataContainer::_get_data);
- ObjectTypeDB::bind_method(_MD("_iter_init"),&PackedDataContainer::_iter_init);
- ObjectTypeDB::bind_method(_MD("_iter_get"),&PackedDataContainer::_iter_get);
- ObjectTypeDB::bind_method(_MD("_iter_next"),&PackedDataContainer::_iter_next);
- ObjectTypeDB::bind_method(_MD("pack:Error","value"),&PackedDataContainer::pack);
- ObjectTypeDB::bind_method(_MD("size"),&PackedDataContainer::size);
+ ClassDB::bind_method(_MD("_set_data"),&PackedDataContainer::_set_data);
+ ClassDB::bind_method(_MD("_get_data"),&PackedDataContainer::_get_data);
+ ClassDB::bind_method(_MD("_iter_init"),&PackedDataContainer::_iter_init);
+ ClassDB::bind_method(_MD("_iter_get"),&PackedDataContainer::_iter_get);
+ ClassDB::bind_method(_MD("_iter_next"),&PackedDataContainer::_iter_next);
+ ClassDB::bind_method(_MD("pack:Error","value"),&PackedDataContainer::pack);
+ ClassDB::bind_method(_MD("size"),&PackedDataContainer::size);
ADD_PROPERTY( PropertyInfo(Variant::RAW_ARRAY,"__data__"),_SCS("_set_data"),_SCS("_get_data"));
}
@@ -426,11 +426,11 @@ bool PackedDataContainerRef::_is_dictionary() const {
void PackedDataContainerRef::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("size"),&PackedDataContainerRef::size);
- ObjectTypeDB::bind_method(_MD("_iter_init"),&PackedDataContainerRef::_iter_init);
- ObjectTypeDB::bind_method(_MD("_iter_get"),&PackedDataContainerRef::_iter_get);
- ObjectTypeDB::bind_method(_MD("_iter_next"),&PackedDataContainerRef::_iter_next);
- ObjectTypeDB::bind_method(_MD("_is_dictionary"),&PackedDataContainerRef::_is_dictionary);
+ ClassDB::bind_method(_MD("size"),&PackedDataContainerRef::size);
+ ClassDB::bind_method(_MD("_iter_init"),&PackedDataContainerRef::_iter_init);
+ ClassDB::bind_method(_MD("_iter_get"),&PackedDataContainerRef::_iter_get);
+ ClassDB::bind_method(_MD("_iter_next"),&PackedDataContainerRef::_iter_next);
+ ClassDB::bind_method(_MD("_is_dictionary"),&PackedDataContainerRef::_is_dictionary);
}
diff --git a/core/packed_data_container.h b/core/packed_data_container.h
index 0d718870dd..5e0180a424 100644
--- a/core/packed_data_container.h
+++ b/core/packed_data_container.h
@@ -36,7 +36,7 @@
class PackedDataContainer : public Resource {
- OBJ_TYPE(PackedDataContainer,Resource);
+ GDCLASS(PackedDataContainer,Resource);
enum {
TYPE_DICT=0xFFFFFFFF,
@@ -87,7 +87,7 @@ public:
};
class PackedDataContainerRef : public Reference {
- OBJ_TYPE(PackedDataContainerRef,Reference);
+ GDCLASS(PackedDataContainerRef,Reference);
friend class PackedDataContainer;
uint32_t offset;
diff --git a/core/path_remap.cpp b/core/path_remap.cpp
index 5b0ab514d6..c0bed76ac8 100644
--- a/core/path_remap.cpp
+++ b/core/path_remap.cpp
@@ -190,11 +190,11 @@ void PathRemap::load_remaps() {
void PathRemap::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_remap","from","to","locale"),&PathRemap::add_remap,DEFVAL(String()));
- ObjectTypeDB::bind_method(_MD("has_remap","path"),&PathRemap::has_remap);
- ObjectTypeDB::bind_method(_MD("get_remap","path"),&PathRemap::get_remap);
- ObjectTypeDB::bind_method(_MD("erase_remap","path"),&PathRemap::erase_remap);
- ObjectTypeDB::bind_method(_MD("clear_remaps"),&PathRemap::clear_remaps);
+ ClassDB::bind_method(_MD("add_remap","from","to","locale"),&PathRemap::add_remap,DEFVAL(String()));
+ ClassDB::bind_method(_MD("has_remap","path"),&PathRemap::has_remap);
+ ClassDB::bind_method(_MD("get_remap","path"),&PathRemap::get_remap);
+ ClassDB::bind_method(_MD("erase_remap","path"),&PathRemap::erase_remap);
+ ClassDB::bind_method(_MD("clear_remaps"),&PathRemap::clear_remaps);
}
PathRemap::PathRemap() {
diff --git a/core/path_remap.h b/core/path_remap.h
index fc687ee03c..a106030f95 100644
--- a/core/path_remap.h
+++ b/core/path_remap.h
@@ -36,7 +36,7 @@
class PathRemap : public Object {
- OBJ_TYPE(PathRemap,Object);
+ GDCLASS(PathRemap,Object);
static PathRemap* singleton;
struct RemapData {
diff --git a/core/reference.cpp b/core/reference.cpp
index 3e3355c219..69e053cc1a 100644
--- a/core/reference.cpp
+++ b/core/reference.cpp
@@ -54,9 +54,9 @@ bool Reference::init_ref() {
void Reference::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("init_ref"),&Reference::init_ref);
- ObjectTypeDB::bind_method(_MD("reference"),&Reference::reference);
- ObjectTypeDB::bind_method(_MD("unreference"),&Reference::unreference);
+ ClassDB::bind_method(_MD("init_ref"),&Reference::init_ref);
+ ClassDB::bind_method(_MD("reference"),&Reference::reference);
+ ClassDB::bind_method(_MD("unreference"),&Reference::unreference);
}
int Reference::reference_get_count() const {
@@ -126,7 +126,7 @@ WeakRef::WeakRef() {
void WeakRef::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_ref:Object"),&WeakRef::get_ref);
+ ClassDB::bind_method(_MD("get_ref:Object"),&WeakRef::get_ref);
}
#if 0
diff --git a/core/reference.h b/core/reference.h
index b82001da19..ce196801bb 100644
--- a/core/reference.h
+++ b/core/reference.h
@@ -39,7 +39,7 @@
*/
class Reference : public Object{
- OBJ_TYPE( Reference, Object );
+ GDCLASS( Reference, Object );
friend class RefBase;
SafeRefCount refcount;
SafeRefCount refcount_init;
@@ -315,7 +315,7 @@ typedef Ref<Reference> REF;
class WeakRef : public Reference {
- OBJ_TYPE(WeakRef,Reference);
+ GDCLASS(WeakRef,Reference);
ObjectID ref;
protected:
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index fa82368f19..0e1dec075b 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -67,6 +67,7 @@ static ResourceFormatLoaderBinary *resource_loader_binary=NULL;
static _ResourceLoader *_resource_loader=NULL;
static _ResourceSaver *_resource_saver=NULL;
static _OS *_os=NULL;
+static _ClassDB *_classdb=NULL;
static _Marshalls *_marshalls = NULL;
static TranslationLoaderPO *resource_format_po=NULL;
@@ -112,48 +113,48 @@ void register_core_types() {
ResourceLoader::add_resource_format_loader(resource_loader_xml);
#endif
- ObjectTypeDB::register_type<Object>();
-
-
- ObjectTypeDB::register_type<Reference>();
- ObjectTypeDB::register_type<WeakRef>();
- ObjectTypeDB::register_type<ResourceImportMetadata>();
- ObjectTypeDB::register_type<Resource>();
- ObjectTypeDB::register_type<FuncRef>();
- ObjectTypeDB::register_virtual_type<StreamPeer>();
- ObjectTypeDB::register_type<StreamPeerBuffer>();
- ObjectTypeDB::register_create_type<StreamPeerTCP>();
- ObjectTypeDB::register_create_type<TCP_Server>();
- ObjectTypeDB::register_create_type<PacketPeerUDP>();
- ObjectTypeDB::register_create_type<StreamPeerSSL>();
- ObjectTypeDB::register_virtual_type<IP>();
- ObjectTypeDB::register_virtual_type<PacketPeer>();
- ObjectTypeDB::register_type<PacketPeerStream>();
- ObjectTypeDB::register_type<MainLoop>();
-// ObjectTypeDB::register_type<OptimizedSaver>();
- ObjectTypeDB::register_type<Translation>();
- ObjectTypeDB::register_type<PHashTranslation>();
- ObjectTypeDB::register_type<UndoRedo>();
- ObjectTypeDB::register_type<HTTPClient>();
- ObjectTypeDB::register_type<TriangleMesh>();
-
- ObjectTypeDB::register_virtual_type<ResourceInteractiveLoader>();
-
- ObjectTypeDB::register_type<_File>();
- ObjectTypeDB::register_type<_Directory>();
- ObjectTypeDB::register_type<_Thread>();
- ObjectTypeDB::register_type<_Mutex>();
- ObjectTypeDB::register_type<_Semaphore>();
-
- ObjectTypeDB::register_type<XMLParser>();
-
- ObjectTypeDB::register_type<ConfigFile>();
-
- ObjectTypeDB::register_type<PCKPacker>();
-
- ObjectTypeDB::register_type<PackedDataContainer>();
- ObjectTypeDB::register_virtual_type<PackedDataContainerRef>();
- ObjectTypeDB::register_type<AStar>();
+ ClassDB::register_class<Object>();
+
+
+ ClassDB::register_class<Reference>();
+ ClassDB::register_class<WeakRef>();
+ ClassDB::register_class<ResourceImportMetadata>();
+ ClassDB::register_class<Resource>();
+ ClassDB::register_class<FuncRef>();
+ ClassDB::register_virtual_class<StreamPeer>();
+ ClassDB::register_class<StreamPeerBuffer>();
+ ClassDB::register_custom_instance_class<StreamPeerTCP>();
+ ClassDB::register_custom_instance_class<TCP_Server>();
+ ClassDB::register_custom_instance_class<PacketPeerUDP>();
+ ClassDB::register_custom_instance_class<StreamPeerSSL>();
+ ClassDB::register_virtual_class<IP>();
+ ClassDB::register_virtual_class<PacketPeer>();
+ ClassDB::register_class<PacketPeerStream>();
+ ClassDB::register_class<MainLoop>();
+// ClassDB::register_type<OptimizedSaver>();
+ ClassDB::register_class<Translation>();
+ ClassDB::register_class<PHashTranslation>();
+ ClassDB::register_class<UndoRedo>();
+ ClassDB::register_class<HTTPClient>();
+ ClassDB::register_class<TriangleMesh>();
+
+ ClassDB::register_virtual_class<ResourceInteractiveLoader>();
+
+ ClassDB::register_class<_File>();
+ ClassDB::register_class<_Directory>();
+ ClassDB::register_class<_Thread>();
+ ClassDB::register_class<_Mutex>();
+ ClassDB::register_class<_Semaphore>();
+
+ ClassDB::register_class<XMLParser>();
+
+ ClassDB::register_class<ConfigFile>();
+
+ ClassDB::register_class<PCKPacker>();
+
+ ClassDB::register_class<PackedDataContainer>();
+ ClassDB::register_virtual_class<PackedDataContainerRef>();
+ ClassDB::register_class<AStar>();
ip = IP::create();
@@ -164,6 +165,7 @@ void register_core_types() {
_resource_loader=memnew(_ResourceLoader);
_resource_saver=memnew(_ResourceSaver);
_os=memnew(_OS);
+ _classdb=memnew(_ClassDB);
_marshalls = memnew(_Marshalls);
@@ -179,6 +181,7 @@ void register_core_singletons() {
Globals::get_singleton()->add_singleton( Globals::Singleton("ResourceSaver",_ResourceSaver::get_singleton()) );
Globals::get_singleton()->add_singleton( Globals::Singleton("PathRemap",PathRemap::get_singleton() ) );
Globals::get_singleton()->add_singleton( Globals::Singleton("OS",_OS::get_singleton() ) );
+ Globals::get_singleton()->add_singleton( Globals::Singleton("ClassDB",_classdb ) );
Globals::get_singleton()->add_singleton( Globals::Singleton("Marshalls",_Marshalls::get_singleton() ) );
Globals::get_singleton()->add_singleton( Globals::Singleton("TranslationServer",TranslationServer::get_singleton() ) );
Globals::get_singleton()->add_singleton( Globals::Singleton("TS",TranslationServer::get_singleton() ) );
@@ -195,6 +198,7 @@ void unregister_core_types() {
memdelete( _resource_loader );
memdelete( _resource_saver );
memdelete( _os);
+ memdelete( _classdb );
memdelete( _marshalls );
memdelete( _geometry );
@@ -221,7 +225,7 @@ void unregister_core_types() {
unregister_variant_methods();
- ObjectTypeDB::cleanup();
+ ClassDB::cleanup();
ResourceCache::clear();
CoreStringNames::free();
StringName::cleanup();
diff --git a/core/resource.cpp b/core/resource.cpp
index e6c574e502..ba330c758f 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -127,17 +127,17 @@ StringArray ResourceImportMetadata::_get_options() const {
void ResourceImportMetadata::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_editor","name"),&ResourceImportMetadata::set_editor);
- ObjectTypeDB::bind_method(_MD("get_editor"),&ResourceImportMetadata::get_editor);
- ObjectTypeDB::bind_method(_MD("add_source","path","md5"),&ResourceImportMetadata::add_source, "");
- ObjectTypeDB::bind_method(_MD("get_source_path","idx"),&ResourceImportMetadata::get_source_path);
- ObjectTypeDB::bind_method(_MD("get_source_md5","idx"),&ResourceImportMetadata::get_source_md5);
- ObjectTypeDB::bind_method(_MD("set_source_md5","idx", "md5"),&ResourceImportMetadata::set_source_md5);
- ObjectTypeDB::bind_method(_MD("remove_source","idx"),&ResourceImportMetadata::remove_source);
- ObjectTypeDB::bind_method(_MD("get_source_count"),&ResourceImportMetadata::get_source_count);
- ObjectTypeDB::bind_method(_MD("set_option","key","value"),&ResourceImportMetadata::set_option);
- ObjectTypeDB::bind_method(_MD("get_option","key"),&ResourceImportMetadata::get_option);
- ObjectTypeDB::bind_method(_MD("get_options"),&ResourceImportMetadata::_get_options);
+ ClassDB::bind_method(_MD("set_editor","name"),&ResourceImportMetadata::set_editor);
+ ClassDB::bind_method(_MD("get_editor"),&ResourceImportMetadata::get_editor);
+ ClassDB::bind_method(_MD("add_source","path","md5"),&ResourceImportMetadata::add_source, "");
+ ClassDB::bind_method(_MD("get_source_path","idx"),&ResourceImportMetadata::get_source_path);
+ ClassDB::bind_method(_MD("get_source_md5","idx"),&ResourceImportMetadata::get_source_md5);
+ ClassDB::bind_method(_MD("set_source_md5","idx", "md5"),&ResourceImportMetadata::set_source_md5);
+ ClassDB::bind_method(_MD("remove_source","idx"),&ResourceImportMetadata::remove_source);
+ ClassDB::bind_method(_MD("get_source_count"),&ResourceImportMetadata::get_source_count);
+ ClassDB::bind_method(_MD("set_option","key","value"),&ResourceImportMetadata::set_option);
+ ClassDB::bind_method(_MD("get_option","key"),&ResourceImportMetadata::get_option);
+ ClassDB::bind_method(_MD("get_options"),&ResourceImportMetadata::_get_options);
}
ResourceImportMetadata::ResourceImportMetadata() {
@@ -229,7 +229,7 @@ void Resource::reload_from_file() {
if (!path.is_resource_file())
return;
- Ref<Resource> s = ResourceLoader::load(path,get_type(),true);
+ Ref<Resource> s = ResourceLoader::load(path,get_class(),true);
if (!s.is_valid())
return;
@@ -256,7 +256,7 @@ Ref<Resource> Resource::duplicate(bool p_subresources) {
get_property_list(&plist);
- Resource *r = (Resource*)ObjectTypeDB::instance(get_type());
+ Resource *r = (Resource*)ClassDB::instance(get_class());
ERR_FAIL_COND_V(!r,Ref<Resource>());
for(List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) {
@@ -291,16 +291,16 @@ void Resource::_take_over_path(const String& p_path) {
void Resource::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_path","path"),&Resource::_set_path);
- ObjectTypeDB::bind_method(_MD("take_over_path","path"),&Resource::_take_over_path);
- ObjectTypeDB::bind_method(_MD("get_path"),&Resource::get_path);
- ObjectTypeDB::bind_method(_MD("set_name","name"),&Resource::set_name);
- ObjectTypeDB::bind_method(_MD("get_name"),&Resource::get_name);
- ObjectTypeDB::bind_method(_MD("get_rid"),&Resource::get_rid);
- ObjectTypeDB::bind_method(_MD("set_import_metadata","metadata"),&Resource::set_import_metadata);
- ObjectTypeDB::bind_method(_MD("get_import_metadata"),&Resource::get_import_metadata);
+ ClassDB::bind_method(_MD("set_path","path"),&Resource::_set_path);
+ ClassDB::bind_method(_MD("take_over_path","path"),&Resource::_take_over_path);
+ ClassDB::bind_method(_MD("get_path"),&Resource::get_path);
+ ClassDB::bind_method(_MD("set_name","name"),&Resource::set_name);
+ ClassDB::bind_method(_MD("get_name"),&Resource::get_name);
+ ClassDB::bind_method(_MD("get_rid"),&Resource::get_rid);
+ ClassDB::bind_method(_MD("set_import_metadata","metadata"),&Resource::set_import_metadata);
+ ClassDB::bind_method(_MD("get_import_metadata"),&Resource::get_import_metadata);
- ObjectTypeDB::bind_method(_MD("duplicate","subresources"),&Resource::duplicate,DEFVAL(false));
+ ClassDB::bind_method(_MD("duplicate","subresources"),&Resource::duplicate,DEFVAL(false));
ADD_SIGNAL( MethodInfo("changed") );
ADD_PROPERTY( PropertyInfo(Variant::STRING,"resource/path",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR ), _SCS("set_path"),_SCS("get_path"));
ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"resource/name"), _SCS("set_name"),_SCS("get_name"));
@@ -476,16 +476,16 @@ void ResourceCache::dump(const char* p_file,bool p_short) {
Resource *r = resources[*K];
- if (!type_count.has(r->get_type())) {
- type_count[r->get_type()]=0;
+ if (!type_count.has(r->get_class())) {
+ type_count[r->get_class()]=0;
}
- type_count[r->get_type()]++;
+ type_count[r->get_class()]++;
if (!p_short) {
if (f)
- f->store_line(r->get_type()+": "+r->get_path());
+ f->store_line(r->get_class()+": "+r->get_path());
}
}
diff --git a/core/resource.h b/core/resource.h
index 3ea54ef277..cb109b3767 100644
--- a/core/resource.h
+++ b/core/resource.h
@@ -41,14 +41,14 @@
#define RES_BASE_EXTENSION(m_ext)\
public:\
-static void register_custom_data_to_otdb() { ObjectTypeDB::add_resource_base_extension(m_ext,get_type_static()); }\
+static void register_custom_data_to_otdb() { ClassDB::add_resource_base_extension(m_ext,get_class_static()); }\
virtual String get_base_extension() const { return m_ext; }\
private:
class ResourceImportMetadata : public Reference {
- OBJ_TYPE( ResourceImportMetadata, Reference );
+ GDCLASS( ResourceImportMetadata, Reference );
struct Source {
String path;
@@ -88,7 +88,7 @@ public:
class Resource : public Reference {
- OBJ_TYPE( Resource, Reference );
+ GDCLASS( Resource, Reference );
OBJ_CATEGORY("Resources");
RES_BASE_EXTENSION("res");
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 3686169a4e..c1d78f129a 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -575,8 +575,8 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) {
packet_peer_stream->put_var("message:inspect_object");
packet_peer_stream->put_var(props_to_send*5+4);
packet_peer_stream->put_var(p_id);
- packet_peer_stream->put_var(obj->get_type());
- if (obj->is_type("Resource") || obj->is_type("Node"))
+ packet_peer_stream->put_var(obj->get_class());
+ if (obj->is_class("Resource") || obj->is_class("Node"))
packet_peer_stream->put_var(obj->call("get_path"));
else
packet_peer_stream->put_var("");
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 40b59d4e84..52ae181c32 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -46,13 +46,13 @@ void Script::_notification( int p_what) {
void Script::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("can_instance"),&Script::can_instance);
- //ObjectTypeDB::bind_method(_MD("instance_create","base_object"),&Script::instance_create);
- ObjectTypeDB::bind_method(_MD("instance_has","base_object"),&Script::instance_has);
- ObjectTypeDB::bind_method(_MD("has_source_code"),&Script::has_source_code);
- ObjectTypeDB::bind_method(_MD("get_source_code"),&Script::get_source_code);
- ObjectTypeDB::bind_method(_MD("set_source_code","source"),&Script::set_source_code);
- ObjectTypeDB::bind_method(_MD("reload","keep_state"),&Script::reload,DEFVAL(false));
+ ClassDB::bind_method(_MD("can_instance"),&Script::can_instance);
+ //ClassDB::bind_method(_MD("instance_create","base_object"),&Script::instance_create);
+ ClassDB::bind_method(_MD("instance_has","base_object"),&Script::instance_has);
+ ClassDB::bind_method(_MD("has_source_code"),&Script::has_source_code);
+ ClassDB::bind_method(_MD("get_source_code"),&Script::get_source_code);
+ ClassDB::bind_method(_MD("set_source_code","source"),&Script::set_source_code);
+ ClassDB::bind_method(_MD("reload","keep_state"),&Script::reload,DEFVAL(false));
}
diff --git a/core/script_language.h b/core/script_language.h
index 43b1c649b7..8c38af47cb 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -77,7 +77,7 @@ class PlaceHolderScriptInstance;
class Script : public Resource {
- OBJ_TYPE( Script, Resource );
+ GDCLASS( Script, Resource );
OBJ_SAVE_TYPE( Script );
protected:
diff --git a/core/translation.cpp b/core/translation.cpp
index f368c9d5fc..9ac1d6a31e 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -898,15 +898,15 @@ int Translation::get_message_count() const {
void Translation::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_locale","locale"),&Translation::set_locale);
- ObjectTypeDB::bind_method(_MD("get_locale"),&Translation::get_locale);
- ObjectTypeDB::bind_method(_MD("add_message","src_message","xlated_message"),&Translation::add_message);
- ObjectTypeDB::bind_method(_MD("get_message","src_message"),&Translation::get_message);
- ObjectTypeDB::bind_method(_MD("erase_message","src_message"),&Translation::erase_message);
- ObjectTypeDB::bind_method(_MD("get_message_list"),&Translation::_get_message_list);
- ObjectTypeDB::bind_method(_MD("get_message_count"),&Translation::get_message_count);
- ObjectTypeDB::bind_method(_MD("_set_messages"),&Translation::_set_messages);
- ObjectTypeDB::bind_method(_MD("_get_messages"),&Translation::_get_messages);
+ ClassDB::bind_method(_MD("set_locale","locale"),&Translation::set_locale);
+ ClassDB::bind_method(_MD("get_locale"),&Translation::get_locale);
+ ClassDB::bind_method(_MD("add_message","src_message","xlated_message"),&Translation::add_message);
+ ClassDB::bind_method(_MD("get_message","src_message"),&Translation::get_message);
+ ClassDB::bind_method(_MD("erase_message","src_message"),&Translation::erase_message);
+ ClassDB::bind_method(_MD("get_message_list"),&Translation::_get_message_list);
+ ClassDB::bind_method(_MD("get_message_count"),&Translation::get_message_count);
+ ClassDB::bind_method(_MD("_set_messages"),&Translation::_set_messages);
+ ClassDB::bind_method(_MD("_get_messages"),&Translation::_get_messages);
ADD_PROPERTY( PropertyInfo(Variant::STRING_ARRAY,"messages",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR), _SCS("_set_messages"), _SCS("_get_messages") );
ADD_PROPERTY( PropertyInfo(Variant::STRING,"locale"), _SCS("set_locale"), _SCS("get_locale") );
@@ -1116,15 +1116,15 @@ StringName TranslationServer::tool_translate(const StringName& p_message) const
void TranslationServer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_locale","locale"),&TranslationServer::set_locale);
- ObjectTypeDB::bind_method(_MD("get_locale"),&TranslationServer::get_locale);
+ ClassDB::bind_method(_MD("set_locale","locale"),&TranslationServer::set_locale);
+ ClassDB::bind_method(_MD("get_locale"),&TranslationServer::get_locale);
- ObjectTypeDB::bind_method(_MD("translate","message"),&TranslationServer::translate);
+ ClassDB::bind_method(_MD("translate","message"),&TranslationServer::translate);
- ObjectTypeDB::bind_method(_MD("add_translation","translation:Translation"),&TranslationServer::add_translation);
- ObjectTypeDB::bind_method(_MD("remove_translation","translation:Translation"),&TranslationServer::remove_translation);
+ ClassDB::bind_method(_MD("add_translation","translation:Translation"),&TranslationServer::add_translation);
+ ClassDB::bind_method(_MD("remove_translation","translation:Translation"),&TranslationServer::remove_translation);
- ObjectTypeDB::bind_method(_MD("clear"),&TranslationServer::clear);
+ ClassDB::bind_method(_MD("clear"),&TranslationServer::clear);
}
diff --git a/core/translation.h b/core/translation.h
index 14b7c372f6..01edc82139 100644
--- a/core/translation.h
+++ b/core/translation.h
@@ -35,7 +35,7 @@
class Translation : public Resource {
- OBJ_TYPE( Translation, Resource );
+ GDCLASS( Translation, Resource );
OBJ_SAVE_TYPE( Translation );
RES_BASE_EXTENSION("xl");
@@ -68,7 +68,7 @@ public:
class TranslationServer : public Object {
- OBJ_TYPE(TranslationServer, Object);
+ GDCLASS(TranslationServer, Object);
String locale;
String fallback;
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index bf7bf69c64..5bdc8ef72d 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -479,11 +479,11 @@ Variant UndoRedo::_add_undo_method(const Variant** p_args, int p_argcount, Varia
void UndoRedo::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("create_action","name","merge_mode"),&UndoRedo::create_action, DEFVAL(MERGE_DISABLE) );
- ObjectTypeDB::bind_method(_MD("commit_action"),&UndoRedo::commit_action);
+ ClassDB::bind_method(_MD("create_action","name","merge_mode"),&UndoRedo::create_action, DEFVAL(MERGE_DISABLE) );
+ ClassDB::bind_method(_MD("commit_action"),&UndoRedo::commit_action);
- //ObjectTypeDB::bind_method(_MD("add_do_method","p_object", "p_method", "VARIANT_ARG_LIST"),&UndoRedo::add_do_method);
- //ObjectTypeDB::bind_method(_MD("add_undo_method","p_object", "p_method", "VARIANT_ARG_LIST"),&UndoRedo::add_undo_method);
+ //ClassDB::bind_method(_MD("add_do_method","p_object", "p_method", "VARIANT_ARG_LIST"),&UndoRedo::add_do_method);
+ //ClassDB::bind_method(_MD("add_undo_method","p_object", "p_method", "VARIANT_ARG_LIST"),&UndoRedo::add_undo_method);
{
MethodInfo mi;
@@ -492,7 +492,7 @@ void UndoRedo::_bind_methods() {
mi.arguments.push_back( PropertyInfo( Variant::STRING, "method"));
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"add_do_method",&UndoRedo::_add_do_method,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"add_do_method",&UndoRedo::_add_do_method,mi);
}
{
@@ -502,16 +502,16 @@ void UndoRedo::_bind_methods() {
mi.arguments.push_back( PropertyInfo( Variant::STRING, "method"));
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"add_undo_method",&UndoRedo::_add_undo_method,mi);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"add_undo_method",&UndoRedo::_add_undo_method,mi);
}
- ObjectTypeDB::bind_method(_MD("add_do_property","object", "property", "value:Variant"),&UndoRedo::add_do_property);
- ObjectTypeDB::bind_method(_MD("add_undo_property","object", "property", "value:Variant"),&UndoRedo::add_undo_property);
- ObjectTypeDB::bind_method(_MD("add_do_reference","object"),&UndoRedo::add_do_reference);
- ObjectTypeDB::bind_method(_MD("add_undo_reference","object"),&UndoRedo::add_undo_reference);
- ObjectTypeDB::bind_method(_MD("clear_history"),&UndoRedo::clear_history);
- ObjectTypeDB::bind_method(_MD("get_current_action_name"),&UndoRedo::get_current_action_name);
- ObjectTypeDB::bind_method(_MD("get_version"),&UndoRedo::get_version);
+ ClassDB::bind_method(_MD("add_do_property","object", "property", "value:Variant"),&UndoRedo::add_do_property);
+ ClassDB::bind_method(_MD("add_undo_property","object", "property", "value:Variant"),&UndoRedo::add_undo_property);
+ ClassDB::bind_method(_MD("add_do_reference","object"),&UndoRedo::add_do_reference);
+ ClassDB::bind_method(_MD("add_undo_reference","object"),&UndoRedo::add_undo_reference);
+ ClassDB::bind_method(_MD("clear_history"),&UndoRedo::clear_history);
+ ClassDB::bind_method(_MD("get_current_action_name"),&UndoRedo::get_current_action_name);
+ ClassDB::bind_method(_MD("get_version"),&UndoRedo::get_version);
BIND_CONSTANT(MERGE_DISABLE);
BIND_CONSTANT(MERGE_ENDS);
diff --git a/core/undo_redo.h b/core/undo_redo.h
index cccfc39116..3d14dd9ee2 100644
--- a/core/undo_redo.h
+++ b/core/undo_redo.h
@@ -37,7 +37,7 @@
class UndoRedo : public Object {
- OBJ_TYPE(UndoRedo,Object);
+ GDCLASS(UndoRedo,Object);
OBJ_SAVE_TYPE( UndoRedo );
public:
diff --git a/core/variant.cpp b/core/variant.cpp
index 437f1fb634..19b0ea7129 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -1665,7 +1665,7 @@ Variant::operator String() const {
};
};
#endif
- return "["+_get_obj().obj->get_type()+":"+itos(_get_obj().obj->get_instance_ID())+"]";
+ return "["+_get_obj().obj->get_class()+":"+itos(_get_obj().obj->get_instance_ID())+"]";
} else
return "[Object:null]";
@@ -3066,7 +3066,7 @@ String Variant::get_call_error_text(Object* p_base, const StringName& p_method,c
return "Call OK";
}
- String class_name = p_base->get_type();
+ String class_name = p_base->get_class();
Ref<Script> script = p_base->get_script();
if (script.is_valid() && script->get_path().is_resource_file()) {
diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp
index 97c74aa7c9..bb5a034b6b 100644
--- a/drivers/png/resource_saver_png.cpp
+++ b/drivers/png/resource_saver_png.cpp
@@ -222,7 +222,7 @@ Error ResourceSaverPNG::save_image(const String &p_path, Image &p_img) {
bool ResourceSaverPNG::recognize(const RES& p_resource) const {
- return (p_resource.is_valid() && p_resource->is_type("ImageTexture"));
+ return (p_resource.is_valid() && p_resource->is_class("ImageTexture"));
}
void ResourceSaverPNG::get_recognized_extensions(const RES& p_resource,List<String> *p_extensions) const{
diff --git a/drivers/unix/ip_unix.h b/drivers/unix/ip_unix.h
index 00870d5492..eb7ebf8bb0 100644
--- a/drivers/unix/ip_unix.h
+++ b/drivers/unix/ip_unix.h
@@ -34,7 +34,7 @@
#if defined(UNIX_ENABLED) || defined(WINDOWS_ENABLED)
class IP_Unix : public IP {
- OBJ_TYPE(IP_Unix, IP);
+ GDCLASS(IP_Unix, IP);
virtual IP_Address _resolve_hostname(const String& p_hostname, IP::Type p_type);
diff --git a/main/input_default.h b/main/input_default.h
index e6e5c13c88..eb160cbc23 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -34,7 +34,7 @@
class InputDefault : public Input {
- OBJ_TYPE( InputDefault, Input );
+ GDCLASS( InputDefault, Input );
_THREAD_SAFE_CLASS_
int mouse_button_mask;
diff --git a/main/main.cpp b/main/main.cpp
index b8712a6fec..6703da8b01 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -195,7 +195,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
RID_OwnerBase::init_rid();
OS::get_singleton()->initialize_core();
- ObjectTypeDB::init();
+ ClassDB::init();
MAIN_PRINT("Main: Initialize CORE");
@@ -1002,10 +1002,10 @@ Error Main::setup2() {
}
}
#ifdef TOOLS_ENABLED
- ObjectTypeDB::set_current_api(ObjectTypeDB::API_EDITOR);
+ ClassDB::set_current_api(ClassDB::API_EDITOR);
EditorNode::register_editor_types();
- ObjectTypeDB::set_current_api(ObjectTypeDB::API_CORE);
+ ClassDB::set_current_api(ClassDB::API_CORE);
#endif
@@ -1033,11 +1033,11 @@ Error Main::setup2() {
_start_success=true;
locale=String();
- ObjectTypeDB::set_current_api(ObjectTypeDB::API_NONE); //no more api is registered at this point
+ ClassDB::set_current_api(ClassDB::API_NONE); //no more api is registered at this point
if (OS::get_singleton()->is_stdout_verbose()) {
- print_line("CORE API HASH: "+itos(ObjectTypeDB::get_api_hash(ObjectTypeDB::API_CORE)));
- print_line("EDITOR API HASH: "+itos(ObjectTypeDB::get_api_hash(ObjectTypeDB::API_EDITOR)));
+ print_line("CORE API HASH: "+itos(ClassDB::get_api_hash(ClassDB::API_CORE)));
+ print_line("EDITOR API HASH: "+itos(ClassDB::get_api_hash(ClassDB::API_EDITOR)));
}
MAIN_PRINT("Main: Done");
@@ -1194,7 +1194,7 @@ bool Main::start() {
StringName instance_type=script_res->get_instance_base_type();
- Object *obj = ObjectTypeDB::instance(instance_type);
+ Object *obj = ClassDB::instance(instance_type);
MainLoop *script_loop = obj?obj->cast_to<MainLoop>():NULL;
if (!script_loop) {
if (obj)
@@ -1219,12 +1219,12 @@ bool Main::start() {
main_loop_type="SceneTree";
if (!main_loop) {
- if (!ObjectTypeDB::type_exists(main_loop_type)) {
+ if (!ClassDB::class_exists(main_loop_type)) {
OS::get_singleton()->alert("godot: error: MainLoop type doesn't exist: "+main_loop_type);
return false;
} else {
- Object *ml = ObjectTypeDB::instance(main_loop_type);
+ Object *ml = ClassDB::instance(main_loop_type);
if (!ml) {
ERR_EXPLAIN("Can't instance MainLoop type");
ERR_FAIL_V(false);
@@ -1241,7 +1241,7 @@ bool Main::start() {
}
}
- if (main_loop->is_type("SceneTree")) {
+ if (main_loop->is_class("SceneTree")) {
SceneTree *sml = main_loop->cast_to<SceneTree>();
@@ -1452,17 +1452,17 @@ bool Main::start() {
ERR_EXPLAIN("Can't autoload: "+path);
ERR_CONTINUE(res.is_null());
Node *n=NULL;
- if (res->is_type("PackedScene")) {
+ if (res->is_class("PackedScene")) {
Ref<PackedScene> ps = res;
n=ps->instance();
- } else if (res->is_type("Script")) {
+ } else if (res->is_class("Script")) {
Ref<Script> s = res;
StringName ibt = s->get_instance_base_type();
- bool valid_type = ObjectTypeDB::is_type(ibt,"Node");
+ bool valid_type = ClassDB::is_parent_class(ibt,"Node");
ERR_EXPLAIN("Script does not inherit a Node: "+path);
ERR_CONTINUE( !valid_type );
- Object *obj = ObjectTypeDB::instance(ibt);
+ Object *obj = ClassDB::instance(ibt);
ERR_EXPLAIN("Cannot instance script for autoload, expected 'Node' inheritance, got: "+String(ibt));
ERR_CONTINUE( obj==NULL );
diff --git a/main/performance.cpp b/main/performance.cpp
index febed7bb94..28b42ae689 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -40,7 +40,7 @@ Performance *Performance::singleton=NULL;
void Performance::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_monitor","monitor"),&Performance::get_monitor);
+ ClassDB::bind_method(_MD("get_monitor","monitor"),&Performance::get_monitor);
BIND_CONSTANT( TIME_FPS );
BIND_CONSTANT( TIME_PROCESS );
diff --git a/main/performance.h b/main/performance.h
index 5f8d7c0c41..8b5626b681 100644
--- a/main/performance.h
+++ b/main/performance.h
@@ -37,7 +37,7 @@
class Performance : public Object {
- OBJ_TYPE(Performance,Object);
+ GDCLASS(Performance,Object);
static Performance *singleton;
static void _bind_methods();
diff --git a/modules/chibi/event_stream_chibi.cpp b/modules/chibi/event_stream_chibi.cpp
index d910d86d7b..0b680b4fda 100644
--- a/modules/chibi/event_stream_chibi.cpp
+++ b/modules/chibi/event_stream_chibi.cpp
@@ -860,7 +860,7 @@ void initialize_chibi() {
sample_manager = memnew( CPSampleManagerImpl );
resource_loader = memnew( ResourceFormatLoaderChibi );
- ObjectTypeDB::register_type<EventStreamChibi>();
+ ClassDB::register_class<EventStreamChibi>();
ResourceLoader::add_resource_format_loader( resource_loader );
}
diff --git a/modules/chibi/event_stream_chibi.h b/modules/chibi/event_stream_chibi.h
index 57aa307a8a..9c6c883f61 100644
--- a/modules/chibi/event_stream_chibi.h
+++ b/modules/chibi/event_stream_chibi.h
@@ -223,7 +223,7 @@ class EventStreamChibi;
class EventStreamPlaybackChibi : public EventStreamPlayback {
- OBJ_TYPE(EventStreamPlaybackChibi,EventStreamPlayback);
+ GDCLASS(EventStreamPlaybackChibi,EventStreamPlayback);
CPMixerImpl mixer;
uint64_t total_usec;
@@ -275,7 +275,7 @@ public:
class EventStreamChibi : public EventStream {
- OBJ_TYPE(EventStreamChibi,EventStream);
+ GDCLASS(EventStreamChibi,EventStream);
friend class ResourceFormatLoaderChibi;
friend class EventStreamPlaybackChibi;
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index 2fbd53d3d1..598b2aab0e 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -473,7 +473,7 @@ void ResourceFormatDDS::get_recognized_extensions(List<String> *p_extensions) co
bool ResourceFormatDDS::handles_type(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Texture");
+ return ClassDB::is_parent_class(p_type,"Texture");
}
String ResourceFormatDDS::get_resource_type(const String &p_path) const {
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index 2ee0d8fb61..43d9988de1 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -643,12 +643,12 @@ void NetworkedMultiplayerENet::enet_compressor_destroy(void * context){
void NetworkedMultiplayerENet::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("create_server","port","max_clients","in_bandwidth","out_bandwidth"),&NetworkedMultiplayerENet::create_server,DEFVAL(32),DEFVAL(0),DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("create_client","ip","port","in_bandwidth","out_bandwidth"),&NetworkedMultiplayerENet::create_client,DEFVAL(0),DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("close_connection"),&NetworkedMultiplayerENet::close_connection);
- ObjectTypeDB::bind_method(_MD("set_compression_mode","mode"),&NetworkedMultiplayerENet::set_compression_mode);
- ObjectTypeDB::bind_method(_MD("get_compression_mode"),&NetworkedMultiplayerENet::get_compression_mode);
- ObjectTypeDB::bind_method(_MD("set_bind_ip", "ip"),&NetworkedMultiplayerENet::set_bind_ip);
+ ClassDB::bind_method(_MD("create_server","port","max_clients","in_bandwidth","out_bandwidth"),&NetworkedMultiplayerENet::create_server,DEFVAL(32),DEFVAL(0),DEFVAL(0));
+ ClassDB::bind_method(_MD("create_client","ip","port","in_bandwidth","out_bandwidth"),&NetworkedMultiplayerENet::create_client,DEFVAL(0),DEFVAL(0));
+ ClassDB::bind_method(_MD("close_connection"),&NetworkedMultiplayerENet::close_connection);
+ ClassDB::bind_method(_MD("set_compression_mode","mode"),&NetworkedMultiplayerENet::set_compression_mode);
+ ClassDB::bind_method(_MD("get_compression_mode"),&NetworkedMultiplayerENet::get_compression_mode);
+ ClassDB::bind_method(_MD("set_bind_ip", "ip"),&NetworkedMultiplayerENet::set_bind_ip);
BIND_CONSTANT( COMPRESS_NONE );
BIND_CONSTANT( COMPRESS_RANGE_CODER );
diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h
index 881166b7a4..dcf8c2429b 100644
--- a/modules/enet/networked_multiplayer_enet.h
+++ b/modules/enet/networked_multiplayer_enet.h
@@ -35,7 +35,7 @@
class NetworkedMultiplayerENet : public NetworkedMultiplayerPeer {
- OBJ_TYPE(NetworkedMultiplayerENet,NetworkedMultiplayerPeer)
+ GDCLASS(NetworkedMultiplayerENet,NetworkedMultiplayerPeer)
public:
enum CompressionMode {
COMPRESS_NONE,
diff --git a/modules/enet/register_types.cpp b/modules/enet/register_types.cpp
index 81e3ecfd71..2b4dd35d33 100644
--- a/modules/enet/register_types.cpp
+++ b/modules/enet/register_types.cpp
@@ -40,7 +40,7 @@ void register_enet_types() {
enet_ok=true;
}
- ObjectTypeDB::register_type<NetworkedMultiplayerENet>();
+ ClassDB::register_class<NetworkedMultiplayerENet>();
}
void unregister_enet_types() {
diff --git a/modules/etc1/texture_loader_pkm.cpp b/modules/etc1/texture_loader_pkm.cpp
index 275afc1fd6..f8af141979 100644
--- a/modules/etc1/texture_loader_pkm.cpp
+++ b/modules/etc1/texture_loader_pkm.cpp
@@ -73,7 +73,7 @@ void ResourceFormatPKM::get_recognized_extensions(List<String> *p_extensions) co
bool ResourceFormatPKM::handles_type(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Texture");
+ return ClassDB::is_parent_class(p_type,"Texture");
}
String ResourceFormatPKM::get_resource_type(const String &p_path) const {
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp
index 30cb09b3ba..75a49ace31 100644
--- a/modules/gdscript/gd_compiler.cpp
+++ b/modules/gdscript/gd_compiler.cpp
@@ -208,7 +208,7 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre
if (nc) {
bool success=false;
- int constant = ObjectTypeDB::get_integer_constant(nc->get_name(),identifier,&success);
+ int constant = ClassDB::get_integer_constant(nc->get_name(),identifier,&success);
if (success) {
Variant key=constant;
int idx;
@@ -1723,7 +1723,7 @@ Error GDCompiler::_parse_class(GDScript *p_script, GDScript *p_owner, const GDPa
}
if (native.is_valid()) {
- if (ObjectTypeDB::has_signal(native->get_name(),name)) {
+ if (ClassDB::has_signal(native->get_name(),name)) {
_set_error("Signal '"+name+"' redefined (original in native class '"+String(native->get_name())+"')",p_class);
return ERR_ALREADY_EXISTS;
}
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index a29c5bbd8f..1a9bef6691 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -347,7 +347,7 @@ String GDScriptLanguage::make_function(const String& p_class,const String& p_nam
struct GDCompletionIdentifier {
- StringName obj_type;
+ StringName GDCLASS;
Ref<GDScript> script;
Variant::Type type;
Variant value; //im case there is a value, also return it
@@ -365,10 +365,10 @@ static GDCompletionIdentifier _get_type_from_variant(const Variant& p_variant) {
Object *obj = p_variant;
if (obj) {
//if (obj->cast_to<GDNativeClass>()) {
- // t.obj_type=obj->cast_to<GDNativeClass>()->get_name();
+ // t.GDCLASS=obj->cast_to<GDNativeClass>()->get_name();
// t.value=Variant();
//} else {
- t.obj_type=obj->get_type();
+ t.GDCLASS=obj->get_class();
//}
}
}
@@ -380,7 +380,7 @@ static GDCompletionIdentifier _get_type_from_pinfo(const PropertyInfo& p_info) {
GDCompletionIdentifier t;
t.type=p_info.type;
if (p_info.hint==PROPERTY_HINT_RESOURCE_TYPE) {
- t.obj_type=p_info.hint_string;
+ t.GDCLASS=p_info.hint_string;
}
return t;
}
@@ -508,7 +508,7 @@ static GDCompletionIdentifier _get_native_class(GDCompletionContext& context) {
id.type=Variant::OBJECT;
if (context.base)
id.value=context.base;
- id.obj_type=nc->get_name();
+ id.GDCLASS=nc->get_name();
return id;
}
@@ -609,15 +609,15 @@ static bool _guess_expression_type(GDCompletionContext& context,const GDParser::
GDNativeClass *gdnc = obj->cast_to<GDNativeClass>();
r_type.type=Variant::OBJECT;
r_type.value=Variant();
- r_type.obj_type=gdnc->get_name();
+ r_type.GDCLASS=gdnc->get_name();
return true;
}
}
- if (ObjectTypeDB::has_method(base.obj_type,id)) {
+ if (ClassDB::has_method(base.GDCLASS,id)) {
#ifdef TOOLS_ENABLED
- MethodBind *mb = ObjectTypeDB::get_method(base.obj_type,id);
+ MethodBind *mb = ClassDB::get_method(base.GDCLASS,id);
PropertyInfo pi = mb->get_argument_info(-1);
//try calling the function if constant and all args are constant, should not crash..
@@ -643,7 +643,7 @@ static bool _guess_expression_type(GDCompletionContext& context,const GDParser::
}
}
- if (all_valid && String(id)=="get_node" && ObjectTypeDB::is_type(base.obj_type,"Node") && args.size()) {
+ if (all_valid && String(id)=="get_node" && ClassDB::is_parent_class(base.GDCLASS,"Node") && args.size()) {
String arg1=args[0];
if (arg1.begins_with("/root/")) {
@@ -686,7 +686,7 @@ static bool _guess_expression_type(GDCompletionContext& context,const GDParser::
scr = ResourceLoader::load(script);
- r_type.obj_type="Node";
+ r_type.GDCLASS="Node";
r_type.type=Variant::OBJECT;
r_type.script=scr;
r_type.value=Variant();
@@ -729,7 +729,7 @@ static bool _guess_expression_type(GDCompletionContext& context,const GDParser::
r_type.type=pi.type;
if (pi.hint==PROPERTY_HINT_RESOURCE_TYPE) {
- r_type.obj_type=pi.hint_string;
+ r_type.GDCLASS=pi.hint_string;
}
@@ -755,7 +755,7 @@ static bool _guess_expression_type(GDCompletionContext& context,const GDParser::
MethodInfo mi = E->get();
r_type.type=mi.return_val.type;
if (mi.return_val.hint==PROPERTY_HINT_RESOURCE_TYPE) {
- r_type.obj_type=mi.return_val.hint_string;
+ r_type.GDCLASS=mi.return_val.hint_string;
}
return true;
}
@@ -1064,11 +1064,11 @@ static bool _guess_identifier_type(GDCompletionContext& context,int p_line,const
if (argindex!=-1) {
GDCompletionIdentifier id =_get_native_class(context);
- if (id.type==Variant::OBJECT && id.obj_type!=StringName()) {
+ if (id.type==Variant::OBJECT && id.GDCLASS!=StringName()) {
//this kinda sucks but meh
List<MethodInfo> vmethods;
- ObjectTypeDB::get_virtual_methods(id.obj_type,&vmethods);
+ ClassDB::get_virtual_methods(id.GDCLASS,&vmethods);
for (List<MethodInfo>::Element *E=vmethods.front();E;E=E->next()) {
@@ -1081,14 +1081,14 @@ static bool _guess_identifier_type(GDCompletionContext& context,int p_line,const
r_type.type=Variant::OBJECT;
- r_type.obj_type=arg.name.substr(scp+1,arg.name.length());
+ r_type.GDCLASS=arg.name.substr(scp+1,arg.name.length());
return true;
} else {
r_type.type=arg.type;
if (arg.hint==PROPERTY_HINT_RESOURCE_TYPE)
- r_type.obj_type=arg.hint_string;
+ r_type.GDCLASS=arg.hint_string;
return true;
}
}
@@ -1174,7 +1174,7 @@ static bool _guess_identifier_type(GDCompletionContext& context,int p_line,const
scr = ResourceLoader::load(script);
- r_type.obj_type="Node";
+ r_type.GDCLASS="Node";
r_type.type=Variant::OBJECT;
r_type.script=scr;
r_type.value=Variant();
@@ -1302,13 +1302,13 @@ static void _find_identifiers_in_class(GDCompletionContext& context,bool p_stati
StringName type = nc->get_name();
List<String> constants;
- ObjectTypeDB::get_integer_constant_list(type,&constants);
+ ClassDB::get_integer_constant_list(type,&constants);
for(List<String>::Element *E=constants.front();E;E=E->next()) {
result.insert(E->get());
}
List<MethodInfo> methods;
- ObjectTypeDB::get_method_list(type,&methods);
+ ClassDB::get_method_list(type,&methods);
for(List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
if (E->get().name.begins_with("_"))
continue;
@@ -1483,10 +1483,10 @@ static void _find_type_arguments(GDCompletionContext& context,const GDParser::No
}
- } else if (id.type==Variant::OBJECT && id.obj_type!=StringName()) {
+ } else if (id.type==Variant::OBJECT && id.GDCLASS!=StringName()) {
- MethodBind *m = ObjectTypeDB::get_method(id.obj_type,p_method);
+ MethodBind *m = ClassDB::get_method(id.GDCLASS,p_method);
if (!m) {
//not in static method, see script
@@ -1699,7 +1699,7 @@ static void _find_type_arguments(GDCompletionContext& context,const GDParser::No
if (p_argidx==0) {
List<MethodInfo> sigs;
- ObjectTypeDB::get_signal_list(id.obj_type,&sigs);
+ ClassDB::get_signal_list(id.GDCLASS,&sigs);
if (id.script.is_valid()) {
id.script->get_script_signal_list(&sigs);
@@ -1735,7 +1735,7 @@ static void _find_type_arguments(GDCompletionContext& context,const GDParser::No
}*/
} else {
- if (p_argidx==0 && (String(p_method)=="get_node" || String(p_method)=="has_node") && ObjectTypeDB::is_type(id.obj_type,"Node")) {
+ if (p_argidx==0 && (String(p_method)=="get_node" || String(p_method)=="has_node") && ClassDB::is_parent_class(id.GDCLASS,"Node")) {
List<PropertyInfo> props;
Globals::get_singleton()->get_property_list(&props);
@@ -1962,7 +1962,7 @@ static void _find_call_arguments(GDCompletionContext& context,const GDParser::No
GDCompletionIdentifier ci;
ci.type=Variant::OBJECT;
- ci.obj_type=nc->get_name();
+ ci.GDCLASS=nc->get_name();
if (!context._class->owner)
ci.value=context.base;
@@ -1970,7 +1970,7 @@ static void _find_call_arguments(GDCompletionContext& context,const GDParser::No
//guess type..
/*
List<MethodInfo> methods;
- ObjectTypeDB::get_method_list(type,&methods);
+ ClassDB::get_method_list(type,&methods);
for(List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
//if (E->get().arguments.size())
// result.insert(E->get().name+"(");
@@ -2063,13 +2063,13 @@ static void _find_call_arguments(GDCompletionContext& context,const GDParser::No
StringName type = nc->get_name();
List<String> constants;
- ObjectTypeDB::get_integer_constant_list(type,&constants);
+ ClassDB::get_integer_constant_list(type,&constants);
for(List<String>::Element *E=constants.front();E;E=E->next()) {
result.insert(E->get());
}
List<MethodInfo> methods;
- ObjectTypeDB::get_method_list(type,&methods);
+ ClassDB::get_method_list(type,&methods);
for(List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
if (E->get().arguments.size())
result.insert(E->get().name+"(");
@@ -2143,18 +2143,18 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
GDCompletionIdentifier t;
if (_guess_expression_type(context,static_cast<const GDParser::OperatorNode *>(node)->arguments[0],p.get_completion_line(),t)) {
- if (t.type==Variant::OBJECT && t.obj_type=="GDNativeClass") {
+ if (t.type==Variant::OBJECT && t.GDCLASS=="GDNativeClass") {
//native enum
Ref<GDNativeClass> gdn = t.value;
if (gdn.is_valid()) {
StringName cn = gdn->get_name();
List<String> cnames;
- ObjectTypeDB::get_integer_constant_list(cn,&cnames);
+ ClassDB::get_integer_constant_list(cn,&cnames);
for (List<String>::Element *E=cnames.front();E;E=E->next()) {
options.insert(E->get());
}
}
- } else if (t.type==Variant::OBJECT && t.obj_type!=StringName()) {
+ } else if (t.type==Variant::OBJECT && t.GDCLASS!=StringName()) {
Ref<GDScript> on_script;
@@ -2288,10 +2288,10 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
if (!isfunction) {
- ObjectTypeDB::get_integer_constant_list(t.obj_type,r_options);
+ ClassDB::get_integer_constant_list(t.GDCLASS,r_options);
}
List<MethodInfo> mi;
- ObjectTypeDB::get_method_list(t.obj_type,&mi);
+ ClassDB::get_method_list(t.GDCLASS,&mi);
for (List<MethodInfo>::Element *E=mi.front();E;E=E->next()) {
if (E->get().name.begins_with("_"))
@@ -2395,9 +2395,9 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
GDCompletionIdentifier cid = _get_native_class(context);
- if (cid.obj_type!=StringName()) {
+ if (cid.GDCLASS!=StringName()) {
List<MethodInfo> vm;
- ObjectTypeDB::get_virtual_methods(cid.obj_type,&vm);
+ ClassDB::get_virtual_methods(cid.GDCLASS,&vm);
for(List<MethodInfo>::Element *E=vm.front();E;E=E->next()) {
MethodInfo &mi=E->get();
@@ -2430,10 +2430,10 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
if (!_guess_expression_type(context,node,p.get_completion_line(),t))
break;
- if (t.type==Variant::OBJECT && t.obj_type!=StringName()) {
+ if (t.type==Variant::OBJECT && t.GDCLASS!=StringName()) {
List<MethodInfo> sigs;
- ObjectTypeDB::get_signal_list(t.obj_type,&sigs);
+ ClassDB::get_signal_list(t.GDCLASS,&sigs);
for (List<MethodInfo>::Element *E=sigs.front();E;E=E->next()) {
options.insert("\""+E->get().name+"\"");
}
@@ -2531,7 +2531,7 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
//before parsing, try the usual stuff
- if (ObjectTypeDB::type_exists(p_symbol)) {
+ if (ClassDB::class_exists(p_symbol)) {
r_result.type=ScriptLanguage::LookupResult::RESULT_CLASS;
r_result.class_name=p_symbol;
return OK;
@@ -2610,12 +2610,12 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
}
GDCompletionIdentifier identifier = _get_native_class(context);
- print_line("identifier: "+String(identifier.obj_type));
+ print_line("identifier: "+String(identifier.GDCLASS));
- if (ObjectTypeDB::has_method(identifier.obj_type,p_symbol)) {
+ if (ClassDB::has_method(identifier.GDCLASS,p_symbol)) {
r_result.type=ScriptLanguage::LookupResult::RESULT_CLASS_METHOD;
- r_result.class_name=identifier.obj_type;
+ r_result.class_name=identifier.GDCLASS;
r_result.class_member=p_symbol;
return OK;
}
@@ -2653,10 +2653,10 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
GDCompletionIdentifier identifier = _get_native_class(context);
- if (ObjectTypeDB::has_method(identifier.obj_type,p_symbol)) {
+ if (ClassDB::has_method(identifier.GDCLASS,p_symbol)) {
r_result.type=ScriptLanguage::LookupResult::RESULT_CLASS_METHOD;
- r_result.class_name=identifier.obj_type;
+ r_result.class_name=identifier.GDCLASS;
r_result.class_member=p_symbol;
return OK;
}
@@ -2777,7 +2777,7 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
} else {
r_result.type=ScriptLanguage::LookupResult::RESULT_CLASS;
- r_result.class_name=obj->get_type();
+ r_result.class_name=obj->get_class();
}
return OK;
}
@@ -2799,7 +2799,7 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
if (identifier.script.is_valid()) {
print_line("var script: "+identifier.script->get_path());
}
- print_line("obj type: "+String(identifier.obj_type));
+ print_line("obj type: "+String(identifier.GDCLASS));
print_line("value: "+String(identifier.value));
}
#endif
@@ -2823,7 +2823,7 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
GDCompletionIdentifier t;
if (_guess_expression_type(context,static_cast<const GDParser::OperatorNode *>(node)->arguments[0],p.get_completion_line(),t)) {
- if (t.type==Variant::OBJECT && t.obj_type=="GDNativeClass") {
+ if (t.type==Variant::OBJECT && t.GDCLASS=="GDNativeClass") {
//native enum
Ref<GDNativeClass> gdn = t.value;
if (gdn.is_valid()) {
@@ -2833,7 +2833,7 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
return OK;
}
- } else if (t.type==Variant::OBJECT && t.obj_type!=StringName()) {
+ } else if (t.type==Variant::OBJECT && t.GDCLASS!=StringName()) {
Ref<GDScript> on_script;
@@ -2858,29 +2858,29 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
}
}
- if (ObjectTypeDB::has_method(t.obj_type,p_symbol)) {
+ if (ClassDB::has_method(t.GDCLASS,p_symbol)) {
r_result.type=ScriptLanguage::LookupResult::RESULT_CLASS_METHOD;
- r_result.class_name=t.obj_type;
+ r_result.class_name=t.GDCLASS;
r_result.class_member=p_symbol;
return OK;
}
bool success;
- ObjectTypeDB::get_integer_constant(t.obj_type,p_symbol,&success);
+ ClassDB::get_integer_constant(t.GDCLASS,p_symbol,&success);
if (success) {
r_result.type=ScriptLanguage::LookupResult::RESULT_CLASS_CONSTANT;
- r_result.class_name=t.obj_type;
+ r_result.class_name=t.GDCLASS;
r_result.class_member=p_symbol;
return OK;
}
- ObjectTypeDB::get_property_type(t.obj_type,p_symbol,&success);
+ ClassDB::get_property_type(t.GDCLASS,p_symbol,&success);
if (success) {
r_result.type=ScriptLanguage::LookupResult::RESULT_CLASS_PROPERTY;
- r_result.class_name=t.obj_type;
+ r_result.class_name=t.GDCLASS;
r_result.class_member=p_symbol;
return OK;
}
@@ -2934,15 +2934,15 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
GDCompletionIdentifier cid = _get_native_class(context);
- if (cid.obj_type!=StringName()) {
+ if (cid.GDCLASS!=StringName()) {
List<MethodInfo> vm;
- ObjectTypeDB::get_virtual_methods(cid.obj_type,&vm);
+ ClassDB::get_virtual_methods(cid.GDCLASS,&vm);
for(List<MethodInfo>::Element *E=vm.front();E;E=E->next()) {
if (p_symbol==E->get().name) {
r_result.type=ScriptLanguage::LookupResult::RESULT_CLASS_METHOD;
- r_result.class_name=cid.obj_type;
+ r_result.class_name=cid.GDCLASS;
r_result.class_member=p_symbol;
return OK;
diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp
index 094e21bb4f..2bacb50d86 100644
--- a/modules/gdscript/gd_function.cpp
+++ b/modules/gdscript/gd_function.cpp
@@ -119,9 +119,9 @@ static String _get_var_type(const Variant* p_type) {
#ifdef DEBUG_ENABLED
if (ObjectDB::instance_validate(bobj)) {
if (bobj->get_script_instance())
- basestr= bobj->get_type()+" ("+bobj->get_script_instance()->get_script()->get_path().get_file()+")";
+ basestr= bobj->get_class()+" ("+bobj->get_script_instance()->get_script()->get_path().get_file()+")";
else
- basestr = bobj->get_type();
+ basestr = bobj->get_class();
} else {
basestr="previously freed instance";
}
@@ -395,11 +395,11 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
if (!nc) {
- err_text="Right operand of 'extends' is not a class (type: '"+obj_B->get_type()+"').";
+ err_text="Right operand of 'extends' is not a class (type: '"+obj_B->get_class()+"').";
break;
}
- extends_ok=ObjectTypeDB::is_type(obj_A->get_type_name(),nc->get_name());
+ extends_ok=ClassDB::is_parent_class(obj_A->get_class_name(),nc->get_name());
}
*dst=extends_ok;
@@ -788,7 +788,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
if (*methodname!=GDScriptLanguage::get_singleton()->strings._init) {
- MethodBind *mb = ObjectTypeDB::get_method(gds->native->get_name(),*methodname);
+ MethodBind *mb = ClassDB::get_method(gds->native->get_name(),*methodname);
if (!mb) {
err.error=Variant::CallError::CALL_ERROR_INVALID_METHOD;
} else {
@@ -1435,9 +1435,9 @@ Variant GDFunctionState::resume(const Variant& p_arg) {
void GDFunctionState::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("resume:Variant","arg"),&GDFunctionState::resume,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("is_valid"),&GDFunctionState::is_valid);
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"_signal_callback",&GDFunctionState::_signal_callback,MethodInfo("_signal_callback"));
+ ClassDB::bind_method(_MD("resume:Variant","arg"),&GDFunctionState::resume,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("is_valid"),&GDFunctionState::is_valid);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"_signal_callback",&GDFunctionState::_signal_callback,MethodInfo("_signal_callback"));
}
diff --git a/modules/gdscript/gd_function.h b/modules/gdscript/gd_function.h
index f1c5b13ca1..976dbb7778 100644
--- a/modules/gdscript/gd_function.h
+++ b/modules/gdscript/gd_function.h
@@ -204,7 +204,7 @@ public:
class GDFunctionState : public Reference {
- OBJ_TYPE(GDFunctionState,Reference);
+ GDCLASS(GDFunctionState,Reference);
friend class GDFunction;
GDFunction *function;
GDFunction::CallState state;
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp
index e5da9e7bc5..74b804b206 100644
--- a/modules/gdscript/gd_functions.cpp
+++ b/modules/gdscript/gd_functions.cpp
@@ -536,7 +536,7 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va
case TYPE_EXISTS: {
VALIDATE_ARG_COUNT(1);
- r_ret = ObjectTypeDB::type_exists(*p_args[0]);
+ r_ret = ClassDB::class_exists(*p_args[0]);
} break;
case TEXT_CHAR: {
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 6520e27c9f..bc9d3fa4f4 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -2931,7 +2931,7 @@ void GDParser::_parse_class(ClassNode *p_class) {
} else if (tokenizer->get_token()==GDTokenizer::TK_IDENTIFIER) {
String identifier = tokenizer->get_token_identifier();
- if (!ObjectTypeDB::is_type(identifier,"Resource")) {
+ if (!ClassDB::is_parent_class(identifier,"Resource")) {
current_export=PropertyInfo();
_set_error("Export hint not a type or resource.");
@@ -3149,7 +3149,7 @@ void GDParser::_parse_class(ClassNode *p_class) {
return;
}
member._export.hint=PROPERTY_HINT_RESOURCE_TYPE;
- member._export.hint_string=res->get_type();
+ member._export.hint_string=res->get_class();
}
}
}
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index 39c47f7954..9c10411dcf 100644
--- a/modules/gdscript/gd_script.cpp
+++ b/modules/gdscript/gd_script.cpp
@@ -50,7 +50,7 @@ GDNativeClass::GDNativeClass(const StringName& p_name) {
bool GDNativeClass::_get(const StringName& p_name,Variant &r_ret) const {
bool ok;
- int v = ObjectTypeDB::get_integer_constant(name, p_name, &ok);
+ int v = ClassDB::get_integer_constant(name, p_name, &ok);
if (ok) {
r_ret=v;
@@ -63,7 +63,7 @@ bool GDNativeClass::_get(const StringName& p_name,Variant &r_ret) const {
void GDNativeClass::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("new"),&GDNativeClass::_new);
+ ClassDB::bind_method(_MD("new"),&GDNativeClass::_new);
}
@@ -86,7 +86,7 @@ Variant GDNativeClass::_new() {
Object *GDNativeClass::instance() {
- return ObjectTypeDB::instance(name);
+ return ClassDB::instance(name);
}
@@ -388,12 +388,12 @@ ScriptInstance* GDScript::instance_create(Object *p_this) {
top=top->_base;
if (top->native.is_valid()) {
- if (!ObjectTypeDB::is_type(p_this->get_type_name(),top->native->get_name())) {
+ if (!ClassDB::is_parent_class(p_this->get_class_name(),top->native->get_name())) {
if (ScriptDebugger::get_singleton()) {
- GDScriptLanguage::get_singleton()->debug_break_parse(get_path(),0,"Script inherits from native type '"+String(top->native->get_name())+"', so it can't be instanced in object of type: '"+p_this->get_type()+"'");
+ GDScriptLanguage::get_singleton()->debug_break_parse(get_path(),0,"Script inherits from native type '"+String(top->native->get_name())+"', so it can't be instanced in object of type: '"+p_this->get_class()+"'");
}
- ERR_EXPLAIN("Script inherits from native type '"+String(top->native->get_name())+"', so it can't be instanced in object of type: '"+p_this->get_type()+"'");
+ ERR_EXPLAIN("Script inherits from native type '"+String(top->native->get_name())+"', so it can't be instanced in object of type: '"+p_this->get_class()+"'");
ERR_FAIL_V(NULL);
}
@@ -751,9 +751,9 @@ void GDScript::_get_property_list(List<PropertyInfo> *p_properties) const {
void GDScript::_bind_methods() {
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"new",&GDScript::_new,MethodInfo(Variant::OBJECT,"new"));
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"new",&GDScript::_new,MethodInfo(Variant::OBJECT,"new"));
- ObjectTypeDB::bind_method(_MD("get_as_byte_code"),&GDScript::get_as_byte_code);
+ ClassDB::bind_method(_MD("get_as_byte_code"),&GDScript::get_as_byte_code);
}
@@ -1477,7 +1477,7 @@ void GDScriptLanguage::init() {
//populate native classes
List<StringName> class_list;
- ObjectTypeDB::get_type_list(&class_list);
+ ClassDB::get_class_list(&class_list);
for(List<StringName>::Element *E=class_list.front();E;E=E->next()) {
StringName n = E->get();
diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h
index 9903c7a79e..7e572589c7 100644
--- a/modules/gdscript/gd_script.h
+++ b/modules/gdscript/gd_script.h
@@ -35,7 +35,7 @@
#include "gd_function.h"
class GDNativeClass : public Reference {
- OBJ_TYPE(GDNativeClass,Reference);
+ GDCLASS(GDNativeClass,Reference);
StringName name;
protected:
@@ -55,7 +55,7 @@ public:
class GDScript : public Script {
- OBJ_TYPE(GDScript,Script);
+ GDCLASS(GDScript,Script);
bool tool;
bool valid;
diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp
index 3292c094e4..11bdf783f8 100644
--- a/modules/gdscript/register_types.cpp
+++ b/modules/gdscript/register_types.cpp
@@ -48,7 +48,7 @@ ResourceFormatSaverGDScript *resource_saver_gd=NULL;
class EditorExportGDScript : public EditorExportPlugin {
- OBJ_TYPE(EditorExportGDScript,EditorExportPlugin);
+ GDCLASS(EditorExportGDScript,EditorExportPlugin);
public:
@@ -138,8 +138,8 @@ static void register_editor_plugin() {
void register_gdscript_types() {
- ObjectTypeDB::register_type<GDScript>();
- ObjectTypeDB::register_virtual_type<GDFunctionState>();
+ ClassDB::register_class<GDScript>();
+ ClassDB::register_virtual_class<GDFunctionState>();
script_language_gd=memnew( GDScriptLanguage );
//script_language_gd->init();
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index b7c18ba477..84d8250033 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -1185,60 +1185,60 @@ void GridMap::_update_dirty_map_callback() {
void GridMap::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_theme","theme:MeshLibrary"),&GridMap::set_theme);
- ObjectTypeDB::bind_method(_MD("get_theme:MeshLibrary"),&GridMap::get_theme);
+ ClassDB::bind_method(_MD("set_theme","theme:MeshLibrary"),&GridMap::set_theme);
+ ClassDB::bind_method(_MD("get_theme:MeshLibrary"),&GridMap::get_theme);
- ObjectTypeDB::bind_method(_MD("set_bake","enable"),&GridMap::set_bake);
- ObjectTypeDB::bind_method(_MD("is_baking_enabled"),&GridMap::is_baking_enabled);
+ ClassDB::bind_method(_MD("set_bake","enable"),&GridMap::set_bake);
+ ClassDB::bind_method(_MD("is_baking_enabled"),&GridMap::is_baking_enabled);
- ObjectTypeDB::bind_method(_MD("set_cell_size","size"),&GridMap::set_cell_size);
- ObjectTypeDB::bind_method(_MD("get_cell_size"),&GridMap::get_cell_size);
+ ClassDB::bind_method(_MD("set_cell_size","size"),&GridMap::set_cell_size);
+ ClassDB::bind_method(_MD("get_cell_size"),&GridMap::get_cell_size);
- ObjectTypeDB::bind_method(_MD("set_octant_size","size"),&GridMap::set_octant_size);
- ObjectTypeDB::bind_method(_MD("get_octant_size"),&GridMap::get_octant_size);
+ ClassDB::bind_method(_MD("set_octant_size","size"),&GridMap::set_octant_size);
+ ClassDB::bind_method(_MD("get_octant_size"),&GridMap::get_octant_size);
- ObjectTypeDB::bind_method(_MD("set_cell_item","x","y","z","item","orientation"),&GridMap::set_cell_item,DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_cell_item","x","y","z"),&GridMap::get_cell_item);
- ObjectTypeDB::bind_method(_MD("get_cell_item_orientation","x","y","z"),&GridMap::get_cell_item_orientation);
+ ClassDB::bind_method(_MD("set_cell_item","x","y","z","item","orientation"),&GridMap::set_cell_item,DEFVAL(0));
+ ClassDB::bind_method(_MD("get_cell_item","x","y","z"),&GridMap::get_cell_item);
+ ClassDB::bind_method(_MD("get_cell_item_orientation","x","y","z"),&GridMap::get_cell_item_orientation);
-// ObjectTypeDB::bind_method(_MD("_recreate_octants"),&GridMap::_recreate_octants);
- ObjectTypeDB::bind_method(_MD("_update_dirty_map_callback"),&GridMap::_update_dirty_map_callback);
- ObjectTypeDB::bind_method(_MD("resource_changed","resource"),&GridMap::resource_changed);
+// ClassDB::bind_method(_MD("_recreate_octants"),&GridMap::_recreate_octants);
+ ClassDB::bind_method(_MD("_update_dirty_map_callback"),&GridMap::_update_dirty_map_callback);
+ ClassDB::bind_method(_MD("resource_changed","resource"),&GridMap::resource_changed);
- ObjectTypeDB::bind_method(_MD("set_center_x","enable"),&GridMap::set_center_x);
- ObjectTypeDB::bind_method(_MD("get_center_x"),&GridMap::get_center_x);
- ObjectTypeDB::bind_method(_MD("set_center_y","enable"),&GridMap::set_center_y);
- ObjectTypeDB::bind_method(_MD("get_center_y"),&GridMap::get_center_y);
- ObjectTypeDB::bind_method(_MD("set_center_z","enable"),&GridMap::set_center_z);
- ObjectTypeDB::bind_method(_MD("get_center_z"),&GridMap::get_center_z);
+ ClassDB::bind_method(_MD("set_center_x","enable"),&GridMap::set_center_x);
+ ClassDB::bind_method(_MD("get_center_x"),&GridMap::get_center_x);
+ ClassDB::bind_method(_MD("set_center_y","enable"),&GridMap::set_center_y);
+ ClassDB::bind_method(_MD("get_center_y"),&GridMap::get_center_y);
+ ClassDB::bind_method(_MD("set_center_z","enable"),&GridMap::set_center_z);
+ ClassDB::bind_method(_MD("get_center_z"),&GridMap::get_center_z);
- ObjectTypeDB::bind_method(_MD("set_clip","enabled","clipabove","floor","axis"),&GridMap::set_clip,DEFVAL(true),DEFVAL(0),DEFVAL(Vector3::AXIS_X));
+ ClassDB::bind_method(_MD("set_clip","enabled","clipabove","floor","axis"),&GridMap::set_clip,DEFVAL(true),DEFVAL(0),DEFVAL(Vector3::AXIS_X));
- ObjectTypeDB::bind_method(_MD("create_area","id","area"),&GridMap::create_area);
- ObjectTypeDB::bind_method(_MD("area_get_bounds","area","bounds"),&GridMap::area_get_bounds);
- ObjectTypeDB::bind_method(_MD("area_set_exterior_portal","area","enable"),&GridMap::area_set_exterior_portal);
- ObjectTypeDB::bind_method(_MD("area_set_name","area","name"),&GridMap::area_set_name);
- ObjectTypeDB::bind_method(_MD("area_get_name","area"),&GridMap::area_get_name);
- ObjectTypeDB::bind_method(_MD("area_is_exterior_portal","area"),&GridMap::area_is_exterior_portal);
- ObjectTypeDB::bind_method(_MD("area_set_portal_disable_distance","area","distance"),&GridMap::area_set_portal_disable_distance);
- ObjectTypeDB::bind_method(_MD("area_get_portal_disable_distance","area"),&GridMap::area_get_portal_disable_distance);
- ObjectTypeDB::bind_method(_MD("area_set_portal_disable_color","area","color"),&GridMap::area_set_portal_disable_color);
- ObjectTypeDB::bind_method(_MD("area_get_portal_disable_color","area"),&GridMap::area_get_portal_disable_color);
- ObjectTypeDB::bind_method(_MD("erase_area","area"),&GridMap::erase_area);
- ObjectTypeDB::bind_method(_MD("get_unused_area_id","area"),&GridMap::get_unused_area_id);
- ObjectTypeDB::bind_method(_MD("bake_geometry"),&GridMap::bake_geometry);
+ ClassDB::bind_method(_MD("create_area","id","area"),&GridMap::create_area);
+ ClassDB::bind_method(_MD("area_get_bounds","area","bounds"),&GridMap::area_get_bounds);
+ ClassDB::bind_method(_MD("area_set_exterior_portal","area","enable"),&GridMap::area_set_exterior_portal);
+ ClassDB::bind_method(_MD("area_set_name","area","name"),&GridMap::area_set_name);
+ ClassDB::bind_method(_MD("area_get_name","area"),&GridMap::area_get_name);
+ ClassDB::bind_method(_MD("area_is_exterior_portal","area"),&GridMap::area_is_exterior_portal);
+ ClassDB::bind_method(_MD("area_set_portal_disable_distance","area","distance"),&GridMap::area_set_portal_disable_distance);
+ ClassDB::bind_method(_MD("area_get_portal_disable_distance","area"),&GridMap::area_get_portal_disable_distance);
+ ClassDB::bind_method(_MD("area_set_portal_disable_color","area","color"),&GridMap::area_set_portal_disable_color);
+ ClassDB::bind_method(_MD("area_get_portal_disable_color","area"),&GridMap::area_get_portal_disable_color);
+ ClassDB::bind_method(_MD("erase_area","area"),&GridMap::erase_area);
+ ClassDB::bind_method(_MD("get_unused_area_id","area"),&GridMap::get_unused_area_id);
+ ClassDB::bind_method(_MD("bake_geometry"),&GridMap::bake_geometry);
- ObjectTypeDB::bind_method(_MD("_baked_light_changed"),&GridMap::_baked_light_changed);
- ObjectTypeDB::bind_method(_MD("set_use_baked_light","use"),&GridMap::set_use_baked_light);
- ObjectTypeDB::bind_method(_MD("is_using_baked_light","use"),&GridMap::is_using_baked_light);
+ ClassDB::bind_method(_MD("_baked_light_changed"),&GridMap::_baked_light_changed);
+ ClassDB::bind_method(_MD("set_use_baked_light","use"),&GridMap::set_use_baked_light);
+ ClassDB::bind_method(_MD("is_using_baked_light","use"),&GridMap::is_using_baked_light);
- ObjectTypeDB::bind_method(_MD("_get_baked_light_meshes"),&GridMap::_get_baked_light_meshes);
+ ClassDB::bind_method(_MD("_get_baked_light_meshes"),&GridMap::_get_baked_light_meshes);
- ObjectTypeDB::set_method_flags("GridMap","bake_geometry",METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
+ ClassDB::set_method_flags("GridMap","bake_geometry",METHOD_FLAGS_DEFAULT|METHOD_FLAG_EDITOR);
- ObjectTypeDB::bind_method(_MD("clear"),&GridMap::clear);
+ ClassDB::bind_method(_MD("clear"),&GridMap::clear);
BIND_CONSTANT( INVALID_CELL_ITEM );
diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h
index 3863c337b3..934e9382b3 100644
--- a/modules/gridmap/grid_map.h
+++ b/modules/gridmap/grid_map.h
@@ -44,7 +44,7 @@ class BakedLightInstance;
class GridMap : public Spatial {
- OBJ_TYPE( GridMap, Spatial );
+ GDCLASS( GridMap, Spatial );
enum {
MAP_DIRTY_TRANSFORMS=1,
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 246f2eecc9..eb712e49cb 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -1181,15 +1181,15 @@ void GridMapEditor::_floor_changed(float p_value) {
void GridMapEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&GridMapEditor::_menu_option);
- ObjectTypeDB::bind_method("_configure",&GridMapEditor::_configure);
- ObjectTypeDB::bind_method("_item_selected_cbk",&GridMapEditor::_item_selected_cbk);
- ObjectTypeDB::bind_method("_edit_mode_changed",&GridMapEditor::_edit_mode_changed);
- ObjectTypeDB::bind_method("_area_renamed",&GridMapEditor::_area_renamed);
- ObjectTypeDB::bind_method("_area_selected",&GridMapEditor::_area_selected);
- ObjectTypeDB::bind_method("_floor_changed",&GridMapEditor::_floor_changed);
-
- ObjectTypeDB::bind_method(_MD("_set_display_mode","mode"), &GridMapEditor::_set_display_mode);
+ ClassDB::bind_method("_menu_option",&GridMapEditor::_menu_option);
+ ClassDB::bind_method("_configure",&GridMapEditor::_configure);
+ ClassDB::bind_method("_item_selected_cbk",&GridMapEditor::_item_selected_cbk);
+ ClassDB::bind_method("_edit_mode_changed",&GridMapEditor::_edit_mode_changed);
+ ClassDB::bind_method("_area_renamed",&GridMapEditor::_area_renamed);
+ ClassDB::bind_method("_area_selected",&GridMapEditor::_area_selected);
+ ClassDB::bind_method("_floor_changed",&GridMapEditor::_floor_changed);
+
+ ClassDB::bind_method(_MD("_set_display_mode","mode"), &GridMapEditor::_set_display_mode);
}
@@ -1480,7 +1480,7 @@ void GridMapEditorPlugin::edit(Object *p_object) {
bool GridMapEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("GridMap");
+ return p_object->is_class("GridMap");
}
void GridMapEditorPlugin::make_visible(bool p_visible) {
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index 34ced7b13b..2c0ff99dc6 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -40,7 +40,7 @@
class SpatialEditorPlugin;
class GridMapEditor : public VBoxContainer {
- OBJ_TYPE(GridMapEditor, VBoxContainer );
+ GDCLASS(GridMapEditor, VBoxContainer );
enum {
@@ -238,7 +238,7 @@ public:
class GridMapEditorPlugin : public EditorPlugin {
- OBJ_TYPE( GridMapEditorPlugin, EditorPlugin );
+ GDCLASS( GridMapEditorPlugin, EditorPlugin );
GridMapEditor *gridmap_editor;
EditorNode *editor;
diff --git a/modules/gridmap/register_types.cpp b/modules/gridmap/register_types.cpp
index 284d59a689..b4a0d3b0b7 100644
--- a/modules/gridmap/register_types.cpp
+++ b/modules/gridmap/register_types.cpp
@@ -36,7 +36,7 @@
void register_gridmap_types() {
#ifndef _3D_DISABLED
- ObjectTypeDB::register_type<GridMap>();
+ ClassDB::register_class<GridMap>();
#ifdef TOOLS_ENABLED
EditorPlugins::add_by_type<GridMapEditorPlugin>();
#endif
diff --git a/modules/mpc/audio_stream_mpc.cpp b/modules/mpc/audio_stream_mpc.cpp
index befb8ea291..d8572d3b5d 100644
--- a/modules/mpc/audio_stream_mpc.cpp
+++ b/modules/mpc/audio_stream_mpc.cpp
@@ -351,8 +351,8 @@ void AudioStreamPlaybackMPC::seek_pos(float p_time) {
void AudioStreamPlaybackMPC::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_file","name"),&AudioStreamPlaybackMPC::set_file);
- ObjectTypeDB::bind_method(_MD("get_file"),&AudioStreamPlaybackMPC::get_file);
+ ClassDB::bind_method(_MD("set_file","name"),&AudioStreamPlaybackMPC::set_file);
+ ClassDB::bind_method(_MD("get_file"),&AudioStreamPlaybackMPC::get_file);
ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"file",PROPERTY_HINT_FILE,"mpc"), _SCS("set_file"), _SCS("get_file"));
diff --git a/modules/mpc/audio_stream_mpc.h b/modules/mpc/audio_stream_mpc.h
index 9430f752ff..e7d677aa8c 100644
--- a/modules/mpc/audio_stream_mpc.h
+++ b/modules/mpc/audio_stream_mpc.h
@@ -38,7 +38,7 @@
class AudioStreamPlaybackMPC : public AudioStreamPlayback {
- OBJ_TYPE( AudioStreamPlaybackMPC, AudioStreamPlayback );
+ GDCLASS( AudioStreamPlaybackMPC, AudioStreamPlayback );
bool preload;
FileAccess *f;
@@ -118,7 +118,7 @@ public:
class AudioStreamMPC : public AudioStream {
- OBJ_TYPE( AudioStreamMPC, AudioStream );
+ GDCLASS( AudioStreamMPC, AudioStream );
String file;
public:
diff --git a/modules/mpc/register_types.cpp b/modules/mpc/register_types.cpp
index 7e962804b5..df058916bb 100644
--- a/modules/mpc/register_types.cpp
+++ b/modules/mpc/register_types.cpp
@@ -36,7 +36,7 @@ void register_mpc_types() {
mpc_stream_loader=memnew( ResourceFormatLoaderAudioStreamMPC );
ResourceLoader::add_resource_format_loader(mpc_stream_loader);
- ObjectTypeDB::register_type<AudioStreamMPC>();
+ ClassDB::register_class<AudioStreamMPC>();
}
void unregister_mpc_types() {
diff --git a/modules/openssl/register_types.cpp b/modules/openssl/register_types.cpp
index e92d9a8c7b..6cc9fa3669 100644
--- a/modules/openssl/register_types.cpp
+++ b/modules/openssl/register_types.cpp
@@ -32,7 +32,7 @@
void register_openssl_types() {
- ObjectTypeDB::register_type<StreamPeerOpenSSL>();
+ ClassDB::register_class<StreamPeerOpenSSL>();
StreamPeerOpenSSL::initialize_ssl();
}
diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h
index 68e15f188b..5093456ccd 100644
--- a/modules/opus/audio_stream_opus.h
+++ b/modules/opus/audio_stream_opus.h
@@ -40,7 +40,7 @@
class AudioStreamPlaybackOpus : public AudioStreamPlayback {
- OBJ_TYPE(AudioStreamPlaybackOpus,AudioStreamPlayback)
+ GDCLASS(AudioStreamPlaybackOpus,AudioStreamPlayback)
enum {
MIN_MIX=1024
@@ -115,7 +115,7 @@ public:
class AudioStreamOpus: public AudioStream {
- OBJ_TYPE(AudioStreamOpus,AudioStream)
+ GDCLASS(AudioStreamOpus,AudioStream)
String file;
public:
diff --git a/modules/opus/register_types.cpp b/modules/opus/register_types.cpp
index 9d9a707994..a177bc9463 100644
--- a/modules/opus/register_types.cpp
+++ b/modules/opus/register_types.cpp
@@ -36,7 +36,7 @@ void register_opus_types() {
opus_stream_loader = memnew( ResourceFormatLoaderAudioStreamOpus );
ResourceLoader::add_resource_format_loader(opus_stream_loader);
- ObjectTypeDB::register_type<AudioStreamOpus>();
+ ClassDB::register_class<AudioStreamOpus>();
}
void unregister_opus_types() {
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index b650d5687d..0b07e05410 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -180,7 +180,7 @@ void ResourceFormatPVR::get_recognized_extensions(List<String> *p_extensions) co
}
bool ResourceFormatPVR::handles_type(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Texture");
+ return ClassDB::is_parent_class(p_type,"Texture");
}
String ResourceFormatPVR::get_resource_type(const String &p_path) const {
diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp
index c7ce2884a1..e67040b5a3 100644
--- a/modules/regex/regex.cpp
+++ b/modules/regex/regex.cpp
@@ -1481,26 +1481,26 @@ RegEx::~RegEx() {
void RegExMatch::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("expand","template"),&RegExMatch::expand);
- ObjectTypeDB::bind_method(_MD("get_group_count"),&RegExMatch::get_group_count);
- ObjectTypeDB::bind_method(_MD("get_group_array"),&RegExMatch::get_group_array);
- ObjectTypeDB::bind_method(_MD("get_names"),&RegExMatch::get_names);
- ObjectTypeDB::bind_method(_MD("get_name_dict"),&RegExMatch::get_name_dict);
- ObjectTypeDB::bind_method(_MD("get_string","name"),&RegExMatch::get_string, DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_start","name"),&RegExMatch::get_start, DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("get_end","name"),&RegExMatch::get_end, DEFVAL(0));
+ ClassDB::bind_method(_MD("expand","template"),&RegExMatch::expand);
+ ClassDB::bind_method(_MD("get_group_count"),&RegExMatch::get_group_count);
+ ClassDB::bind_method(_MD("get_group_array"),&RegExMatch::get_group_array);
+ ClassDB::bind_method(_MD("get_names"),&RegExMatch::get_names);
+ ClassDB::bind_method(_MD("get_name_dict"),&RegExMatch::get_name_dict);
+ ClassDB::bind_method(_MD("get_string","name"),&RegExMatch::get_string, DEFVAL(0));
+ ClassDB::bind_method(_MD("get_start","name"),&RegExMatch::get_start, DEFVAL(0));
+ ClassDB::bind_method(_MD("get_end","name"),&RegExMatch::get_end, DEFVAL(0));
}
void RegEx::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("clear"),&RegEx::clear);
- ObjectTypeDB::bind_method(_MD("compile","pattern"),&RegEx::compile);
- ObjectTypeDB::bind_method(_MD("search","text","start","end"),&RegEx::search, DEFVAL(0), DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("sub","text","replacement","all","start","end"),&RegEx::sub, DEFVAL(false), DEFVAL(0), DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("is_valid"),&RegEx::is_valid);
- ObjectTypeDB::bind_method(_MD("get_pattern"),&RegEx::get_pattern);
- ObjectTypeDB::bind_method(_MD("get_group_count"),&RegEx::get_group_count);
- ObjectTypeDB::bind_method(_MD("get_names"),&RegEx::get_names);
+ ClassDB::bind_method(_MD("clear"),&RegEx::clear);
+ ClassDB::bind_method(_MD("compile","pattern"),&RegEx::compile);
+ ClassDB::bind_method(_MD("search","text","start","end"),&RegEx::search, DEFVAL(0), DEFVAL(-1));
+ ClassDB::bind_method(_MD("sub","text","replacement","all","start","end"),&RegEx::sub, DEFVAL(false), DEFVAL(0), DEFVAL(-1));
+ ClassDB::bind_method(_MD("is_valid"),&RegEx::is_valid);
+ ClassDB::bind_method(_MD("get_pattern"),&RegEx::get_pattern);
+ ClassDB::bind_method(_MD("get_group_count"),&RegEx::get_group_count);
+ ClassDB::bind_method(_MD("get_names"),&RegEx::get_names);
ADD_PROPERTY(PropertyInfo(Variant::STRING, "pattern"), _SCS("compile"), _SCS("get_pattern"));
}
diff --git a/modules/regex/regex.h b/modules/regex/regex.h
index 08b0bebdcd..193d818da3 100644
--- a/modules/regex/regex.h
+++ b/modules/regex/regex.h
@@ -40,7 +40,7 @@ class RegExNode;
class RegExMatch : public Reference {
- OBJ_TYPE(RegExMatch, Reference);
+ GDCLASS(RegExMatch, Reference);
struct Group {
Variant name;
@@ -80,7 +80,7 @@ public:
class RegEx : public Resource {
- OBJ_TYPE(RegEx, Resource);
+ GDCLASS(RegEx, Resource);
RegExNode* root;
Vector<Variant> group_names;
diff --git a/modules/regex/register_types.cpp b/modules/regex/register_types.cpp
index b3f56cd924..d44c7e563c 100644
--- a/modules/regex/register_types.cpp
+++ b/modules/regex/register_types.cpp
@@ -33,8 +33,8 @@
void register_regex_types() {
- ObjectTypeDB::register_type<RegExMatch>();
- ObjectTypeDB::register_type<RegEx>();
+ ClassDB::register_class<RegExMatch>();
+ ClassDB::register_class<RegEx>();
}
void unregister_regex_types() {
diff --git a/modules/theora/register_types.cpp b/modules/theora/register_types.cpp
index 043498a230..58f63465c9 100644
--- a/modules/theora/register_types.cpp
+++ b/modules/theora/register_types.cpp
@@ -36,7 +36,7 @@ void register_theora_types() {
theora_stream_loader = memnew( ResourceFormatLoaderVideoStreamTheora );
ResourceLoader::add_resource_format_loader(theora_stream_loader);
- ObjectTypeDB::register_type<VideoStreamTheora>();
+ ClassDB::register_class<VideoStreamTheora>();
}
void unregister_theora_types() {
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index afb8fc9860..bff9d2538d 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -43,7 +43,7 @@
class VideoStreamPlaybackTheora : public VideoStreamPlayback {
- OBJ_TYPE(VideoStreamPlaybackTheora, VideoStreamPlayback);
+ GDCLASS(VideoStreamPlaybackTheora, VideoStreamPlayback);
enum {
MAX_FRAMES = 4,
@@ -165,7 +165,7 @@ public:
class VideoStreamTheora : public VideoStream {
- OBJ_TYPE(VideoStreamTheora,VideoStream);
+ GDCLASS(VideoStreamTheora,VideoStream);
String file;
int audio_track;
diff --git a/modules/visual_script/register_types.cpp b/modules/visual_script/register_types.cpp
index 793cc7288b..79bf3d50b2 100644
--- a/modules/visual_script/register_types.cpp
+++ b/modules/visual_script/register_types.cpp
@@ -48,58 +48,58 @@ void register_visual_script_types() {
//script_language_gd->init();
ScriptServer::register_language(visual_script_language);
- ObjectTypeDB::register_type<VisualScript>();
- ObjectTypeDB::register_virtual_type<VisualScriptNode>();
- ObjectTypeDB::register_virtual_type<VisualScriptFunctionState>();
- ObjectTypeDB::register_type<VisualScriptFunction>();
- ObjectTypeDB::register_type<VisualScriptOperator>();
- ObjectTypeDB::register_type<VisualScriptVariableSet>();
- ObjectTypeDB::register_type<VisualScriptVariableGet>();
- ObjectTypeDB::register_type<VisualScriptConstant>();
- ObjectTypeDB::register_type<VisualScriptIndexGet>();
- ObjectTypeDB::register_type<VisualScriptIndexSet>();
- ObjectTypeDB::register_type<VisualScriptGlobalConstant>();
- ObjectTypeDB::register_type<VisualScriptClassConstant>();
- ObjectTypeDB::register_type<VisualScriptMathConstant>();
- ObjectTypeDB::register_type<VisualScriptBasicTypeConstant>();
- ObjectTypeDB::register_type<VisualScriptEngineSingleton>();
- ObjectTypeDB::register_type<VisualScriptSceneNode>();
- ObjectTypeDB::register_type<VisualScriptSceneTree>();
- ObjectTypeDB::register_type<VisualScriptResourcePath>();
- ObjectTypeDB::register_type<VisualScriptSelf>();
- ObjectTypeDB::register_type<VisualScriptCustomNode>();
- ObjectTypeDB::register_type<VisualScriptSubCall>();
- ObjectTypeDB::register_type<VisualScriptComment>();
- ObjectTypeDB::register_type<VisualScriptConstructor>();
- ObjectTypeDB::register_type<VisualScriptLocalVar>();
- ObjectTypeDB::register_type<VisualScriptLocalVarSet>();
- ObjectTypeDB::register_type<VisualScriptInputAction>();
- ObjectTypeDB::register_type<VisualScriptDeconstruct>();
- ObjectTypeDB::register_type<VisualScriptPreload>();
- ObjectTypeDB::register_type<VisualScriptTypeCast>();
-
-
- ObjectTypeDB::register_type<VisualScriptFunctionCall>();
- ObjectTypeDB::register_type<VisualScriptPropertySet>();
- ObjectTypeDB::register_type<VisualScriptPropertyGet>();
-// ObjectTypeDB::register_type<VisualScriptScriptCall>();
- ObjectTypeDB::register_type<VisualScriptEmitSignal>();
-
- ObjectTypeDB::register_type<VisualScriptReturn>();
- ObjectTypeDB::register_type<VisualScriptCondition>();
- ObjectTypeDB::register_type<VisualScriptWhile>();
- ObjectTypeDB::register_type<VisualScriptIterator>();
- ObjectTypeDB::register_type<VisualScriptSequence>();
- ObjectTypeDB::register_type<VisualScriptInputFilter>();
- ObjectTypeDB::register_type<VisualScriptSwitch >();
-
- ObjectTypeDB::register_type<VisualScriptYield>();
- ObjectTypeDB::register_type<VisualScriptYieldSignal>();
-
- ObjectTypeDB::register_type<VisualScriptBuiltinFunc>();
-
-
- ObjectTypeDB::register_type<VisualScriptExpression>();
+ ClassDB::register_class<VisualScript>();
+ ClassDB::register_virtual_class<VisualScriptNode>();
+ ClassDB::register_virtual_class<VisualScriptFunctionState>();
+ ClassDB::register_class<VisualScriptFunction>();
+ ClassDB::register_class<VisualScriptOperator>();
+ ClassDB::register_class<VisualScriptVariableSet>();
+ ClassDB::register_class<VisualScriptVariableGet>();
+ ClassDB::register_class<VisualScriptConstant>();
+ ClassDB::register_class<VisualScriptIndexGet>();
+ ClassDB::register_class<VisualScriptIndexSet>();
+ ClassDB::register_class<VisualScriptGlobalConstant>();
+ ClassDB::register_class<VisualScriptClassConstant>();
+ ClassDB::register_class<VisualScriptMathConstant>();
+ ClassDB::register_class<VisualScriptBasicTypeConstant>();
+ ClassDB::register_class<VisualScriptEngineSingleton>();
+ ClassDB::register_class<VisualScriptSceneNode>();
+ ClassDB::register_class<VisualScriptSceneTree>();
+ ClassDB::register_class<VisualScriptResourcePath>();
+ ClassDB::register_class<VisualScriptSelf>();
+ ClassDB::register_class<VisualScriptCustomNode>();
+ ClassDB::register_class<VisualScriptSubCall>();
+ ClassDB::register_class<VisualScriptComment>();
+ ClassDB::register_class<VisualScriptConstructor>();
+ ClassDB::register_class<VisualScriptLocalVar>();
+ ClassDB::register_class<VisualScriptLocalVarSet>();
+ ClassDB::register_class<VisualScriptInputAction>();
+ ClassDB::register_class<VisualScriptDeconstruct>();
+ ClassDB::register_class<VisualScriptPreload>();
+ ClassDB::register_class<VisualScriptTypeCast>();
+
+
+ ClassDB::register_class<VisualScriptFunctionCall>();
+ ClassDB::register_class<VisualScriptPropertySet>();
+ ClassDB::register_class<VisualScriptPropertyGet>();
+// ClassDB::register_type<VisualScriptScriptCall>();
+ ClassDB::register_class<VisualScriptEmitSignal>();
+
+ ClassDB::register_class<VisualScriptReturn>();
+ ClassDB::register_class<VisualScriptCondition>();
+ ClassDB::register_class<VisualScriptWhile>();
+ ClassDB::register_class<VisualScriptIterator>();
+ ClassDB::register_class<VisualScriptSequence>();
+ ClassDB::register_class<VisualScriptInputFilter>();
+ ClassDB::register_class<VisualScriptSwitch >();
+
+ ClassDB::register_class<VisualScriptYield>();
+ ClassDB::register_class<VisualScriptYieldSignal>();
+
+ ClassDB::register_class<VisualScriptBuiltinFunc>();
+
+
+ ClassDB::register_class<VisualScriptExpression>();
register_visual_script_nodes();
register_visual_script_func_nodes();
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index bd042c8989..64b949bb6f 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -104,11 +104,11 @@ Array VisualScriptNode::_get_default_input_values() const {
void VisualScriptNode::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_visual_script:VisualScript"),&VisualScriptNode::get_visual_script);
- ObjectTypeDB::bind_method(_MD("set_default_input_value","port_idx","value:Variant"),&VisualScriptNode::set_default_input_value);
- ObjectTypeDB::bind_method(_MD("get_default_input_value:Variant","port_idx"),&VisualScriptNode::get_default_input_value);
- ObjectTypeDB::bind_method(_MD("_set_default_input_values","values"),&VisualScriptNode::_set_default_input_values);
- ObjectTypeDB::bind_method(_MD("_get_default_input_values"),&VisualScriptNode::_get_default_input_values);
+ ClassDB::bind_method(_MD("get_visual_script:VisualScript"),&VisualScriptNode::get_visual_script);
+ ClassDB::bind_method(_MD("set_default_input_value","port_idx","value:Variant"),&VisualScriptNode::set_default_input_value);
+ ClassDB::bind_method(_MD("get_default_input_value:Variant","port_idx"),&VisualScriptNode::get_default_input_value);
+ ClassDB::bind_method(_MD("_set_default_input_values","values"),&VisualScriptNode::_set_default_input_values);
+ ClassDB::bind_method(_MD("_get_default_input_values"),&VisualScriptNode::_get_default_input_values);
ADD_PROPERTY(PropertyInfo(Variant::ARRAY,"_default_input_values",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_default_input_values"),_SCS("_get_default_input_values"));
ADD_SIGNAL(MethodInfo("ports_changed"));
@@ -122,7 +122,7 @@ VisualScriptNode::TypeGuess VisualScriptNode::guess_output_type(TypeGuess* p_inp
tg.type=pinfo.type;
if (pinfo.hint==PROPERTY_HINT_RESOURCE_TYPE) {
- tg.obj_type=pinfo.hint_string;
+ tg.GDCLASS=pinfo.hint_string;
}
return tg;
@@ -1317,63 +1317,63 @@ void VisualScript::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_node_ports_changed"),&VisualScript::_node_ports_changed);
-
- ObjectTypeDB::bind_method(_MD("add_function","name"),&VisualScript::add_function);
- ObjectTypeDB::bind_method(_MD("has_function","name"),&VisualScript::has_function);
- ObjectTypeDB::bind_method(_MD("remove_function","name"),&VisualScript::remove_function);
- ObjectTypeDB::bind_method(_MD("rename_function","name","new_name"),&VisualScript::rename_function);
- ObjectTypeDB::bind_method(_MD("set_function_scroll","ofs"),&VisualScript::set_function_scroll);
- ObjectTypeDB::bind_method(_MD("get_function_scroll"),&VisualScript::get_function_scroll);
-
- ObjectTypeDB::bind_method(_MD("add_node","func","id","node","pos"),&VisualScript::add_node,DEFVAL(Point2()));
- ObjectTypeDB::bind_method(_MD("remove_node","func","id"),&VisualScript::remove_node);
- ObjectTypeDB::bind_method(_MD("get_function_node_id","name"),&VisualScript::get_function_node_id);
-
- ObjectTypeDB::bind_method(_MD("get_node","func","id"),&VisualScript::get_node);
- ObjectTypeDB::bind_method(_MD("has_node","func","id"),&VisualScript::has_node);
- ObjectTypeDB::bind_method(_MD("set_node_pos","func","id","pos"),&VisualScript::set_node_pos);
- ObjectTypeDB::bind_method(_MD("get_node_pos","func","id"),&VisualScript::get_node_pos);
-
- ObjectTypeDB::bind_method(_MD("sequence_connect","func","from_node","from_output","to_node"),&VisualScript::sequence_connect);
- ObjectTypeDB::bind_method(_MD("sequence_disconnect","func","from_node","from_output","to_node"),&VisualScript::sequence_disconnect);
- ObjectTypeDB::bind_method(_MD("has_sequence_connection","func","from_node","from_output","to_node"),&VisualScript::has_sequence_connection);
-
- ObjectTypeDB::bind_method(_MD("data_connect","func","from_node","from_port","to_node","to_port"),&VisualScript::data_connect);
- ObjectTypeDB::bind_method(_MD("data_disconnect","func","from_node","from_port","to_node","to_port"),&VisualScript::data_disconnect);
- ObjectTypeDB::bind_method(_MD("has_data_connection","func","from_node","from_port","to_node","to_port"),&VisualScript::has_data_connection);
-
- ObjectTypeDB::bind_method(_MD("add_variable","name","default_value","export"),&VisualScript::add_variable,DEFVAL(Variant()),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("has_variable","name"),&VisualScript::has_variable);
- ObjectTypeDB::bind_method(_MD("remove_variable","name"),&VisualScript::remove_variable);
- ObjectTypeDB::bind_method(_MD("set_variable_default_value","name","value"),&VisualScript::set_variable_default_value);
- ObjectTypeDB::bind_method(_MD("get_variable_default_value","name"),&VisualScript::get_variable_default_value);
- ObjectTypeDB::bind_method(_MD("set_variable_info","name","value"),&VisualScript::_set_variable_info);
- ObjectTypeDB::bind_method(_MD("get_variable_info","name"),&VisualScript::_get_variable_info);
- ObjectTypeDB::bind_method(_MD("set_variable_export","name","enable"),&VisualScript::set_variable_export);
- ObjectTypeDB::bind_method(_MD("get_variable_export","name"),&VisualScript::get_variable_export);
- ObjectTypeDB::bind_method(_MD("rename_variable","name","new_name"),&VisualScript::rename_variable);
-
- ObjectTypeDB::bind_method(_MD("add_custom_signal","name"),&VisualScript::add_custom_signal);
- ObjectTypeDB::bind_method(_MD("has_custom_signal","name"),&VisualScript::has_custom_signal);
- ObjectTypeDB::bind_method(_MD("custom_signal_add_argument","name","type","argname","index"),&VisualScript::custom_signal_add_argument,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("custom_signal_set_argument_type","name","argidx","type"),&VisualScript::custom_signal_set_argument_type);
- ObjectTypeDB::bind_method(_MD("custom_signal_get_argument_type","name","argidx"),&VisualScript::custom_signal_get_argument_type);
- ObjectTypeDB::bind_method(_MD("custom_signal_set_argument_name","name","argidx","argname"),&VisualScript::custom_signal_set_argument_name);
- ObjectTypeDB::bind_method(_MD("custom_signal_get_argument_name","name","argidx"),&VisualScript::custom_signal_get_argument_name);
- ObjectTypeDB::bind_method(_MD("custom_signal_remove_argument","argidx"),&VisualScript::custom_signal_remove_argument);
- ObjectTypeDB::bind_method(_MD("custom_signal_get_argument_count","name"),&VisualScript::custom_signal_get_argument_count);
- ObjectTypeDB::bind_method(_MD("custom_signal_swap_argument","name","argidx","withidx"),&VisualScript::custom_signal_swap_argument);
- ObjectTypeDB::bind_method(_MD("remove_custom_signal","name"),&VisualScript::remove_custom_signal);
- ObjectTypeDB::bind_method(_MD("rename_custom_signal","name","new_name"),&VisualScript::rename_custom_signal);
-
- //ObjectTypeDB::bind_method(_MD("set_variable_info","name","info"),&VScript::set_variable_info);
- //ObjectTypeDB::bind_method(_MD("get_variable_info","name"),&VScript::set_variable_info);
-
- ObjectTypeDB::bind_method(_MD("set_instance_base_type","type"),&VisualScript::set_instance_base_type);
-
- ObjectTypeDB::bind_method(_MD("_set_data","data"),&VisualScript::_set_data);
- ObjectTypeDB::bind_method(_MD("_get_data"),&VisualScript::_get_data);
+ ClassDB::bind_method(_MD("_node_ports_changed"),&VisualScript::_node_ports_changed);
+
+ ClassDB::bind_method(_MD("add_function","name"),&VisualScript::add_function);
+ ClassDB::bind_method(_MD("has_function","name"),&VisualScript::has_function);
+ ClassDB::bind_method(_MD("remove_function","name"),&VisualScript::remove_function);
+ ClassDB::bind_method(_MD("rename_function","name","new_name"),&VisualScript::rename_function);
+ ClassDB::bind_method(_MD("set_function_scroll","ofs"),&VisualScript::set_function_scroll);
+ ClassDB::bind_method(_MD("get_function_scroll"),&VisualScript::get_function_scroll);
+
+ ClassDB::bind_method(_MD("add_node","func","id","node","pos"),&VisualScript::add_node,DEFVAL(Point2()));
+ ClassDB::bind_method(_MD("remove_node","func","id"),&VisualScript::remove_node);
+ ClassDB::bind_method(_MD("get_function_node_id","name"),&VisualScript::get_function_node_id);
+
+ ClassDB::bind_method(_MD("get_node","func","id"),&VisualScript::get_node);
+ ClassDB::bind_method(_MD("has_node","func","id"),&VisualScript::has_node);
+ ClassDB::bind_method(_MD("set_node_pos","func","id","pos"),&VisualScript::set_node_pos);
+ ClassDB::bind_method(_MD("get_node_pos","func","id"),&VisualScript::get_node_pos);
+
+ ClassDB::bind_method(_MD("sequence_connect","func","from_node","from_output","to_node"),&VisualScript::sequence_connect);
+ ClassDB::bind_method(_MD("sequence_disconnect","func","from_node","from_output","to_node"),&VisualScript::sequence_disconnect);
+ ClassDB::bind_method(_MD("has_sequence_connection","func","from_node","from_output","to_node"),&VisualScript::has_sequence_connection);
+
+ ClassDB::bind_method(_MD("data_connect","func","from_node","from_port","to_node","to_port"),&VisualScript::data_connect);
+ ClassDB::bind_method(_MD("data_disconnect","func","from_node","from_port","to_node","to_port"),&VisualScript::data_disconnect);
+ ClassDB::bind_method(_MD("has_data_connection","func","from_node","from_port","to_node","to_port"),&VisualScript::has_data_connection);
+
+ ClassDB::bind_method(_MD("add_variable","name","default_value","export"),&VisualScript::add_variable,DEFVAL(Variant()),DEFVAL(false));
+ ClassDB::bind_method(_MD("has_variable","name"),&VisualScript::has_variable);
+ ClassDB::bind_method(_MD("remove_variable","name"),&VisualScript::remove_variable);
+ ClassDB::bind_method(_MD("set_variable_default_value","name","value"),&VisualScript::set_variable_default_value);
+ ClassDB::bind_method(_MD("get_variable_default_value","name"),&VisualScript::get_variable_default_value);
+ ClassDB::bind_method(_MD("set_variable_info","name","value"),&VisualScript::_set_variable_info);
+ ClassDB::bind_method(_MD("get_variable_info","name"),&VisualScript::_get_variable_info);
+ ClassDB::bind_method(_MD("set_variable_export","name","enable"),&VisualScript::set_variable_export);
+ ClassDB::bind_method(_MD("get_variable_export","name"),&VisualScript::get_variable_export);
+ ClassDB::bind_method(_MD("rename_variable","name","new_name"),&VisualScript::rename_variable);
+
+ ClassDB::bind_method(_MD("add_custom_signal","name"),&VisualScript::add_custom_signal);
+ ClassDB::bind_method(_MD("has_custom_signal","name"),&VisualScript::has_custom_signal);
+ ClassDB::bind_method(_MD("custom_signal_add_argument","name","type","argname","index"),&VisualScript::custom_signal_add_argument,DEFVAL(-1));
+ ClassDB::bind_method(_MD("custom_signal_set_argument_type","name","argidx","type"),&VisualScript::custom_signal_set_argument_type);
+ ClassDB::bind_method(_MD("custom_signal_get_argument_type","name","argidx"),&VisualScript::custom_signal_get_argument_type);
+ ClassDB::bind_method(_MD("custom_signal_set_argument_name","name","argidx","argname"),&VisualScript::custom_signal_set_argument_name);
+ ClassDB::bind_method(_MD("custom_signal_get_argument_name","name","argidx"),&VisualScript::custom_signal_get_argument_name);
+ ClassDB::bind_method(_MD("custom_signal_remove_argument","argidx"),&VisualScript::custom_signal_remove_argument);
+ ClassDB::bind_method(_MD("custom_signal_get_argument_count","name"),&VisualScript::custom_signal_get_argument_count);
+ ClassDB::bind_method(_MD("custom_signal_swap_argument","name","argidx","withidx"),&VisualScript::custom_signal_swap_argument);
+ ClassDB::bind_method(_MD("remove_custom_signal","name"),&VisualScript::remove_custom_signal);
+ ClassDB::bind_method(_MD("rename_custom_signal","name","new_name"),&VisualScript::rename_custom_signal);
+
+ //ClassDB::bind_method(_MD("set_variable_info","name","info"),&VScript::set_variable_info);
+ //ClassDB::bind_method(_MD("get_variable_info","name"),&VScript::set_variable_info);
+
+ ClassDB::bind_method(_MD("set_instance_base_type","type"),&VisualScript::set_instance_base_type);
+
+ ClassDB::bind_method(_MD("_set_data","data"),&VisualScript::_set_data);
+ ClassDB::bind_method(_MD("_get_data"),&VisualScript::_get_data);
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY,"data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_data"),_SCS("_get_data"));
@@ -1573,7 +1573,7 @@ Variant VisualScriptInstance::_call_internal(const StringName& p_method, void* p
p_pass++; //increment pass
current_node_id=node->get_id();
- VSDEBUG("==========AT NODE: "+itos(current_node_id)+" base: "+node->get_base_node()->get_type());
+ VSDEBUG("==========AT NODE: "+itos(current_node_id)+" base: "+node->get_base_node()->get_class_name());
VSDEBUG("AT STACK POS: "+itos(flow_stack_pos));
@@ -2436,10 +2436,10 @@ Variant VisualScriptFunctionState::resume(Array p_args) {
void VisualScriptFunctionState::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("connect_to_signal","obj","signals","args"),&VisualScriptFunctionState::connect_to_signal);
- ObjectTypeDB::bind_method(_MD("resume:Array","args"),&VisualScriptFunctionState::resume,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("is_valid"),&VisualScriptFunctionState::is_valid);
- ObjectTypeDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"_signal_callback",&VisualScriptFunctionState::_signal_callback,MethodInfo("_signal_callback"));
+ ClassDB::bind_method(_MD("connect_to_signal","obj","signals","args"),&VisualScriptFunctionState::connect_to_signal);
+ ClassDB::bind_method(_MD("resume:Array","args"),&VisualScriptFunctionState::resume,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("is_valid"),&VisualScriptFunctionState::is_valid);
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT,"_signal_callback",&VisualScriptFunctionState::_signal_callback,MethodInfo("_signal_callback"));
}
VisualScriptFunctionState::VisualScriptFunctionState() {
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index 63b018b0c2..340db21c32 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -9,7 +9,7 @@ class VisualScriptNodeInstance;
class VisualScript;
class VisualScriptNode : public Resource {
- OBJ_TYPE(VisualScriptNode,Resource)
+ GDCLASS(VisualScriptNode,Resource)
friend class VisualScript;
@@ -64,7 +64,7 @@ public:
Variant::Type type;
InputEvent::Type ev_type;
- StringName obj_type;
+ StringName GDCLASS;
Ref<Script> script;
TypeGuess() { type=Variant::NIL; ev_type=InputEvent::NONE; }
@@ -143,7 +143,7 @@ public:
class VisualScript : public Script {
- OBJ_TYPE( VisualScript, Script )
+ GDCLASS( VisualScript, Script )
RES_BASE_EXTENSION("vs");
@@ -437,7 +437,7 @@ public:
class VisualScriptFunctionState : public Reference {
- OBJ_TYPE(VisualScriptFunctionState,Reference);
+ GDCLASS(VisualScriptFunctionState,Reference);
friend class VisualScriptInstance;
ObjectID instance_id;
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index 2bfb6bc9ea..58dbfbc5ad 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -981,7 +981,7 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func,const Variant** p_inp
case VisualScriptBuiltinFunc::TYPE_EXISTS: {
- *r_return = ObjectTypeDB::type_exists(*p_inputs[0]);
+ *r_return = ClassDB::class_exists(*p_inputs[0]);
} break;
case VisualScriptBuiltinFunc::TEXT_CHAR: {
@@ -1145,8 +1145,8 @@ VisualScriptNodeInstance* VisualScriptBuiltinFunc::instance(VisualScriptInstance
void VisualScriptBuiltinFunc::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_func","which"),&VisualScriptBuiltinFunc::set_func);
- ObjectTypeDB::bind_method(_MD("get_func"),&VisualScriptBuiltinFunc::get_func);
+ ClassDB::bind_method(_MD("set_func","which"),&VisualScriptBuiltinFunc::set_func);
+ ClassDB::bind_method(_MD("get_func"),&VisualScriptBuiltinFunc::get_func);
String cc;
diff --git a/modules/visual_script/visual_script_builtin_funcs.h b/modules/visual_script/visual_script_builtin_funcs.h
index 8b0d70c1ea..fba2099598 100644
--- a/modules/visual_script/visual_script_builtin_funcs.h
+++ b/modules/visual_script/visual_script_builtin_funcs.h
@@ -6,7 +6,7 @@
class VisualScriptBuiltinFunc : public VisualScriptNode {
- OBJ_TYPE(VisualScriptBuiltinFunc,VisualScriptNode)
+ GDCLASS(VisualScriptBuiltinFunc,VisualScriptNode)
public:
enum BuiltinFunc {
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 02d3c453c4..f9285fcf6c 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -11,7 +11,7 @@
#ifdef TOOLS_ENABLED
class VisualScriptEditorSignalEdit : public Object {
- OBJ_TYPE(VisualScriptEditorSignalEdit,Object)
+ GDCLASS(VisualScriptEditorSignalEdit,Object)
StringName sig;
public:
@@ -22,7 +22,7 @@ public:
protected:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_sig_changed",&VisualScriptEditorSignalEdit::_sig_changed);
+ ClassDB::bind_method("_sig_changed",&VisualScriptEditorSignalEdit::_sig_changed);
}
void _sig_changed() {
@@ -160,7 +160,7 @@ public:
class VisualScriptEditorVariableEdit : public Object {
- OBJ_TYPE(VisualScriptEditorVariableEdit,Object)
+ GDCLASS(VisualScriptEditorVariableEdit,Object)
StringName var;
public:
@@ -171,8 +171,8 @@ public:
protected:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_var_changed",&VisualScriptEditorVariableEdit::_var_changed);
- ObjectTypeDB::bind_method("_var_value_changed",&VisualScriptEditorVariableEdit::_var_value_changed);
+ ClassDB::bind_method("_var_changed",&VisualScriptEditorVariableEdit::_var_changed);
+ ClassDB::bind_method("_var_value_changed",&VisualScriptEditorVariableEdit::_var_value_changed);
}
void _var_changed() {
@@ -990,7 +990,7 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
virtuals_in_menu.clear();
List<MethodInfo> mi;
- ObjectTypeDB::get_method_list(script->get_instance_base_type(),&mi);
+ ClassDB::get_method_list(script->get_instance_base_type(),&mi);
for (List<MethodInfo>::Element *E=mi.front();E;E=E->next()) {
MethodInfo mi=E->get();
if (mi.flags&METHOD_FLAG_VIRTUAL) {
@@ -1917,7 +1917,7 @@ void VisualScriptEditor::drop_data_fw(const Point2& p_point,const Variant& p_dat
call.instance();
call->set_call_mode(VisualScriptFunctionCall::CALL_MODE_NODE_PATH);
call->set_base_path(sn->get_path_to(node));;
- call->set_base_type(node->get_type());
+ call->set_base_type(node->get_class());
n=call;
method_select->select_method_from_instance(node);
@@ -1986,7 +1986,7 @@ void VisualScriptEditor::drop_data_fw(const Point2& p_point,const Variant& p_dat
Ref<VisualScriptPropertySet> pset;
pset.instance();
pset->set_call_mode(VisualScriptPropertySet::CALL_MODE_INSTANCE);
- pset->set_base_type(obj->get_type());
+ pset->set_base_type(obj->get_class());
/*if (use_value) {
pset->set_use_builtin_value(true);
pset->set_builtin_value(d["value"]);
@@ -1997,7 +1997,7 @@ void VisualScriptEditor::drop_data_fw(const Point2& p_point,const Variant& p_dat
Ref<VisualScriptPropertyGet> pget;
pget.instance();
pget->set_call_mode(VisualScriptPropertyGet::CALL_MODE_INSTANCE);
- pget->set_base_type(obj->get_type());
+ pget->set_base_type(obj->get_class());
vnode=pget;
@@ -2171,7 +2171,7 @@ String VisualScriptEditor::get_name(){
} else if (script->get_name()!="")
name=script->get_name();
else
- name=script->get_type()+"("+itos(script->get_instance_ID())+")";
+ name=script->get_class()+"("+itos(script->get_instance_ID())+")";
return name;
@@ -2704,7 +2704,7 @@ VisualScriptNode::TypeGuess VisualScriptEditor::_guess_output_type(int p_node,i
if (obj) {
g.type=Variant::OBJECT;
- g.obj_type=obj->get_type();
+ g.GDCLASS=obj->get_class();
g.script=obj->get_script();
}
}
@@ -2745,8 +2745,8 @@ void VisualScriptEditor::_port_action_menu(int p_option) {
if (tg.type==Variant::OBJECT) {
n->set_call_mode(VisualScriptFunctionCall::CALL_MODE_INSTANCE);
- if (tg.obj_type!=StringName()) {
- n->set_base_type(tg.obj_type);
+ if (tg.GDCLASS!=StringName()) {
+ n->set_base_type(tg.GDCLASS);
} else {
n->set_base_type("Object");
}
@@ -2780,8 +2780,8 @@ void VisualScriptEditor::_port_action_menu(int p_option) {
if (tg.type==Variant::OBJECT) {
n->set_call_mode(VisualScriptPropertySet::CALL_MODE_INSTANCE);
- if (tg.obj_type!=StringName()) {
- n->set_base_type(tg.obj_type);
+ if (tg.GDCLASS!=StringName()) {
+ n->set_base_type(tg.GDCLASS);
} else {
n->set_base_type("Object");
}
@@ -2811,8 +2811,8 @@ void VisualScriptEditor::_port_action_menu(int p_option) {
if (tg.type==Variant::OBJECT) {
n->set_call_mode(VisualScriptPropertyGet::CALL_MODE_INSTANCE);
- if (tg.obj_type!=StringName()) {
- n->set_base_type(tg.obj_type);
+ if (tg.GDCLASS!=StringName()) {
+ n->set_base_type(tg.GDCLASS);
} else {
n->set_base_type("Object");
}
@@ -3232,55 +3232,55 @@ void VisualScriptEditor::_menu_option(int p_what) {
void VisualScriptEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_member_button",&VisualScriptEditor::_member_button);
- ObjectTypeDB::bind_method("_member_edited",&VisualScriptEditor::_member_edited);
- ObjectTypeDB::bind_method("_member_selected",&VisualScriptEditor::_member_selected);
- ObjectTypeDB::bind_method("_update_members",&VisualScriptEditor::_update_members);
- ObjectTypeDB::bind_method("_change_base_type",&VisualScriptEditor::_change_base_type);
- ObjectTypeDB::bind_method("_change_base_type_callback",&VisualScriptEditor::_change_base_type_callback);
- ObjectTypeDB::bind_method("_override_pressed",&VisualScriptEditor::_override_pressed);
- ObjectTypeDB::bind_method("_node_selected",&VisualScriptEditor::_node_selected);
- ObjectTypeDB::bind_method("_node_moved",&VisualScriptEditor::_node_moved);
- ObjectTypeDB::bind_method("_move_node",&VisualScriptEditor::_move_node);
- ObjectTypeDB::bind_method("_begin_node_move",&VisualScriptEditor::_begin_node_move);
- ObjectTypeDB::bind_method("_end_node_move",&VisualScriptEditor::_end_node_move);
- ObjectTypeDB::bind_method("_remove_node",&VisualScriptEditor::_remove_node);
- ObjectTypeDB::bind_method("_update_graph",&VisualScriptEditor::_update_graph,DEFVAL(-1));
- ObjectTypeDB::bind_method("_node_ports_changed",&VisualScriptEditor::_node_ports_changed);
- ObjectTypeDB::bind_method("_available_node_doubleclicked",&VisualScriptEditor::_available_node_doubleclicked);
- ObjectTypeDB::bind_method("_default_value_edited",&VisualScriptEditor::_default_value_edited);
- ObjectTypeDB::bind_method("_default_value_changed",&VisualScriptEditor::_default_value_changed);
- ObjectTypeDB::bind_method("_menu_option",&VisualScriptEditor::_menu_option);
- ObjectTypeDB::bind_method("_graph_ofs_changed",&VisualScriptEditor::_graph_ofs_changed);
- ObjectTypeDB::bind_method("_center_on_node",&VisualScriptEditor::_center_on_node);
- ObjectTypeDB::bind_method("_comment_node_resized",&VisualScriptEditor::_comment_node_resized);
- ObjectTypeDB::bind_method("_button_resource_previewed",&VisualScriptEditor::_button_resource_previewed);
- ObjectTypeDB::bind_method("_port_action_menu",&VisualScriptEditor::_port_action_menu);
- ObjectTypeDB::bind_method("_selected_connect_node_method_or_setget",&VisualScriptEditor::_selected_connect_node_method_or_setget);
- ObjectTypeDB::bind_method("_expression_text_changed",&VisualScriptEditor::_expression_text_changed);
-
-
-
-
- ObjectTypeDB::bind_method("get_drag_data_fw",&VisualScriptEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method("can_drop_data_fw",&VisualScriptEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method("drop_data_fw",&VisualScriptEditor::drop_data_fw);
-
- ObjectTypeDB::bind_method("_input",&VisualScriptEditor::_input);
- ObjectTypeDB::bind_method("_on_nodes_delete",&VisualScriptEditor::_on_nodes_delete);
- ObjectTypeDB::bind_method("_on_nodes_duplicate",&VisualScriptEditor::_on_nodes_duplicate);
-
- ObjectTypeDB::bind_method("_hide_timer",&VisualScriptEditor::_hide_timer);
-
- ObjectTypeDB::bind_method("_graph_connected",&VisualScriptEditor::_graph_connected);
- ObjectTypeDB::bind_method("_graph_disconnected",&VisualScriptEditor::_graph_disconnected);
- ObjectTypeDB::bind_method("_graph_connect_to_empty",&VisualScriptEditor::_graph_connect_to_empty);
-
- ObjectTypeDB::bind_method("_update_graph_connections",&VisualScriptEditor::_update_graph_connections);
- ObjectTypeDB::bind_method("_node_filter_changed",&VisualScriptEditor::_node_filter_changed);
-
- ObjectTypeDB::bind_method("_selected_method",&VisualScriptEditor::_selected_method);
- ObjectTypeDB::bind_method("_draw_color_over_button",&VisualScriptEditor::_draw_color_over_button);
+ ClassDB::bind_method("_member_button",&VisualScriptEditor::_member_button);
+ ClassDB::bind_method("_member_edited",&VisualScriptEditor::_member_edited);
+ ClassDB::bind_method("_member_selected",&VisualScriptEditor::_member_selected);
+ ClassDB::bind_method("_update_members",&VisualScriptEditor::_update_members);
+ ClassDB::bind_method("_change_base_type",&VisualScriptEditor::_change_base_type);
+ ClassDB::bind_method("_change_base_type_callback",&VisualScriptEditor::_change_base_type_callback);
+ ClassDB::bind_method("_override_pressed",&VisualScriptEditor::_override_pressed);
+ ClassDB::bind_method("_node_selected",&VisualScriptEditor::_node_selected);
+ ClassDB::bind_method("_node_moved",&VisualScriptEditor::_node_moved);
+ ClassDB::bind_method("_move_node",&VisualScriptEditor::_move_node);
+ ClassDB::bind_method("_begin_node_move",&VisualScriptEditor::_begin_node_move);
+ ClassDB::bind_method("_end_node_move",&VisualScriptEditor::_end_node_move);
+ ClassDB::bind_method("_remove_node",&VisualScriptEditor::_remove_node);
+ ClassDB::bind_method("_update_graph",&VisualScriptEditor::_update_graph,DEFVAL(-1));
+ ClassDB::bind_method("_node_ports_changed",&VisualScriptEditor::_node_ports_changed);
+ ClassDB::bind_method("_available_node_doubleclicked",&VisualScriptEditor::_available_node_doubleclicked);
+ ClassDB::bind_method("_default_value_edited",&VisualScriptEditor::_default_value_edited);
+ ClassDB::bind_method("_default_value_changed",&VisualScriptEditor::_default_value_changed);
+ ClassDB::bind_method("_menu_option",&VisualScriptEditor::_menu_option);
+ ClassDB::bind_method("_graph_ofs_changed",&VisualScriptEditor::_graph_ofs_changed);
+ ClassDB::bind_method("_center_on_node",&VisualScriptEditor::_center_on_node);
+ ClassDB::bind_method("_comment_node_resized",&VisualScriptEditor::_comment_node_resized);
+ ClassDB::bind_method("_button_resource_previewed",&VisualScriptEditor::_button_resource_previewed);
+ ClassDB::bind_method("_port_action_menu",&VisualScriptEditor::_port_action_menu);
+ ClassDB::bind_method("_selected_connect_node_method_or_setget",&VisualScriptEditor::_selected_connect_node_method_or_setget);
+ ClassDB::bind_method("_expression_text_changed",&VisualScriptEditor::_expression_text_changed);
+
+
+
+
+ ClassDB::bind_method("get_drag_data_fw",&VisualScriptEditor::get_drag_data_fw);
+ ClassDB::bind_method("can_drop_data_fw",&VisualScriptEditor::can_drop_data_fw);
+ ClassDB::bind_method("drop_data_fw",&VisualScriptEditor::drop_data_fw);
+
+ ClassDB::bind_method("_input",&VisualScriptEditor::_input);
+ ClassDB::bind_method("_on_nodes_delete",&VisualScriptEditor::_on_nodes_delete);
+ ClassDB::bind_method("_on_nodes_duplicate",&VisualScriptEditor::_on_nodes_duplicate);
+
+ ClassDB::bind_method("_hide_timer",&VisualScriptEditor::_hide_timer);
+
+ ClassDB::bind_method("_graph_connected",&VisualScriptEditor::_graph_connected);
+ ClassDB::bind_method("_graph_disconnected",&VisualScriptEditor::_graph_disconnected);
+ ClassDB::bind_method("_graph_connect_to_empty",&VisualScriptEditor::_graph_connect_to_empty);
+
+ ClassDB::bind_method("_update_graph_connections",&VisualScriptEditor::_update_graph_connections);
+ ClassDB::bind_method("_node_filter_changed",&VisualScriptEditor::_node_filter_changed);
+
+ ClassDB::bind_method("_selected_method",&VisualScriptEditor::_selected_method);
+ ClassDB::bind_method("_draw_color_over_button",&VisualScriptEditor::_draw_color_over_button);
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index 483ae1644c..dbd5d220c2 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -15,7 +15,7 @@ class VisualScriptEditorVariableEdit;
class VisualScriptEditor : public ScriptEditorBase {
- OBJ_TYPE(VisualScriptEditor,ScriptEditorBase)
+ GDCLASS(VisualScriptEditor,ScriptEditorBase)
enum {
TYPE_SEQUENCE=1000,
diff --git a/modules/visual_script/visual_script_expression.h b/modules/visual_script/visual_script_expression.h
index 4edae133c7..a67656a4b1 100644
--- a/modules/visual_script/visual_script_expression.h
+++ b/modules/visual_script/visual_script_expression.h
@@ -6,7 +6,7 @@
class VisualScriptExpression : public VisualScriptNode {
- OBJ_TYPE(VisualScriptExpression,VisualScriptNode)
+ GDCLASS(VisualScriptExpression,VisualScriptNode)
friend class VisualScriptNodeInstanceExpression;
struct Input {
diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp
index 97338da187..606a2f47a8 100644
--- a/modules/visual_script/visual_script_flow_control.cpp
+++ b/modules/visual_script/visual_script_flow_control.cpp
@@ -81,10 +81,10 @@ bool VisualScriptReturn::is_return_value_enabled() const {
void VisualScriptReturn::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_return_type","type"),&VisualScriptReturn::set_return_type);
- ObjectTypeDB::bind_method(_MD("get_return_type"),&VisualScriptReturn::get_return_type);
- ObjectTypeDB::bind_method(_MD("set_enable_return_value","enable"),&VisualScriptReturn::set_enable_return_value);
- ObjectTypeDB::bind_method(_MD("is_return_value_enabled"),&VisualScriptReturn::is_return_value_enabled);
+ ClassDB::bind_method(_MD("set_return_type","type"),&VisualScriptReturn::set_return_type);
+ ClassDB::bind_method(_MD("get_return_type"),&VisualScriptReturn::get_return_type);
+ ClassDB::bind_method(_MD("set_enable_return_value","enable"),&VisualScriptReturn::set_enable_return_value);
+ ClassDB::bind_method(_MD("is_return_value_enabled"),&VisualScriptReturn::is_return_value_enabled);
String argt="Any";
for(int i=1;i<Variant::VARIANT_MAX;i++) {
@@ -544,8 +544,8 @@ int VisualScriptSequence::get_steps() const {
void VisualScriptSequence::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_steps","steps"),&VisualScriptSequence::set_steps);
- ObjectTypeDB::bind_method(_MD("get_steps"),&VisualScriptSequence::get_steps);
+ ClassDB::bind_method(_MD("set_steps","steps"),&VisualScriptSequence::set_steps);
+ ClassDB::bind_method(_MD("get_steps"),&VisualScriptSequence::get_steps);
ADD_PROPERTY(PropertyInfo(Variant::INT,"steps",PROPERTY_HINT_RANGE,"1,64,1"),_SCS("set_steps"),_SCS("get_steps"));
@@ -1869,7 +1869,7 @@ public:
return 1; //not found sorry
}
- if (ObjectTypeDB::is_type(obj->get_type_name(),base_type)) {
+ if (ClassDB::is_parent_class(obj->get_class_name(),base_type)) {
*p_outputs[0]=*p_inputs[0]; //copy
return 0;
} else
@@ -1893,11 +1893,11 @@ VisualScriptNodeInstance* VisualScriptTypeCast::instance(VisualScriptInstance* p
void VisualScriptTypeCast::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_base_type","type"),&VisualScriptTypeCast::set_base_type);
- ObjectTypeDB::bind_method(_MD("get_base_type"),&VisualScriptTypeCast::get_base_type);
+ ClassDB::bind_method(_MD("set_base_type","type"),&VisualScriptTypeCast::set_base_type);
+ ClassDB::bind_method(_MD("get_base_type"),&VisualScriptTypeCast::get_base_type);
- ObjectTypeDB::bind_method(_MD("set_base_script","path"),&VisualScriptTypeCast::set_base_script);
- ObjectTypeDB::bind_method(_MD("get_base_script"),&VisualScriptTypeCast::get_base_script);
+ ClassDB::bind_method(_MD("set_base_script","path"),&VisualScriptTypeCast::set_base_script);
+ ClassDB::bind_method(_MD("get_base_script"),&VisualScriptTypeCast::get_base_script);
List<String> script_extensions;
diff --git a/modules/visual_script/visual_script_flow_control.h b/modules/visual_script/visual_script_flow_control.h
index e0da84a534..26e981cb1e 100644
--- a/modules/visual_script/visual_script_flow_control.h
+++ b/modules/visual_script/visual_script_flow_control.h
@@ -5,7 +5,7 @@
class VisualScriptReturn : public VisualScriptNode {
- OBJ_TYPE(VisualScriptReturn,VisualScriptNode)
+ GDCLASS(VisualScriptReturn,VisualScriptNode)
Variant::Type type;
@@ -48,7 +48,7 @@ public:
class VisualScriptCondition : public VisualScriptNode {
- OBJ_TYPE(VisualScriptCondition,VisualScriptNode)
+ GDCLASS(VisualScriptCondition,VisualScriptNode)
@@ -84,7 +84,7 @@ public:
class VisualScriptWhile : public VisualScriptNode {
- OBJ_TYPE(VisualScriptWhile,VisualScriptNode)
+ GDCLASS(VisualScriptWhile,VisualScriptNode)
@@ -121,7 +121,7 @@ public:
class VisualScriptIterator : public VisualScriptNode {
- OBJ_TYPE(VisualScriptIterator,VisualScriptNode)
+ GDCLASS(VisualScriptIterator,VisualScriptNode)
@@ -158,7 +158,7 @@ public:
class VisualScriptSequence : public VisualScriptNode {
- OBJ_TYPE(VisualScriptSequence,VisualScriptNode)
+ GDCLASS(VisualScriptSequence,VisualScriptNode)
int steps;
@@ -199,7 +199,7 @@ public:
class VisualScriptSwitch : public VisualScriptNode {
- OBJ_TYPE(VisualScriptSwitch,VisualScriptNode)
+ GDCLASS(VisualScriptSwitch,VisualScriptNode)
struct Case {
Variant::Type type;
@@ -248,7 +248,7 @@ public:
class VisualScriptInputFilter : public VisualScriptNode {
- OBJ_TYPE(VisualScriptInputFilter,VisualScriptNode)
+ GDCLASS(VisualScriptInputFilter,VisualScriptNode)
Vector<InputEvent> filters;
@@ -290,7 +290,7 @@ public:
class VisualScriptTypeCast : public VisualScriptNode {
- OBJ_TYPE(VisualScriptTypeCast,VisualScriptNode)
+ GDCLASS(VisualScriptTypeCast,VisualScriptNode)
StringName base_type;
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 5a21cb40e9..f1424af2fe 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -92,7 +92,7 @@ StringName VisualScriptFunctionCall::_get_base_type() const {
else if (call_mode==CALL_MODE_NODE_PATH && get_visual_script().is_valid()) {
Node *path = _get_base_node();
if (path)
- return path->get_type();
+ return path->get_class();
}
@@ -110,7 +110,7 @@ int VisualScriptFunctionCall::get_input_value_port_count() const{
} else {
- MethodBind *mb = ObjectTypeDB::get_method(_get_base_type(),function);
+ MethodBind *mb = ClassDB::get_method(_get_base_type(),function);
if (mb) {
return mb->get_argument_count() + (call_mode==CALL_MODE_INSTANCE?1:0) + (rpc_call_mode>=RPC_RELIABLE_TO_ID?1:0) - use_default_args;
}
@@ -129,7 +129,7 @@ int VisualScriptFunctionCall::get_output_value_port_count() const{
} else {
int ret;
- MethodBind *mb = ObjectTypeDB::get_method(_get_base_type(),function);
+ MethodBind *mb = ClassDB::get_method(_get_base_type(),function);
if (mb) {
ret = mb->has_return() ? 1 : 0;
} else
@@ -182,7 +182,7 @@ PropertyInfo VisualScriptFunctionCall::get_input_value_port_info(int p_idx) cons
} else {
- MethodBind *mb = ObjectTypeDB::get_method(_get_base_type(),function);
+ MethodBind *mb = ClassDB::get_method(_get_base_type(),function);
if (mb) {
return mb->get_argument_info(p_idx);
}
@@ -220,7 +220,7 @@ PropertyInfo VisualScriptFunctionCall::get_output_value_port_info(int p_idx) con
PropertyInfo ret;
- /*MethodBind *mb = ObjectTypeDB::get_method(_get_base_type(),function);
+ /*MethodBind *mb = ClassDB::get_method(_get_base_type(),function);
if (mb) {
ret = mb->get_argument_info(-1);
@@ -334,7 +334,7 @@ void VisualScriptFunctionCall::set_singleton(const StringName& p_path) {
singleton=p_path;
Object *obj = Globals::get_singleton()->get_singleton_object(singleton);
if (obj) {
- base_type=obj->get_type();
+ base_type=obj->get_class();
}
_change_notify();
@@ -356,7 +356,7 @@ void VisualScriptFunctionCall::_update_method_cache() {
Node* node=_get_base_node();
if (node) {
- type=node->get_type();
+ type=node->get_class();
base_type=type; //cache, too
script = node->get_script();
}
@@ -372,7 +372,7 @@ void VisualScriptFunctionCall::_update_method_cache() {
Object *obj = Globals::get_singleton()->get_singleton_object(singleton);
if (obj) {
- type=obj->get_type();
+ type=obj->get_class();
script=obj->get_script();
}
@@ -397,7 +397,7 @@ void VisualScriptFunctionCall::_update_method_cache() {
// print_line("BASE: "+String(type)+" FUNC: "+String(function));
- MethodBind *mb = ObjectTypeDB::get_method(type,function);
+ MethodBind *mb = ClassDB::get_method(type,function);
if (mb) {
use_default_args=mb->get_default_argument_count();
method_cache = MethodInfo();
@@ -661,7 +661,7 @@ void VisualScriptFunctionCall::_validate_property(PropertyInfo& property) const
mc = Variant::get_method_default_arguments(basic_type,function).size();
} else {
- MethodBind *mb = ObjectTypeDB::get_method(_get_base_type(),function);
+ MethodBind *mb = ClassDB::get_method(_get_base_type(),function);
if (mb) {
mc=mb->get_default_argument_count();
@@ -687,38 +687,38 @@ void VisualScriptFunctionCall::_validate_property(PropertyInfo& property) const
void VisualScriptFunctionCall::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_base_type","base_type"),&VisualScriptFunctionCall::set_base_type);
- ObjectTypeDB::bind_method(_MD("get_base_type"),&VisualScriptFunctionCall::get_base_type);
+ ClassDB::bind_method(_MD("set_base_type","base_type"),&VisualScriptFunctionCall::set_base_type);
+ ClassDB::bind_method(_MD("get_base_type"),&VisualScriptFunctionCall::get_base_type);
- ObjectTypeDB::bind_method(_MD("set_base_script","base_script"),&VisualScriptFunctionCall::set_base_script);
- ObjectTypeDB::bind_method(_MD("get_base_script"),&VisualScriptFunctionCall::get_base_script);
+ ClassDB::bind_method(_MD("set_base_script","base_script"),&VisualScriptFunctionCall::set_base_script);
+ ClassDB::bind_method(_MD("get_base_script"),&VisualScriptFunctionCall::get_base_script);
- ObjectTypeDB::bind_method(_MD("set_basic_type","basic_type"),&VisualScriptFunctionCall::set_basic_type);
- ObjectTypeDB::bind_method(_MD("get_basic_type"),&VisualScriptFunctionCall::get_basic_type);
+ ClassDB::bind_method(_MD("set_basic_type","basic_type"),&VisualScriptFunctionCall::set_basic_type);
+ ClassDB::bind_method(_MD("get_basic_type"),&VisualScriptFunctionCall::get_basic_type);
- ObjectTypeDB::bind_method(_MD("set_singleton","singleton"),&VisualScriptFunctionCall::set_singleton);
- ObjectTypeDB::bind_method(_MD("get_singleton"),&VisualScriptFunctionCall::get_singleton);
+ ClassDB::bind_method(_MD("set_singleton","singleton"),&VisualScriptFunctionCall::set_singleton);
+ ClassDB::bind_method(_MD("get_singleton"),&VisualScriptFunctionCall::get_singleton);
- ObjectTypeDB::bind_method(_MD("set_function","function"),&VisualScriptFunctionCall::set_function);
- ObjectTypeDB::bind_method(_MD("get_function"),&VisualScriptFunctionCall::get_function);
+ ClassDB::bind_method(_MD("set_function","function"),&VisualScriptFunctionCall::set_function);
+ ClassDB::bind_method(_MD("get_function"),&VisualScriptFunctionCall::get_function);
- ObjectTypeDB::bind_method(_MD("set_call_mode","mode"),&VisualScriptFunctionCall::set_call_mode);
- ObjectTypeDB::bind_method(_MD("get_call_mode"),&VisualScriptFunctionCall::get_call_mode);
+ ClassDB::bind_method(_MD("set_call_mode","mode"),&VisualScriptFunctionCall::set_call_mode);
+ ClassDB::bind_method(_MD("get_call_mode"),&VisualScriptFunctionCall::get_call_mode);
- ObjectTypeDB::bind_method(_MD("set_base_path","base_path"),&VisualScriptFunctionCall::set_base_path);
- ObjectTypeDB::bind_method(_MD("get_base_path"),&VisualScriptFunctionCall::get_base_path);
+ ClassDB::bind_method(_MD("set_base_path","base_path"),&VisualScriptFunctionCall::set_base_path);
+ ClassDB::bind_method(_MD("get_base_path"),&VisualScriptFunctionCall::get_base_path);
- ObjectTypeDB::bind_method(_MD("set_use_default_args","amount"),&VisualScriptFunctionCall::set_use_default_args);
- ObjectTypeDB::bind_method(_MD("get_use_default_args"),&VisualScriptFunctionCall::get_use_default_args);
+ ClassDB::bind_method(_MD("set_use_default_args","amount"),&VisualScriptFunctionCall::set_use_default_args);
+ ClassDB::bind_method(_MD("get_use_default_args"),&VisualScriptFunctionCall::get_use_default_args);
- ObjectTypeDB::bind_method(_MD("_set_argument_cache","argument_cache"),&VisualScriptFunctionCall::_set_argument_cache);
- ObjectTypeDB::bind_method(_MD("_get_argument_cache"),&VisualScriptFunctionCall::_get_argument_cache);
+ ClassDB::bind_method(_MD("_set_argument_cache","argument_cache"),&VisualScriptFunctionCall::_set_argument_cache);
+ ClassDB::bind_method(_MD("_get_argument_cache"),&VisualScriptFunctionCall::_get_argument_cache);
- ObjectTypeDB::bind_method(_MD("set_rpc_call_mode","mode"),&VisualScriptFunctionCall::set_rpc_call_mode);
- ObjectTypeDB::bind_method(_MD("get_rpc_call_mode"),&VisualScriptFunctionCall::get_rpc_call_mode);
+ ClassDB::bind_method(_MD("set_rpc_call_mode","mode"),&VisualScriptFunctionCall::set_rpc_call_mode);
+ ClassDB::bind_method(_MD("get_rpc_call_mode"),&VisualScriptFunctionCall::get_rpc_call_mode);
- ObjectTypeDB::bind_method(_MD("set_validate","enable"),&VisualScriptFunctionCall::set_validate);
- ObjectTypeDB::bind_method(_MD("get_validate"),&VisualScriptFunctionCall::get_validate);
+ ClassDB::bind_method(_MD("set_validate","enable"),&VisualScriptFunctionCall::set_validate);
+ ClassDB::bind_method(_MD("get_validate"),&VisualScriptFunctionCall::get_validate);
String bt;
for(int i=0;i<Variant::VARIANT_MAX;i++) {
@@ -1034,7 +1034,7 @@ StringName VisualScriptPropertySet::_get_base_type() const {
else if (call_mode==CALL_MODE_NODE_PATH && get_visual_script().is_valid()) {
Node *path = _get_base_node();
if (path)
- return path->get_type();
+ return path->get_class();
}
@@ -1122,7 +1122,7 @@ void VisualScriptPropertySet::_update_base_type() {
Node* node=_get_base_node();
if (node) {
- base_type=node->get_type();
+ base_type=node->get_class();
}
} else if (call_mode==CALL_MODE_SELF) {
@@ -1247,7 +1247,7 @@ void VisualScriptPropertySet::_update_cache() {
node=_get_base_node();
if (node) {
- type=node->get_type();
+ type=node->get_class();
base_type=type; //cache, too
script = node->get_script();
}
@@ -1284,7 +1284,7 @@ void VisualScriptPropertySet::_update_cache() {
node->get_property_list(&pinfo);
} else {
- ObjectTypeDB::get_property_list(type,&pinfo);
+ ClassDB::get_property_list(type,&pinfo);
}
if (script.is_valid()) {
@@ -1453,29 +1453,29 @@ void VisualScriptPropertySet::_validate_property(PropertyInfo& property) const {
void VisualScriptPropertySet::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_base_type","base_type"),&VisualScriptPropertySet::set_base_type);
- ObjectTypeDB::bind_method(_MD("get_base_type"),&VisualScriptPropertySet::get_base_type);
+ ClassDB::bind_method(_MD("set_base_type","base_type"),&VisualScriptPropertySet::set_base_type);
+ ClassDB::bind_method(_MD("get_base_type"),&VisualScriptPropertySet::get_base_type);
- ObjectTypeDB::bind_method(_MD("set_base_script","base_script"),&VisualScriptPropertySet::set_base_script);
- ObjectTypeDB::bind_method(_MD("get_base_script"),&VisualScriptPropertySet::get_base_script);
+ ClassDB::bind_method(_MD("set_base_script","base_script"),&VisualScriptPropertySet::set_base_script);
+ ClassDB::bind_method(_MD("get_base_script"),&VisualScriptPropertySet::get_base_script);
- ObjectTypeDB::bind_method(_MD("set_basic_type","basic_type"),&VisualScriptPropertySet::set_basic_type);
- ObjectTypeDB::bind_method(_MD("get_basic_type"),&VisualScriptPropertySet::get_basic_type);
+ ClassDB::bind_method(_MD("set_basic_type","basic_type"),&VisualScriptPropertySet::set_basic_type);
+ ClassDB::bind_method(_MD("get_basic_type"),&VisualScriptPropertySet::get_basic_type);
- ObjectTypeDB::bind_method(_MD("_set_type_cache","type_cache"),&VisualScriptPropertySet::_set_type_cache);
- ObjectTypeDB::bind_method(_MD("_get_type_cache"),&VisualScriptPropertySet::_get_type_cache);
+ ClassDB::bind_method(_MD("_set_type_cache","type_cache"),&VisualScriptPropertySet::_set_type_cache);
+ ClassDB::bind_method(_MD("_get_type_cache"),&VisualScriptPropertySet::_get_type_cache);
- ObjectTypeDB::bind_method(_MD("set_event_type","event_type"),&VisualScriptPropertySet::set_event_type);
- ObjectTypeDB::bind_method(_MD("get_event_type"),&VisualScriptPropertySet::get_event_type);
+ ClassDB::bind_method(_MD("set_event_type","event_type"),&VisualScriptPropertySet::set_event_type);
+ ClassDB::bind_method(_MD("get_event_type"),&VisualScriptPropertySet::get_event_type);
- ObjectTypeDB::bind_method(_MD("set_property","property"),&VisualScriptPropertySet::set_property);
- ObjectTypeDB::bind_method(_MD("get_property"),&VisualScriptPropertySet::get_property);
+ ClassDB::bind_method(_MD("set_property","property"),&VisualScriptPropertySet::set_property);
+ ClassDB::bind_method(_MD("get_property"),&VisualScriptPropertySet::get_property);
- ObjectTypeDB::bind_method(_MD("set_call_mode","mode"),&VisualScriptPropertySet::set_call_mode);
- ObjectTypeDB::bind_method(_MD("get_call_mode"),&VisualScriptPropertySet::get_call_mode);
+ ClassDB::bind_method(_MD("set_call_mode","mode"),&VisualScriptPropertySet::set_call_mode);
+ ClassDB::bind_method(_MD("get_call_mode"),&VisualScriptPropertySet::get_call_mode);
- ObjectTypeDB::bind_method(_MD("set_base_path","base_path"),&VisualScriptPropertySet::set_base_path);
- ObjectTypeDB::bind_method(_MD("get_base_path"),&VisualScriptPropertySet::get_base_path);
+ ClassDB::bind_method(_MD("set_base_path","base_path"),&VisualScriptPropertySet::set_base_path);
+ ClassDB::bind_method(_MD("get_base_path"),&VisualScriptPropertySet::get_base_path);
@@ -1554,7 +1554,7 @@ public:
if (!valid) {
r_error.error=Variant::CallError::CALL_ERROR_INVALID_METHOD;
- r_error_str="Invalid set value '"+String(*p_inputs[0])+"' on property '"+String(property)+"' of type "+object->get_type();
+ r_error_str="Invalid set value '"+String(*p_inputs[0])+"' on property '"+String(property)+"' of type "+object->get_class();
}
} break;
case VisualScriptPropertySet::CALL_MODE_NODE_PATH: {
@@ -1579,7 +1579,7 @@ public:
if (!valid) {
r_error.error=Variant::CallError::CALL_ERROR_INVALID_METHOD;
- r_error_str="Invalid set value '"+String(*p_inputs[0])+"' on property '"+String(property)+"' of type "+another->get_type();
+ r_error_str="Invalid set value '"+String(*p_inputs[0])+"' on property '"+String(property)+"' of type "+another->get_class();
}
} break;
@@ -1669,7 +1669,7 @@ void VisualScriptPropertyGet::_update_base_type() {
Node* node=_get_base_node();
if (node) {
- base_type=node->get_type();
+ base_type=node->get_class();
}
} else if (call_mode==CALL_MODE_SELF) {
@@ -1724,7 +1724,7 @@ StringName VisualScriptPropertyGet::_get_base_type() const {
else if (call_mode==CALL_MODE_NODE_PATH && get_visual_script().is_valid()) {
Node *path = _get_base_node();
if (path)
- return path->get_type();
+ return path->get_class();
}
@@ -1868,7 +1868,7 @@ void VisualScriptPropertyGet::_update_cache() {
node=_get_base_node();
if (node) {
- type=node->get_type();
+ type=node->get_class();
base_type=type; //cache, too
script = node->get_script();
}
@@ -1903,7 +1903,7 @@ void VisualScriptPropertyGet::_update_cache() {
Variant::Type type_ret;
- type_ret=ObjectTypeDB::get_property_type(base_type,property,&valid);
+ type_ret=ClassDB::get_property_type(base_type,property,&valid);
if (valid) {
type_cache=type_ret;
@@ -2117,30 +2117,30 @@ void VisualScriptPropertyGet::_validate_property(PropertyInfo& property) const {
void VisualScriptPropertyGet::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_base_type","base_type"),&VisualScriptPropertyGet::set_base_type);
- ObjectTypeDB::bind_method(_MD("get_base_type"),&VisualScriptPropertyGet::get_base_type);
+ ClassDB::bind_method(_MD("set_base_type","base_type"),&VisualScriptPropertyGet::set_base_type);
+ ClassDB::bind_method(_MD("get_base_type"),&VisualScriptPropertyGet::get_base_type);
- ObjectTypeDB::bind_method(_MD("set_base_script","base_script"),&VisualScriptPropertyGet::set_base_script);
- ObjectTypeDB::bind_method(_MD("get_base_script"),&VisualScriptPropertyGet::get_base_script);
+ ClassDB::bind_method(_MD("set_base_script","base_script"),&VisualScriptPropertyGet::set_base_script);
+ ClassDB::bind_method(_MD("get_base_script"),&VisualScriptPropertyGet::get_base_script);
- ObjectTypeDB::bind_method(_MD("set_basic_type","basic_type"),&VisualScriptPropertyGet::set_basic_type);
- ObjectTypeDB::bind_method(_MD("get_basic_type"),&VisualScriptPropertyGet::get_basic_type);
+ ClassDB::bind_method(_MD("set_basic_type","basic_type"),&VisualScriptPropertyGet::set_basic_type);
+ ClassDB::bind_method(_MD("get_basic_type"),&VisualScriptPropertyGet::get_basic_type);
- ObjectTypeDB::bind_method(_MD("_set_type_cache","type_cache"),&VisualScriptPropertyGet::_set_type_cache);
- ObjectTypeDB::bind_method(_MD("_get_type_cache"),&VisualScriptPropertyGet::_get_type_cache);
+ ClassDB::bind_method(_MD("_set_type_cache","type_cache"),&VisualScriptPropertyGet::_set_type_cache);
+ ClassDB::bind_method(_MD("_get_type_cache"),&VisualScriptPropertyGet::_get_type_cache);
- ObjectTypeDB::bind_method(_MD("set_event_type","event_type"),&VisualScriptPropertyGet::set_event_type);
- ObjectTypeDB::bind_method(_MD("get_event_type"),&VisualScriptPropertyGet::get_event_type);
+ ClassDB::bind_method(_MD("set_event_type","event_type"),&VisualScriptPropertyGet::set_event_type);
+ ClassDB::bind_method(_MD("get_event_type"),&VisualScriptPropertyGet::get_event_type);
- ObjectTypeDB::bind_method(_MD("set_property","property"),&VisualScriptPropertyGet::set_property);
- ObjectTypeDB::bind_method(_MD("get_property"),&VisualScriptPropertyGet::get_property);
+ ClassDB::bind_method(_MD("set_property","property"),&VisualScriptPropertyGet::set_property);
+ ClassDB::bind_method(_MD("get_property"),&VisualScriptPropertyGet::get_property);
- ObjectTypeDB::bind_method(_MD("set_call_mode","mode"),&VisualScriptPropertyGet::set_call_mode);
- ObjectTypeDB::bind_method(_MD("get_call_mode"),&VisualScriptPropertyGet::get_call_mode);
+ ClassDB::bind_method(_MD("set_call_mode","mode"),&VisualScriptPropertyGet::set_call_mode);
+ ClassDB::bind_method(_MD("get_call_mode"),&VisualScriptPropertyGet::get_call_mode);
- ObjectTypeDB::bind_method(_MD("set_base_path","base_path"),&VisualScriptPropertyGet::set_base_path);
- ObjectTypeDB::bind_method(_MD("get_base_path"),&VisualScriptPropertyGet::get_base_path);
+ ClassDB::bind_method(_MD("set_base_path","base_path"),&VisualScriptPropertyGet::set_base_path);
+ ClassDB::bind_method(_MD("get_base_path"),&VisualScriptPropertyGet::get_base_path);
String bt;
for(int i=0;i<Variant::VARIANT_MAX;i++) {
@@ -2420,8 +2420,8 @@ void VisualScriptEmitSignal::_validate_property(PropertyInfo& property) const {
void VisualScriptEmitSignal::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_signal","name"),&VisualScriptEmitSignal::set_signal);
- ObjectTypeDB::bind_method(_MD("get_signal"),&VisualScriptEmitSignal::get_signal);
+ ClassDB::bind_method(_MD("set_signal","name"),&VisualScriptEmitSignal::set_signal);
+ ClassDB::bind_method(_MD("get_signal"),&VisualScriptEmitSignal::get_signal);
ADD_PROPERTY(PropertyInfo(Variant::STRING,"signal/signal"),_SCS("set_signal"),_SCS("get_signal"));
diff --git a/modules/visual_script/visual_script_func_nodes.h b/modules/visual_script/visual_script_func_nodes.h
index 43ef276cf4..7d33549e21 100644
--- a/modules/visual_script/visual_script_func_nodes.h
+++ b/modules/visual_script/visual_script_func_nodes.h
@@ -6,7 +6,7 @@
class VisualScriptFunctionCall : public VisualScriptNode {
- OBJ_TYPE(VisualScriptFunctionCall,VisualScriptNode)
+ GDCLASS(VisualScriptFunctionCall,VisualScriptNode)
public:
enum CallMode {
CALL_MODE_SELF,
@@ -117,7 +117,7 @@ VARIANT_ENUM_CAST(VisualScriptFunctionCall::RPCCallMode );
class VisualScriptPropertySet : public VisualScriptNode {
- OBJ_TYPE(VisualScriptPropertySet,VisualScriptNode)
+ GDCLASS(VisualScriptPropertySet,VisualScriptNode)
public:
enum CallMode {
CALL_MODE_SELF,
@@ -208,7 +208,7 @@ VARIANT_ENUM_CAST(VisualScriptPropertySet::CallMode );
class VisualScriptPropertyGet : public VisualScriptNode {
- OBJ_TYPE(VisualScriptPropertyGet,VisualScriptNode)
+ GDCLASS(VisualScriptPropertyGet,VisualScriptNode)
public:
enum CallMode {
CALL_MODE_SELF,
@@ -299,7 +299,7 @@ VARIANT_ENUM_CAST(VisualScriptPropertyGet::CallMode );
class VisualScriptEmitSignal : public VisualScriptNode {
- OBJ_TYPE(VisualScriptEmitSignal,VisualScriptNode)
+ GDCLASS(VisualScriptEmitSignal,VisualScriptNode)
private:
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 8ffbcc6e62..07d234207e 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -539,11 +539,11 @@ Variant::Type VisualScriptOperator::get_typed() const {
void VisualScriptOperator::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_operator","op"),&VisualScriptOperator::set_operator);
- ObjectTypeDB::bind_method(_MD("get_operator"),&VisualScriptOperator::get_operator);
+ ClassDB::bind_method(_MD("set_operator","op"),&VisualScriptOperator::set_operator);
+ ClassDB::bind_method(_MD("get_operator"),&VisualScriptOperator::get_operator);
- ObjectTypeDB::bind_method(_MD("set_typed","type"),&VisualScriptOperator::set_typed);
- ObjectTypeDB::bind_method(_MD("get_typed"),&VisualScriptOperator::get_typed);
+ ClassDB::bind_method(_MD("set_typed","type"),&VisualScriptOperator::set_typed);
+ ClassDB::bind_method(_MD("get_typed"),&VisualScriptOperator::get_typed);
String types;
for(int i=0;i<Variant::OP_MAX;i++) {
@@ -717,8 +717,8 @@ void VisualScriptVariableGet::_validate_property(PropertyInfo& property) const {
void VisualScriptVariableGet::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_variable","name"),&VisualScriptVariableGet::set_variable);
- ObjectTypeDB::bind_method(_MD("get_variable"),&VisualScriptVariableGet::get_variable);
+ ClassDB::bind_method(_MD("set_variable","name"),&VisualScriptVariableGet::set_variable);
+ ClassDB::bind_method(_MD("get_variable"),&VisualScriptVariableGet::get_variable);
ADD_PROPERTY(PropertyInfo(Variant::STRING,"variable/name"),_SCS("set_variable"),_SCS("get_variable"));
@@ -853,8 +853,8 @@ void VisualScriptVariableSet::_validate_property(PropertyInfo& property) const {
void VisualScriptVariableSet::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_variable","name"),&VisualScriptVariableSet::set_variable);
- ObjectTypeDB::bind_method(_MD("get_variable"),&VisualScriptVariableSet::get_variable);
+ ClassDB::bind_method(_MD("set_variable","name"),&VisualScriptVariableSet::set_variable);
+ ClassDB::bind_method(_MD("get_variable"),&VisualScriptVariableSet::get_variable);
ADD_PROPERTY(PropertyInfo(Variant::STRING,"variable/name"),_SCS("set_variable"),_SCS("get_variable"));
@@ -995,11 +995,11 @@ void VisualScriptConstant::_validate_property(PropertyInfo& property) const {
void VisualScriptConstant::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_constant_type","type"),&VisualScriptConstant::set_constant_type);
- ObjectTypeDB::bind_method(_MD("get_constant_type"),&VisualScriptConstant::get_constant_type);
+ ClassDB::bind_method(_MD("set_constant_type","type"),&VisualScriptConstant::set_constant_type);
+ ClassDB::bind_method(_MD("get_constant_type"),&VisualScriptConstant::get_constant_type);
- ObjectTypeDB::bind_method(_MD("set_constant_value","value"),&VisualScriptConstant::set_constant_value);
- ObjectTypeDB::bind_method(_MD("get_constant_value"),&VisualScriptConstant::get_constant_value);
+ ClassDB::bind_method(_MD("set_constant_value","value"),&VisualScriptConstant::set_constant_value);
+ ClassDB::bind_method(_MD("get_constant_value"),&VisualScriptConstant::get_constant_value);
String argt="Null";
for(int i=1;i<Variant::VARIANT_MAX;i++) {
@@ -1078,7 +1078,7 @@ PropertyInfo VisualScriptPreload::get_output_value_port_info(int p_idx) const{
PropertyInfo pinfo=PropertyInfo(Variant::OBJECT,"res");
if (preload.is_valid()) {
pinfo.hint=PROPERTY_HINT_RESOURCE_TYPE;
- pinfo.hint_string=preload->get_type();
+ pinfo.hint_string=preload->get_class();
}
return pinfo;
@@ -1098,7 +1098,7 @@ String VisualScriptPreload::get_text() const {
} else if (preload->get_name()!=String()) {
return preload->get_name();
} else {
- return preload->get_type();
+ return preload->get_class();
}
} else {
return "<empty>";
@@ -1123,8 +1123,8 @@ Ref<Resource> VisualScriptPreload::get_preload() const{
void VisualScriptPreload::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_preload","resource"),&VisualScriptPreload::set_preload);
- ObjectTypeDB::bind_method(_MD("get_preload"),&VisualScriptPreload::get_preload);
+ ClassDB::bind_method(_MD("set_preload","resource"),&VisualScriptPreload::set_preload);
+ ClassDB::bind_method(_MD("get_preload"),&VisualScriptPreload::get_preload);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT,"resource",PROPERTY_HINT_RESOURCE_TYPE,"Resource"),_SCS("set_preload"),_SCS("get_preload"));
@@ -1425,8 +1425,8 @@ VisualScriptNodeInstance* VisualScriptGlobalConstant::instance(VisualScriptInsta
void VisualScriptGlobalConstant::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_global_constant","index"),&VisualScriptGlobalConstant::set_global_constant);
- ObjectTypeDB::bind_method(_MD("get_global_constant"),&VisualScriptGlobalConstant::get_global_constant);
+ ClassDB::bind_method(_MD("set_global_constant","index"),&VisualScriptGlobalConstant::set_global_constant);
+ ClassDB::bind_method(_MD("get_global_constant"),&VisualScriptGlobalConstant::get_global_constant);
String cc;
@@ -1540,7 +1540,7 @@ public:
VisualScriptNodeInstance* VisualScriptClassConstant::instance(VisualScriptInstance* p_instance) {
VisualScriptNodeInstanceClassConstant * instance = memnew(VisualScriptNodeInstanceClassConstant );
- instance->value=ObjectTypeDB::get_integer_constant(base_type,name,&instance->valid);
+ instance->value=ClassDB::get_integer_constant(base_type,name,&instance->valid);
return instance;
}
@@ -1549,7 +1549,7 @@ void VisualScriptClassConstant::_validate_property(PropertyInfo& property) const
if (property.name=="constant") {
List<String> constants;
- ObjectTypeDB::get_integer_constant_list(base_type,&constants,true);
+ ClassDB::get_integer_constant_list(base_type,&constants,true);
property.hint_string="";
for(List<String>::Element *E=constants.front();E;E=E->next()) {
@@ -1563,11 +1563,11 @@ void VisualScriptClassConstant::_validate_property(PropertyInfo& property) const
void VisualScriptClassConstant::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_class_constant","name"),&VisualScriptClassConstant::set_class_constant);
- ObjectTypeDB::bind_method(_MD("get_class_constant"),&VisualScriptClassConstant::get_class_constant);
+ ClassDB::bind_method(_MD("set_class_constant","name"),&VisualScriptClassConstant::set_class_constant);
+ ClassDB::bind_method(_MD("get_class_constant"),&VisualScriptClassConstant::get_class_constant);
- ObjectTypeDB::bind_method(_MD("set_base_type","name"),&VisualScriptClassConstant::set_base_type);
- ObjectTypeDB::bind_method(_MD("get_base_type"),&VisualScriptClassConstant::get_base_type);
+ ClassDB::bind_method(_MD("set_base_type","name"),&VisualScriptClassConstant::set_base_type);
+ ClassDB::bind_method(_MD("get_base_type"),&VisualScriptClassConstant::get_base_type);
ADD_PROPERTY(PropertyInfo(Variant::STRING,"base_type",PROPERTY_HINT_TYPE_STRING,"Object"),_SCS("set_base_type"),_SCS("get_base_type"));
ADD_PROPERTY(PropertyInfo(Variant::STRING,"constant",PROPERTY_HINT_ENUM,""),_SCS("set_class_constant"),_SCS("get_class_constant"));
@@ -1703,11 +1703,11 @@ void VisualScriptBasicTypeConstant::_validate_property(PropertyInfo& property) c
void VisualScriptBasicTypeConstant::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_basic_type","name"),&VisualScriptBasicTypeConstant::set_basic_type);
- ObjectTypeDB::bind_method(_MD("get_basic_type"),&VisualScriptBasicTypeConstant::get_basic_type);
+ ClassDB::bind_method(_MD("set_basic_type","name"),&VisualScriptBasicTypeConstant::set_basic_type);
+ ClassDB::bind_method(_MD("get_basic_type"),&VisualScriptBasicTypeConstant::get_basic_type);
- ObjectTypeDB::bind_method(_MD("set_basic_type_constant","name"),&VisualScriptBasicTypeConstant::set_basic_type_constant);
- ObjectTypeDB::bind_method(_MD("get_basic_type_constant"),&VisualScriptBasicTypeConstant::get_basic_type_constant);
+ ClassDB::bind_method(_MD("set_basic_type_constant","name"),&VisualScriptBasicTypeConstant::set_basic_type_constant);
+ ClassDB::bind_method(_MD("get_basic_type_constant"),&VisualScriptBasicTypeConstant::get_basic_type_constant);
String argt="Null";
@@ -1831,8 +1831,8 @@ VisualScriptNodeInstance* VisualScriptMathConstant::instance(VisualScriptInstanc
void VisualScriptMathConstant::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_math_constant","which"),&VisualScriptMathConstant::set_math_constant);
- ObjectTypeDB::bind_method(_MD("get_math_constant"),&VisualScriptMathConstant::get_math_constant);
+ ClassDB::bind_method(_MD("set_math_constant","which"),&VisualScriptMathConstant::set_math_constant);
+ ClassDB::bind_method(_MD("get_math_constant"),&VisualScriptMathConstant::get_math_constant);
String cc;
@@ -1943,7 +1943,7 @@ VisualScriptEngineSingleton::TypeGuess VisualScriptEngineSingleton::guess_output
TypeGuess tg;
tg.type=Variant::OBJECT;
if (obj) {
- tg.obj_type=obj->get_type();
+ tg.GDCLASS=obj->get_class();
tg.script=obj->get_script();
}
@@ -1953,8 +1953,8 @@ VisualScriptEngineSingleton::TypeGuess VisualScriptEngineSingleton::guess_output
void VisualScriptEngineSingleton::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_singleton","name"),&VisualScriptEngineSingleton::set_singleton);
- ObjectTypeDB::bind_method(_MD("get_singleton"),&VisualScriptEngineSingleton::get_singleton);
+ ClassDB::bind_method(_MD("set_singleton","name"),&VisualScriptEngineSingleton::set_singleton);
+ ClassDB::bind_method(_MD("get_singleton"),&VisualScriptEngineSingleton::get_singleton);
String cc;
@@ -2117,7 +2117,7 @@ VisualScriptSceneNode::TypeGuess VisualScriptSceneNode::guess_output_type(TypeGu
VisualScriptSceneNode::TypeGuess tg;
tg.type=Variant::OBJECT;
- tg.obj_type="Node";
+ tg.GDCLASS="Node";
#ifdef TOOLS_ENABLED
Ref<Script> script = get_visual_script();
@@ -2146,7 +2146,7 @@ VisualScriptSceneNode::TypeGuess VisualScriptSceneNode::guess_output_type(TypeGu
Node* another = script_node->get_node(path);
if (another) {
- tg.obj_type=another->get_type();
+ tg.GDCLASS=another->get_class();
tg.script=another->get_script();
}
#endif
@@ -2190,8 +2190,8 @@ void VisualScriptSceneNode::_validate_property(PropertyInfo& property) const {
void VisualScriptSceneNode::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_node_path","path"),&VisualScriptSceneNode::set_node_path);
- ObjectTypeDB::bind_method(_MD("get_node_path"),&VisualScriptSceneNode::get_node_path);
+ ClassDB::bind_method(_MD("set_node_path","path"),&VisualScriptSceneNode::set_node_path);
+ ClassDB::bind_method(_MD("get_node_path"),&VisualScriptSceneNode::get_node_path);
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH,"node_path",PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE),_SCS("set_node_path"),_SCS("get_node_path"));
}
@@ -2296,7 +2296,7 @@ VisualScriptSceneTree::TypeGuess VisualScriptSceneTree::guess_output_type(TypeGu
TypeGuess tg;
tg.type=Variant::OBJECT;
- tg.obj_type="SceneTree";
+ tg.GDCLASS="SceneTree";
return tg;
}
@@ -2401,8 +2401,8 @@ VisualScriptNodeInstance* VisualScriptResourcePath::instance(VisualScriptInstanc
void VisualScriptResourcePath::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_resource_path","path"),&VisualScriptResourcePath::set_resource_path);
- ObjectTypeDB::bind_method(_MD("get_resource_path"),&VisualScriptResourcePath::get_resource_path);
+ ClassDB::bind_method(_MD("set_resource_path","path"),&VisualScriptResourcePath::set_resource_path);
+ ClassDB::bind_method(_MD("get_resource_path"),&VisualScriptResourcePath::get_resource_path);
ADD_PROPERTY(PropertyInfo(Variant::STRING,"path",PROPERTY_HINT_FILE),_SCS("set_resource_path"),_SCS("get_resource_path"));
}
@@ -2494,13 +2494,13 @@ VisualScriptSelf::TypeGuess VisualScriptSelf::guess_output_type(TypeGuess* p_inp
VisualScriptSceneNode::TypeGuess tg;
tg.type=Variant::OBJECT;
- tg.obj_type="Object";
+ tg.GDCLASS="Object";
Ref<Script> script = get_visual_script();
if (!script.is_valid())
return tg;
- tg.obj_type=script->get_instance_base_type();
+ tg.GDCLASS=script->get_instance_base_type();
tg.script=script;
return tg;
@@ -2817,7 +2817,7 @@ String VisualScriptSubCall::get_text() const {
return script->get_name();
if (script->get_path().is_resource_file())
return script->get_path().get_file();
- return script->get_type();
+ return script->get_class();
}
return "";
}
@@ -3001,14 +3001,14 @@ VisualScriptNodeInstance* VisualScriptComment::instance(VisualScriptInstance* p_
void VisualScriptComment::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_title","title"),&VisualScriptComment::set_title);
- ObjectTypeDB::bind_method(_MD("get_title"),&VisualScriptComment::get_title);
+ ClassDB::bind_method(_MD("set_title","title"),&VisualScriptComment::set_title);
+ ClassDB::bind_method(_MD("get_title"),&VisualScriptComment::get_title);
- ObjectTypeDB::bind_method(_MD("set_description","description"),&VisualScriptComment::set_description);
- ObjectTypeDB::bind_method(_MD("get_description"),&VisualScriptComment::get_description);
+ ClassDB::bind_method(_MD("set_description","description"),&VisualScriptComment::set_description);
+ ClassDB::bind_method(_MD("get_description"),&VisualScriptComment::get_description);
- ObjectTypeDB::bind_method(_MD("set_size","size"),&VisualScriptComment::set_size);
- ObjectTypeDB::bind_method(_MD("get_size"),&VisualScriptComment::get_size);
+ ClassDB::bind_method(_MD("set_size","size"),&VisualScriptComment::set_size);
+ ClassDB::bind_method(_MD("get_size"),&VisualScriptComment::get_size);
ADD_PROPERTY( PropertyInfo(Variant::STRING,"title"),_SCS("set_title"),_SCS("get_title"));
ADD_PROPERTY( PropertyInfo(Variant::STRING,"description",PROPERTY_HINT_MULTILINE_TEXT),_SCS("set_description"),_SCS("get_description"));
@@ -3140,11 +3140,11 @@ VisualScriptNodeInstance* VisualScriptConstructor::instance(VisualScriptInstance
void VisualScriptConstructor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_constructor_type","type"),&VisualScriptConstructor::set_constructor_type);
- ObjectTypeDB::bind_method(_MD("get_constructor_type"),&VisualScriptConstructor::get_constructor_type);
+ ClassDB::bind_method(_MD("set_constructor_type","type"),&VisualScriptConstructor::set_constructor_type);
+ ClassDB::bind_method(_MD("get_constructor_type"),&VisualScriptConstructor::get_constructor_type);
- ObjectTypeDB::bind_method(_MD("set_constructor","constructor"),&VisualScriptConstructor::set_constructor);
- ObjectTypeDB::bind_method(_MD("get_constructor"),&VisualScriptConstructor::get_constructor);
+ ClassDB::bind_method(_MD("set_constructor","constructor"),&VisualScriptConstructor::set_constructor);
+ ClassDB::bind_method(_MD("get_constructor"),&VisualScriptConstructor::get_constructor);
ADD_PROPERTY( PropertyInfo(Variant::INT,"type",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("set_constructor_type"),_SCS("get_constructor_type"));
ADD_PROPERTY( PropertyInfo(Variant::DICTIONARY,"constructor",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("set_constructor"),_SCS("get_constructor"));
@@ -3283,11 +3283,11 @@ VisualScriptNodeInstance* VisualScriptLocalVar::instance(VisualScriptInstance* p
void VisualScriptLocalVar::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_var_name","name"),&VisualScriptLocalVar::set_var_name);
- ObjectTypeDB::bind_method(_MD("get_var_name"),&VisualScriptLocalVar::get_var_name);
+ ClassDB::bind_method(_MD("set_var_name","name"),&VisualScriptLocalVar::set_var_name);
+ ClassDB::bind_method(_MD("get_var_name"),&VisualScriptLocalVar::get_var_name);
- ObjectTypeDB::bind_method(_MD("set_var_type","type"),&VisualScriptLocalVar::set_var_type);
- ObjectTypeDB::bind_method(_MD("get_var_type"),&VisualScriptLocalVar::get_var_type);
+ ClassDB::bind_method(_MD("set_var_type","type"),&VisualScriptLocalVar::set_var_type);
+ ClassDB::bind_method(_MD("get_var_type"),&VisualScriptLocalVar::get_var_type);
String argt="Any";
for(int i=1;i<Variant::VARIANT_MAX;i++) {
@@ -3420,11 +3420,11 @@ VisualScriptNodeInstance* VisualScriptLocalVarSet::instance(VisualScriptInstance
void VisualScriptLocalVarSet::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_var_name","name"),&VisualScriptLocalVarSet::set_var_name);
- ObjectTypeDB::bind_method(_MD("get_var_name"),&VisualScriptLocalVarSet::get_var_name);
+ ClassDB::bind_method(_MD("set_var_name","name"),&VisualScriptLocalVarSet::set_var_name);
+ ClassDB::bind_method(_MD("get_var_name"),&VisualScriptLocalVarSet::get_var_name);
- ObjectTypeDB::bind_method(_MD("set_var_type","type"),&VisualScriptLocalVarSet::set_var_type);
- ObjectTypeDB::bind_method(_MD("get_var_type"),&VisualScriptLocalVarSet::get_var_type);
+ ClassDB::bind_method(_MD("set_var_type","type"),&VisualScriptLocalVarSet::set_var_type);
+ ClassDB::bind_method(_MD("get_var_type"),&VisualScriptLocalVarSet::get_var_type);
String argt="Any";
for(int i=1;i<Variant::VARIANT_MAX;i++) {
@@ -3630,11 +3630,11 @@ void VisualScriptInputAction::_validate_property(PropertyInfo& property) const {
void VisualScriptInputAction::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_action_name","name"),&VisualScriptInputAction::set_action_name);
- ObjectTypeDB::bind_method(_MD("get_action_name"),&VisualScriptInputAction::get_action_name);
+ ClassDB::bind_method(_MD("set_action_name","name"),&VisualScriptInputAction::set_action_name);
+ ClassDB::bind_method(_MD("get_action_name"),&VisualScriptInputAction::get_action_name);
- ObjectTypeDB::bind_method(_MD("set_action_mode","mode"),&VisualScriptInputAction::set_action_mode);
- ObjectTypeDB::bind_method(_MD("get_action_mode"),&VisualScriptInputAction::get_action_mode);
+ ClassDB::bind_method(_MD("set_action_mode","mode"),&VisualScriptInputAction::set_action_mode);
+ ClassDB::bind_method(_MD("get_action_mode"),&VisualScriptInputAction::get_action_mode);
ADD_PROPERTY( PropertyInfo(Variant::STRING,"action"),_SCS("set_action_name"),_SCS("get_action_name"));
ADD_PROPERTY( PropertyInfo(Variant::INT,"mode",PROPERTY_HINT_ENUM,"Pressed,Released,JustPressed,JustReleased"),_SCS("set_action_mode"),_SCS("get_action_mode"));
@@ -3834,14 +3834,14 @@ void VisualScriptDeconstruct::_validate_property(PropertyInfo& property) const {
void VisualScriptDeconstruct::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_deconstruct_type","type"),&VisualScriptDeconstruct::set_deconstruct_type);
- ObjectTypeDB::bind_method(_MD("get_deconstruct_type"),&VisualScriptDeconstruct::get_deconstruct_type);
+ ClassDB::bind_method(_MD("set_deconstruct_type","type"),&VisualScriptDeconstruct::set_deconstruct_type);
+ ClassDB::bind_method(_MD("get_deconstruct_type"),&VisualScriptDeconstruct::get_deconstruct_type);
- ObjectTypeDB::bind_method(_MD("set_deconstruct_input_type","input_type"),&VisualScriptDeconstruct::set_deconstruct_input_type);
- ObjectTypeDB::bind_method(_MD("get_deconstruct_input_type"),&VisualScriptDeconstruct::get_deconstruct_input_type);
+ ClassDB::bind_method(_MD("set_deconstruct_input_type","input_type"),&VisualScriptDeconstruct::set_deconstruct_input_type);
+ ClassDB::bind_method(_MD("get_deconstruct_input_type"),&VisualScriptDeconstruct::get_deconstruct_input_type);
- ObjectTypeDB::bind_method(_MD("_set_elem_cache","_cache"),&VisualScriptDeconstruct::_set_elem_cache);
- ObjectTypeDB::bind_method(_MD("_get_elem_cache"),&VisualScriptDeconstruct::_get_elem_cache);
+ ClassDB::bind_method(_MD("_set_elem_cache","_cache"),&VisualScriptDeconstruct::_set_elem_cache);
+ ClassDB::bind_method(_MD("_get_elem_cache"),&VisualScriptDeconstruct::_get_elem_cache);
String argt="Any";
for(int i=1;i<Variant::VARIANT_MAX;i++) {
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index 94eeadca57..eb70c86637 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -5,7 +5,7 @@
class VisualScriptFunction : public VisualScriptNode {
- OBJ_TYPE(VisualScriptFunction,VisualScriptNode)
+ GDCLASS(VisualScriptFunction,VisualScriptNode)
struct Argument {
@@ -72,7 +72,7 @@ public:
class VisualScriptOperator : public VisualScriptNode {
- OBJ_TYPE(VisualScriptOperator,VisualScriptNode)
+ GDCLASS(VisualScriptOperator,VisualScriptNode)
Variant::Type typed;
@@ -114,7 +114,7 @@ public:
class VisualScriptVariableGet : public VisualScriptNode {
- OBJ_TYPE(VisualScriptVariableGet,VisualScriptNode)
+ GDCLASS(VisualScriptVariableGet,VisualScriptNode)
StringName variable;
@@ -153,7 +153,7 @@ public:
class VisualScriptVariableSet : public VisualScriptNode {
- OBJ_TYPE(VisualScriptVariableSet,VisualScriptNode)
+ GDCLASS(VisualScriptVariableSet,VisualScriptNode)
StringName variable;
@@ -192,7 +192,7 @@ public:
class VisualScriptConstant : public VisualScriptNode {
- OBJ_TYPE(VisualScriptConstant,VisualScriptNode)
+ GDCLASS(VisualScriptConstant,VisualScriptNode)
Variant::Type type;
@@ -236,7 +236,7 @@ public:
class VisualScriptPreload : public VisualScriptNode {
- OBJ_TYPE(VisualScriptPreload,VisualScriptNode)
+ GDCLASS(VisualScriptPreload,VisualScriptNode)
Ref<Resource> preload;
@@ -274,7 +274,7 @@ public:
class VisualScriptIndexGet : public VisualScriptNode {
- OBJ_TYPE(VisualScriptIndexGet,VisualScriptNode)
+ GDCLASS(VisualScriptIndexGet,VisualScriptNode)
public:
@@ -305,7 +305,7 @@ public:
class VisualScriptIndexSet : public VisualScriptNode {
- OBJ_TYPE(VisualScriptIndexSet,VisualScriptNode)
+ GDCLASS(VisualScriptIndexSet,VisualScriptNode)
public:
@@ -337,7 +337,7 @@ public:
class VisualScriptGlobalConstant : public VisualScriptNode {
- OBJ_TYPE(VisualScriptGlobalConstant,VisualScriptNode)
+ GDCLASS(VisualScriptGlobalConstant,VisualScriptNode)
int index;
@@ -373,7 +373,7 @@ public:
class VisualScriptClassConstant : public VisualScriptNode {
- OBJ_TYPE(VisualScriptClassConstant,VisualScriptNode)
+ GDCLASS(VisualScriptClassConstant,VisualScriptNode)
StringName base_type;
StringName name;
@@ -414,7 +414,7 @@ public:
class VisualScriptBasicTypeConstant : public VisualScriptNode {
- OBJ_TYPE(VisualScriptBasicTypeConstant,VisualScriptNode)
+ GDCLASS(VisualScriptBasicTypeConstant,VisualScriptNode)
Variant::Type type;
StringName name;
@@ -457,7 +457,7 @@ public:
class VisualScriptMathConstant : public VisualScriptNode {
- OBJ_TYPE(VisualScriptMathConstant,VisualScriptNode)
+ GDCLASS(VisualScriptMathConstant,VisualScriptNode)
public:
enum MathConstant {
@@ -508,7 +508,7 @@ VARIANT_ENUM_CAST( VisualScriptMathConstant::MathConstant )
class VisualScriptEngineSingleton : public VisualScriptNode {
- OBJ_TYPE(VisualScriptEngineSingleton,VisualScriptNode)
+ GDCLASS(VisualScriptEngineSingleton,VisualScriptNode)
String singleton;
@@ -549,7 +549,7 @@ public:
class VisualScriptSceneNode : public VisualScriptNode {
- OBJ_TYPE(VisualScriptSceneNode,VisualScriptNode)
+ GDCLASS(VisualScriptSceneNode,VisualScriptNode)
NodePath path;
protected:
@@ -590,7 +590,7 @@ public:
class VisualScriptSceneTree : public VisualScriptNode {
- OBJ_TYPE(VisualScriptSceneTree,VisualScriptNode)
+ GDCLASS(VisualScriptSceneTree,VisualScriptNode)
protected:
@@ -627,7 +627,7 @@ public:
class VisualScriptResourcePath : public VisualScriptNode {
- OBJ_TYPE(VisualScriptResourcePath,VisualScriptNode)
+ GDCLASS(VisualScriptResourcePath,VisualScriptNode)
String path;
protected:
@@ -664,7 +664,7 @@ public:
class VisualScriptSelf : public VisualScriptNode {
- OBJ_TYPE(VisualScriptSelf,VisualScriptNode)
+ GDCLASS(VisualScriptSelf,VisualScriptNode)
protected:
@@ -701,7 +701,7 @@ public:
class VisualScriptCustomNode: public VisualScriptNode {
- OBJ_TYPE(VisualScriptCustomNode,VisualScriptNode)
+ GDCLASS(VisualScriptCustomNode,VisualScriptNode)
protected:
@@ -752,7 +752,7 @@ public:
class VisualScriptSubCall: public VisualScriptNode {
- OBJ_TYPE(VisualScriptSubCall,VisualScriptNode)
+ GDCLASS(VisualScriptSubCall,VisualScriptNode)
protected:
@@ -785,7 +785,7 @@ public:
class VisualScriptComment: public VisualScriptNode {
- OBJ_TYPE(VisualScriptComment,VisualScriptNode)
+ GDCLASS(VisualScriptComment,VisualScriptNode)
String title;
@@ -829,7 +829,7 @@ public:
class VisualScriptConstructor: public VisualScriptNode {
- OBJ_TYPE(VisualScriptConstructor,VisualScriptNode)
+ GDCLASS(VisualScriptConstructor,VisualScriptNode)
Variant::Type type;
@@ -874,7 +874,7 @@ public:
class VisualScriptLocalVar: public VisualScriptNode {
- OBJ_TYPE(VisualScriptLocalVar,VisualScriptNode)
+ GDCLASS(VisualScriptLocalVar,VisualScriptNode)
StringName name;
Variant::Type type;
@@ -914,7 +914,7 @@ public:
class VisualScriptLocalVarSet: public VisualScriptNode {
- OBJ_TYPE(VisualScriptLocalVarSet,VisualScriptNode)
+ GDCLASS(VisualScriptLocalVarSet,VisualScriptNode)
StringName name;
Variant::Type type;
@@ -956,7 +956,7 @@ public:
class VisualScriptInputAction: public VisualScriptNode {
- OBJ_TYPE(VisualScriptInputAction,VisualScriptNode)
+ GDCLASS(VisualScriptInputAction,VisualScriptNode)
public:
enum Mode {
MODE_PRESSED,
@@ -1007,7 +1007,7 @@ VARIANT_ENUM_CAST( VisualScriptInputAction::Mode )
class VisualScriptDeconstruct: public VisualScriptNode {
- OBJ_TYPE(VisualScriptDeconstruct,VisualScriptNode)
+ GDCLASS(VisualScriptDeconstruct,VisualScriptNode)
struct Element {
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index 221c46b6fd..8b251e667c 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -157,11 +157,11 @@ void VisualScriptYield::_validate_property(PropertyInfo& property) const {
void VisualScriptYield::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_yield_mode","mode"),&VisualScriptYield::set_yield_mode);
- ObjectTypeDB::bind_method(_MD("get_yield_mode"),&VisualScriptYield::get_yield_mode);
+ ClassDB::bind_method(_MD("set_yield_mode","mode"),&VisualScriptYield::set_yield_mode);
+ ClassDB::bind_method(_MD("get_yield_mode"),&VisualScriptYield::get_yield_mode);
- ObjectTypeDB::bind_method(_MD("set_wait_time","sec"),&VisualScriptYield::set_wait_time);
- ObjectTypeDB::bind_method(_MD("get_wait_time"),&VisualScriptYield::get_wait_time);
+ ClassDB::bind_method(_MD("set_wait_time","sec"),&VisualScriptYield::set_wait_time);
+ ClassDB::bind_method(_MD("get_wait_time"),&VisualScriptYield::get_wait_time);
ADD_PROPERTY(PropertyInfo(Variant::INT,"mode",PROPERTY_HINT_ENUM,"Frame,FixedFrame,Time",PROPERTY_USAGE_NOEDITOR),_SCS("set_yield_mode"),_SCS("get_yield_mode"));
ADD_PROPERTY(PropertyInfo(Variant::REAL,"wait_time"),_SCS("set_wait_time"),_SCS("get_wait_time"));
@@ -270,7 +270,7 @@ StringName VisualScriptYieldSignal::_get_base_type() const {
else if (call_mode==CALL_MODE_NODE_PATH && get_visual_script().is_valid()) {
Node *path = _get_base_node();
if (path)
- return path->get_type();
+ return path->get_class();
}
@@ -290,7 +290,7 @@ int VisualScriptYieldSignal::get_output_value_port_count() const{
MethodInfo sr;
- if (!ObjectTypeDB::get_signal(_get_base_type(),signal,&sr))
+ if (!ClassDB::get_signal(_get_base_type(),signal,&sr))
return 0;
return sr.arguments.size();
@@ -315,7 +315,7 @@ PropertyInfo VisualScriptYieldSignal::get_output_value_port_info(int p_idx) cons
MethodInfo sr;
- if (!ObjectTypeDB::get_signal(_get_base_type(),signal,&sr))
+ if (!ClassDB::get_signal(_get_base_type(),signal,&sr))
return PropertyInfo(); //no signal
ERR_FAIL_INDEX_V(p_idx,sr.arguments.size(),PropertyInfo());
return sr.arguments[p_idx];
@@ -440,7 +440,7 @@ void VisualScriptYieldSignal::_validate_property(PropertyInfo& property) const {
List<MethodInfo> methods;
- ObjectTypeDB::get_signal_list(_get_base_type(),&methods);
+ ClassDB::get_signal_list(_get_base_type(),&methods);
List<String> mstring;
for (List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
@@ -468,17 +468,17 @@ void VisualScriptYieldSignal::_validate_property(PropertyInfo& property) const {
void VisualScriptYieldSignal::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_base_type","base_type"),&VisualScriptYieldSignal::set_base_type);
- ObjectTypeDB::bind_method(_MD("get_base_type"),&VisualScriptYieldSignal::get_base_type);
+ ClassDB::bind_method(_MD("set_base_type","base_type"),&VisualScriptYieldSignal::set_base_type);
+ ClassDB::bind_method(_MD("get_base_type"),&VisualScriptYieldSignal::get_base_type);
- ObjectTypeDB::bind_method(_MD("set_signal","signal"),&VisualScriptYieldSignal::set_signal);
- ObjectTypeDB::bind_method(_MD("get_signal"),&VisualScriptYieldSignal::get_signal);
+ ClassDB::bind_method(_MD("set_signal","signal"),&VisualScriptYieldSignal::set_signal);
+ ClassDB::bind_method(_MD("get_signal"),&VisualScriptYieldSignal::get_signal);
- ObjectTypeDB::bind_method(_MD("set_call_mode","mode"),&VisualScriptYieldSignal::set_call_mode);
- ObjectTypeDB::bind_method(_MD("get_call_mode"),&VisualScriptYieldSignal::get_call_mode);
+ ClassDB::bind_method(_MD("set_call_mode","mode"),&VisualScriptYieldSignal::set_call_mode);
+ ClassDB::bind_method(_MD("get_call_mode"),&VisualScriptYieldSignal::get_call_mode);
- ObjectTypeDB::bind_method(_MD("set_base_path","base_path"),&VisualScriptYieldSignal::set_base_path);
- ObjectTypeDB::bind_method(_MD("get_base_path"),&VisualScriptYieldSignal::get_base_path);
+ ClassDB::bind_method(_MD("set_base_path","base_path"),&VisualScriptYieldSignal::set_base_path);
+ ClassDB::bind_method(_MD("get_base_path"),&VisualScriptYieldSignal::get_base_path);
diff --git a/modules/visual_script/visual_script_yield_nodes.h b/modules/visual_script/visual_script_yield_nodes.h
index ae7f8c15c1..210d6ec995 100644
--- a/modules/visual_script/visual_script_yield_nodes.h
+++ b/modules/visual_script/visual_script_yield_nodes.h
@@ -5,7 +5,7 @@
class VisualScriptYield : public VisualScriptNode {
- OBJ_TYPE(VisualScriptYield,VisualScriptNode)
+ GDCLASS(VisualScriptYield,VisualScriptNode)
public:
enum YieldMode {
@@ -60,7 +60,7 @@ VARIANT_ENUM_CAST( VisualScriptYield::YieldMode )
class VisualScriptYieldSignal : public VisualScriptNode {
- OBJ_TYPE(VisualScriptYieldSignal,VisualScriptNode)
+ GDCLASS(VisualScriptYieldSignal,VisualScriptNode)
public:
enum CallMode {
CALL_MODE_SELF,
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h
index adeef6cc36..bc2bfa2ae6 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/vorbis/audio_stream_ogg_vorbis.h
@@ -38,7 +38,7 @@
class AudioStreamPlaybackOGGVorbis : public AudioStreamPlayback {
- OBJ_TYPE(AudioStreamPlaybackOGGVorbis,AudioStreamPlayback);
+ GDCLASS(AudioStreamPlaybackOGGVorbis,AudioStreamPlayback);
enum {
MIN_MIX=1024
@@ -115,7 +115,7 @@ public:
class AudioStreamOGGVorbis : public AudioStream {
- OBJ_TYPE(AudioStreamOGGVorbis,AudioStream);
+ GDCLASS(AudioStreamOGGVorbis,AudioStream);
String file;
public:
diff --git a/modules/vorbis/register_types.cpp b/modules/vorbis/register_types.cpp
index d339462493..de929d9350 100644
--- a/modules/vorbis/register_types.cpp
+++ b/modules/vorbis/register_types.cpp
@@ -36,7 +36,7 @@ void register_vorbis_types() {
vorbis_stream_loader = memnew( ResourceFormatLoaderAudioStreamOGGVorbis );
ResourceLoader::add_resource_format_loader(vorbis_stream_loader);
- ObjectTypeDB::register_type<AudioStreamOGGVorbis>();
+ ClassDB::register_class<AudioStreamOGGVorbis>();
}
void unregister_vorbis_types() {
diff --git a/modules/webm/register_types.cpp b/modules/webm/register_types.cpp
index 97794941cc..e50eb337ae 100644
--- a/modules/webm/register_types.cpp
+++ b/modules/webm/register_types.cpp
@@ -36,7 +36,7 @@ void register_webm_types() {
webm_stream_loader = memnew(ResourceFormatLoaderVideoStreamWebm);
ResourceLoader::add_resource_format_loader(webm_stream_loader);
- ObjectTypeDB::register_type<VideoStreamWebm>();
+ ClassDB::register_class<VideoStreamWebm>();
}
void unregister_webm_types() {
diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h
index 83f0b6af09..a34591d9b9 100644
--- a/modules/webm/video_stream_webm.h
+++ b/modules/webm/video_stream_webm.h
@@ -36,7 +36,7 @@ class OpusVorbisDecoder;
class VideoStreamPlaybackWebm : public VideoStreamPlayback {
- OBJ_TYPE(VideoStreamPlaybackWebm, VideoStreamPlayback)
+ GDCLASS(VideoStreamPlaybackWebm, VideoStreamPlayback)
String file_name;
int audio_track;
@@ -102,7 +102,7 @@ private:
class VideoStreamWebm : public VideoStream {
- OBJ_TYPE(VideoStreamWebm, VideoStream)
+ GDCLASS(VideoStreamWebm, VideoStream)
String file;
int audio_track;
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 72e109fb5d..0bbb45b8f5 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -190,7 +190,7 @@ NULL};
class EditorExportPlatformAndroid : public EditorExportPlatform {
- OBJ_TYPE( EditorExportPlatformAndroid,EditorExportPlatform );
+ GDCLASS( EditorExportPlatformAndroid,EditorExportPlatform );
enum {
diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp
index d3683d8420..4ef6619146 100644
--- a/platform/android/godot_android.cpp
+++ b/platform/android/godot_android.cpp
@@ -57,7 +57,7 @@ extern "C" {
class JNISingleton : public Object {
- OBJ_TYPE( JNISingleton, Object );
+ GDCLASS( JNISingleton, Object );
struct MethodData {
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp
index 26123b10af..296ac0a831 100644
--- a/platform/android/java_class_wrapper.cpp
+++ b/platform/android/java_class_wrapper.cpp
@@ -562,7 +562,7 @@ JavaObject::~JavaObject(){
void JavaClassWrapper::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("wrap:JavaClass","name"),&JavaClassWrapper::wrap);
+ ClassDB::bind_method(_MD("wrap:JavaClass","name"),&JavaClassWrapper::wrap);
}
diff --git a/platform/android/java_class_wrapper.h b/platform/android/java_class_wrapper.h
index 8165d636c7..ff213c7f33 100644
--- a/platform/android/java_class_wrapper.h
+++ b/platform/android/java_class_wrapper.h
@@ -37,7 +37,7 @@ class JavaObject;
class JavaClass : public Reference {
- OBJ_TYPE(JavaClass,Reference);
+ GDCLASS(JavaClass,Reference);
enum ArgumentType {
@@ -131,7 +131,7 @@ public:
class JavaObject : public Reference {
- OBJ_TYPE(JavaObject,Reference);
+ GDCLASS(JavaObject,Reference);
Ref<JavaClass> base_class;
friend class JavaClass;
@@ -150,7 +150,7 @@ public:
class JavaClassWrapper : public Object {
- OBJ_TYPE(JavaClassWrapper,Object);
+ GDCLASS(JavaClassWrapper,Object);
Map<String,Ref<JavaClass> > class_cache;
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 27219ac56c..c8dc3ce3c3 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -410,7 +410,7 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) {
class JNISingleton : public Object {
- OBJ_TYPE( JNISingleton, Object );
+ GDCLASS( JNISingleton, Object );
struct MethodData {
diff --git a/platform/bb10/export/export.cpp b/platform/bb10/export/export.cpp
index 476de0fedd..a79d0807aa 100644
--- a/platform/bb10/export/export.cpp
+++ b/platform/bb10/export/export.cpp
@@ -43,7 +43,7 @@
class EditorExportPlatformBB10 : public EditorExportPlatform {
- OBJ_TYPE( EditorExportPlatformBB10,EditorExportPlatform );
+ GDCLASS( EditorExportPlatformBB10,EditorExportPlatform );
String custom_package;
diff --git a/platform/bb10/payment_service.cpp b/platform/bb10/payment_service.cpp
index 68c2fc6687..3138dc2c1d 100644
--- a/platform/bb10/payment_service.cpp
+++ b/platform/bb10/payment_service.cpp
@@ -38,11 +38,11 @@ extern char* launch_dir_ptr;
void PaymentService::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("request_product_info"),&PaymentService::request_product_info);
- ObjectTypeDB::bind_method(_MD("purchase"),&PaymentService::purchase);
+ ClassDB::bind_method(_MD("request_product_info"),&PaymentService::request_product_info);
+ ClassDB::bind_method(_MD("purchase"),&PaymentService::purchase);
- ObjectTypeDB::bind_method(_MD("get_pending_event_count"),&PaymentService::get_pending_event_count);
- ObjectTypeDB::bind_method(_MD("pop_pending_event"),&PaymentService::pop_pending_event);
+ ClassDB::bind_method(_MD("get_pending_event_count"),&PaymentService::get_pending_event_count);
+ ClassDB::bind_method(_MD("pop_pending_event"),&PaymentService::pop_pending_event);
};
Error PaymentService::request_product_info(Variant p_params) {
diff --git a/platform/bb10/payment_service.h b/platform/bb10/payment_service.h
index 9c3bb04eb5..b31a954ef8 100644
--- a/platform/bb10/payment_service.h
+++ b/platform/bb10/payment_service.h
@@ -39,7 +39,7 @@
class PaymentService : public Object {
- OBJ_TYPE(PaymentService, Object);
+ GDCLASS(PaymentService, Object);
static void _bind_methods();
diff --git a/platform/iphone/game_center.h b/platform/iphone/game_center.h
index 3fe275112e..abbeaaf86f 100644
--- a/platform/iphone/game_center.h
+++ b/platform/iphone/game_center.h
@@ -35,7 +35,7 @@
class GameCenter : public Object {
- OBJ_TYPE(GameCenter, Object);
+ GDCLASS(GameCenter, Object);
static GameCenter* instance;
static void _bind_methods();
diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm
index aee5ceb211..03ee327d65 100644
--- a/platform/iphone/game_center.mm
+++ b/platform/iphone/game_center.mm
@@ -48,18 +48,18 @@ extern "C" {
GameCenter* GameCenter::instance = NULL;
void GameCenter::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("connect"),&GameCenter::connect);
- ObjectTypeDB::bind_method(_MD("is_connected"),&GameCenter::is_connected);
-
- ObjectTypeDB::bind_method(_MD("post_score"),&GameCenter::post_score);
- ObjectTypeDB::bind_method(_MD("award_achievement"),&GameCenter::award_achievement);
- ObjectTypeDB::bind_method(_MD("reset_achievements"),&GameCenter::reset_achievements);
- ObjectTypeDB::bind_method(_MD("request_achievements"),&GameCenter::request_achievements);
- ObjectTypeDB::bind_method(_MD("request_achievement_descriptions"),&GameCenter::request_achievement_descriptions);
- ObjectTypeDB::bind_method(_MD("show_game_center"),&GameCenter::show_game_center);
-
- ObjectTypeDB::bind_method(_MD("get_pending_event_count"),&GameCenter::get_pending_event_count);
- ObjectTypeDB::bind_method(_MD("pop_pending_event"),&GameCenter::pop_pending_event);
+ ClassDB::bind_method(_MD("connect"),&GameCenter::connect);
+ ClassDB::bind_method(_MD("is_connected"),&GameCenter::is_connected);
+
+ ClassDB::bind_method(_MD("post_score"),&GameCenter::post_score);
+ ClassDB::bind_method(_MD("award_achievement"),&GameCenter::award_achievement);
+ ClassDB::bind_method(_MD("reset_achievements"),&GameCenter::reset_achievements);
+ ClassDB::bind_method(_MD("request_achievements"),&GameCenter::request_achievements);
+ ClassDB::bind_method(_MD("request_achievement_descriptions"),&GameCenter::request_achievement_descriptions);
+ ClassDB::bind_method(_MD("show_game_center"),&GameCenter::show_game_center);
+
+ ClassDB::bind_method(_MD("get_pending_event_count"),&GameCenter::get_pending_event_count);
+ ClassDB::bind_method(_MD("pop_pending_event"),&GameCenter::pop_pending_event);
};
diff --git a/platform/iphone/icloud.h b/platform/iphone/icloud.h
index 92e678522f..ba50c4be15 100644
--- a/platform/iphone/icloud.h
+++ b/platform/iphone/icloud.h
@@ -36,7 +36,7 @@
class ICloud : public Object {
- OBJ_TYPE(ICloud, Object);
+ GDCLASS(ICloud, Object);
static ICloud* instance;
static void _bind_methods();
diff --git a/platform/iphone/icloud.mm b/platform/iphone/icloud.mm
index b88af468fd..de70bb7e14 100644
--- a/platform/iphone/icloud.mm
+++ b/platform/iphone/icloud.mm
@@ -44,14 +44,14 @@ extern "C" {
ICloud* ICloud::instance = NULL;
void ICloud::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("remove_key"),&ICloud::remove_key);
- ObjectTypeDB::bind_method(_MD("set_key_values"),&ICloud::set_key_values);
- ObjectTypeDB::bind_method(_MD("get_key_value"),&ICloud::get_key_value);
- ObjectTypeDB::bind_method(_MD("synchronize_key_values"),&ICloud::synchronize_key_values);
- ObjectTypeDB::bind_method(_MD("get_all_key_values"),&ICloud::get_all_key_values);
-
- ObjectTypeDB::bind_method(_MD("get_pending_event_count"),&ICloud::get_pending_event_count);
- ObjectTypeDB::bind_method(_MD("pop_pending_event"),&ICloud::pop_pending_event);
+ ClassDB::bind_method(_MD("remove_key"),&ICloud::remove_key);
+ ClassDB::bind_method(_MD("set_key_values"),&ICloud::set_key_values);
+ ClassDB::bind_method(_MD("get_key_value"),&ICloud::get_key_value);
+ ClassDB::bind_method(_MD("synchronize_key_values"),&ICloud::synchronize_key_values);
+ ClassDB::bind_method(_MD("get_all_key_values"),&ICloud::get_all_key_values);
+
+ ClassDB::bind_method(_MD("get_pending_event_count"),&ICloud::get_pending_event_count);
+ ClassDB::bind_method(_MD("pop_pending_event"),&ICloud::pop_pending_event);
};
int ICloud::get_pending_event_count() {
diff --git a/platform/iphone/in_app_store.h b/platform/iphone/in_app_store.h
index 1598ae29df..59a745c0f7 100644
--- a/platform/iphone/in_app_store.h
+++ b/platform/iphone/in_app_store.h
@@ -35,7 +35,7 @@
class InAppStore : public Object {
- OBJ_TYPE(InAppStore, Object);
+ GDCLASS(InAppStore, Object);
static InAppStore* instance;
static void _bind_methods();
diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm
index bef01a9724..49026ceb0a 100644
--- a/platform/iphone/in_app_store.mm
+++ b/platform/iphone/in_app_store.mm
@@ -66,13 +66,13 @@ NSMutableDictionary* pending_transactions = [NSMutableDictionary dictionary];
InAppStore* InAppStore::instance = NULL;
void InAppStore::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("request_product_info"),&InAppStore::request_product_info);
- ObjectTypeDB::bind_method(_MD("purchase"),&InAppStore::purchase);
+ ClassDB::bind_method(_MD("request_product_info"),&InAppStore::request_product_info);
+ ClassDB::bind_method(_MD("purchase"),&InAppStore::purchase);
- ObjectTypeDB::bind_method(_MD("get_pending_event_count"),&InAppStore::get_pending_event_count);
- ObjectTypeDB::bind_method(_MD("pop_pending_event"),&InAppStore::pop_pending_event);
- ObjectTypeDB::bind_method(_MD("finish_transaction"),&InAppStore::finish_transaction);
- ObjectTypeDB::bind_method(_MD("set_auto_finish_transaction"),&InAppStore::set_auto_finish_transaction);
+ ClassDB::bind_method(_MD("get_pending_event_count"),&InAppStore::get_pending_event_count);
+ ClassDB::bind_method(_MD("pop_pending_event"),&InAppStore::pop_pending_event);
+ ClassDB::bind_method(_MD("finish_transaction"),&InAppStore::finish_transaction);
+ ClassDB::bind_method(_MD("set_auto_finish_transaction"),&InAppStore::set_auto_finish_transaction);
};
@interface ProductsDelegate : NSObject<SKProductsRequestDelegate> {
diff --git a/platform/iphone/ios.h b/platform/iphone/ios.h
index 6a8c3b1a8e..345bf127f2 100644
--- a/platform/iphone/ios.h
+++ b/platform/iphone/ios.h
@@ -33,7 +33,7 @@
class iOS : public Object {
- OBJ_TYPE(iOS, Object);
+ GDCLASS(iOS, Object);
static void _bind_methods();
diff --git a/platform/iphone/ios.mm b/platform/iphone/ios.mm
index e7e4d9191c..a068d4aa31 100644
--- a/platform/iphone/ios.mm
+++ b/platform/iphone/ios.mm
@@ -32,7 +32,7 @@
void iOS::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_rate_url","app_id"),&iOS::get_rate_url);
+ ClassDB::bind_method(_MD("get_rate_url","app_id"),&iOS::get_rate_url);
};
String iOS::get_rate_url(int p_app_id) const {
diff --git a/platform/javascript/audio_server_javascript.h b/platform/javascript/audio_server_javascript.h
index 95c16db3ee..47aadf6bc6 100644
--- a/platform/javascript/audio_server_javascript.h
+++ b/platform/javascript/audio_server_javascript.h
@@ -34,7 +34,7 @@
class AudioServerJavascript : public AudioServer {
- OBJ_TYPE(AudioServerJavascript,AudioServer);
+ GDCLASS(AudioServerJavascript,AudioServer);
enum {
INTERNAL_BUFFER_SIZE=4096,
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index f2b63ff12f..77aab98e0c 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -40,7 +40,7 @@
#include "string.h"
class EditorExportPlatformJavaScript : public EditorExportPlatform {
- OBJ_TYPE( EditorExportPlatformJavaScript,EditorExportPlatform );
+ GDCLASS( EditorExportPlatformJavaScript,EditorExportPlatform );
String custom_release_package;
String custom_debug_package;
diff --git a/platform/javascript/javascript_eval.h b/platform/javascript/javascript_eval.h
index 9b2c91f25e..679224d519 100644
--- a/platform/javascript/javascript_eval.h
+++ b/platform/javascript/javascript_eval.h
@@ -35,7 +35,7 @@
class JavaScript : public Object {
private:
- OBJ_TYPE( JavaScript, Object );
+ GDCLASS( JavaScript, Object );
static JavaScript *singleton;
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 64628e4a07..d8298eee73 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -43,7 +43,7 @@
class EditorExportPlatformOSX : public EditorExportPlatform {
- OBJ_TYPE( EditorExportPlatformOSX,EditorExportPlatform );
+ GDCLASS( EditorExportPlatformOSX,EditorExportPlatform );
String custom_release_package;
String custom_debug_package;
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index 017ad0f48e..186c509ca5 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -434,7 +434,7 @@ public:
class EditorExportPlatformUWP : public EditorExportPlatform {
- OBJ_TYPE(EditorExportPlatformUWP, EditorExportPlatform);
+ GDCLASS(EditorExportPlatformUWP, EditorExportPlatform);
Ref<ImageTexture> logo;
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;
diff --git a/servers/audio/audio_server_sw.h b/servers/audio/audio_server_sw.h
index c416d3393f..f97ae8db82 100644
--- a/servers/audio/audio_server_sw.h
+++ b/servers/audio/audio_server_sw.h
@@ -37,7 +37,7 @@
#include "os/thread.h"
class AudioServerSW : public AudioServer {
- OBJ_TYPE( AudioServerSW, AudioServer );
+ GDCLASS( AudioServerSW, AudioServer );
_THREAD_SAFE_CLASS_
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 04e21e1007..78d793fe46 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -104,69 +104,69 @@ void AudioServer::sample_set_signed_data(RID p_sample, const DVector<float>& p_b
void AudioServer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("sample_create","format","stereo","length"), &AudioServer::sample_create );
- ObjectTypeDB::bind_method(_MD("sample_set_description","sample","description"), &AudioServer::sample_set_description );
- ObjectTypeDB::bind_method(_MD("sample_get_description","sample"), &AudioServer::sample_get_description );
+ ClassDB::bind_method(_MD("sample_create","format","stereo","length"), &AudioServer::sample_create );
+ ClassDB::bind_method(_MD("sample_set_description","sample","description"), &AudioServer::sample_set_description );
+ ClassDB::bind_method(_MD("sample_get_description","sample"), &AudioServer::sample_get_description );
- ObjectTypeDB::bind_method(_MD("sample_get_format","sample"), &AudioServer::sample_get_format );
- ObjectTypeDB::bind_method(_MD("sample_is_stereo","sample"), &AudioServer::sample_is_stereo );
- ObjectTypeDB::bind_method(_MD("sample_get_length","sample"), &AudioServer::sample_get_length );
+ ClassDB::bind_method(_MD("sample_get_format","sample"), &AudioServer::sample_get_format );
+ ClassDB::bind_method(_MD("sample_is_stereo","sample"), &AudioServer::sample_is_stereo );
+ ClassDB::bind_method(_MD("sample_get_length","sample"), &AudioServer::sample_get_length );
- ObjectTypeDB::bind_method(_MD("sample_set_signed_data","sample","data"), &AudioServer::sample_set_signed_data );
- ObjectTypeDB::bind_method(_MD("sample_set_data","sample","data"), &AudioServer::sample_set_data );
- ObjectTypeDB::bind_method(_MD("sample_get_data","sample"), &AudioServer::sample_get_data );
+ ClassDB::bind_method(_MD("sample_set_signed_data","sample","data"), &AudioServer::sample_set_signed_data );
+ ClassDB::bind_method(_MD("sample_set_data","sample","data"), &AudioServer::sample_set_data );
+ ClassDB::bind_method(_MD("sample_get_data","sample"), &AudioServer::sample_get_data );
- ObjectTypeDB::bind_method(_MD("sample_set_mix_rate","sample","mix_rate"), &AudioServer::sample_set_mix_rate );
- ObjectTypeDB::bind_method(_MD("sample_get_mix_rate","sample"), &AudioServer::sample_get_mix_rate );
+ ClassDB::bind_method(_MD("sample_set_mix_rate","sample","mix_rate"), &AudioServer::sample_set_mix_rate );
+ ClassDB::bind_method(_MD("sample_get_mix_rate","sample"), &AudioServer::sample_get_mix_rate );
- ObjectTypeDB::bind_method(_MD("sample_set_loop_format","sample","loop_format"), &AudioServer::sample_set_loop_format );
- ObjectTypeDB::bind_method(_MD("sample_get_loop_format","sample"), &AudioServer::sample_get_loop_format );
+ ClassDB::bind_method(_MD("sample_set_loop_format","sample","loop_format"), &AudioServer::sample_set_loop_format );
+ ClassDB::bind_method(_MD("sample_get_loop_format","sample"), &AudioServer::sample_get_loop_format );
- ObjectTypeDB::bind_method(_MD("sample_set_loop_begin","sample","pos"), &AudioServer::sample_set_loop_begin );
- ObjectTypeDB::bind_method(_MD("sample_get_loop_begin","sample"), &AudioServer::sample_get_loop_begin );
+ ClassDB::bind_method(_MD("sample_set_loop_begin","sample","pos"), &AudioServer::sample_set_loop_begin );
+ ClassDB::bind_method(_MD("sample_get_loop_begin","sample"), &AudioServer::sample_get_loop_begin );
- ObjectTypeDB::bind_method(_MD("sample_set_loop_end","sample","pos"), &AudioServer::sample_set_loop_end );
- ObjectTypeDB::bind_method(_MD("sample_get_loop_end","sample"), &AudioServer::sample_get_loop_end );
+ ClassDB::bind_method(_MD("sample_set_loop_end","sample","pos"), &AudioServer::sample_set_loop_end );
+ ClassDB::bind_method(_MD("sample_get_loop_end","sample"), &AudioServer::sample_get_loop_end );
- ObjectTypeDB::bind_method(_MD("voice_create"), &AudioServer::voice_create );
- ObjectTypeDB::bind_method(_MD("voice_play","voice","sample"), &AudioServer::voice_play );
- ObjectTypeDB::bind_method(_MD("voice_set_volume","voice","volume"), &AudioServer::voice_set_volume );
- ObjectTypeDB::bind_method(_MD("voice_set_pan","voice","pan","depth","height"), &AudioServer::voice_set_pan,DEFVAL(0),DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("voice_set_filter","voice","type","cutoff","resonance","gain"), &AudioServer::voice_set_filter,DEFVAL(0) );
- ObjectTypeDB::bind_method(_MD("voice_set_chorus","voice","chorus"), &AudioServer::voice_set_chorus );
- ObjectTypeDB::bind_method(_MD("voice_set_reverb","voice","room","reverb"), &AudioServer::voice_set_reverb );
- ObjectTypeDB::bind_method(_MD("voice_set_mix_rate","voice","rate"), &AudioServer::voice_set_mix_rate );
- ObjectTypeDB::bind_method(_MD("voice_set_positional","voice","enabled"), &AudioServer::voice_set_positional );
+ ClassDB::bind_method(_MD("voice_create"), &AudioServer::voice_create );
+ ClassDB::bind_method(_MD("voice_play","voice","sample"), &AudioServer::voice_play );
+ ClassDB::bind_method(_MD("voice_set_volume","voice","volume"), &AudioServer::voice_set_volume );
+ ClassDB::bind_method(_MD("voice_set_pan","voice","pan","depth","height"), &AudioServer::voice_set_pan,DEFVAL(0),DEFVAL(0) );
+ ClassDB::bind_method(_MD("voice_set_filter","voice","type","cutoff","resonance","gain"), &AudioServer::voice_set_filter,DEFVAL(0) );
+ ClassDB::bind_method(_MD("voice_set_chorus","voice","chorus"), &AudioServer::voice_set_chorus );
+ ClassDB::bind_method(_MD("voice_set_reverb","voice","room","reverb"), &AudioServer::voice_set_reverb );
+ ClassDB::bind_method(_MD("voice_set_mix_rate","voice","rate"), &AudioServer::voice_set_mix_rate );
+ ClassDB::bind_method(_MD("voice_set_positional","voice","enabled"), &AudioServer::voice_set_positional );
- ObjectTypeDB::bind_method(_MD("voice_get_volume","voice"), &AudioServer::voice_get_volume );
- ObjectTypeDB::bind_method(_MD("voice_get_pan","voice"), &AudioServer::voice_get_pan );
- ObjectTypeDB::bind_method(_MD("voice_get_pan_height","voice"), &AudioServer::voice_get_pan_height );
- ObjectTypeDB::bind_method(_MD("voice_get_pan_depth","voice"), &AudioServer::voice_get_pan_depth );
- ObjectTypeDB::bind_method(_MD("voice_get_filter_type","voice"), &AudioServer::voice_get_filter_type );
- ObjectTypeDB::bind_method(_MD("voice_get_filter_cutoff","voice"), &AudioServer::voice_get_filter_cutoff );
- ObjectTypeDB::bind_method(_MD("voice_get_filter_resonance","voice"), &AudioServer::voice_get_filter_resonance );
- ObjectTypeDB::bind_method(_MD("voice_get_chorus","voice"), &AudioServer::voice_get_chorus );
- ObjectTypeDB::bind_method(_MD("voice_get_reverb_type","voice"), &AudioServer::voice_get_reverb_type );
- ObjectTypeDB::bind_method(_MD("voice_get_reverb","voice"), &AudioServer::voice_get_reverb );
- ObjectTypeDB::bind_method(_MD("voice_get_mix_rate","voice"), &AudioServer::voice_get_mix_rate );
- ObjectTypeDB::bind_method(_MD("voice_is_positional","voice"), &AudioServer::voice_is_positional );
+ ClassDB::bind_method(_MD("voice_get_volume","voice"), &AudioServer::voice_get_volume );
+ ClassDB::bind_method(_MD("voice_get_pan","voice"), &AudioServer::voice_get_pan );
+ ClassDB::bind_method(_MD("voice_get_pan_height","voice"), &AudioServer::voice_get_pan_height );
+ ClassDB::bind_method(_MD("voice_get_pan_depth","voice"), &AudioServer::voice_get_pan_depth );
+ ClassDB::bind_method(_MD("voice_get_filter_type","voice"), &AudioServer::voice_get_filter_type );
+ ClassDB::bind_method(_MD("voice_get_filter_cutoff","voice"), &AudioServer::voice_get_filter_cutoff );
+ ClassDB::bind_method(_MD("voice_get_filter_resonance","voice"), &AudioServer::voice_get_filter_resonance );
+ ClassDB::bind_method(_MD("voice_get_chorus","voice"), &AudioServer::voice_get_chorus );
+ ClassDB::bind_method(_MD("voice_get_reverb_type","voice"), &AudioServer::voice_get_reverb_type );
+ ClassDB::bind_method(_MD("voice_get_reverb","voice"), &AudioServer::voice_get_reverb );
+ ClassDB::bind_method(_MD("voice_get_mix_rate","voice"), &AudioServer::voice_get_mix_rate );
+ ClassDB::bind_method(_MD("voice_is_positional","voice"), &AudioServer::voice_is_positional );
- ObjectTypeDB::bind_method(_MD("voice_stop","voice"), &AudioServer::voice_stop );
+ ClassDB::bind_method(_MD("voice_stop","voice"), &AudioServer::voice_stop );
- ObjectTypeDB::bind_method(_MD("free_rid","rid"), &AudioServer::free );
+ ClassDB::bind_method(_MD("free_rid","rid"), &AudioServer::free );
- ObjectTypeDB::bind_method(_MD("set_stream_global_volume_scale","scale"), &AudioServer::set_stream_global_volume_scale );
- ObjectTypeDB::bind_method(_MD("get_stream_global_volume_scale"), &AudioServer::get_stream_global_volume_scale );
+ ClassDB::bind_method(_MD("set_stream_global_volume_scale","scale"), &AudioServer::set_stream_global_volume_scale );
+ ClassDB::bind_method(_MD("get_stream_global_volume_scale"), &AudioServer::get_stream_global_volume_scale );
- ObjectTypeDB::bind_method(_MD("set_fx_global_volume_scale","scale"), &AudioServer::set_fx_global_volume_scale );
- ObjectTypeDB::bind_method(_MD("get_fx_global_volume_scale"), &AudioServer::get_fx_global_volume_scale );
+ ClassDB::bind_method(_MD("set_fx_global_volume_scale","scale"), &AudioServer::set_fx_global_volume_scale );
+ ClassDB::bind_method(_MD("get_fx_global_volume_scale"), &AudioServer::get_fx_global_volume_scale );
- ObjectTypeDB::bind_method(_MD("set_event_voice_global_volume_scale","scale"), &AudioServer::set_event_voice_global_volume_scale );
- ObjectTypeDB::bind_method(_MD("get_event_voice_global_volume_scale"), &AudioServer::get_event_voice_global_volume_scale );
+ ClassDB::bind_method(_MD("set_event_voice_global_volume_scale","scale"), &AudioServer::set_event_voice_global_volume_scale );
+ ClassDB::bind_method(_MD("get_event_voice_global_volume_scale"), &AudioServer::get_event_voice_global_volume_scale );
BIND_CONSTANT( SAMPLE_FORMAT_PCM8 );
BIND_CONSTANT( SAMPLE_FORMAT_PCM16 );
diff --git a/servers/audio_server.h b/servers/audio_server.h
index 0ec708a0a8..9d8ae2bff9 100644
--- a/servers/audio_server.h
+++ b/servers/audio_server.h
@@ -107,7 +107,7 @@ public:
class AudioServer : public Object {
- OBJ_TYPE( AudioServer, Object );
+ GDCLASS( AudioServer, Object );
static AudioServer *singleton;
protected:
diff --git a/servers/physics/body_sw.h b/servers/physics/body_sw.h
index 2855e03a81..9b28468b34 100644
--- a/servers/physics/body_sw.h
+++ b/servers/physics/body_sw.h
@@ -351,7 +351,7 @@ void BodySW::add_contact(const Vector3& p_local_pos,const Vector3& p_local_norma
class PhysicsDirectBodyStateSW : public PhysicsDirectBodyState {
- OBJ_TYPE( PhysicsDirectBodyStateSW, PhysicsDirectBodyState );
+ GDCLASS( PhysicsDirectBodyStateSW, PhysicsDirectBodyState );
public:
diff --git a/servers/physics/physics_server_sw.h b/servers/physics/physics_server_sw.h
index 46c77dc722..bd9b5e4e30 100644
--- a/servers/physics/physics_server_sw.h
+++ b/servers/physics/physics_server_sw.h
@@ -39,7 +39,7 @@
class PhysicsServerSW : public PhysicsServer {
- OBJ_TYPE( PhysicsServerSW, PhysicsServer );
+ GDCLASS( PhysicsServerSW, PhysicsServer );
friend class PhysicsDirectSpaceStateSW;
bool active;
diff --git a/servers/physics/space_sw.h b/servers/physics/space_sw.h
index 21973b785e..0abc4726ea 100644
--- a/servers/physics/space_sw.h
+++ b/servers/physics/space_sw.h
@@ -42,7 +42,7 @@
class PhysicsDirectSpaceStateSW : public PhysicsDirectSpaceState {
- OBJ_TYPE( PhysicsDirectSpaceStateSW, PhysicsDirectSpaceState );
+ GDCLASS( PhysicsDirectSpaceStateSW, PhysicsDirectSpaceState );
public:
SpaceSW *space;
diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h
index ea42e604ac..59e88f5640 100644
--- a/servers/physics_2d/body_2d_sw.h
+++ b/servers/physics_2d/body_2d_sw.h
@@ -352,7 +352,7 @@ void Body2DSW::add_contact(const Vector2& p_local_pos,const Vector2& p_local_nor
class Physics2DDirectBodyStateSW : public Physics2DDirectBodyState {
- OBJ_TYPE( Physics2DDirectBodyStateSW, Physics2DDirectBodyState );
+ GDCLASS( Physics2DDirectBodyStateSW, Physics2DDirectBodyState );
public:
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index 7664bce9c3..f290e9391f 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -39,7 +39,7 @@
class Physics2DServerSW : public Physics2DServer {
- OBJ_TYPE( Physics2DServerSW, Physics2DServer );
+ GDCLASS( Physics2DServerSW, Physics2DServer );
friend class Physics2DDirectSpaceStateSW;
friend class Physics2DDirectBodyStateSW;
diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h
index 7fa9e17eea..692cf08c87 100644
--- a/servers/physics_2d/space_2d_sw.h
+++ b/servers/physics_2d/space_2d_sw.h
@@ -42,7 +42,7 @@
class Physics2DDirectSpaceStateSW : public Physics2DDirectSpaceState {
- OBJ_TYPE( Physics2DDirectSpaceStateSW, Physics2DDirectSpaceState );
+ GDCLASS( Physics2DDirectSpaceStateSW, Physics2DDirectSpaceState );
public:
Space2DSW *space;
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 5058264734..22dbfd6e80 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -73,40 +73,40 @@ Physics2DServer * Physics2DServer::get_singleton() {
void Physics2DDirectBodyState::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_total_gravity"),&Physics2DDirectBodyState::get_total_gravity);
- ObjectTypeDB::bind_method(_MD("get_total_linear_damp"),&Physics2DDirectBodyState::get_total_linear_damp);
- ObjectTypeDB::bind_method(_MD("get_total_angular_damp"),&Physics2DDirectBodyState::get_total_angular_damp);
+ ClassDB::bind_method(_MD("get_total_gravity"),&Physics2DDirectBodyState::get_total_gravity);
+ ClassDB::bind_method(_MD("get_total_linear_damp"),&Physics2DDirectBodyState::get_total_linear_damp);
+ ClassDB::bind_method(_MD("get_total_angular_damp"),&Physics2DDirectBodyState::get_total_angular_damp);
- ObjectTypeDB::bind_method(_MD("get_inverse_mass"),&Physics2DDirectBodyState::get_inverse_mass);
- ObjectTypeDB::bind_method(_MD("get_inverse_inertia"),&Physics2DDirectBodyState::get_inverse_inertia);
+ ClassDB::bind_method(_MD("get_inverse_mass"),&Physics2DDirectBodyState::get_inverse_mass);
+ ClassDB::bind_method(_MD("get_inverse_inertia"),&Physics2DDirectBodyState::get_inverse_inertia);
- ObjectTypeDB::bind_method(_MD("set_linear_velocity","velocity"),&Physics2DDirectBodyState::set_linear_velocity);
- ObjectTypeDB::bind_method(_MD("get_linear_velocity"),&Physics2DDirectBodyState::get_linear_velocity);
+ ClassDB::bind_method(_MD("set_linear_velocity","velocity"),&Physics2DDirectBodyState::set_linear_velocity);
+ ClassDB::bind_method(_MD("get_linear_velocity"),&Physics2DDirectBodyState::get_linear_velocity);
- ObjectTypeDB::bind_method(_MD("set_angular_velocity","velocity"),&Physics2DDirectBodyState::set_angular_velocity);
- ObjectTypeDB::bind_method(_MD("get_angular_velocity"),&Physics2DDirectBodyState::get_angular_velocity);
+ ClassDB::bind_method(_MD("set_angular_velocity","velocity"),&Physics2DDirectBodyState::set_angular_velocity);
+ ClassDB::bind_method(_MD("get_angular_velocity"),&Physics2DDirectBodyState::get_angular_velocity);
- ObjectTypeDB::bind_method(_MD("set_transform","transform"),&Physics2DDirectBodyState::set_transform);
- ObjectTypeDB::bind_method(_MD("get_transform"),&Physics2DDirectBodyState::get_transform);
+ ClassDB::bind_method(_MD("set_transform","transform"),&Physics2DDirectBodyState::set_transform);
+ ClassDB::bind_method(_MD("get_transform"),&Physics2DDirectBodyState::get_transform);
- ObjectTypeDB::bind_method(_MD("set_sleep_state","enabled"),&Physics2DDirectBodyState::set_sleep_state);
- ObjectTypeDB::bind_method(_MD("is_sleeping"),&Physics2DDirectBodyState::is_sleeping);
+ ClassDB::bind_method(_MD("set_sleep_state","enabled"),&Physics2DDirectBodyState::set_sleep_state);
+ ClassDB::bind_method(_MD("is_sleeping"),&Physics2DDirectBodyState::is_sleeping);
- ObjectTypeDB::bind_method(_MD("get_contact_count"),&Physics2DDirectBodyState::get_contact_count);
+ ClassDB::bind_method(_MD("get_contact_count"),&Physics2DDirectBodyState::get_contact_count);
- ObjectTypeDB::bind_method(_MD("get_contact_local_pos","contact_idx"),&Physics2DDirectBodyState::get_contact_local_pos);
- ObjectTypeDB::bind_method(_MD("get_contact_local_normal","contact_idx"),&Physics2DDirectBodyState::get_contact_local_normal);
- ObjectTypeDB::bind_method(_MD("get_contact_local_shape","contact_idx"),&Physics2DDirectBodyState::get_contact_local_shape);
- ObjectTypeDB::bind_method(_MD("get_contact_collider","contact_idx"),&Physics2DDirectBodyState::get_contact_collider);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_pos","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_pos);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_id","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_id);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_object","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_object);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_shape","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_shape);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_shape_metadata:Variant","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_shape_metadata);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_velocity_at_pos","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_velocity_at_pos);
- ObjectTypeDB::bind_method(_MD("get_step"),&Physics2DDirectBodyState::get_step);
- ObjectTypeDB::bind_method(_MD("integrate_forces"),&Physics2DDirectBodyState::integrate_forces);
- ObjectTypeDB::bind_method(_MD("get_space_state:Physics2DDirectSpaceState"),&Physics2DDirectBodyState::get_space_state);
+ ClassDB::bind_method(_MD("get_contact_local_pos","contact_idx"),&Physics2DDirectBodyState::get_contact_local_pos);
+ ClassDB::bind_method(_MD("get_contact_local_normal","contact_idx"),&Physics2DDirectBodyState::get_contact_local_normal);
+ ClassDB::bind_method(_MD("get_contact_local_shape","contact_idx"),&Physics2DDirectBodyState::get_contact_local_shape);
+ ClassDB::bind_method(_MD("get_contact_collider","contact_idx"),&Physics2DDirectBodyState::get_contact_collider);
+ ClassDB::bind_method(_MD("get_contact_collider_pos","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_pos);
+ ClassDB::bind_method(_MD("get_contact_collider_id","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_id);
+ ClassDB::bind_method(_MD("get_contact_collider_object","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_object);
+ ClassDB::bind_method(_MD("get_contact_collider_shape","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_shape);
+ ClassDB::bind_method(_MD("get_contact_collider_shape_metadata:Variant","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_shape_metadata);
+ ClassDB::bind_method(_MD("get_contact_collider_velocity_at_pos","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_velocity_at_pos);
+ ClassDB::bind_method(_MD("get_step"),&Physics2DDirectBodyState::get_step);
+ ClassDB::bind_method(_MD("integrate_forces"),&Physics2DDirectBodyState::integrate_forces);
+ ClassDB::bind_method(_MD("get_space_state:Physics2DDirectSpaceState"),&Physics2DDirectBodyState::get_space_state);
}
@@ -198,27 +198,27 @@ Vector<RID> Physics2DShapeQueryParameters::get_exclude() const{
void Physics2DShapeQueryParameters::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_shape","shape:Shape2D"),&Physics2DShapeQueryParameters::set_shape);
- ObjectTypeDB::bind_method(_MD("set_shape_rid","shape"),&Physics2DShapeQueryParameters::set_shape_rid);
- ObjectTypeDB::bind_method(_MD("get_shape_rid"),&Physics2DShapeQueryParameters::get_shape_rid);
+ ClassDB::bind_method(_MD("set_shape","shape:Shape2D"),&Physics2DShapeQueryParameters::set_shape);
+ ClassDB::bind_method(_MD("set_shape_rid","shape"),&Physics2DShapeQueryParameters::set_shape_rid);
+ ClassDB::bind_method(_MD("get_shape_rid"),&Physics2DShapeQueryParameters::get_shape_rid);
- ObjectTypeDB::bind_method(_MD("set_transform","transform"),&Physics2DShapeQueryParameters::set_transform);
- ObjectTypeDB::bind_method(_MD("get_transform"),&Physics2DShapeQueryParameters::get_transform);
+ ClassDB::bind_method(_MD("set_transform","transform"),&Physics2DShapeQueryParameters::set_transform);
+ ClassDB::bind_method(_MD("get_transform"),&Physics2DShapeQueryParameters::get_transform);
- ObjectTypeDB::bind_method(_MD("set_motion","motion"),&Physics2DShapeQueryParameters::set_motion);
- ObjectTypeDB::bind_method(_MD("get_motion"),&Physics2DShapeQueryParameters::get_motion);
+ ClassDB::bind_method(_MD("set_motion","motion"),&Physics2DShapeQueryParameters::set_motion);
+ ClassDB::bind_method(_MD("get_motion"),&Physics2DShapeQueryParameters::get_motion);
- ObjectTypeDB::bind_method(_MD("set_margin","margin"),&Physics2DShapeQueryParameters::set_margin);
- ObjectTypeDB::bind_method(_MD("get_margin"),&Physics2DShapeQueryParameters::get_margin);
+ ClassDB::bind_method(_MD("set_margin","margin"),&Physics2DShapeQueryParameters::set_margin);
+ ClassDB::bind_method(_MD("get_margin"),&Physics2DShapeQueryParameters::get_margin);
- ObjectTypeDB::bind_method(_MD("set_layer_mask","layer_mask"),&Physics2DShapeQueryParameters::set_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_layer_mask"),&Physics2DShapeQueryParameters::get_layer_mask);
+ ClassDB::bind_method(_MD("set_layer_mask","layer_mask"),&Physics2DShapeQueryParameters::set_layer_mask);
+ ClassDB::bind_method(_MD("get_layer_mask"),&Physics2DShapeQueryParameters::get_layer_mask);
- ObjectTypeDB::bind_method(_MD("set_object_type_mask","object_type_mask"),&Physics2DShapeQueryParameters::set_object_type_mask);
- ObjectTypeDB::bind_method(_MD("get_object_type_mask"),&Physics2DShapeQueryParameters::get_object_type_mask);
+ ClassDB::bind_method(_MD("set_object_type_mask","object_type_mask"),&Physics2DShapeQueryParameters::set_object_type_mask);
+ ClassDB::bind_method(_MD("get_object_type_mask"),&Physics2DShapeQueryParameters::get_object_type_mask);
- ObjectTypeDB::bind_method(_MD("set_exclude","exclude"),&Physics2DShapeQueryParameters::set_exclude);
- ObjectTypeDB::bind_method(_MD("get_exclude"),&Physics2DShapeQueryParameters::get_exclude);
+ ClassDB::bind_method(_MD("set_exclude","exclude"),&Physics2DShapeQueryParameters::set_exclude);
+ ClassDB::bind_method(_MD("get_exclude"),&Physics2DShapeQueryParameters::get_exclude);
}
@@ -366,13 +366,13 @@ Physics2DDirectSpaceState::Physics2DDirectSpaceState() {
void Physics2DDirectSpaceState::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("intersect_point","point","max_results","exclude","layer_mask","type_mask"),&Physics2DDirectSpaceState::_intersect_point,DEFVAL(32),DEFVAL(Array()),DEFVAL(0x7FFFFFFF),DEFVAL(TYPE_MASK_COLLISION));
- ObjectTypeDB::bind_method(_MD("intersect_ray:Dictionary","from","to","exclude","layer_mask","type_mask"),&Physics2DDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0x7FFFFFFF),DEFVAL(TYPE_MASK_COLLISION));
- ObjectTypeDB::bind_method(_MD("intersect_shape","shape:Physics2DShapeQueryParameters","max_results"),&Physics2DDirectSpaceState::_intersect_shape,DEFVAL(32));
- ObjectTypeDB::bind_method(_MD("cast_motion","shape:Physics2DShapeQueryParameters"),&Physics2DDirectSpaceState::_cast_motion);
- ObjectTypeDB::bind_method(_MD("collide_shape","shape:Physics2DShapeQueryParameters","max_results"),&Physics2DDirectSpaceState::_collide_shape,DEFVAL(32));
- ObjectTypeDB::bind_method(_MD("get_rest_info","shape:Physics2DShapeQueryParameters"),&Physics2DDirectSpaceState::_get_rest_info);
- //ObjectTypeDB::bind_method(_MD("cast_motion","shape","xform","motion","exclude","umask"),&Physics2DDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0));
+ ClassDB::bind_method(_MD("intersect_point","point","max_results","exclude","layer_mask","type_mask"),&Physics2DDirectSpaceState::_intersect_point,DEFVAL(32),DEFVAL(Array()),DEFVAL(0x7FFFFFFF),DEFVAL(TYPE_MASK_COLLISION));
+ ClassDB::bind_method(_MD("intersect_ray:Dictionary","from","to","exclude","layer_mask","type_mask"),&Physics2DDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0x7FFFFFFF),DEFVAL(TYPE_MASK_COLLISION));
+ ClassDB::bind_method(_MD("intersect_shape","shape:Physics2DShapeQueryParameters","max_results"),&Physics2DDirectSpaceState::_intersect_shape,DEFVAL(32));
+ ClassDB::bind_method(_MD("cast_motion","shape:Physics2DShapeQueryParameters"),&Physics2DDirectSpaceState::_cast_motion);
+ ClassDB::bind_method(_MD("collide_shape","shape:Physics2DShapeQueryParameters","max_results"),&Physics2DDirectSpaceState::_collide_shape,DEFVAL(32));
+ ClassDB::bind_method(_MD("get_rest_info","shape:Physics2DShapeQueryParameters"),&Physics2DDirectSpaceState::_get_rest_info);
+ //ClassDB::bind_method(_MD("cast_motion","shape","xform","motion","exclude","umask"),&Physics2DDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0));
BIND_CONSTANT( TYPE_MASK_STATIC_BODY );
BIND_CONSTANT( TYPE_MASK_KINEMATIC_BODY );
@@ -412,11 +412,11 @@ Physics2DShapeQueryResult::Physics2DShapeQueryResult() {
void Physics2DShapeQueryResult::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_result_count"),&Physics2DShapeQueryResult::get_result_count);
- ObjectTypeDB::bind_method(_MD("get_result_rid","idx"),&Physics2DShapeQueryResult::get_result_rid);
- ObjectTypeDB::bind_method(_MD("get_result_object_id","idx"),&Physics2DShapeQueryResult::get_result_object_id);
- ObjectTypeDB::bind_method(_MD("get_result_object","idx"),&Physics2DShapeQueryResult::get_result_object);
- ObjectTypeDB::bind_method(_MD("get_result_object_shape","idx"),&Physics2DShapeQueryResult::get_result_object_shape);
+ ClassDB::bind_method(_MD("get_result_count"),&Physics2DShapeQueryResult::get_result_count);
+ ClassDB::bind_method(_MD("get_result_rid","idx"),&Physics2DShapeQueryResult::get_result_rid);
+ ClassDB::bind_method(_MD("get_result_object_id","idx"),&Physics2DShapeQueryResult::get_result_object_id);
+ ClassDB::bind_method(_MD("get_result_object","idx"),&Physics2DShapeQueryResult::get_result_object);
+ ClassDB::bind_method(_MD("get_result_object_shape","idx"),&Physics2DShapeQueryResult::get_result_object_shape);
}
@@ -468,16 +468,16 @@ int Physics2DTestMotionResult::get_collider_shape() const{
void Physics2DTestMotionResult::_bind_methods() {
- //ObjectTypeDB::bind_method(_MD("is_colliding"),&Physics2DTestMotionResult::is_colliding);
- ObjectTypeDB::bind_method(_MD("get_motion"),&Physics2DTestMotionResult::get_motion);
- ObjectTypeDB::bind_method(_MD("get_motion_remainder"),&Physics2DTestMotionResult::get_motion_remainder);
- ObjectTypeDB::bind_method(_MD("get_collision_point"),&Physics2DTestMotionResult::get_collision_point);
- ObjectTypeDB::bind_method(_MD("get_collision_normal"),&Physics2DTestMotionResult::get_collision_normal);
- ObjectTypeDB::bind_method(_MD("get_collider_velocity"),&Physics2DTestMotionResult::get_collider_velocity);
- ObjectTypeDB::bind_method(_MD("get_collider_id"),&Physics2DTestMotionResult::get_collider_id);
- ObjectTypeDB::bind_method(_MD("get_collider_rid"),&Physics2DTestMotionResult::get_collider_rid);
- ObjectTypeDB::bind_method(_MD("get_collider"),&Physics2DTestMotionResult::get_collider);
- ObjectTypeDB::bind_method(_MD("get_collider_shape"),&Physics2DTestMotionResult::get_collider_shape);
+ //ClassDB::bind_method(_MD("is_colliding"),&Physics2DTestMotionResult::is_colliding);
+ ClassDB::bind_method(_MD("get_motion"),&Physics2DTestMotionResult::get_motion);
+ ClassDB::bind_method(_MD("get_motion_remainder"),&Physics2DTestMotionResult::get_motion_remainder);
+ ClassDB::bind_method(_MD("get_collision_point"),&Physics2DTestMotionResult::get_collision_point);
+ ClassDB::bind_method(_MD("get_collision_normal"),&Physics2DTestMotionResult::get_collision_normal);
+ ClassDB::bind_method(_MD("get_collider_velocity"),&Physics2DTestMotionResult::get_collider_velocity);
+ ClassDB::bind_method(_MD("get_collider_id"),&Physics2DTestMotionResult::get_collider_id);
+ ClassDB::bind_method(_MD("get_collider_rid"),&Physics2DTestMotionResult::get_collider_rid);
+ ClassDB::bind_method(_MD("get_collider"),&Physics2DTestMotionResult::get_collider);
+ ClassDB::bind_method(_MD("get_collider_shape"),&Physics2DTestMotionResult::get_collider_shape);
}
@@ -504,147 +504,147 @@ bool Physics2DServer::_body_test_motion(RID p_body,const Matrix32& p_from,const
void Physics2DServer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("shape_create","type"),&Physics2DServer::shape_create);
- ObjectTypeDB::bind_method(_MD("shape_set_data","shape","data"),&Physics2DServer::shape_set_data);
+ ClassDB::bind_method(_MD("shape_create","type"),&Physics2DServer::shape_create);
+ ClassDB::bind_method(_MD("shape_set_data","shape","data"),&Physics2DServer::shape_set_data);
- ObjectTypeDB::bind_method(_MD("shape_get_type","shape"),&Physics2DServer::shape_get_type);
- ObjectTypeDB::bind_method(_MD("shape_get_data","shape"),&Physics2DServer::shape_get_data);
+ ClassDB::bind_method(_MD("shape_get_type","shape"),&Physics2DServer::shape_get_type);
+ ClassDB::bind_method(_MD("shape_get_data","shape"),&Physics2DServer::shape_get_data);
- ObjectTypeDB::bind_method(_MD("space_create"),&Physics2DServer::space_create);
- ObjectTypeDB::bind_method(_MD("space_set_active","space","active"),&Physics2DServer::space_set_active);
- ObjectTypeDB::bind_method(_MD("space_is_active","space"),&Physics2DServer::space_is_active);
- ObjectTypeDB::bind_method(_MD("space_set_param","space","param","value"),&Physics2DServer::space_set_param);
- ObjectTypeDB::bind_method(_MD("space_get_param","space","param"),&Physics2DServer::space_get_param);
- ObjectTypeDB::bind_method(_MD("space_get_direct_state:Physics2DDirectSpaceState","space"),&Physics2DServer::space_get_direct_state);
+ ClassDB::bind_method(_MD("space_create"),&Physics2DServer::space_create);
+ ClassDB::bind_method(_MD("space_set_active","space","active"),&Physics2DServer::space_set_active);
+ ClassDB::bind_method(_MD("space_is_active","space"),&Physics2DServer::space_is_active);
+ ClassDB::bind_method(_MD("space_set_param","space","param","value"),&Physics2DServer::space_set_param);
+ ClassDB::bind_method(_MD("space_get_param","space","param"),&Physics2DServer::space_get_param);
+ ClassDB::bind_method(_MD("space_get_direct_state:Physics2DDirectSpaceState","space"),&Physics2DServer::space_get_direct_state);
- ObjectTypeDB::bind_method(_MD("area_create"),&Physics2DServer::area_create);
- ObjectTypeDB::bind_method(_MD("area_set_space","area","space"),&Physics2DServer::area_set_space);
- ObjectTypeDB::bind_method(_MD("area_get_space","area"),&Physics2DServer::area_get_space);
+ ClassDB::bind_method(_MD("area_create"),&Physics2DServer::area_create);
+ ClassDB::bind_method(_MD("area_set_space","area","space"),&Physics2DServer::area_set_space);
+ ClassDB::bind_method(_MD("area_get_space","area"),&Physics2DServer::area_get_space);
- ObjectTypeDB::bind_method(_MD("area_set_space_override_mode","area","mode"),&Physics2DServer::area_set_space_override_mode);
- ObjectTypeDB::bind_method(_MD("area_get_space_override_mode","area"),&Physics2DServer::area_get_space_override_mode);
+ ClassDB::bind_method(_MD("area_set_space_override_mode","area","mode"),&Physics2DServer::area_set_space_override_mode);
+ ClassDB::bind_method(_MD("area_get_space_override_mode","area"),&Physics2DServer::area_get_space_override_mode);
- ObjectTypeDB::bind_method(_MD("area_add_shape","area","shape","transform"),&Physics2DServer::area_add_shape,DEFVAL(Matrix32()));
- ObjectTypeDB::bind_method(_MD("area_set_shape","area","shape_idx","shape"),&Physics2DServer::area_set_shape);
- ObjectTypeDB::bind_method(_MD("area_set_shape_transform","area","shape_idx","transform"),&Physics2DServer::area_set_shape_transform);
+ ClassDB::bind_method(_MD("area_add_shape","area","shape","transform"),&Physics2DServer::area_add_shape,DEFVAL(Matrix32()));
+ ClassDB::bind_method(_MD("area_set_shape","area","shape_idx","shape"),&Physics2DServer::area_set_shape);
+ ClassDB::bind_method(_MD("area_set_shape_transform","area","shape_idx","transform"),&Physics2DServer::area_set_shape_transform);
- ObjectTypeDB::bind_method(_MD("area_get_shape_count","area"),&Physics2DServer::area_get_shape_count);
- ObjectTypeDB::bind_method(_MD("area_get_shape","area","shape_idx"),&Physics2DServer::area_get_shape);
- ObjectTypeDB::bind_method(_MD("area_get_shape_transform","area","shape_idx"),&Physics2DServer::area_get_shape_transform);
+ ClassDB::bind_method(_MD("area_get_shape_count","area"),&Physics2DServer::area_get_shape_count);
+ ClassDB::bind_method(_MD("area_get_shape","area","shape_idx"),&Physics2DServer::area_get_shape);
+ ClassDB::bind_method(_MD("area_get_shape_transform","area","shape_idx"),&Physics2DServer::area_get_shape_transform);
- ObjectTypeDB::bind_method(_MD("area_remove_shape","area","shape_idx"),&Physics2DServer::area_remove_shape);
- ObjectTypeDB::bind_method(_MD("area_clear_shapes","area"),&Physics2DServer::area_clear_shapes);
+ ClassDB::bind_method(_MD("area_remove_shape","area","shape_idx"),&Physics2DServer::area_remove_shape);
+ ClassDB::bind_method(_MD("area_clear_shapes","area"),&Physics2DServer::area_clear_shapes);
- ObjectTypeDB::bind_method(_MD("area_set_layer_mask","area","mask"),&Physics2DServer::area_set_layer_mask);
- ObjectTypeDB::bind_method(_MD("area_set_collision_mask","area","mask"),&Physics2DServer::area_set_collision_mask);
+ ClassDB::bind_method(_MD("area_set_layer_mask","area","mask"),&Physics2DServer::area_set_layer_mask);
+ ClassDB::bind_method(_MD("area_set_collision_mask","area","mask"),&Physics2DServer::area_set_collision_mask);
- ObjectTypeDB::bind_method(_MD("area_set_param","area","param","value"),&Physics2DServer::area_set_param);
- ObjectTypeDB::bind_method(_MD("area_set_transform","area","transform"),&Physics2DServer::area_set_transform);
+ ClassDB::bind_method(_MD("area_set_param","area","param","value"),&Physics2DServer::area_set_param);
+ ClassDB::bind_method(_MD("area_set_transform","area","transform"),&Physics2DServer::area_set_transform);
- ObjectTypeDB::bind_method(_MD("area_get_param","area","param"),&Physics2DServer::area_get_param);
- ObjectTypeDB::bind_method(_MD("area_get_transform","area"),&Physics2DServer::area_get_transform);
+ ClassDB::bind_method(_MD("area_get_param","area","param"),&Physics2DServer::area_get_param);
+ ClassDB::bind_method(_MD("area_get_transform","area"),&Physics2DServer::area_get_transform);
- ObjectTypeDB::bind_method(_MD("area_attach_object_instance_ID","area","id"),&Physics2DServer::area_attach_object_instance_ID);
- ObjectTypeDB::bind_method(_MD("area_get_object_instance_ID","area"),&Physics2DServer::area_get_object_instance_ID);
+ ClassDB::bind_method(_MD("area_attach_object_instance_ID","area","id"),&Physics2DServer::area_attach_object_instance_ID);
+ ClassDB::bind_method(_MD("area_get_object_instance_ID","area"),&Physics2DServer::area_get_object_instance_ID);
- ObjectTypeDB::bind_method(_MD("area_set_monitor_callback","area","receiver","method"),&Physics2DServer::area_set_monitor_callback);
+ ClassDB::bind_method(_MD("area_set_monitor_callback","area","receiver","method"),&Physics2DServer::area_set_monitor_callback);
- ObjectTypeDB::bind_method(_MD("body_create","mode","init_sleeping"),&Physics2DServer::body_create,DEFVAL(BODY_MODE_RIGID),DEFVAL(false));
+ ClassDB::bind_method(_MD("body_create","mode","init_sleeping"),&Physics2DServer::body_create,DEFVAL(BODY_MODE_RIGID),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("body_set_space","body","space"),&Physics2DServer::body_set_space);
- ObjectTypeDB::bind_method(_MD("body_get_space","body"),&Physics2DServer::body_get_space);
+ ClassDB::bind_method(_MD("body_set_space","body","space"),&Physics2DServer::body_set_space);
+ ClassDB::bind_method(_MD("body_get_space","body"),&Physics2DServer::body_get_space);
- ObjectTypeDB::bind_method(_MD("body_set_mode","body","mode"),&Physics2DServer::body_set_mode);
- ObjectTypeDB::bind_method(_MD("body_get_mode","body"),&Physics2DServer::body_get_mode);
+ ClassDB::bind_method(_MD("body_set_mode","body","mode"),&Physics2DServer::body_set_mode);
+ ClassDB::bind_method(_MD("body_get_mode","body"),&Physics2DServer::body_get_mode);
- ObjectTypeDB::bind_method(_MD("body_add_shape","body","shape","transform"),&Physics2DServer::body_add_shape,DEFVAL(Matrix32()));
- ObjectTypeDB::bind_method(_MD("body_set_shape","body","shape_idx","shape"),&Physics2DServer::body_set_shape);
- ObjectTypeDB::bind_method(_MD("body_set_shape_transform","body","shape_idx","transform"),&Physics2DServer::body_set_shape_transform);
- ObjectTypeDB::bind_method(_MD("body_set_shape_metadata","body","shape_idx","metadata"),&Physics2DServer::body_set_shape_metadata);
+ ClassDB::bind_method(_MD("body_add_shape","body","shape","transform"),&Physics2DServer::body_add_shape,DEFVAL(Matrix32()));
+ ClassDB::bind_method(_MD("body_set_shape","body","shape_idx","shape"),&Physics2DServer::body_set_shape);
+ ClassDB::bind_method(_MD("body_set_shape_transform","body","shape_idx","transform"),&Physics2DServer::body_set_shape_transform);
+ ClassDB::bind_method(_MD("body_set_shape_metadata","body","shape_idx","metadata"),&Physics2DServer::body_set_shape_metadata);
- ObjectTypeDB::bind_method(_MD("body_get_shape_count","body"),&Physics2DServer::body_get_shape_count);
- ObjectTypeDB::bind_method(_MD("body_get_shape","body","shape_idx"),&Physics2DServer::body_get_shape);
- ObjectTypeDB::bind_method(_MD("body_get_shape_transform","body","shape_idx"),&Physics2DServer::body_get_shape_transform);
- ObjectTypeDB::bind_method(_MD("body_get_shape_metadata","body","shape_idx"),&Physics2DServer::body_get_shape_metadata);
+ ClassDB::bind_method(_MD("body_get_shape_count","body"),&Physics2DServer::body_get_shape_count);
+ ClassDB::bind_method(_MD("body_get_shape","body","shape_idx"),&Physics2DServer::body_get_shape);
+ ClassDB::bind_method(_MD("body_get_shape_transform","body","shape_idx"),&Physics2DServer::body_get_shape_transform);
+ ClassDB::bind_method(_MD("body_get_shape_metadata","body","shape_idx"),&Physics2DServer::body_get_shape_metadata);
- ObjectTypeDB::bind_method(_MD("body_remove_shape","body","shape_idx"),&Physics2DServer::body_remove_shape);
- ObjectTypeDB::bind_method(_MD("body_clear_shapes","body"),&Physics2DServer::body_clear_shapes);
+ ClassDB::bind_method(_MD("body_remove_shape","body","shape_idx"),&Physics2DServer::body_remove_shape);
+ ClassDB::bind_method(_MD("body_clear_shapes","body"),&Physics2DServer::body_clear_shapes);
- ObjectTypeDB::bind_method(_MD("body_set_shape_as_trigger","body","shape_idx","enable"),&Physics2DServer::body_set_shape_as_trigger);
- ObjectTypeDB::bind_method(_MD("body_is_shape_set_as_trigger","body","shape_idx"),&Physics2DServer::body_is_shape_set_as_trigger);
+ ClassDB::bind_method(_MD("body_set_shape_as_trigger","body","shape_idx","enable"),&Physics2DServer::body_set_shape_as_trigger);
+ ClassDB::bind_method(_MD("body_is_shape_set_as_trigger","body","shape_idx"),&Physics2DServer::body_is_shape_set_as_trigger);
- ObjectTypeDB::bind_method(_MD("body_attach_object_instance_ID","body","id"),&Physics2DServer::body_attach_object_instance_ID);
- ObjectTypeDB::bind_method(_MD("body_get_object_instance_ID","body"),&Physics2DServer::body_get_object_instance_ID);
+ ClassDB::bind_method(_MD("body_attach_object_instance_ID","body","id"),&Physics2DServer::body_attach_object_instance_ID);
+ ClassDB::bind_method(_MD("body_get_object_instance_ID","body"),&Physics2DServer::body_get_object_instance_ID);
- ObjectTypeDB::bind_method(_MD("body_set_continuous_collision_detection_mode","body","mode"),&Physics2DServer::body_set_continuous_collision_detection_mode);
- ObjectTypeDB::bind_method(_MD("body_get_continuous_collision_detection_mode","body"),&Physics2DServer::body_get_continuous_collision_detection_mode);
+ ClassDB::bind_method(_MD("body_set_continuous_collision_detection_mode","body","mode"),&Physics2DServer::body_set_continuous_collision_detection_mode);
+ ClassDB::bind_method(_MD("body_get_continuous_collision_detection_mode","body"),&Physics2DServer::body_get_continuous_collision_detection_mode);
- ObjectTypeDB::bind_method(_MD("body_set_layer_mask","body","mask"),&Physics2DServer::body_set_layer_mask);
- ObjectTypeDB::bind_method(_MD("body_get_layer_mask","body"),&Physics2DServer::body_get_layer_mask);
+ ClassDB::bind_method(_MD("body_set_layer_mask","body","mask"),&Physics2DServer::body_set_layer_mask);
+ ClassDB::bind_method(_MD("body_get_layer_mask","body"),&Physics2DServer::body_get_layer_mask);
- ObjectTypeDB::bind_method(_MD("body_set_collision_mask","body","mask"),&Physics2DServer::body_set_collision_mask);
- ObjectTypeDB::bind_method(_MD("body_get_collision_mask","body"),&Physics2DServer::body_get_collision_mask);
+ ClassDB::bind_method(_MD("body_set_collision_mask","body","mask"),&Physics2DServer::body_set_collision_mask);
+ ClassDB::bind_method(_MD("body_get_collision_mask","body"),&Physics2DServer::body_get_collision_mask);
- ObjectTypeDB::bind_method(_MD("body_set_param","body","param","value"),&Physics2DServer::body_set_param);
- ObjectTypeDB::bind_method(_MD("body_get_param","body","param"),&Physics2DServer::body_get_param);
+ ClassDB::bind_method(_MD("body_set_param","body","param","value"),&Physics2DServer::body_set_param);
+ ClassDB::bind_method(_MD("body_get_param","body","param"),&Physics2DServer::body_get_param);
- ObjectTypeDB::bind_method(_MD("body_set_state","body","state","value"),&Physics2DServer::body_set_state);
- ObjectTypeDB::bind_method(_MD("body_get_state","body","state"),&Physics2DServer::body_get_state);
+ ClassDB::bind_method(_MD("body_set_state","body","state","value"),&Physics2DServer::body_set_state);
+ ClassDB::bind_method(_MD("body_get_state","body","state"),&Physics2DServer::body_get_state);
- ObjectTypeDB::bind_method(_MD("body_apply_impulse","body","pos","impulse"),&Physics2DServer::body_apply_impulse);
- ObjectTypeDB::bind_method(_MD("body_add_force","body","offset","force"),&Physics2DServer::body_add_force);
- ObjectTypeDB::bind_method(_MD("body_set_axis_velocity","body","axis_velocity"),&Physics2DServer::body_set_axis_velocity);
+ ClassDB::bind_method(_MD("body_apply_impulse","body","pos","impulse"),&Physics2DServer::body_apply_impulse);
+ ClassDB::bind_method(_MD("body_add_force","body","offset","force"),&Physics2DServer::body_add_force);
+ ClassDB::bind_method(_MD("body_set_axis_velocity","body","axis_velocity"),&Physics2DServer::body_set_axis_velocity);
- ObjectTypeDB::bind_method(_MD("body_add_collision_exception","body","excepted_body"),&Physics2DServer::body_add_collision_exception);
- ObjectTypeDB::bind_method(_MD("body_remove_collision_exception","body","excepted_body"),&Physics2DServer::body_remove_collision_exception);
+ ClassDB::bind_method(_MD("body_add_collision_exception","body","excepted_body"),&Physics2DServer::body_add_collision_exception);
+ ClassDB::bind_method(_MD("body_remove_collision_exception","body","excepted_body"),&Physics2DServer::body_remove_collision_exception);
// virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0;
- ObjectTypeDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&Physics2DServer::body_set_max_contacts_reported);
- ObjectTypeDB::bind_method(_MD("body_get_max_contacts_reported","body"),&Physics2DServer::body_get_max_contacts_reported);
+ ClassDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&Physics2DServer::body_set_max_contacts_reported);
+ ClassDB::bind_method(_MD("body_get_max_contacts_reported","body"),&Physics2DServer::body_get_max_contacts_reported);
- ObjectTypeDB::bind_method(_MD("body_set_one_way_collision_direction","body","normal"),&Physics2DServer::body_set_one_way_collision_direction);
- ObjectTypeDB::bind_method(_MD("body_get_one_way_collision_direction","body"),&Physics2DServer::body_get_one_way_collision_direction);
+ ClassDB::bind_method(_MD("body_set_one_way_collision_direction","body","normal"),&Physics2DServer::body_set_one_way_collision_direction);
+ ClassDB::bind_method(_MD("body_get_one_way_collision_direction","body"),&Physics2DServer::body_get_one_way_collision_direction);
- ObjectTypeDB::bind_method(_MD("body_set_one_way_collision_max_depth","body","depth"),&Physics2DServer::body_set_one_way_collision_max_depth);
- ObjectTypeDB::bind_method(_MD("body_get_one_way_collision_max_depth","body"),&Physics2DServer::body_get_one_way_collision_max_depth);
+ ClassDB::bind_method(_MD("body_set_one_way_collision_max_depth","body","depth"),&Physics2DServer::body_set_one_way_collision_max_depth);
+ ClassDB::bind_method(_MD("body_get_one_way_collision_max_depth","body"),&Physics2DServer::body_get_one_way_collision_max_depth);
- ObjectTypeDB::bind_method(_MD("body_set_omit_force_integration","body","enable"),&Physics2DServer::body_set_omit_force_integration);
- ObjectTypeDB::bind_method(_MD("body_is_omitting_force_integration","body"),&Physics2DServer::body_is_omitting_force_integration);
+ ClassDB::bind_method(_MD("body_set_omit_force_integration","body","enable"),&Physics2DServer::body_set_omit_force_integration);
+ ClassDB::bind_method(_MD("body_is_omitting_force_integration","body"),&Physics2DServer::body_is_omitting_force_integration);
- ObjectTypeDB::bind_method(_MD("body_set_force_integration_callback","body","receiver","method","userdata"),&Physics2DServer::body_set_force_integration_callback,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("body_set_force_integration_callback","body","receiver","method","userdata"),&Physics2DServer::body_set_force_integration_callback,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("body_test_motion","body","from","motion","margin","result:Physics2DTestMotionResult"),&Physics2DServer::_body_test_motion,DEFVAL(0.08),DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("body_test_motion","body","from","motion","margin","result:Physics2DTestMotionResult"),&Physics2DServer::_body_test_motion,DEFVAL(0.08),DEFVAL(Variant()));
/* JOINT API */
- ObjectTypeDB::bind_method(_MD("joint_set_param","joint","param","value"),&Physics2DServer::joint_set_param);
- ObjectTypeDB::bind_method(_MD("joint_get_param","joint","param"),&Physics2DServer::joint_get_param);
+ ClassDB::bind_method(_MD("joint_set_param","joint","param","value"),&Physics2DServer::joint_set_param);
+ ClassDB::bind_method(_MD("joint_get_param","joint","param"),&Physics2DServer::joint_get_param);
- ObjectTypeDB::bind_method(_MD("pin_joint_create","anchor","body_a","body_b"),&Physics2DServer::pin_joint_create,DEFVAL(RID()));
- ObjectTypeDB::bind_method(_MD("groove_joint_create","groove1_a","groove2_a","anchor_b","body_a","body_b"),&Physics2DServer::groove_joint_create,DEFVAL(RID()),DEFVAL(RID()));
- ObjectTypeDB::bind_method(_MD("damped_spring_joint_create","anchor_a","anchor_b","body_a","body_b"),&Physics2DServer::damped_spring_joint_create,DEFVAL(RID()));
+ ClassDB::bind_method(_MD("pin_joint_create","anchor","body_a","body_b"),&Physics2DServer::pin_joint_create,DEFVAL(RID()));
+ ClassDB::bind_method(_MD("groove_joint_create","groove1_a","groove2_a","anchor_b","body_a","body_b"),&Physics2DServer::groove_joint_create,DEFVAL(RID()),DEFVAL(RID()));
+ ClassDB::bind_method(_MD("damped_spring_joint_create","anchor_a","anchor_b","body_a","body_b"),&Physics2DServer::damped_spring_joint_create,DEFVAL(RID()));
- ObjectTypeDB::bind_method(_MD("damped_string_joint_set_param","joint","param","value"),&Physics2DServer::damped_string_joint_set_param);
- ObjectTypeDB::bind_method(_MD("damped_string_joint_get_param","joint","param"),&Physics2DServer::damped_string_joint_get_param);
+ ClassDB::bind_method(_MD("damped_string_joint_set_param","joint","param","value"),&Physics2DServer::damped_string_joint_set_param);
+ ClassDB::bind_method(_MD("damped_string_joint_get_param","joint","param"),&Physics2DServer::damped_string_joint_get_param);
- ObjectTypeDB::bind_method(_MD("joint_get_type","joint"),&Physics2DServer::joint_get_type);
+ ClassDB::bind_method(_MD("joint_get_type","joint"),&Physics2DServer::joint_get_type);
- ObjectTypeDB::bind_method(_MD("free_rid","rid"),&Physics2DServer::free);
+ ClassDB::bind_method(_MD("free_rid","rid"),&Physics2DServer::free);
- ObjectTypeDB::bind_method(_MD("set_active","active"),&Physics2DServer::set_active);
+ ClassDB::bind_method(_MD("set_active","active"),&Physics2DServer::set_active);
- ObjectTypeDB::bind_method(_MD("get_process_info","process_info"),&Physics2DServer::get_process_info);
+ ClassDB::bind_method(_MD("get_process_info","process_info"),&Physics2DServer::get_process_info);
-// ObjectTypeDB::bind_method(_MD("init"),&Physics2DServer::init);
-// ObjectTypeDB::bind_method(_MD("step"),&Physics2DServer::step);
-// ObjectTypeDB::bind_method(_MD("sync"),&Physics2DServer::sync);
- //ObjectTypeDB::bind_method(_MD("flush_queries"),&Physics2DServer::flush_queries);
+// ClassDB::bind_method(_MD("init"),&Physics2DServer::init);
+// ClassDB::bind_method(_MD("step"),&Physics2DServer::step);
+// ClassDB::bind_method(_MD("sync"),&Physics2DServer::sync);
+ //ClassDB::bind_method(_MD("flush_queries"),&Physics2DServer::flush_queries);
BIND_CONSTANT( SPACE_PARAM_CONTACT_RECYCLE_RADIUS );
BIND_CONSTANT( SPACE_PARAM_CONTACT_MAX_SEPARATION );
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h
index 743185610f..4b6e6584e6 100644
--- a/servers/physics_2d_server.h
+++ b/servers/physics_2d_server.h
@@ -37,7 +37,7 @@ class Physics2DDirectSpaceState;
class Physics2DDirectBodyState : public Object {
- OBJ_TYPE( Physics2DDirectBodyState, Object );
+ GDCLASS( Physics2DDirectBodyState, Object );
protected:
static void _bind_methods();
public:
@@ -90,7 +90,7 @@ class Physics2DShapeQueryResult;
//used for script
class Physics2DShapeQueryParameters : public Reference {
- OBJ_TYPE(Physics2DShapeQueryParameters, Reference);
+ GDCLASS(Physics2DShapeQueryParameters, Reference);
friend class Physics2DDirectSpaceState;
RID shape;
Matrix32 transform;
@@ -133,7 +133,7 @@ public:
class Physics2DDirectSpaceState : public Object {
- OBJ_TYPE( Physics2DDirectSpaceState, Object );
+ GDCLASS( Physics2DDirectSpaceState, Object );
Dictionary _intersect_ray(const Vector2& p_from, const Vector2& p_to,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_layers=0,uint32_t p_object_type_mask=TYPE_MASK_COLLISION);
@@ -211,7 +211,7 @@ public:
class Physics2DShapeQueryResult : public Reference {
- OBJ_TYPE( Physics2DShapeQueryResult, Reference );
+ GDCLASS( Physics2DShapeQueryResult, Reference );
Vector<Physics2DDirectSpaceState::ShapeResult> result;
@@ -234,7 +234,7 @@ class Physics2DTestMotionResult;
class Physics2DServer : public Object {
- OBJ_TYPE( Physics2DServer, Object );
+ GDCLASS( Physics2DServer, Object );
static Physics2DServer * singleton;
@@ -576,7 +576,7 @@ public:
class Physics2DTestMotionResult : public Reference {
- OBJ_TYPE( Physics2DTestMotionResult, Reference );
+ GDCLASS( Physics2DTestMotionResult, Reference );
Physics2DServer::MotionResult result;
bool colliding;
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index 61ce260bed..32c8da66ff 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -74,42 +74,42 @@ PhysicsServer * PhysicsServer::get_singleton() {
void PhysicsDirectBodyState::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_total_gravity"),&PhysicsDirectBodyState::get_total_gravity);
- ObjectTypeDB::bind_method(_MD("get_total_linear_damp"),&PhysicsDirectBodyState::get_total_linear_damp);
- ObjectTypeDB::bind_method(_MD("get_total_angular_damp"),&PhysicsDirectBodyState::get_total_angular_damp);
+ ClassDB::bind_method(_MD("get_total_gravity"),&PhysicsDirectBodyState::get_total_gravity);
+ ClassDB::bind_method(_MD("get_total_linear_damp"),&PhysicsDirectBodyState::get_total_linear_damp);
+ ClassDB::bind_method(_MD("get_total_angular_damp"),&PhysicsDirectBodyState::get_total_angular_damp);
- ObjectTypeDB::bind_method(_MD("get_inverse_mass"),&PhysicsDirectBodyState::get_inverse_mass);
- ObjectTypeDB::bind_method(_MD("get_inverse_inertia"),&PhysicsDirectBodyState::get_inverse_inertia);
+ ClassDB::bind_method(_MD("get_inverse_mass"),&PhysicsDirectBodyState::get_inverse_mass);
+ ClassDB::bind_method(_MD("get_inverse_inertia"),&PhysicsDirectBodyState::get_inverse_inertia);
- ObjectTypeDB::bind_method(_MD("set_linear_velocity","velocity"),&PhysicsDirectBodyState::set_linear_velocity);
- ObjectTypeDB::bind_method(_MD("get_linear_velocity"),&PhysicsDirectBodyState::get_linear_velocity);
+ ClassDB::bind_method(_MD("set_linear_velocity","velocity"),&PhysicsDirectBodyState::set_linear_velocity);
+ ClassDB::bind_method(_MD("get_linear_velocity"),&PhysicsDirectBodyState::get_linear_velocity);
- ObjectTypeDB::bind_method(_MD("set_angular_velocity","velocity"),&PhysicsDirectBodyState::set_angular_velocity);
- ObjectTypeDB::bind_method(_MD("get_angular_velocity"),&PhysicsDirectBodyState::get_angular_velocity);
+ ClassDB::bind_method(_MD("set_angular_velocity","velocity"),&PhysicsDirectBodyState::set_angular_velocity);
+ ClassDB::bind_method(_MD("get_angular_velocity"),&PhysicsDirectBodyState::get_angular_velocity);
- ObjectTypeDB::bind_method(_MD("set_transform","transform"),&PhysicsDirectBodyState::set_transform);
- ObjectTypeDB::bind_method(_MD("get_transform"),&PhysicsDirectBodyState::get_transform);
+ ClassDB::bind_method(_MD("set_transform","transform"),&PhysicsDirectBodyState::set_transform);
+ ClassDB::bind_method(_MD("get_transform"),&PhysicsDirectBodyState::get_transform);
- ObjectTypeDB::bind_method(_MD("add_force","force","pos"),&PhysicsDirectBodyState::add_force);
- ObjectTypeDB::bind_method(_MD("apply_impulse","pos","j"),&PhysicsDirectBodyState::apply_impulse);
+ ClassDB::bind_method(_MD("add_force","force","pos"),&PhysicsDirectBodyState::add_force);
+ ClassDB::bind_method(_MD("apply_impulse","pos","j"),&PhysicsDirectBodyState::apply_impulse);
- ObjectTypeDB::bind_method(_MD("set_sleep_state","enabled"),&PhysicsDirectBodyState::set_sleep_state);
- ObjectTypeDB::bind_method(_MD("is_sleeping"),&PhysicsDirectBodyState::is_sleeping);
+ ClassDB::bind_method(_MD("set_sleep_state","enabled"),&PhysicsDirectBodyState::set_sleep_state);
+ ClassDB::bind_method(_MD("is_sleeping"),&PhysicsDirectBodyState::is_sleeping);
- ObjectTypeDB::bind_method(_MD("get_contact_count"),&PhysicsDirectBodyState::get_contact_count);
+ ClassDB::bind_method(_MD("get_contact_count"),&PhysicsDirectBodyState::get_contact_count);
- ObjectTypeDB::bind_method(_MD("get_contact_local_pos","contact_idx"),&PhysicsDirectBodyState::get_contact_local_pos);
- ObjectTypeDB::bind_method(_MD("get_contact_local_normal","contact_idx"),&PhysicsDirectBodyState::get_contact_local_normal);
- ObjectTypeDB::bind_method(_MD("get_contact_local_shape","contact_idx"),&PhysicsDirectBodyState::get_contact_local_shape);
- ObjectTypeDB::bind_method(_MD("get_contact_collider","contact_idx"),&PhysicsDirectBodyState::get_contact_collider);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_pos","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_pos);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_id","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_id);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_object","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_object);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_shape","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_shape);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_velocity_at_pos","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_velocity_at_pos);
- ObjectTypeDB::bind_method(_MD("get_step"),&PhysicsDirectBodyState::get_step);
- ObjectTypeDB::bind_method(_MD("integrate_forces"),&PhysicsDirectBodyState::integrate_forces);
- ObjectTypeDB::bind_method(_MD("get_space_state:PhysicsDirectSpaceState"),&PhysicsDirectBodyState::get_space_state);
+ ClassDB::bind_method(_MD("get_contact_local_pos","contact_idx"),&PhysicsDirectBodyState::get_contact_local_pos);
+ ClassDB::bind_method(_MD("get_contact_local_normal","contact_idx"),&PhysicsDirectBodyState::get_contact_local_normal);
+ ClassDB::bind_method(_MD("get_contact_local_shape","contact_idx"),&PhysicsDirectBodyState::get_contact_local_shape);
+ ClassDB::bind_method(_MD("get_contact_collider","contact_idx"),&PhysicsDirectBodyState::get_contact_collider);
+ ClassDB::bind_method(_MD("get_contact_collider_pos","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_pos);
+ ClassDB::bind_method(_MD("get_contact_collider_id","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_id);
+ ClassDB::bind_method(_MD("get_contact_collider_object","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_object);
+ ClassDB::bind_method(_MD("get_contact_collider_shape","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_shape);
+ ClassDB::bind_method(_MD("get_contact_collider_velocity_at_pos","contact_idx"),&PhysicsDirectBodyState::get_contact_collider_velocity_at_pos);
+ ClassDB::bind_method(_MD("get_step"),&PhysicsDirectBodyState::get_step);
+ ClassDB::bind_method(_MD("integrate_forces"),&PhysicsDirectBodyState::integrate_forces);
+ ClassDB::bind_method(_MD("get_space_state:PhysicsDirectSpaceState"),&PhysicsDirectBodyState::get_space_state);
}
@@ -193,24 +193,24 @@ Vector<RID> PhysicsShapeQueryParameters::get_exclude() const{
void PhysicsShapeQueryParameters::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_shape","shape:Shape"),&PhysicsShapeQueryParameters::set_shape);
- ObjectTypeDB::bind_method(_MD("set_shape_rid","shape"),&PhysicsShapeQueryParameters::set_shape_rid);
- ObjectTypeDB::bind_method(_MD("get_shape_rid"),&PhysicsShapeQueryParameters::get_shape_rid);
+ ClassDB::bind_method(_MD("set_shape","shape:Shape"),&PhysicsShapeQueryParameters::set_shape);
+ ClassDB::bind_method(_MD("set_shape_rid","shape"),&PhysicsShapeQueryParameters::set_shape_rid);
+ ClassDB::bind_method(_MD("get_shape_rid"),&PhysicsShapeQueryParameters::get_shape_rid);
- ObjectTypeDB::bind_method(_MD("set_transform","transform"),&PhysicsShapeQueryParameters::set_transform);
- ObjectTypeDB::bind_method(_MD("get_transform"),&PhysicsShapeQueryParameters::get_transform);
+ ClassDB::bind_method(_MD("set_transform","transform"),&PhysicsShapeQueryParameters::set_transform);
+ ClassDB::bind_method(_MD("get_transform"),&PhysicsShapeQueryParameters::get_transform);
- ObjectTypeDB::bind_method(_MD("set_margin","margin"),&PhysicsShapeQueryParameters::set_margin);
- ObjectTypeDB::bind_method(_MD("get_margin"),&PhysicsShapeQueryParameters::get_margin);
+ ClassDB::bind_method(_MD("set_margin","margin"),&PhysicsShapeQueryParameters::set_margin);
+ ClassDB::bind_method(_MD("get_margin"),&PhysicsShapeQueryParameters::get_margin);
- ObjectTypeDB::bind_method(_MD("set_layer_mask","layer_mask"),&PhysicsShapeQueryParameters::set_layer_mask);
- ObjectTypeDB::bind_method(_MD("get_layer_mask"),&PhysicsShapeQueryParameters::get_layer_mask);
+ ClassDB::bind_method(_MD("set_layer_mask","layer_mask"),&PhysicsShapeQueryParameters::set_layer_mask);
+ ClassDB::bind_method(_MD("get_layer_mask"),&PhysicsShapeQueryParameters::get_layer_mask);
- ObjectTypeDB::bind_method(_MD("set_object_type_mask","object_type_mask"),&PhysicsShapeQueryParameters::set_object_type_mask);
- ObjectTypeDB::bind_method(_MD("get_object_type_mask"),&PhysicsShapeQueryParameters::get_object_type_mask);
+ ClassDB::bind_method(_MD("set_object_type_mask","object_type_mask"),&PhysicsShapeQueryParameters::set_object_type_mask);
+ ClassDB::bind_method(_MD("get_object_type_mask"),&PhysicsShapeQueryParameters::get_object_type_mask);
- ObjectTypeDB::bind_method(_MD("set_exclude","exclude"),&PhysicsShapeQueryParameters::set_exclude);
- ObjectTypeDB::bind_method(_MD("get_exclude"),&PhysicsShapeQueryParameters::get_exclude);
+ ClassDB::bind_method(_MD("set_exclude","exclude"),&PhysicsShapeQueryParameters::set_exclude);
+ ClassDB::bind_method(_MD("get_exclude"),&PhysicsShapeQueryParameters::get_exclude);
}
@@ -359,14 +359,14 @@ PhysicsDirectSpaceState::PhysicsDirectSpaceState() {
void PhysicsDirectSpaceState::_bind_methods() {
-// ObjectTypeDB::bind_method(_MD("intersect_ray","from","to","exclude","umask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0));
-// ObjectTypeDB::bind_method(_MD("intersect_shape:PhysicsShapeQueryResult","shape","xform","result_max","exclude","umask"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0));
+// ClassDB::bind_method(_MD("intersect_ray","from","to","exclude","umask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0));
+// ClassDB::bind_method(_MD("intersect_shape:PhysicsShapeQueryResult","shape","xform","result_max","exclude","umask"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0));
- ObjectTypeDB::bind_method(_MD("intersect_ray:Dictionary","from","to","exclude","layer_mask","type_mask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0x7FFFFFFF),DEFVAL(TYPE_MASK_COLLISION));
- ObjectTypeDB::bind_method(_MD("intersect_shape","shape:PhysicsShapeQueryParameters","max_results"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(32));
- ObjectTypeDB::bind_method(_MD("cast_motion","shape:PhysicsShapeQueryParameters","motion"),&PhysicsDirectSpaceState::_cast_motion);
- ObjectTypeDB::bind_method(_MD("collide_shape","shape:PhysicsShapeQueryParameters","max_results"),&PhysicsDirectSpaceState::_collide_shape,DEFVAL(32));
- ObjectTypeDB::bind_method(_MD("get_rest_info","shape:PhysicsShapeQueryParameters"),&PhysicsDirectSpaceState::_get_rest_info);
+ ClassDB::bind_method(_MD("intersect_ray:Dictionary","from","to","exclude","layer_mask","type_mask"),&PhysicsDirectSpaceState::_intersect_ray,DEFVAL(Array()),DEFVAL(0x7FFFFFFF),DEFVAL(TYPE_MASK_COLLISION));
+ ClassDB::bind_method(_MD("intersect_shape","shape:PhysicsShapeQueryParameters","max_results"),&PhysicsDirectSpaceState::_intersect_shape,DEFVAL(32));
+ ClassDB::bind_method(_MD("cast_motion","shape:PhysicsShapeQueryParameters","motion"),&PhysicsDirectSpaceState::_cast_motion);
+ ClassDB::bind_method(_MD("collide_shape","shape:PhysicsShapeQueryParameters","max_results"),&PhysicsDirectSpaceState::_collide_shape,DEFVAL(32));
+ ClassDB::bind_method(_MD("get_rest_info","shape:PhysicsShapeQueryParameters"),&PhysicsDirectSpaceState::_get_rest_info);
BIND_CONSTANT( TYPE_MASK_STATIC_BODY );
@@ -407,11 +407,11 @@ PhysicsShapeQueryResult::PhysicsShapeQueryResult() {
void PhysicsShapeQueryResult::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_result_count"),&PhysicsShapeQueryResult::get_result_count);
- ObjectTypeDB::bind_method(_MD("get_result_rid","idx"),&PhysicsShapeQueryResult::get_result_rid);
- ObjectTypeDB::bind_method(_MD("get_result_object_id","idx"),&PhysicsShapeQueryResult::get_result_object_id);
- ObjectTypeDB::bind_method(_MD("get_result_object","idx"),&PhysicsShapeQueryResult::get_result_object);
- ObjectTypeDB::bind_method(_MD("get_result_object_shape","idx"),&PhysicsShapeQueryResult::get_result_object_shape);
+ ClassDB::bind_method(_MD("get_result_count"),&PhysicsShapeQueryResult::get_result_count);
+ ClassDB::bind_method(_MD("get_result_rid","idx"),&PhysicsShapeQueryResult::get_result_rid);
+ ClassDB::bind_method(_MD("get_result_object_id","idx"),&PhysicsShapeQueryResult::get_result_object_id);
+ ClassDB::bind_method(_MD("get_result_object","idx"),&PhysicsShapeQueryResult::get_result_object);
+ ClassDB::bind_method(_MD("get_result_object_shape","idx"),&PhysicsShapeQueryResult::get_result_object_shape);
}
@@ -425,117 +425,117 @@ void PhysicsShapeQueryResult::_bind_methods() {
void PhysicsServer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("shape_create","type"),&PhysicsServer::shape_create);
- ObjectTypeDB::bind_method(_MD("shape_set_data","shape","data"),&PhysicsServer::shape_set_data);
+ ClassDB::bind_method(_MD("shape_create","type"),&PhysicsServer::shape_create);
+ ClassDB::bind_method(_MD("shape_set_data","shape","data"),&PhysicsServer::shape_set_data);
- ObjectTypeDB::bind_method(_MD("shape_get_type","shape"),&PhysicsServer::shape_get_type);
- ObjectTypeDB::bind_method(_MD("shape_get_data","shape"),&PhysicsServer::shape_get_data);
+ ClassDB::bind_method(_MD("shape_get_type","shape"),&PhysicsServer::shape_get_type);
+ ClassDB::bind_method(_MD("shape_get_data","shape"),&PhysicsServer::shape_get_data);
- ObjectTypeDB::bind_method(_MD("space_create"),&PhysicsServer::space_create);
- ObjectTypeDB::bind_method(_MD("space_set_active","space","active"),&PhysicsServer::space_set_active);
- ObjectTypeDB::bind_method(_MD("space_is_active","space"),&PhysicsServer::space_is_active);
- ObjectTypeDB::bind_method(_MD("space_set_param","space","param","value"),&PhysicsServer::space_set_param);
- ObjectTypeDB::bind_method(_MD("space_get_param","space","param"),&PhysicsServer::space_get_param);
- ObjectTypeDB::bind_method(_MD("space_get_direct_state:PhysicsDirectSpaceState","space"),&PhysicsServer::space_get_direct_state);
+ ClassDB::bind_method(_MD("space_create"),&PhysicsServer::space_create);
+ ClassDB::bind_method(_MD("space_set_active","space","active"),&PhysicsServer::space_set_active);
+ ClassDB::bind_method(_MD("space_is_active","space"),&PhysicsServer::space_is_active);
+ ClassDB::bind_method(_MD("space_set_param","space","param","value"),&PhysicsServer::space_set_param);
+ ClassDB::bind_method(_MD("space_get_param","space","param"),&PhysicsServer::space_get_param);
+ ClassDB::bind_method(_MD("space_get_direct_state:PhysicsDirectSpaceState","space"),&PhysicsServer::space_get_direct_state);
- ObjectTypeDB::bind_method(_MD("area_create"),&PhysicsServer::area_create);
- ObjectTypeDB::bind_method(_MD("area_set_space","area","space"),&PhysicsServer::area_set_space);
- ObjectTypeDB::bind_method(_MD("area_get_space","area"),&PhysicsServer::area_get_space);
+ ClassDB::bind_method(_MD("area_create"),&PhysicsServer::area_create);
+ ClassDB::bind_method(_MD("area_set_space","area","space"),&PhysicsServer::area_set_space);
+ ClassDB::bind_method(_MD("area_get_space","area"),&PhysicsServer::area_get_space);
- ObjectTypeDB::bind_method(_MD("area_set_space_override_mode","area","mode"),&PhysicsServer::area_set_space_override_mode);
- ObjectTypeDB::bind_method(_MD("area_get_space_override_mode","area"),&PhysicsServer::area_get_space_override_mode);
+ ClassDB::bind_method(_MD("area_set_space_override_mode","area","mode"),&PhysicsServer::area_set_space_override_mode);
+ ClassDB::bind_method(_MD("area_get_space_override_mode","area"),&PhysicsServer::area_get_space_override_mode);
- ObjectTypeDB::bind_method(_MD("area_add_shape","area","shape","transform"),&PhysicsServer::area_add_shape,DEFVAL(Transform()));
- ObjectTypeDB::bind_method(_MD("area_set_shape","area","shape_idx","shape"),&PhysicsServer::area_set_shape);
- ObjectTypeDB::bind_method(_MD("area_set_shape_transform","area","shape_idx","transform"),&PhysicsServer::area_set_shape_transform);
+ ClassDB::bind_method(_MD("area_add_shape","area","shape","transform"),&PhysicsServer::area_add_shape,DEFVAL(Transform()));
+ ClassDB::bind_method(_MD("area_set_shape","area","shape_idx","shape"),&PhysicsServer::area_set_shape);
+ ClassDB::bind_method(_MD("area_set_shape_transform","area","shape_idx","transform"),&PhysicsServer::area_set_shape_transform);
- ObjectTypeDB::bind_method(_MD("area_get_shape_count","area"),&PhysicsServer::area_get_shape_count);
- ObjectTypeDB::bind_method(_MD("area_get_shape","area","shape_idx"),&PhysicsServer::area_get_shape);
- ObjectTypeDB::bind_method(_MD("area_get_shape_transform","area","shape_idx"),&PhysicsServer::area_get_shape_transform);
+ ClassDB::bind_method(_MD("area_get_shape_count","area"),&PhysicsServer::area_get_shape_count);
+ ClassDB::bind_method(_MD("area_get_shape","area","shape_idx"),&PhysicsServer::area_get_shape);
+ ClassDB::bind_method(_MD("area_get_shape_transform","area","shape_idx"),&PhysicsServer::area_get_shape_transform);
- ObjectTypeDB::bind_method(_MD("area_remove_shape","area","shape_idx"),&PhysicsServer::area_remove_shape);
- ObjectTypeDB::bind_method(_MD("area_clear_shapes","area"),&PhysicsServer::area_clear_shapes);
+ ClassDB::bind_method(_MD("area_remove_shape","area","shape_idx"),&PhysicsServer::area_remove_shape);
+ ClassDB::bind_method(_MD("area_clear_shapes","area"),&PhysicsServer::area_clear_shapes);
- ObjectTypeDB::bind_method(_MD("area_set_layer_mask","area","mask"),&PhysicsServer::area_set_layer_mask);
- ObjectTypeDB::bind_method(_MD("area_set_collision_mask","area","mask"),&PhysicsServer::area_set_collision_mask);
+ ClassDB::bind_method(_MD("area_set_layer_mask","area","mask"),&PhysicsServer::area_set_layer_mask);
+ ClassDB::bind_method(_MD("area_set_collision_mask","area","mask"),&PhysicsServer::area_set_collision_mask);
- ObjectTypeDB::bind_method(_MD("area_set_param","area","param","value"),&PhysicsServer::area_set_param);
- ObjectTypeDB::bind_method(_MD("area_set_transform","area","transform"),&PhysicsServer::area_set_transform);
+ ClassDB::bind_method(_MD("area_set_param","area","param","value"),&PhysicsServer::area_set_param);
+ ClassDB::bind_method(_MD("area_set_transform","area","transform"),&PhysicsServer::area_set_transform);
- ObjectTypeDB::bind_method(_MD("area_get_param","area","param"),&PhysicsServer::area_get_param);
- ObjectTypeDB::bind_method(_MD("area_get_transform","area"),&PhysicsServer::area_get_transform);
+ ClassDB::bind_method(_MD("area_get_param","area","param"),&PhysicsServer::area_get_param);
+ ClassDB::bind_method(_MD("area_get_transform","area"),&PhysicsServer::area_get_transform);
- ObjectTypeDB::bind_method(_MD("area_attach_object_instance_ID","area","id"),&PhysicsServer::area_attach_object_instance_ID);
- ObjectTypeDB::bind_method(_MD("area_get_object_instance_ID","area"),&PhysicsServer::area_get_object_instance_ID);
+ ClassDB::bind_method(_MD("area_attach_object_instance_ID","area","id"),&PhysicsServer::area_attach_object_instance_ID);
+ ClassDB::bind_method(_MD("area_get_object_instance_ID","area"),&PhysicsServer::area_get_object_instance_ID);
- ObjectTypeDB::bind_method(_MD("area_set_monitor_callback","area","receiver","method"),&PhysicsServer::area_set_monitor_callback);
+ ClassDB::bind_method(_MD("area_set_monitor_callback","area","receiver","method"),&PhysicsServer::area_set_monitor_callback);
- ObjectTypeDB::bind_method(_MD("area_set_ray_pickable","area","enable"),&PhysicsServer::area_set_ray_pickable);
- ObjectTypeDB::bind_method(_MD("area_is_ray_pickable","area"),&PhysicsServer::area_is_ray_pickable);
+ ClassDB::bind_method(_MD("area_set_ray_pickable","area","enable"),&PhysicsServer::area_set_ray_pickable);
+ ClassDB::bind_method(_MD("area_is_ray_pickable","area"),&PhysicsServer::area_is_ray_pickable);
- ObjectTypeDB::bind_method(_MD("body_create","mode","init_sleeping"),&PhysicsServer::body_create,DEFVAL(BODY_MODE_RIGID),DEFVAL(false));
+ ClassDB::bind_method(_MD("body_create","mode","init_sleeping"),&PhysicsServer::body_create,DEFVAL(BODY_MODE_RIGID),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("body_set_space","body","space"),&PhysicsServer::body_set_space);
- ObjectTypeDB::bind_method(_MD("body_get_space","body"),&PhysicsServer::body_get_space);
+ ClassDB::bind_method(_MD("body_set_space","body","space"),&PhysicsServer::body_set_space);
+ ClassDB::bind_method(_MD("body_get_space","body"),&PhysicsServer::body_get_space);
- ObjectTypeDB::bind_method(_MD("body_set_mode","body","mode"),&PhysicsServer::body_set_mode);
- ObjectTypeDB::bind_method(_MD("body_get_mode","body"),&PhysicsServer::body_get_mode);
+ ClassDB::bind_method(_MD("body_set_mode","body","mode"),&PhysicsServer::body_set_mode);
+ ClassDB::bind_method(_MD("body_get_mode","body"),&PhysicsServer::body_get_mode);
- ObjectTypeDB::bind_method(_MD("body_set_layer_mask","body","mask"),&PhysicsServer::body_set_layer_mask);
- ObjectTypeDB::bind_method(_MD("body_get_layer_mask","body"),&PhysicsServer::body_get_layer_mask);
+ ClassDB::bind_method(_MD("body_set_layer_mask","body","mask"),&PhysicsServer::body_set_layer_mask);
+ ClassDB::bind_method(_MD("body_get_layer_mask","body"),&PhysicsServer::body_get_layer_mask);
- ObjectTypeDB::bind_method(_MD("body_set_collision_mask","body","mask"),&PhysicsServer::body_set_collision_mask);
- ObjectTypeDB::bind_method(_MD("body_get_collision_mask","body"),&PhysicsServer::body_get_collision_mask);
+ ClassDB::bind_method(_MD("body_set_collision_mask","body","mask"),&PhysicsServer::body_set_collision_mask);
+ ClassDB::bind_method(_MD("body_get_collision_mask","body"),&PhysicsServer::body_get_collision_mask);
- ObjectTypeDB::bind_method(_MD("body_add_shape","body","shape","transform"),&PhysicsServer::body_add_shape,DEFVAL(Transform()));
- ObjectTypeDB::bind_method(_MD("body_set_shape","body","shape_idx","shape"),&PhysicsServer::body_set_shape);
- ObjectTypeDB::bind_method(_MD("body_set_shape_transform","body","shape_idx","transform"),&PhysicsServer::body_set_shape_transform);
+ ClassDB::bind_method(_MD("body_add_shape","body","shape","transform"),&PhysicsServer::body_add_shape,DEFVAL(Transform()));
+ ClassDB::bind_method(_MD("body_set_shape","body","shape_idx","shape"),&PhysicsServer::body_set_shape);
+ ClassDB::bind_method(_MD("body_set_shape_transform","body","shape_idx","transform"),&PhysicsServer::body_set_shape_transform);
- ObjectTypeDB::bind_method(_MD("body_get_shape_count","body"),&PhysicsServer::body_get_shape_count);
- ObjectTypeDB::bind_method(_MD("body_get_shape","body","shape_idx"),&PhysicsServer::body_get_shape);
- ObjectTypeDB::bind_method(_MD("body_get_shape_transform","body","shape_idx"),&PhysicsServer::body_get_shape_transform);
+ ClassDB::bind_method(_MD("body_get_shape_count","body"),&PhysicsServer::body_get_shape_count);
+ ClassDB::bind_method(_MD("body_get_shape","body","shape_idx"),&PhysicsServer::body_get_shape);
+ ClassDB::bind_method(_MD("body_get_shape_transform","body","shape_idx"),&PhysicsServer::body_get_shape_transform);
- ObjectTypeDB::bind_method(_MD("body_remove_shape","body","shape_idx"),&PhysicsServer::body_remove_shape);
- ObjectTypeDB::bind_method(_MD("body_clear_shapes","body"),&PhysicsServer::body_clear_shapes);
+ ClassDB::bind_method(_MD("body_remove_shape","body","shape_idx"),&PhysicsServer::body_remove_shape);
+ ClassDB::bind_method(_MD("body_clear_shapes","body"),&PhysicsServer::body_clear_shapes);
- ObjectTypeDB::bind_method(_MD("body_attach_object_instance_ID","body","id"),&PhysicsServer::body_attach_object_instance_ID);
- ObjectTypeDB::bind_method(_MD("body_get_object_instance_ID","body"),&PhysicsServer::body_get_object_instance_ID);
+ ClassDB::bind_method(_MD("body_attach_object_instance_ID","body","id"),&PhysicsServer::body_attach_object_instance_ID);
+ ClassDB::bind_method(_MD("body_get_object_instance_ID","body"),&PhysicsServer::body_get_object_instance_ID);
- ObjectTypeDB::bind_method(_MD("body_set_enable_continuous_collision_detection","body","enable"),&PhysicsServer::body_set_enable_continuous_collision_detection);
- ObjectTypeDB::bind_method(_MD("body_is_continuous_collision_detection_enabled","body"),&PhysicsServer::body_is_continuous_collision_detection_enabled);
+ ClassDB::bind_method(_MD("body_set_enable_continuous_collision_detection","body","enable"),&PhysicsServer::body_set_enable_continuous_collision_detection);
+ ClassDB::bind_method(_MD("body_is_continuous_collision_detection_enabled","body"),&PhysicsServer::body_is_continuous_collision_detection_enabled);
- //ObjectTypeDB::bind_method(_MD("body_set_user_flags","flags""),&PhysicsServer::body_set_shape,DEFVAL(Transform));
- //ObjectTypeDB::bind_method(_MD("body_get_user_flags","body","shape_idx","shape"),&PhysicsServer::body_get_shape);
+ //ClassDB::bind_method(_MD("body_set_user_flags","flags""),&PhysicsServer::body_set_shape,DEFVAL(Transform));
+ //ClassDB::bind_method(_MD("body_get_user_flags","body","shape_idx","shape"),&PhysicsServer::body_get_shape);
- ObjectTypeDB::bind_method(_MD("body_set_param","body","param","value"),&PhysicsServer::body_set_param);
- ObjectTypeDB::bind_method(_MD("body_get_param","body","param"),&PhysicsServer::body_get_param);
+ ClassDB::bind_method(_MD("body_set_param","body","param","value"),&PhysicsServer::body_set_param);
+ ClassDB::bind_method(_MD("body_get_param","body","param"),&PhysicsServer::body_get_param);
- ObjectTypeDB::bind_method(_MD("body_set_state","body","state","value"),&PhysicsServer::body_set_state);
- ObjectTypeDB::bind_method(_MD("body_get_state","body","state"),&PhysicsServer::body_get_state);
+ ClassDB::bind_method(_MD("body_set_state","body","state","value"),&PhysicsServer::body_set_state);
+ ClassDB::bind_method(_MD("body_get_state","body","state"),&PhysicsServer::body_get_state);
- ObjectTypeDB::bind_method(_MD("body_apply_impulse","body","pos","impulse"),&PhysicsServer::body_apply_impulse);
- ObjectTypeDB::bind_method(_MD("body_set_axis_velocity","body","axis_velocity"),&PhysicsServer::body_set_axis_velocity);
+ ClassDB::bind_method(_MD("body_apply_impulse","body","pos","impulse"),&PhysicsServer::body_apply_impulse);
+ ClassDB::bind_method(_MD("body_set_axis_velocity","body","axis_velocity"),&PhysicsServer::body_set_axis_velocity);
- ObjectTypeDB::bind_method(_MD("body_set_axis_lock","body","axis"),&PhysicsServer::body_set_axis_lock);
- ObjectTypeDB::bind_method(_MD("body_get_axis_lock","body"),&PhysicsServer::body_get_axis_lock);
+ ClassDB::bind_method(_MD("body_set_axis_lock","body","axis"),&PhysicsServer::body_set_axis_lock);
+ ClassDB::bind_method(_MD("body_get_axis_lock","body"),&PhysicsServer::body_get_axis_lock);
- ObjectTypeDB::bind_method(_MD("body_add_collision_exception","body","excepted_body"),&PhysicsServer::body_add_collision_exception);
- ObjectTypeDB::bind_method(_MD("body_remove_collision_exception","body","excepted_body"),&PhysicsServer::body_remove_collision_exception);
+ ClassDB::bind_method(_MD("body_add_collision_exception","body","excepted_body"),&PhysicsServer::body_add_collision_exception);
+ ClassDB::bind_method(_MD("body_remove_collision_exception","body","excepted_body"),&PhysicsServer::body_remove_collision_exception);
// virtual void body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions)=0;
- ObjectTypeDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&PhysicsServer::body_set_max_contacts_reported);
- ObjectTypeDB::bind_method(_MD("body_get_max_contacts_reported","body"),&PhysicsServer::body_get_max_contacts_reported);
+ ClassDB::bind_method(_MD("body_set_max_contacts_reported","body","amount"),&PhysicsServer::body_set_max_contacts_reported);
+ ClassDB::bind_method(_MD("body_get_max_contacts_reported","body"),&PhysicsServer::body_get_max_contacts_reported);
- ObjectTypeDB::bind_method(_MD("body_set_omit_force_integration","body","enable"),&PhysicsServer::body_set_omit_force_integration);
- ObjectTypeDB::bind_method(_MD("body_is_omitting_force_integration","body"),&PhysicsServer::body_is_omitting_force_integration);
+ ClassDB::bind_method(_MD("body_set_omit_force_integration","body","enable"),&PhysicsServer::body_set_omit_force_integration);
+ ClassDB::bind_method(_MD("body_is_omitting_force_integration","body"),&PhysicsServer::body_is_omitting_force_integration);
- ObjectTypeDB::bind_method(_MD("body_set_force_integration_callback","body","receiver","method","userdata"),&PhysicsServer::body_set_force_integration_callback,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("body_set_force_integration_callback","body","receiver","method","userdata"),&PhysicsServer::body_set_force_integration_callback,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("body_set_ray_pickable","body","enable"),&PhysicsServer::body_set_ray_pickable);
- ObjectTypeDB::bind_method(_MD("body_is_ray_pickable","body"),&PhysicsServer::body_is_ray_pickable);
+ ClassDB::bind_method(_MD("body_set_ray_pickable","body","enable"),&PhysicsServer::body_set_ray_pickable);
+ ClassDB::bind_method(_MD("body_is_ray_pickable","body"),&PhysicsServer::body_is_ray_pickable);
/* JOINT API */
@@ -545,15 +545,15 @@ void PhysicsServer::_bind_methods() {
BIND_CONSTANT( JOINT_CONE_TWIST );
BIND_CONSTANT( JOINT_6DOF );
- ObjectTypeDB::bind_method(_MD("joint_create_pin","body_A","local_A","body_B","local_B"),&PhysicsServer::joint_create_pin);
- ObjectTypeDB::bind_method(_MD("pin_joint_set_param","joint","param","value"),&PhysicsServer::pin_joint_set_param);
- ObjectTypeDB::bind_method(_MD("pin_joint_get_param","joint","param"),&PhysicsServer::pin_joint_get_param);
+ ClassDB::bind_method(_MD("joint_create_pin","body_A","local_A","body_B","local_B"),&PhysicsServer::joint_create_pin);
+ ClassDB::bind_method(_MD("pin_joint_set_param","joint","param","value"),&PhysicsServer::pin_joint_set_param);
+ ClassDB::bind_method(_MD("pin_joint_get_param","joint","param"),&PhysicsServer::pin_joint_get_param);
- ObjectTypeDB::bind_method(_MD("pin_joint_set_local_A","joint","local_A"),&PhysicsServer::pin_joint_set_local_A);
- ObjectTypeDB::bind_method(_MD("pin_joint_get_local_A","joint"),&PhysicsServer::pin_joint_get_local_A);
+ ClassDB::bind_method(_MD("pin_joint_set_local_A","joint","local_A"),&PhysicsServer::pin_joint_set_local_A);
+ ClassDB::bind_method(_MD("pin_joint_get_local_A","joint"),&PhysicsServer::pin_joint_get_local_A);
- ObjectTypeDB::bind_method(_MD("pin_joint_set_local_B","joint","local_B"),&PhysicsServer::pin_joint_set_local_B);
- ObjectTypeDB::bind_method(_MD("pin_joint_get_local_B","joint"),&PhysicsServer::pin_joint_get_local_B);
+ ClassDB::bind_method(_MD("pin_joint_set_local_B","joint","local_B"),&PhysicsServer::pin_joint_set_local_B);
+ ClassDB::bind_method(_MD("pin_joint_get_local_B","joint"),&PhysicsServer::pin_joint_get_local_B);
BIND_CONSTANT(PIN_JOINT_BIAS );
BIND_CONSTANT(PIN_JOINT_DAMPING );
@@ -571,18 +571,18 @@ void PhysicsServer::_bind_methods() {
BIND_CONSTANT(HINGE_JOINT_FLAG_USE_LIMIT);
BIND_CONSTANT(HINGE_JOINT_FLAG_ENABLE_MOTOR);
- ObjectTypeDB::bind_method(_MD("joint_create_hinge","body_A","hinge_A","body_B","hinge_B"),&PhysicsServer::joint_create_hinge);
+ ClassDB::bind_method(_MD("joint_create_hinge","body_A","hinge_A","body_B","hinge_B"),&PhysicsServer::joint_create_hinge);
- ObjectTypeDB::bind_method(_MD("hinge_joint_set_param","joint","param","value"),&PhysicsServer::hinge_joint_set_param);
- ObjectTypeDB::bind_method(_MD("hinge_joint_get_param","joint","param"),&PhysicsServer::hinge_joint_get_param);
+ ClassDB::bind_method(_MD("hinge_joint_set_param","joint","param","value"),&PhysicsServer::hinge_joint_set_param);
+ ClassDB::bind_method(_MD("hinge_joint_get_param","joint","param"),&PhysicsServer::hinge_joint_get_param);
- ObjectTypeDB::bind_method(_MD("hinge_joint_set_flag","joint","flag","enabled"),&PhysicsServer::hinge_joint_set_flag);
- ObjectTypeDB::bind_method(_MD("hinge_joint_get_flag","joint","flag"),&PhysicsServer::hinge_joint_get_flag);
+ ClassDB::bind_method(_MD("hinge_joint_set_flag","joint","flag","enabled"),&PhysicsServer::hinge_joint_set_flag);
+ ClassDB::bind_method(_MD("hinge_joint_get_flag","joint","flag"),&PhysicsServer::hinge_joint_get_flag);
- ObjectTypeDB::bind_method(_MD("joint_create_slider","body_A","local_ref_A","body_B","local_ref_B"),&PhysicsServer::joint_create_slider);
+ ClassDB::bind_method(_MD("joint_create_slider","body_A","local_ref_A","body_B","local_ref_B"),&PhysicsServer::joint_create_slider);
- ObjectTypeDB::bind_method(_MD("slider_joint_set_param","joint","param","value"),&PhysicsServer::slider_joint_set_param);
- ObjectTypeDB::bind_method(_MD("slider_joint_get_param","joint","param"),&PhysicsServer::slider_joint_get_param);
+ ClassDB::bind_method(_MD("slider_joint_set_param","joint","param","value"),&PhysicsServer::slider_joint_set_param);
+ ClassDB::bind_method(_MD("slider_joint_get_param","joint","param"),&PhysicsServer::slider_joint_get_param);
BIND_CONSTANT( SLIDER_JOINT_LINEAR_LIMIT_UPPER );
BIND_CONSTANT( SLIDER_JOINT_LINEAR_LIMIT_LOWER );
@@ -610,10 +610,10 @@ void PhysicsServer::_bind_methods() {
BIND_CONSTANT( SLIDER_JOINT_MAX );
- ObjectTypeDB::bind_method(_MD("joint_create_cone_twist","body_A","local_ref_A","body_B","local_ref_B"),&PhysicsServer::joint_create_cone_twist);
+ ClassDB::bind_method(_MD("joint_create_cone_twist","body_A","local_ref_A","body_B","local_ref_B"),&PhysicsServer::joint_create_cone_twist);
- ObjectTypeDB::bind_method(_MD("cone_twist_joint_set_param","joint","param","value"),&PhysicsServer::cone_twist_joint_set_param);
- ObjectTypeDB::bind_method(_MD("cone_twist_joint_get_param","joint","param"),&PhysicsServer::cone_twist_joint_get_param);
+ ClassDB::bind_method(_MD("cone_twist_joint_set_param","joint","param","value"),&PhysicsServer::cone_twist_joint_set_param);
+ ClassDB::bind_method(_MD("cone_twist_joint_get_param","joint","param"),&PhysicsServer::cone_twist_joint_get_param);
BIND_CONSTANT( CONE_TWIST_JOINT_SWING_SPAN );
BIND_CONSTANT( CONE_TWIST_JOINT_TWIST_SPAN );
@@ -642,44 +642,44 @@ void PhysicsServer::_bind_methods() {
BIND_CONSTANT( G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT );
BIND_CONSTANT( G6DOF_JOINT_FLAG_ENABLE_MOTOR );
- ObjectTypeDB::bind_method(_MD("joint_get_type","joint"),&PhysicsServer::joint_get_type);
+ ClassDB::bind_method(_MD("joint_get_type","joint"),&PhysicsServer::joint_get_type);
- ObjectTypeDB::bind_method(_MD("joint_set_solver_priority","joint","priority"),&PhysicsServer::joint_set_solver_priority);
- ObjectTypeDB::bind_method(_MD("joint_get_solver_priority","joint"),&PhysicsServer::joint_get_solver_priority);
+ ClassDB::bind_method(_MD("joint_set_solver_priority","joint","priority"),&PhysicsServer::joint_set_solver_priority);
+ ClassDB::bind_method(_MD("joint_get_solver_priority","joint"),&PhysicsServer::joint_get_solver_priority);
- ObjectTypeDB::bind_method(_MD("joint_create_generic_6dof","body_A","local_ref_A","body_B","local_ref_B"),&PhysicsServer::joint_create_generic_6dof);
+ ClassDB::bind_method(_MD("joint_create_generic_6dof","body_A","local_ref_A","body_B","local_ref_B"),&PhysicsServer::joint_create_generic_6dof);
- ObjectTypeDB::bind_method(_MD("generic_6dof_joint_set_param","joint","axis","param","value"),&PhysicsServer::generic_6dof_joint_set_param);
- ObjectTypeDB::bind_method(_MD("generic_6dof_joint_get_param","joint","axis","param"),&PhysicsServer::generic_6dof_joint_get_param);
+ ClassDB::bind_method(_MD("generic_6dof_joint_set_param","joint","axis","param","value"),&PhysicsServer::generic_6dof_joint_set_param);
+ ClassDB::bind_method(_MD("generic_6dof_joint_get_param","joint","axis","param"),&PhysicsServer::generic_6dof_joint_get_param);
- ObjectTypeDB::bind_method(_MD("generic_6dof_joint_set_flag","joint","axis","flag","enable"),&PhysicsServer::generic_6dof_joint_set_flag);
- ObjectTypeDB::bind_method(_MD("generic_6dof_joint_get_flag","joint","axis","flag"),&PhysicsServer::generic_6dof_joint_get_flag);
+ ClassDB::bind_method(_MD("generic_6dof_joint_set_flag","joint","axis","flag","enable"),&PhysicsServer::generic_6dof_joint_set_flag);
+ ClassDB::bind_method(_MD("generic_6dof_joint_get_flag","joint","axis","flag"),&PhysicsServer::generic_6dof_joint_get_flag);
/*
- ObjectTypeDB::bind_method(_MD("joint_set_param","joint","param","value"),&PhysicsServer::joint_set_param);
- ObjectTypeDB::bind_method(_MD("joint_get_param","joint","param"),&PhysicsServer::joint_get_param);
+ ClassDB::bind_method(_MD("joint_set_param","joint","param","value"),&PhysicsServer::joint_set_param);
+ ClassDB::bind_method(_MD("joint_get_param","joint","param"),&PhysicsServer::joint_get_param);
- ObjectTypeDB::bind_method(_MD("pin_joint_create","anchor","body_a","body_b"),&PhysicsServer::pin_joint_create,DEFVAL(RID()));
- ObjectTypeDB::bind_method(_MD("groove_joint_create","groove1_a","groove2_a","anchor_b","body_a","body_b"),&PhysicsServer::groove_joint_create,DEFVAL(RID()),DEFVAL(RID()));
- ObjectTypeDB::bind_method(_MD("damped_spring_joint_create","anchor_a","anchor_b","body_a","body_b"),&PhysicsServer::damped_spring_joint_create,DEFVAL(RID()));
+ ClassDB::bind_method(_MD("pin_joint_create","anchor","body_a","body_b"),&PhysicsServer::pin_joint_create,DEFVAL(RID()));
+ ClassDB::bind_method(_MD("groove_joint_create","groove1_a","groove2_a","anchor_b","body_a","body_b"),&PhysicsServer::groove_joint_create,DEFVAL(RID()),DEFVAL(RID()));
+ ClassDB::bind_method(_MD("damped_spring_joint_create","anchor_a","anchor_b","body_a","body_b"),&PhysicsServer::damped_spring_joint_create,DEFVAL(RID()));
- ObjectTypeDB::bind_method(_MD("damped_string_joint_set_param","joint","param","value"),&PhysicsServer::damped_string_joint_set_param,DEFVAL(RID()));
- ObjectTypeDB::bind_method(_MD("damped_string_joint_get_param","joint","param"),&PhysicsServer::damped_string_joint_get_param);
+ ClassDB::bind_method(_MD("damped_string_joint_set_param","joint","param","value"),&PhysicsServer::damped_string_joint_set_param,DEFVAL(RID()));
+ ClassDB::bind_method(_MD("damped_string_joint_get_param","joint","param"),&PhysicsServer::damped_string_joint_get_param);
- ObjectTypeDB::bind_method(_MD("joint_get_type","joint"),&PhysicsServer::joint_get_type);
+ ClassDB::bind_method(_MD("joint_get_type","joint"),&PhysicsServer::joint_get_type);
*/
- ObjectTypeDB::bind_method(_MD("free_rid","rid"),&PhysicsServer::free);
+ ClassDB::bind_method(_MD("free_rid","rid"),&PhysicsServer::free);
- ObjectTypeDB::bind_method(_MD("set_active","active"),&PhysicsServer::set_active);
+ ClassDB::bind_method(_MD("set_active","active"),&PhysicsServer::set_active);
-// ObjectTypeDB::bind_method(_MD("init"),&PhysicsServer::init);
-// ObjectTypeDB::bind_method(_MD("step"),&PhysicsServer::step);
-// ObjectTypeDB::bind_method(_MD("sync"),&PhysicsServer::sync);
- //ObjectTypeDB::bind_method(_MD("flush_queries"),&PhysicsServer::flush_queries);
+// ClassDB::bind_method(_MD("init"),&PhysicsServer::init);
+// ClassDB::bind_method(_MD("step"),&PhysicsServer::step);
+// ClassDB::bind_method(_MD("sync"),&PhysicsServer::sync);
+ //ClassDB::bind_method(_MD("flush_queries"),&PhysicsServer::flush_queries);
- ObjectTypeDB::bind_method(_MD("get_process_info","process_info"),&PhysicsServer::get_process_info);
+ ClassDB::bind_method(_MD("get_process_info","process_info"),&PhysicsServer::get_process_info);
BIND_CONSTANT( SHAPE_PLANE );
BIND_CONSTANT( SHAPE_RAY );
diff --git a/servers/physics_server.h b/servers/physics_server.h
index a839b734b6..26b28a2076 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -36,7 +36,7 @@ class PhysicsDirectSpaceState;
class PhysicsDirectBodyState : public Object {
- OBJ_TYPE( PhysicsDirectBodyState, Object );
+ GDCLASS( PhysicsDirectBodyState, Object );
protected:
static void _bind_methods();
public:
@@ -90,7 +90,7 @@ class PhysicsShapeQueryResult;
class PhysicsShapeQueryParameters : public Reference {
- OBJ_TYPE(PhysicsShapeQueryParameters, Reference);
+ GDCLASS(PhysicsShapeQueryParameters, Reference);
friend class PhysicsDirectSpaceState;
RID shape;
Transform transform;
@@ -130,7 +130,7 @@ public:
class PhysicsDirectSpaceState : public Object {
- OBJ_TYPE( PhysicsDirectSpaceState, Object );
+ GDCLASS( PhysicsDirectSpaceState, Object );
// Variant _intersect_ray(const Vector3& p_from, const Vector3& p_to,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
// Variant _intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max=64,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
@@ -207,7 +207,7 @@ public:
class PhysicsShapeQueryResult : public Reference {
- OBJ_TYPE( PhysicsShapeQueryResult, Reference );
+ GDCLASS( PhysicsShapeQueryResult, Reference );
Vector<PhysicsDirectSpaceState::ShapeResult> result;
@@ -229,7 +229,7 @@ public:
class PhysicsServer : public Object {
- OBJ_TYPE( PhysicsServer, Object );
+ GDCLASS( PhysicsServer, Object );
static PhysicsServer * singleton;
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index f3ff2223ed..a3f21fad6e 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -75,16 +75,16 @@ void register_server_types() {
shader_types = memnew( ShaderTypes );
- ObjectTypeDB::register_virtual_type<Physics2DDirectBodyState>();
- ObjectTypeDB::register_virtual_type<Physics2DDirectSpaceState>();
- ObjectTypeDB::register_virtual_type<Physics2DShapeQueryResult>();
- ObjectTypeDB::register_type<Physics2DTestMotionResult>();
- ObjectTypeDB::register_type<Physics2DShapeQueryParameters>();
+ ClassDB::register_virtual_class<Physics2DDirectBodyState>();
+ ClassDB::register_virtual_class<Physics2DDirectSpaceState>();
+ ClassDB::register_virtual_class<Physics2DShapeQueryResult>();
+ ClassDB::register_class<Physics2DTestMotionResult>();
+ ClassDB::register_class<Physics2DShapeQueryParameters>();
- ObjectTypeDB::register_type<PhysicsShapeQueryParameters>();
- ObjectTypeDB::register_virtual_type<PhysicsDirectBodyState>();
- ObjectTypeDB::register_virtual_type<PhysicsDirectSpaceState>();
- ObjectTypeDB::register_virtual_type<PhysicsShapeQueryResult>();
+ ClassDB::register_class<PhysicsShapeQueryParameters>();
+ ClassDB::register_virtual_class<PhysicsDirectBodyState>();
+ ClassDB::register_virtual_class<PhysicsDirectSpaceState>();
+ ClassDB::register_virtual_class<PhysicsShapeQueryResult>();
ScriptDebuggerRemote::resource_usage_func=_debugger_get_resource_usage;
}
diff --git a/servers/spatial_sound/spatial_sound_server_sw.h b/servers/spatial_sound/spatial_sound_server_sw.h
index c16753135b..901b781ac2 100644
--- a/servers/spatial_sound/spatial_sound_server_sw.h
+++ b/servers/spatial_sound/spatial_sound_server_sw.h
@@ -36,7 +36,7 @@
class SpatialSoundServerSW : public SpatialSoundServer {
- OBJ_TYPE(SpatialSoundServerSW,SpatialSoundServer);
+ GDCLASS(SpatialSoundServerSW,SpatialSoundServer);
_THREAD_SAFE_CLASS_
diff --git a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h
index ed28ec912e..a4e4b3a4a1 100644
--- a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h
+++ b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h
@@ -36,7 +36,7 @@
class SpatialSound2DServerSW : public SpatialSound2DServer {
- OBJ_TYPE(SpatialSound2DServerSW,SpatialSound2DServer);
+ GDCLASS(SpatialSound2DServerSW,SpatialSound2DServer);
_THREAD_SAFE_CLASS_
diff --git a/servers/spatial_sound_2d_server.h b/servers/spatial_sound_2d_server.h
index e7f40efb05..b54368fec5 100644
--- a/servers/spatial_sound_2d_server.h
+++ b/servers/spatial_sound_2d_server.h
@@ -35,7 +35,7 @@
class SpatialSound2DServer : public Object {
- OBJ_TYPE(SpatialSound2DServer,Object);
+ GDCLASS(SpatialSound2DServer,Object);
static SpatialSound2DServer *singleton;
public:
diff --git a/servers/spatial_sound_server.h b/servers/spatial_sound_server.h
index c23c7fa8e1..69ef71c84f 100644
--- a/servers/spatial_sound_server.h
+++ b/servers/spatial_sound_server.h
@@ -34,7 +34,7 @@
#include "servers/audio_server.h"
class SpatialSoundServer : public Object {
- OBJ_TYPE(SpatialSoundServer,Object);
+ GDCLASS(SpatialSoundServer,Object);
static SpatialSoundServer *singleton;
public:
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index e9c479f339..3e6c30d6f5 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1563,17 +1563,17 @@ Array VisualServer::mesh_surface_get_arrays(RID p_mesh,int p_surface) const {
void VisualServer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("texture_create"),&VisualServer::texture_create);
- ObjectTypeDB::bind_method(_MD("texture_create_from_image"),&VisualServer::texture_create_from_image,DEFVAL( TEXTURE_FLAGS_DEFAULT ) );
- //ObjectTypeDB::bind_method(_MD("texture_allocate"),&VisualServer::texture_allocate,DEFVAL( TEXTURE_FLAGS_DEFAULT ) );
- //ObjectTypeDB::bind_method(_MD("texture_set_data"),&VisualServer::texture_blit_rect,DEFVAL( CUBEMAP_LEFT ) );
- //ObjectTypeDB::bind_method(_MD("texture_get_rect"),&VisualServer::texture_get_rect );
- ObjectTypeDB::bind_method(_MD("texture_set_flags"),&VisualServer::texture_set_flags );
- ObjectTypeDB::bind_method(_MD("texture_get_flags"),&VisualServer::texture_get_flags );
- ObjectTypeDB::bind_method(_MD("texture_get_width"),&VisualServer::texture_get_width );
- ObjectTypeDB::bind_method(_MD("texture_get_height"),&VisualServer::texture_get_height );
-
- ObjectTypeDB::bind_method(_MD("texture_set_shrink_all_x2_on_set_data","shrink"),&VisualServer::texture_set_shrink_all_x2_on_set_data );
+ ClassDB::bind_method(_MD("texture_create"),&VisualServer::texture_create);
+ ClassDB::bind_method(_MD("texture_create_from_image"),&VisualServer::texture_create_from_image,DEFVAL( TEXTURE_FLAGS_DEFAULT ) );
+ //ClassDB::bind_method(_MD("texture_allocate"),&VisualServer::texture_allocate,DEFVAL( TEXTURE_FLAGS_DEFAULT ) );
+ //ClassDB::bind_method(_MD("texture_set_data"),&VisualServer::texture_blit_rect,DEFVAL( CUBEMAP_LEFT ) );
+ //ClassDB::bind_method(_MD("texture_get_rect"),&VisualServer::texture_get_rect );
+ ClassDB::bind_method(_MD("texture_set_flags"),&VisualServer::texture_set_flags );
+ ClassDB::bind_method(_MD("texture_get_flags"),&VisualServer::texture_get_flags );
+ ClassDB::bind_method(_MD("texture_get_width"),&VisualServer::texture_get_width );
+ ClassDB::bind_method(_MD("texture_get_height"),&VisualServer::texture_get_height );
+
+ ClassDB::bind_method(_MD("texture_set_shrink_all_x2_on_set_data","shrink"),&VisualServer::texture_set_shrink_all_x2_on_set_data );
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 2a8255b78b..cf9fe0fe0b 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -42,7 +42,7 @@
*/
class VisualServer : public Object {
- OBJ_TYPE( VisualServer, Object );
+ GDCLASS( VisualServer, Object );
static VisualServer *singleton;
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index ba27369b68..8065ad0e95 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -159,7 +159,7 @@ void DocData::generate(bool p_basic_types) {
List<StringName> classes;
- ObjectTypeDB::get_type_list(&classes);
+ ClassDB::get_class_list(&classes);
classes.sort_custom<StringName::AlphCompare>();
while(classes.size()) {
@@ -172,11 +172,11 @@ void DocData::generate(bool p_basic_types) {
class_list[cname]=ClassDoc();
ClassDoc& c = class_list[cname];
c.name=cname;
- c.inherits=ObjectTypeDB::type_inherits_from(name);
- c.category=ObjectTypeDB::get_category(name);
+ c.inherits=ClassDB::get_parent_class(name);
+ c.category=ClassDB::get_category(name);
List<MethodInfo> method_list;
- ObjectTypeDB::get_method_list(name,&method_list,true);
+ ClassDB::get_method_list(name,&method_list,true);
method_list.sort();
@@ -189,7 +189,7 @@ void DocData::generate(bool p_basic_types) {
method.name=E->get().name;
- MethodBind *m = ObjectTypeDB::get_method(name,E->get().name);
+ MethodBind *m = ClassDB::get_method(name,E->get().name);
if (E->get().flags&METHOD_FLAG_VIRTUAL)
@@ -358,7 +358,7 @@ void DocData::generate(bool p_basic_types) {
}
List<MethodInfo> signal_list;
- ObjectTypeDB::get_signal_list(name,&signal_list,true);
+ ClassDB::get_signal_list(name,&signal_list,true);
if (signal_list.size()) {
@@ -383,13 +383,13 @@ void DocData::generate(bool p_basic_types) {
}
List<String> constant_list;
- ObjectTypeDB::get_integer_constant_list(name, &constant_list, true);
+ ClassDB::get_integer_constant_list(name, &constant_list, true);
for(List<String>::Element *E=constant_list.front();E;E=E->next()) {
ConstantDoc constant;
constant.name=E->get();
- constant.value=itos(ObjectTypeDB::get_integer_constant(name, E->get()));
+ constant.value=itos(ClassDB::get_integer_constant(name, E->get()));
c.constants.push_back(constant);
}
@@ -590,9 +590,9 @@ void DocData::generate(bool p_basic_types) {
PropertyDoc pd;
Globals::Singleton &s=E->get();
pd.name=s.name;
- pd.type=s.ptr->get_type();
- while (String(ObjectTypeDB::type_inherits_from(pd.type))!="Object")
- pd.type=ObjectTypeDB::type_inherits_from(pd.type);
+ pd.type=s.ptr->get_class();
+ while (String(ClassDB::get_parent_class(pd.type))!="Object")
+ pd.type=ClassDB::get_parent_class(pd.type);
if (pd.type.begins_with("_"))
pd.type=pd.type.substr(1,pd.type.length());
c.properties.push_back(pd);
diff --git a/tools/doc/doc_dump.cpp b/tools/doc/doc_dump.cpp
index 75601ca98b..cf7c840b30 100644
--- a/tools/doc/doc_dump.cpp
+++ b/tools/doc/doc_dump.cpp
@@ -77,7 +77,7 @@ void DocDump::dump(const String& p_file) {
List<StringName> class_list;
- ObjectTypeDB::get_type_list(&class_list);
+ ClassDB::get_class_list(&class_list);
class_list.sort_custom<StringName::AlphCompare>();
@@ -92,10 +92,10 @@ void DocDump::dump(const String& p_file) {
String name=class_list.front()->get();
String header="<class name=\""+name+"\"";
- String inherits=ObjectTypeDB::type_inherits_from(name);
+ String inherits=ClassDB::get_parent_class(name);
if (inherits!="")
header+=" inherits=\""+inherits+"\"";
- String category=ObjectTypeDB::get_category(name);
+ String category=ClassDB::get_category(name);
if (category=="")
category="Core";
header+=" category=\""+category+"\"";
@@ -108,7 +108,7 @@ void DocDump::dump(const String& p_file) {
_write_string(f,1,"<methods>");
List<MethodInfo> method_list;
- ObjectTypeDB::get_method_list(name,&method_list,true);
+ ClassDB::get_method_list(name,&method_list,true);
method_list.sort();
@@ -116,7 +116,7 @@ void DocDump::dump(const String& p_file) {
if (E->get().name=="" || E->get().name[0]=='_')
continue; //hiden
- MethodBind *m = ObjectTypeDB::get_method(name,E->get().name);
+ MethodBind *m = ClassDB::get_method(name,E->get().name);
String qualifiers;
if (E->get().flags&METHOD_FLAG_CONST)
@@ -251,7 +251,7 @@ void DocDump::dump(const String& p_file) {
_write_string(f,1,"</methods>");
List<MethodInfo> signal_list;
- ObjectTypeDB::get_signal_list(name,&signal_list,true);
+ ClassDB::get_signal_list(name,&signal_list,true);
if (signal_list.size()) {
@@ -278,7 +278,7 @@ void DocDump::dump(const String& p_file) {
List<String> constant_list;
- ObjectTypeDB::get_integer_constant_list(name, &constant_list, true);
+ ClassDB::get_integer_constant_list(name, &constant_list, true);
/* constants are sorted in a special way */
@@ -287,7 +287,7 @@ void DocDump::dump(const String& p_file) {
for(List<String>::Element *E=constant_list.front();E;E=E->next()) {
_ConstantSort cs;
cs.name=E->get();
- cs.value=ObjectTypeDB::get_integer_constant(name, E->get());
+ cs.value=ClassDB::get_integer_constant(name, E->get());
constant_sort.push_back(cs);
}
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index b14a7eb9b3..2f385f2ba5 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -48,7 +48,7 @@
class AnimationCurveEdit : public Control {
- OBJ_TYPE( AnimationCurveEdit, Control );
+ GDCLASS( AnimationCurveEdit, Control );
public:
enum Mode {
MODE_DISABLED,
@@ -198,8 +198,8 @@ public:
static void _bind_methods() {
- // ObjectTypeDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj);
- ObjectTypeDB::bind_method("_input_event",&AnimationCurveEdit::_input_event);
+ // ClassDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj);
+ ClassDB::bind_method("_input_event",&AnimationCurveEdit::_input_event);
ADD_SIGNAL(MethodInfo("transition_changed"));
}
@@ -243,15 +243,15 @@ public:
class AnimationKeyEdit : public Object {
- OBJ_TYPE(AnimationKeyEdit,Object);
+ GDCLASS(AnimationKeyEdit,Object);
public:
bool setting;
bool hidden;
static void _bind_methods() {
- ObjectTypeDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj);
- ObjectTypeDB::bind_method("_key_ofs_changed",&AnimationKeyEdit::_key_ofs_changed);
+ ClassDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj);
+ ClassDB::bind_method("_key_ofs_changed",&AnimationKeyEdit::_key_ofs_changed);
}
//PopupDialog *ke_dialog;
@@ -612,7 +612,7 @@ public:
if (res.is_valid()) {
hint=PROPERTY_HINT_RESOURCE_TYPE;
- hint_string=res->get_type();
+ hint_string=res->get_class();
}
}
@@ -3841,48 +3841,48 @@ void AnimationKeyEditor::cleanup() {
void AnimationKeyEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_root_removed"),&AnimationKeyEditor::_root_removed);
- ObjectTypeDB::bind_method(_MD("_scale"),&AnimationKeyEditor::_scale);
- ObjectTypeDB::bind_method(_MD("set_root"),&AnimationKeyEditor::set_root);
+ ClassDB::bind_method(_MD("_root_removed"),&AnimationKeyEditor::_root_removed);
+ ClassDB::bind_method(_MD("_scale"),&AnimationKeyEditor::_scale);
+ ClassDB::bind_method(_MD("set_root"),&AnimationKeyEditor::set_root);
-// ObjectTypeDB::bind_method(_MD("_confirm_insert"),&AnimationKeyEditor::_confirm_insert);
- ObjectTypeDB::bind_method(_MD("_confirm_insert_list"),&AnimationKeyEditor::_confirm_insert_list);
+// ClassDB::bind_method(_MD("_confirm_insert"),&AnimationKeyEditor::_confirm_insert);
+ ClassDB::bind_method(_MD("_confirm_insert_list"),&AnimationKeyEditor::_confirm_insert_list);
- ObjectTypeDB::bind_method(_MD("_update_paths"),&AnimationKeyEditor::_update_paths);
- ObjectTypeDB::bind_method(_MD("_track_editor_draw"),&AnimationKeyEditor::_track_editor_draw);
+ ClassDB::bind_method(_MD("_update_paths"),&AnimationKeyEditor::_update_paths);
+ ClassDB::bind_method(_MD("_track_editor_draw"),&AnimationKeyEditor::_track_editor_draw);
- ObjectTypeDB::bind_method(_MD("_animation_changed"),&AnimationKeyEditor::_animation_changed);
- ObjectTypeDB::bind_method(_MD("_scroll_changed"),&AnimationKeyEditor::_scroll_changed);
- ObjectTypeDB::bind_method(_MD("_track_editor_input_event"),&AnimationKeyEditor::_track_editor_input_event);
- ObjectTypeDB::bind_method(_MD("_track_name_changed"),&AnimationKeyEditor::_track_name_changed);
- ObjectTypeDB::bind_method(_MD("_track_menu_selected"),&AnimationKeyEditor::_track_menu_selected);
- ObjectTypeDB::bind_method(_MD("_menu_add_track"),&AnimationKeyEditor::_menu_add_track);
- ObjectTypeDB::bind_method(_MD("_menu_track"),&AnimationKeyEditor::_menu_track);
- ObjectTypeDB::bind_method(_MD("_clear_selection_for_anim"),&AnimationKeyEditor::_clear_selection_for_anim);
- ObjectTypeDB::bind_method(_MD("_select_at_anim"),&AnimationKeyEditor::_select_at_anim);
- ObjectTypeDB::bind_method(_MD("_track_pos_draw"),&AnimationKeyEditor::_track_pos_draw);
- ObjectTypeDB::bind_method(_MD("_insert_delay"),&AnimationKeyEditor::_insert_delay);
- ObjectTypeDB::bind_method(_MD("_step_changed"),&AnimationKeyEditor::_step_changed);
+ ClassDB::bind_method(_MD("_animation_changed"),&AnimationKeyEditor::_animation_changed);
+ ClassDB::bind_method(_MD("_scroll_changed"),&AnimationKeyEditor::_scroll_changed);
+ ClassDB::bind_method(_MD("_track_editor_input_event"),&AnimationKeyEditor::_track_editor_input_event);
+ ClassDB::bind_method(_MD("_track_name_changed"),&AnimationKeyEditor::_track_name_changed);
+ ClassDB::bind_method(_MD("_track_menu_selected"),&AnimationKeyEditor::_track_menu_selected);
+ ClassDB::bind_method(_MD("_menu_add_track"),&AnimationKeyEditor::_menu_add_track);
+ ClassDB::bind_method(_MD("_menu_track"),&AnimationKeyEditor::_menu_track);
+ ClassDB::bind_method(_MD("_clear_selection_for_anim"),&AnimationKeyEditor::_clear_selection_for_anim);
+ ClassDB::bind_method(_MD("_select_at_anim"),&AnimationKeyEditor::_select_at_anim);
+ ClassDB::bind_method(_MD("_track_pos_draw"),&AnimationKeyEditor::_track_pos_draw);
+ ClassDB::bind_method(_MD("_insert_delay"),&AnimationKeyEditor::_insert_delay);
+ ClassDB::bind_method(_MD("_step_changed"),&AnimationKeyEditor::_step_changed);
- ObjectTypeDB::bind_method(_MD("_animation_loop_changed"),&AnimationKeyEditor::_animation_loop_changed);
- ObjectTypeDB::bind_method(_MD("_animation_len_changed"),&AnimationKeyEditor::_animation_len_changed);
- ObjectTypeDB::bind_method(_MD("_create_value_item"),&AnimationKeyEditor::_create_value_item);
- ObjectTypeDB::bind_method(_MD("_pane_drag"),&AnimationKeyEditor::_pane_drag);
+ ClassDB::bind_method(_MD("_animation_loop_changed"),&AnimationKeyEditor::_animation_loop_changed);
+ ClassDB::bind_method(_MD("_animation_len_changed"),&AnimationKeyEditor::_animation_len_changed);
+ ClassDB::bind_method(_MD("_create_value_item"),&AnimationKeyEditor::_create_value_item);
+ ClassDB::bind_method(_MD("_pane_drag"),&AnimationKeyEditor::_pane_drag);
- ObjectTypeDB::bind_method(_MD("_animation_len_update"),&AnimationKeyEditor::_animation_len_update);
+ ClassDB::bind_method(_MD("_animation_len_update"),&AnimationKeyEditor::_animation_len_update);
- ObjectTypeDB::bind_method(_MD("set_animation"),&AnimationKeyEditor::set_animation);
- ObjectTypeDB::bind_method(_MD("_animation_optimize"),&AnimationKeyEditor::_animation_optimize);
- ObjectTypeDB::bind_method(_MD("_curve_transition_changed"),&AnimationKeyEditor::_curve_transition_changed);
- ObjectTypeDB::bind_method(_MD("_toggle_edit_curves"),&AnimationKeyEditor::_toggle_edit_curves);
- ObjectTypeDB::bind_method(_MD("_add_call_track"),&AnimationKeyEditor::_add_call_track);
+ ClassDB::bind_method(_MD("set_animation"),&AnimationKeyEditor::set_animation);
+ ClassDB::bind_method(_MD("_animation_optimize"),&AnimationKeyEditor::_animation_optimize);
+ ClassDB::bind_method(_MD("_curve_transition_changed"),&AnimationKeyEditor::_curve_transition_changed);
+ ClassDB::bind_method(_MD("_toggle_edit_curves"),&AnimationKeyEditor::_toggle_edit_curves);
+ ClassDB::bind_method(_MD("_add_call_track"),&AnimationKeyEditor::_add_call_track);
ADD_SIGNAL( MethodInfo("resource_selected", PropertyInfo( Variant::OBJECT, "res"),PropertyInfo( Variant::STRING, "prop") ) );
diff --git a/tools/editor/animation_editor.h b/tools/editor/animation_editor.h
index 83aa80ea5a..8113853920 100644
--- a/tools/editor/animation_editor.h
+++ b/tools/editor/animation_editor.h
@@ -51,7 +51,7 @@ class AnimationCurveEdit;
class AnimationKeyEditor : public VBoxContainer {
- OBJ_TYPE( AnimationKeyEditor, VBoxContainer );
+ GDCLASS( AnimationKeyEditor, VBoxContainer );
/*
enum {
diff --git a/tools/editor/array_property_edit.cpp b/tools/editor/array_property_edit.cpp
index a0a445ceae..d7e980980c 100644
--- a/tools/editor/array_property_edit.cpp
+++ b/tools/editor/array_property_edit.cpp
@@ -258,10 +258,10 @@ Node *ArrayPropertyEdit::get_node() {
void ArrayPropertyEdit::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_set_size"),&ArrayPropertyEdit::_set_size);
- ObjectTypeDB::bind_method(_MD("_set_value"),&ArrayPropertyEdit::_set_value);
- ObjectTypeDB::bind_method(_MD("_notif_change"),&ArrayPropertyEdit::_notif_change);
- ObjectTypeDB::bind_method(_MD("_notif_changev"),&ArrayPropertyEdit::_notif_changev);
+ ClassDB::bind_method(_MD("_set_size"),&ArrayPropertyEdit::_set_size);
+ ClassDB::bind_method(_MD("_set_value"),&ArrayPropertyEdit::_set_value);
+ ClassDB::bind_method(_MD("_notif_change"),&ArrayPropertyEdit::_notif_change);
+ ClassDB::bind_method(_MD("_notif_changev"),&ArrayPropertyEdit::_notif_changev);
}
ArrayPropertyEdit::ArrayPropertyEdit()
diff --git a/tools/editor/array_property_edit.h b/tools/editor/array_property_edit.h
index fc74def244..f904f3c159 100644
--- a/tools/editor/array_property_edit.h
+++ b/tools/editor/array_property_edit.h
@@ -33,7 +33,7 @@
class ArrayPropertyEdit : public Reference {
- OBJ_TYPE(ArrayPropertyEdit,Reference);
+ GDCLASS(ArrayPropertyEdit,Reference);
int page;
ObjectID obj;
diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp
index 8c693490c0..27455ad7cd 100644
--- a/tools/editor/asset_library_editor_plugin.cpp
+++ b/tools/editor/asset_library_editor_plugin.cpp
@@ -89,10 +89,10 @@ void EditorAssetLibraryItem::_author_clicked(){
void EditorAssetLibraryItem::_bind_methods() {
- ObjectTypeDB::bind_method("set_image",&EditorAssetLibraryItem::set_image);
- ObjectTypeDB::bind_method("_asset_clicked",&EditorAssetLibraryItem::_asset_clicked);
- ObjectTypeDB::bind_method("_category_clicked",&EditorAssetLibraryItem::_category_clicked);
- ObjectTypeDB::bind_method("_author_clicked",&EditorAssetLibraryItem::_author_clicked);
+ ClassDB::bind_method("set_image",&EditorAssetLibraryItem::set_image);
+ ClassDB::bind_method("_asset_clicked",&EditorAssetLibraryItem::_asset_clicked);
+ ClassDB::bind_method("_category_clicked",&EditorAssetLibraryItem::_category_clicked);
+ ClassDB::bind_method("_author_clicked",&EditorAssetLibraryItem::_author_clicked);
ADD_SIGNAL( MethodInfo("asset_selected"));
ADD_SIGNAL( MethodInfo("category_selected"));
ADD_SIGNAL( MethodInfo("author_selected"));
@@ -199,9 +199,9 @@ void EditorAssetLibraryItemDescription::set_image(int p_type,int p_index,const R
}
void EditorAssetLibraryItemDescription::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_image"),&EditorAssetLibraryItemDescription::set_image);
- ObjectTypeDB::bind_method(_MD("_link_click"),&EditorAssetLibraryItemDescription::_link_click);
- ObjectTypeDB::bind_method(_MD("_preview_click"),&EditorAssetLibraryItemDescription::_preview_click);
+ ClassDB::bind_method(_MD("set_image"),&EditorAssetLibraryItemDescription::set_image);
+ ClassDB::bind_method(_MD("_link_click"),&EditorAssetLibraryItemDescription::_link_click);
+ ClassDB::bind_method(_MD("_preview_click"),&EditorAssetLibraryItemDescription::_preview_click);
}
@@ -472,10 +472,10 @@ void EditorAssetLibraryItemDownload::_make_request() {
void EditorAssetLibraryItemDownload::_bind_methods() {
- ObjectTypeDB::bind_method("_http_download_completed",&EditorAssetLibraryItemDownload::_http_download_completed);
- ObjectTypeDB::bind_method("_install",&EditorAssetLibraryItemDownload::_install);
- ObjectTypeDB::bind_method("_close",&EditorAssetLibraryItemDownload::_close);
- ObjectTypeDB::bind_method("_make_request",&EditorAssetLibraryItemDownload::_make_request);
+ ClassDB::bind_method("_http_download_completed",&EditorAssetLibraryItemDownload::_http_download_completed);
+ ClassDB::bind_method("_install",&EditorAssetLibraryItemDownload::_install);
+ ClassDB::bind_method("_close",&EditorAssetLibraryItemDownload::_close);
+ ClassDB::bind_method("_make_request",&EditorAssetLibraryItemDownload::_make_request);
ADD_SIGNAL(MethodInfo("install_asset",PropertyInfo(Variant::STRING,"zip_path"),PropertyInfo(Variant::STRING,"name")));
@@ -1288,20 +1288,20 @@ void EditorAssetLibrary::_install_external_asset(String p_zip_path,String p_titl
void EditorAssetLibrary::_bind_methods() {
- ObjectTypeDB::bind_method("_http_request_completed",&EditorAssetLibrary::_http_request_completed);
- ObjectTypeDB::bind_method("_select_asset",&EditorAssetLibrary::_select_asset);
- ObjectTypeDB::bind_method("_select_author",&EditorAssetLibrary::_select_author);
- ObjectTypeDB::bind_method("_select_category",&EditorAssetLibrary::_select_category);
- ObjectTypeDB::bind_method("_image_request_completed",&EditorAssetLibrary::_image_request_completed);
- ObjectTypeDB::bind_method("_search",&EditorAssetLibrary::_search,DEFVAL(0));
- ObjectTypeDB::bind_method("_install_asset",&EditorAssetLibrary::_install_asset);
- ObjectTypeDB::bind_method("_manage_plugins",&EditorAssetLibrary::_manage_plugins);
- ObjectTypeDB::bind_method("_asset_open",&EditorAssetLibrary::_asset_open);
- ObjectTypeDB::bind_method("_asset_file_selected",&EditorAssetLibrary::_asset_file_selected);
- ObjectTypeDB::bind_method("_repository_changed",&EditorAssetLibrary::_repository_changed);
- ObjectTypeDB::bind_method("_support_toggled",&EditorAssetLibrary::_support_toggled);
- ObjectTypeDB::bind_method("_rerun_search",&EditorAssetLibrary::_rerun_search);
- ObjectTypeDB::bind_method("_install_external_asset",&EditorAssetLibrary::_install_external_asset);
+ ClassDB::bind_method("_http_request_completed",&EditorAssetLibrary::_http_request_completed);
+ ClassDB::bind_method("_select_asset",&EditorAssetLibrary::_select_asset);
+ ClassDB::bind_method("_select_author",&EditorAssetLibrary::_select_author);
+ ClassDB::bind_method("_select_category",&EditorAssetLibrary::_select_category);
+ ClassDB::bind_method("_image_request_completed",&EditorAssetLibrary::_image_request_completed);
+ ClassDB::bind_method("_search",&EditorAssetLibrary::_search,DEFVAL(0));
+ ClassDB::bind_method("_install_asset",&EditorAssetLibrary::_install_asset);
+ ClassDB::bind_method("_manage_plugins",&EditorAssetLibrary::_manage_plugins);
+ ClassDB::bind_method("_asset_open",&EditorAssetLibrary::_asset_open);
+ ClassDB::bind_method("_asset_file_selected",&EditorAssetLibrary::_asset_file_selected);
+ ClassDB::bind_method("_repository_changed",&EditorAssetLibrary::_repository_changed);
+ ClassDB::bind_method("_support_toggled",&EditorAssetLibrary::_support_toggled);
+ ClassDB::bind_method("_rerun_search",&EditorAssetLibrary::_rerun_search);
+ ClassDB::bind_method("_install_external_asset",&EditorAssetLibrary::_install_external_asset);
diff --git a/tools/editor/asset_library_editor_plugin.h b/tools/editor/asset_library_editor_plugin.h
index bbd5ed42cd..c7d6ad8bea 100644
--- a/tools/editor/asset_library_editor_plugin.h
+++ b/tools/editor/asset_library_editor_plugin.h
@@ -52,7 +52,7 @@
class EditorAssetLibraryItem : public PanelContainer {
- OBJ_TYPE( EditorAssetLibraryItem, PanelContainer );
+ GDCLASS( EditorAssetLibraryItem, PanelContainer );
TextureButton *icon;
LinkButton* title;
@@ -88,7 +88,7 @@ public:
class EditorAssetLibraryItemDescription : public ConfirmationDialog {
- OBJ_TYPE(EditorAssetLibraryItemDescription, ConfirmationDialog);
+ GDCLASS(EditorAssetLibraryItemDescription, ConfirmationDialog);
EditorAssetLibraryItem *item;
RichTextLabel *description;
@@ -135,7 +135,7 @@ public:
class EditorAssetLibraryItemDownload : public PanelContainer {
- OBJ_TYPE(EditorAssetLibraryItemDownload, PanelContainer);
+ GDCLASS(EditorAssetLibraryItemDownload, PanelContainer);
TextureFrame *icon;
@@ -178,7 +178,7 @@ public:
};
class EditorAssetLibrary : public PanelContainer {
- OBJ_TYPE(EditorAssetLibrary,PanelContainer);
+ GDCLASS(EditorAssetLibrary,PanelContainer);
String host;
@@ -318,7 +318,7 @@ public:
class AssetLibraryEditorPlugin : public EditorPlugin {
- OBJ_TYPE( AssetLibraryEditorPlugin, EditorPlugin );
+ GDCLASS( AssetLibraryEditorPlugin, EditorPlugin );
EditorAssetLibrary *addon_library;
EditorNode *editor;
diff --git a/tools/editor/call_dialog.cpp b/tools/editor/call_dialog.cpp
index cc78584101..7e8ce1a37a 100644
--- a/tools/editor/call_dialog.cpp
+++ b/tools/editor/call_dialog.cpp
@@ -35,7 +35,7 @@
class CallDialogParams : public Object {
- OBJ_TYPE( CallDialogParams, Object );
+ GDCLASS( CallDialogParams, Object );
public:
bool _set(const StringName& p_name, const Variant& p_value) {
@@ -170,11 +170,11 @@ void CallDialog::_update_method_list() {
List<String> inheritance_list;
- String type = object->get_type();
+ String type = object->get_class();
while(type!="") {
inheritance_list.push_back( type );
- type=ObjectTypeDB::type_inherits_from(type);
+ type=ClassDB::get_parent_class(type);
}
TreeItem *selected_item=NULL;
@@ -182,7 +182,7 @@ void CallDialog::_update_method_list() {
for(int i=0;i<inheritance_list.size();i++) {
String type=inheritance_list[i];
- String parent_type=ObjectTypeDB::type_inherits_from(type);
+ String parent_type=ClassDB::get_parent_class(type);
TreeItem *type_item=NULL;
@@ -192,7 +192,7 @@ void CallDialog::_update_method_list() {
N=E->next();
- if (parent_type!="" && ObjectTypeDB::get_method(parent_type,E->get().name)!=NULL) {
+ if (parent_type!="" && ClassDB::get_method(parent_type,E->get().name)!=NULL) {
E=N;
continue;
}
@@ -224,9 +224,9 @@ void CallDialog::_update_method_list() {
void CallDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_call",&CallDialog::_call);
- ObjectTypeDB::bind_method("_cancel",&CallDialog::_cancel);
- ObjectTypeDB::bind_method("_item_selected", &CallDialog::_item_selected);
+ ClassDB::bind_method("_call",&CallDialog::_call);
+ ClassDB::bind_method("_cancel",&CallDialog::_cancel);
+ ClassDB::bind_method("_item_selected", &CallDialog::_item_selected);
}
@@ -239,7 +239,7 @@ void CallDialog::set_object(Object *p_object,StringName p_selected) {
return_value->clear();
_update_method_list();
- method_label->set_text(vformat(TTR("Method List For '%s':"),p_object->get_type()));
+ method_label->set_text(vformat(TTR("Method List For '%s':"),p_object->get_class()));
}
CallDialog::CallDialog() {
diff --git a/tools/editor/call_dialog.h b/tools/editor/call_dialog.h
index d6c3928122..928ee74567 100644
--- a/tools/editor/call_dialog.h
+++ b/tools/editor/call_dialog.h
@@ -44,7 +44,7 @@ class CallDialogParams;
class CallDialog : public Popup {
- OBJ_TYPE( CallDialog, Popup );
+ GDCLASS( CallDialog, Popup );
Label* method_label;
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index 58576a30f1..e3ceb20880 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -459,19 +459,19 @@ void FindReplaceBar::set_text_edit(TextEdit *p_text_edit) {
void FindReplaceBar::_bind_methods() {
- ObjectTypeDB::bind_method("_unhandled_input",&FindReplaceBar::_unhandled_input);
-
- ObjectTypeDB::bind_method("_editor_text_changed",&FindReplaceBar::_editor_text_changed);
- ObjectTypeDB::bind_method("_search_text_changed",&FindReplaceBar::_search_text_changed);
- ObjectTypeDB::bind_method("_search_text_entered",&FindReplaceBar::_search_text_entered);
- ObjectTypeDB::bind_method("_replace_text_entered",&FindReplaceBar::_replace_text_entered);
- ObjectTypeDB::bind_method("_search_current",&FindReplaceBar::search_current);
- ObjectTypeDB::bind_method("_search_next",&FindReplaceBar::search_next);
- ObjectTypeDB::bind_method("_search_prev",&FindReplaceBar::search_prev);
- ObjectTypeDB::bind_method("_replace_pressed",&FindReplaceBar::_replace);
- ObjectTypeDB::bind_method("_replace_all_pressed",&FindReplaceBar::_replace_all);
- ObjectTypeDB::bind_method("_search_options_changed",&FindReplaceBar::_search_options_changed);
- ObjectTypeDB::bind_method("_hide_pressed",&FindReplaceBar::_hide_bar);
+ ClassDB::bind_method("_unhandled_input",&FindReplaceBar::_unhandled_input);
+
+ ClassDB::bind_method("_editor_text_changed",&FindReplaceBar::_editor_text_changed);
+ ClassDB::bind_method("_search_text_changed",&FindReplaceBar::_search_text_changed);
+ ClassDB::bind_method("_search_text_entered",&FindReplaceBar::_search_text_entered);
+ ClassDB::bind_method("_replace_text_entered",&FindReplaceBar::_replace_text_entered);
+ ClassDB::bind_method("_search_current",&FindReplaceBar::search_current);
+ ClassDB::bind_method("_search_next",&FindReplaceBar::search_next);
+ ClassDB::bind_method("_search_prev",&FindReplaceBar::search_prev);
+ ClassDB::bind_method("_replace_pressed",&FindReplaceBar::_replace);
+ ClassDB::bind_method("_replace_all_pressed",&FindReplaceBar::_replace_all);
+ ClassDB::bind_method("_search_options_changed",&FindReplaceBar::_search_options_changed);
+ ClassDB::bind_method("_hide_pressed",&FindReplaceBar::_hide_bar);
ADD_SIGNAL(MethodInfo("search"));
}
@@ -884,10 +884,10 @@ void FindReplaceDialog::search_next() {
void FindReplaceDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_search_text_entered",&FindReplaceDialog::_search_text_entered);
- ObjectTypeDB::bind_method("_replace_text_entered",&FindReplaceDialog::_replace_text_entered);
- ObjectTypeDB::bind_method("_prompt_changed",&FindReplaceDialog::_prompt_changed);
- ObjectTypeDB::bind_method("_skip_pressed",&FindReplaceDialog::_skip_pressed);
+ ClassDB::bind_method("_search_text_entered",&FindReplaceDialog::_search_text_entered);
+ ClassDB::bind_method("_replace_text_entered",&FindReplaceDialog::_replace_text_entered);
+ ClassDB::bind_method("_prompt_changed",&FindReplaceDialog::_prompt_changed);
+ ClassDB::bind_method("_skip_pressed",&FindReplaceDialog::_skip_pressed);
ADD_SIGNAL(MethodInfo("search"));
ADD_SIGNAL(MethodInfo("skip"));
@@ -1195,14 +1195,14 @@ void CodeTextEditor::_notification(int p_what) {
void CodeTextEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_text_editor_input_event",&CodeTextEditor::_text_editor_input_event);
- ObjectTypeDB::bind_method("_line_col_changed",&CodeTextEditor::_line_col_changed);
- ObjectTypeDB::bind_method("_text_changed",&CodeTextEditor::_text_changed);
- ObjectTypeDB::bind_method("_on_settings_change",&CodeTextEditor::_on_settings_change);
- ObjectTypeDB::bind_method("_text_changed_idle_timeout",&CodeTextEditor::_text_changed_idle_timeout);
- ObjectTypeDB::bind_method("_code_complete_timer_timeout",&CodeTextEditor::_code_complete_timer_timeout);
- ObjectTypeDB::bind_method("_complete_request",&CodeTextEditor::_complete_request);
- ObjectTypeDB::bind_method("_font_resize_timeout",&CodeTextEditor::_font_resize_timeout);
+ ClassDB::bind_method("_text_editor_input_event",&CodeTextEditor::_text_editor_input_event);
+ ClassDB::bind_method("_line_col_changed",&CodeTextEditor::_line_col_changed);
+ ClassDB::bind_method("_text_changed",&CodeTextEditor::_text_changed);
+ ClassDB::bind_method("_on_settings_change",&CodeTextEditor::_on_settings_change);
+ ClassDB::bind_method("_text_changed_idle_timeout",&CodeTextEditor::_text_changed_idle_timeout);
+ ClassDB::bind_method("_code_complete_timer_timeout",&CodeTextEditor::_code_complete_timer_timeout);
+ ClassDB::bind_method("_complete_request",&CodeTextEditor::_complete_request);
+ ClassDB::bind_method("_font_resize_timeout",&CodeTextEditor::_font_resize_timeout);
ADD_SIGNAL(MethodInfo("validate_script"));
ADD_SIGNAL(MethodInfo("load_theme_settings"));
diff --git a/tools/editor/code_editor.h b/tools/editor/code_editor.h
index b5688bc0be..75bad24483 100644
--- a/tools/editor/code_editor.h
+++ b/tools/editor/code_editor.h
@@ -42,7 +42,7 @@
class GotoLineDialog : public ConfirmationDialog {
- OBJ_TYPE(GotoLineDialog,ConfirmationDialog);
+ GDCLASS(GotoLineDialog,ConfirmationDialog);
Label *line_label;
LineEdit *line;
@@ -62,7 +62,7 @@ public:
class FindReplaceBar : public HBoxContainer {
- OBJ_TYPE(FindReplaceBar,HBoxContainer);
+ GDCLASS(FindReplaceBar,HBoxContainer);
LineEdit *search_text;
ToolButton *find_prev;
@@ -134,7 +134,7 @@ public:
class FindReplaceDialog : public ConfirmationDialog {
- OBJ_TYPE(FindReplaceDialog,ConfirmationDialog);
+ GDCLASS(FindReplaceDialog,ConfirmationDialog);
LineEdit *search_text;
LineEdit *replace_text;
@@ -194,7 +194,7 @@ typedef void (*CodeTextEditorCodeCompleteFunc)(void* p_ud,const String& p_code,
class CodeTextEditor : public VBoxContainer {
- OBJ_TYPE(CodeTextEditor,VBoxContainer);
+ GDCLASS(CodeTextEditor,VBoxContainer);
TextEdit *text_editor;
FindReplaceBar *find_replace_bar;
diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp
index dc3d6d08f1..f60dfff49c 100644
--- a/tools/editor/connections_dialog.cpp
+++ b/tools/editor/connections_dialog.cpp
@@ -39,7 +39,7 @@
class ConnectDialogBinds : public Object {
- OBJ_TYPE( ConnectDialogBinds, Object );
+ GDCLASS( ConnectDialogBinds, Object );
public:
Vector<Variant> params;
@@ -127,7 +127,7 @@ void ConnectDialog::_tree_node_selected() {
if (E->get().name.length() && E->get().name[0]=='_')
continue; // hidden method, not show!
- if (ObjectTypeDB::has_method(node->get_type(),"Node") || ObjectTypeDB::has_method(node->get_type(),"Control",true))
+ if (ClassDB::has_method(node->get_type(),"Node") || ClassDB::has_method(node->get_type(),"Control",true))
continue; //avoid too much unnecesary stuff
String method=E->get().name+"(";
@@ -290,13 +290,13 @@ void ConnectDialog::set_dst_method(const StringName& p_method) {
void ConnectDialog::_bind_methods() {
- //ObjectTypeDB::bind_method("_ok",&ConnectDialog::_ok_pressed);
- ObjectTypeDB::bind_method("_cancel",&ConnectDialog::_cancel_pressed);
- //ObjectTypeDB::bind_method("_dst_method_list_selected",&ConnectDialog::_dst_method_list_selected);
- ObjectTypeDB::bind_method("_tree_node_selected",&ConnectDialog::_tree_node_selected);
+ //ClassDB::bind_method("_ok",&ConnectDialog::_ok_pressed);
+ ClassDB::bind_method("_cancel",&ConnectDialog::_cancel_pressed);
+ //ClassDB::bind_method("_dst_method_list_selected",&ConnectDialog::_dst_method_list_selected);
+ ClassDB::bind_method("_tree_node_selected",&ConnectDialog::_tree_node_selected);
- ObjectTypeDB::bind_method("_add_bind",&ConnectDialog::_add_bind);
- ObjectTypeDB::bind_method("_remove_bind",&ConnectDialog::_remove_bind);
+ ClassDB::bind_method("_add_bind",&ConnectDialog::_add_bind);
+ ClassDB::bind_method("_remove_bind",&ConnectDialog::_remove_bind);
ADD_SIGNAL( MethodInfo("connected") );
}
@@ -616,7 +616,7 @@ void ConnectionsDock::update_tree() {
//node_signals.sort_custom<_ConnectionsDockMethodInfoSort>();
bool did_script=false;
- StringName base = node->get_type();
+ StringName base = node->get_class();
while(base) {
@@ -632,16 +632,16 @@ void ConnectionsDock::update_tree() {
if (scr->get_path().is_resource_file())
name=scr->get_path().get_file();
else
- name=scr->get_type();
+ name=scr->get_class();
- if (has_icon(scr->get_type(),"EditorIcons")) {
- icon=get_icon(scr->get_type(),"EditorIcons");
+ if (has_icon(scr->get_class(),"EditorIcons")) {
+ icon=get_icon(scr->get_class(),"EditorIcons");
}
}
} else {
- ObjectTypeDB::get_signal_list(base,&node_signals,true);
+ ClassDB::get_signal_list(base,&node_signals,true);
if (has_icon(base,"EditorIcons")) {
icon=get_icon(base,"EditorIcons");
}
@@ -740,7 +740,7 @@ void ConnectionsDock::update_tree() {
if (!did_script) {
did_script=true;
} else {
- base=ObjectTypeDB::type_inherits_from(base);
+ base=ClassDB::get_parent_class(base);
}
}
@@ -825,12 +825,12 @@ void ConnectionsDock::_something_activated() {
void ConnectionsDock::_bind_methods() {
- ObjectTypeDB::bind_method("_connect",&ConnectionsDock::_connect);
- ObjectTypeDB::bind_method("_something_selected",&ConnectionsDock::_something_selected);
- ObjectTypeDB::bind_method("_something_activated",&ConnectionsDock::_something_activated);
- ObjectTypeDB::bind_method("_close",&ConnectionsDock::_close);
- ObjectTypeDB::bind_method("_connect_pressed",&ConnectionsDock::_connect_pressed);
- ObjectTypeDB::bind_method("update_tree",&ConnectionsDock::update_tree);
+ ClassDB::bind_method("_connect",&ConnectionsDock::_connect);
+ ClassDB::bind_method("_something_selected",&ConnectionsDock::_something_selected);
+ ClassDB::bind_method("_something_activated",&ConnectionsDock::_something_activated);
+ ClassDB::bind_method("_close",&ConnectionsDock::_close);
+ ClassDB::bind_method("_connect_pressed",&ConnectionsDock::_connect_pressed);
+ ClassDB::bind_method("update_tree",&ConnectionsDock::update_tree);
}
diff --git a/tools/editor/connections_dialog.h b/tools/editor/connections_dialog.h
index 028faccabd..bfc75266e9 100644
--- a/tools/editor/connections_dialog.h
+++ b/tools/editor/connections_dialog.h
@@ -48,7 +48,7 @@ class ConnectDialogBinds;
class ConnectDialog : public ConfirmationDialog {
- OBJ_TYPE( ConnectDialog, ConfirmationDialog );
+ GDCLASS( ConnectDialog, ConfirmationDialog );
ConfirmationDialog *error;
@@ -97,7 +97,7 @@ public:
class ConnectionsDock : public VBoxContainer {
- OBJ_TYPE( ConnectionsDock , VBoxContainer );
+ GDCLASS( ConnectionsDock , VBoxContainer );
Button *connect_button;
EditorNode *editor;
diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp
index 4df6f3498f..e1d21e4cd9 100644
--- a/tools/editor/create_dialog.cpp
+++ b/tools/editor/create_dialog.cpp
@@ -151,10 +151,10 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
if (p_types.has(p_type))
return;
- if (!ObjectTypeDB::is_type(p_type,base_type) || p_type==base_type)
+ if (!ClassDB::is_parent_class(p_type,base_type) || p_type==base_type)
return;
- String inherits=ObjectTypeDB::type_inherits_from(p_type);
+ String inherits=ClassDB::get_parent_class(p_type);
TreeItem *parent=p_root;
@@ -172,7 +172,7 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
TreeItem *item = search_options->create_item(parent);
item->set_text(0,p_type);
- if (!ObjectTypeDB::can_instance(p_type)) {
+ if (!ClassDB::can_instance(p_type)) {
item->set_custom_color(0, Color(0.5,0.5,0.5) );
item->set_selectable(0,false);
} else {
@@ -191,7 +191,7 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
// don't collapse the root node
collapse &= (item != p_root);
// don't collapse abstract nodes on the first tree level
- collapse &= ((parent != p_root) || (ObjectTypeDB::can_instance(p_type)));
+ collapse &= ((parent != p_root) || (ClassDB::can_instance(p_type)));
item->set_collapsed(collapse);
}
@@ -222,7 +222,7 @@ void CreateDialog::_update_search() {
*/
List<StringName> type_list;
- ObjectTypeDB::get_type_list(&type_list);
+ ClassDB::get_class_list(&type_list);
HashMap<String,TreeItem*> types;
@@ -245,7 +245,7 @@ void CreateDialog::_update_search() {
if (base_type=="Node" && type.begins_with("Editor"))
continue; // do not show editor nodes
- if (!ObjectTypeDB::can_instance(type))
+ if (!ClassDB::can_instance(type))
continue; // cant create what can't be instanced
if (search_box->get_text()=="") {
@@ -254,14 +254,14 @@ void CreateDialog::_update_search() {
bool found=false;
String type=I->get();
- while(type!="" && ObjectTypeDB::is_type(type,base_type) && type!=base_type) {
+ while(type!="" && ClassDB::is_parent_class(type,base_type) && type!=base_type) {
if (search_box->get_text().is_subsequence_ofi(type)) {
found=true;
break;
}
- type=ObjectTypeDB::type_inherits_from(type);
+ type=ClassDB::get_parent_class(type);
}
@@ -269,7 +269,7 @@ void CreateDialog::_update_search() {
add_type(I->get(),types,root,&to_select);
}
- if (EditorNode::get_editor_data().get_custom_types().has(type) && ObjectTypeDB::is_type(type, base_type)) {
+ if (EditorNode::get_editor_data().get_custom_types().has(type) && ClassDB::is_parent_class(type, base_type)) {
//there are custom types based on this... cool.
//print_line("there are custom types");
@@ -412,9 +412,9 @@ Object *CreateDialog::instance_selected() {
Ref<Script> script = EditorNode::get_editor_data().get_custom_types()[custom][i].script;
String name = selected->get_text(0);
- Object *ob = ObjectTypeDB::instance(custom);
+ Object *ob = ClassDB::instance(custom);
ERR_FAIL_COND_V(!ob,NULL);
- if (ob->is_type("Node")) {
+ if (ob->is_class("Node")) {
ob->call("set_name",name);
}
ob->set_script(script.get_ref_ptr());
@@ -427,7 +427,7 @@ Object *CreateDialog::instance_selected() {
}
} else {
- return ObjectTypeDB::instance(selected->get_text(0));
+ return ClassDB::instance(selected->get_text(0));
}
}
@@ -621,20 +621,20 @@ void CreateDialog::drop_data_fw(const Point2& p_point,const Variant& p_data,Cont
void CreateDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&CreateDialog::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&CreateDialog::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&CreateDialog::_sbox_input);
- ObjectTypeDB::bind_method(_MD("_item_selected"),&CreateDialog::_item_selected);
- ObjectTypeDB::bind_method(_MD("_favorite_toggled"),&CreateDialog::_favorite_toggled);
- ObjectTypeDB::bind_method(_MD("_history_selected"),&CreateDialog::_history_selected);
- ObjectTypeDB::bind_method(_MD("_favorite_selected"),&CreateDialog::_favorite_selected);
- ObjectTypeDB::bind_method(_MD("_history_activated"),&CreateDialog::_history_activated);
- ObjectTypeDB::bind_method(_MD("_favorite_activated"),&CreateDialog::_favorite_activated);
+ ClassDB::bind_method(_MD("_text_changed"),&CreateDialog::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&CreateDialog::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&CreateDialog::_sbox_input);
+ ClassDB::bind_method(_MD("_item_selected"),&CreateDialog::_item_selected);
+ ClassDB::bind_method(_MD("_favorite_toggled"),&CreateDialog::_favorite_toggled);
+ ClassDB::bind_method(_MD("_history_selected"),&CreateDialog::_history_selected);
+ ClassDB::bind_method(_MD("_favorite_selected"),&CreateDialog::_favorite_selected);
+ ClassDB::bind_method(_MD("_history_activated"),&CreateDialog::_history_activated);
+ ClassDB::bind_method(_MD("_favorite_activated"),&CreateDialog::_favorite_activated);
- ObjectTypeDB::bind_method("get_drag_data_fw",&CreateDialog::get_drag_data_fw);
- ObjectTypeDB::bind_method("can_drop_data_fw",&CreateDialog::can_drop_data_fw);
- ObjectTypeDB::bind_method("drop_data_fw",&CreateDialog::drop_data_fw);
+ ClassDB::bind_method("get_drag_data_fw",&CreateDialog::get_drag_data_fw);
+ ClassDB::bind_method("can_drop_data_fw",&CreateDialog::can_drop_data_fw);
+ ClassDB::bind_method("drop_data_fw",&CreateDialog::drop_data_fw);
ADD_SIGNAL(MethodInfo("create"));
@@ -740,10 +740,10 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
if (p_types.has(p_type))
return;
- if (!ObjectTypeDB::is_type(p_type,base) || p_type==base)
+ if (!ClassDB::is_type(p_type,base) || p_type==base)
return;
- String inherits=ObjectTypeDB::type_inherits_from(p_type);
+ String inherits=ClassDB::type_inherits_from(p_type);
TreeItem *parent=p_root;
@@ -761,7 +761,7 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
TreeItem *item = tree->create_item(parent);
item->set_text(0,p_type);
- if (!ObjectTypeDB::can_instance(p_type)) {
+ if (!ClassDB::can_instance(p_type)) {
item->set_custom_color(0, Color(0.5,0.5,0.5) );
item->set_selectable(0,false);
}
@@ -782,7 +782,7 @@ void CreateDialog::update_tree() {
tree->clear();
List<String> type_list;
- ObjectTypeDB::get_type_list(&type_list);
+ ClassDB::get_type_list(&type_list);
HashMap<String,TreeItem*> types;
@@ -798,7 +798,7 @@ void CreateDialog::update_tree() {
String type=I->get();
- if (!ObjectTypeDB::can_instance(type))
+ if (!ClassDB::can_instance(type))
continue; // cant create what can't be instanced
if (filter->get_text()=="")
add_type(type,types,root);
@@ -806,14 +806,14 @@ void CreateDialog::update_tree() {
bool found=false;
String type=I->get();
- while(type!="" && ObjectTypeDB::is_type(type,base) && type!=base) {
+ while(type!="" && ClassDB::is_type(type,base) && type!=base) {
if (type.findn(filter->get_text())!=-1) {
found=true;
break;
}
- type=ObjectTypeDB::type_inherits_from(type);
+ type=ClassDB::type_inherits_from(type);
}
@@ -875,7 +875,7 @@ Object *CreateDialog::instance_selected() {
if (ct[i].name==name) {
- Object* obj = ObjectTypeDB::instance(base);
+ Object* obj = ClassDB::instance(base);
ERR_FAIL_COND_V(!obj,NULL);
obj->set_script(ct[i].script.get_ref_ptr());
if (ct[i].icon.is_valid())
@@ -891,16 +891,16 @@ Object *CreateDialog::instance_selected() {
}
- return ObjectTypeDB::instance(tree->get_selected()->get_text(0));
+ return ClassDB::instance(tree->get_selected()->get_text(0));
}
void CreateDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_create",&CreateDialog::_create);
- ObjectTypeDB::bind_method("_cancel",&CreateDialog::_cancel);
- ObjectTypeDB::bind_method("_text_changed", &CreateDialog::_text_changed);
+ ClassDB::bind_method("_create",&CreateDialog::_create);
+ ClassDB::bind_method("_cancel",&CreateDialog::_cancel);
+ ClassDB::bind_method("_text_changed", &CreateDialog::_text_changed);
ADD_SIGNAL( MethodInfo("create"));
}
diff --git a/tools/editor/create_dialog.h b/tools/editor/create_dialog.h
index ccd733b3ad..5ecb4db2c3 100644
--- a/tools/editor/create_dialog.h
+++ b/tools/editor/create_dialog.h
@@ -45,7 +45,7 @@
class CreateDialog : public ConfirmationDialog {
- OBJ_TYPE(CreateDialog,ConfirmationDialog )
+ GDCLASS(CreateDialog,ConfirmationDialog )
Vector<String> favorite_list;
@@ -108,7 +108,7 @@ public:
class CreateDialog : public ConfirmationDialog {
- OBJ_TYPE( CreateDialog, ConfirmationDialog );
+ GDCLASS( CreateDialog, ConfirmationDialog );
Tree *tree;
Button *create;
diff --git a/tools/editor/dependency_editor.cpp b/tools/editor/dependency_editor.cpp
index 238bb2a3d7..39a7a3620a 100644
--- a/tools/editor/dependency_editor.cpp
+++ b/tools/editor/dependency_editor.cpp
@@ -250,9 +250,9 @@ void DependencyEditor::edit(const String& p_path) {
void DependencyEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_searched"),&DependencyEditor::_searched);
- ObjectTypeDB::bind_method(_MD("_load_pressed"),&DependencyEditor::_load_pressed);
- ObjectTypeDB::bind_method(_MD("_fix_all"),&DependencyEditor::_fix_all);
+ ClassDB::bind_method(_MD("_searched"),&DependencyEditor::_searched);
+ ClassDB::bind_method(_MD("_load_pressed"),&DependencyEditor::_load_pressed);
+ ClassDB::bind_method(_MD("_fix_all"),&DependencyEditor::_fix_all);
}
@@ -690,8 +690,8 @@ void OrphanResourcesDialog::_button_pressed(Object *p_item,int p_column, int p_i
void OrphanResourcesDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_delete_confirm"),&OrphanResourcesDialog::_delete_confirm);
- ObjectTypeDB::bind_method(_MD("_button_pressed"),&OrphanResourcesDialog::_button_pressed);
+ ClassDB::bind_method(_MD("_delete_confirm"),&OrphanResourcesDialog::_delete_confirm);
+ ClassDB::bind_method(_MD("_button_pressed"),&OrphanResourcesDialog::_button_pressed);
}
diff --git a/tools/editor/dependency_editor.h b/tools/editor/dependency_editor.h
index be9c68a877..a96ffe5fcf 100644
--- a/tools/editor/dependency_editor.h
+++ b/tools/editor/dependency_editor.h
@@ -37,7 +37,7 @@
class EditorFileSystemDirectory;
class DependencyEditor : public AcceptDialog {
- OBJ_TYPE(DependencyEditor,AcceptDialog);
+ GDCLASS(DependencyEditor,AcceptDialog);
Tree *tree;
@@ -71,7 +71,7 @@ public:
};
class DependencyEditorOwners : public AcceptDialog {
- OBJ_TYPE(DependencyEditorOwners,AcceptDialog);
+ GDCLASS(DependencyEditorOwners,AcceptDialog);
ItemList *owners;
String editing;
@@ -84,7 +84,7 @@ public:
};
class DependencyRemoveDialog : public ConfirmationDialog {
- OBJ_TYPE(DependencyRemoveDialog,ConfirmationDialog);
+ GDCLASS(DependencyRemoveDialog,ConfirmationDialog);
Label *text;
@@ -103,7 +103,7 @@ public:
class DependencyErrorDialog : public ConfirmationDialog {
- OBJ_TYPE(DependencyErrorDialog,ConfirmationDialog);
+ GDCLASS(DependencyErrorDialog,ConfirmationDialog);
String for_file;
@@ -122,7 +122,7 @@ public:
class OrphanResourcesDialog : public ConfirmationDialog {
- OBJ_TYPE(OrphanResourcesDialog,ConfirmationDialog);
+ GDCLASS(OrphanResourcesDialog,ConfirmationDialog);
DependencyEditor *dep_edit;
Tree *files;
diff --git a/tools/editor/editor_asset_installer.cpp b/tools/editor/editor_asset_installer.cpp
index 85a9d9cbbd..553fa6b600 100644
--- a/tools/editor/editor_asset_installer.cpp
+++ b/tools/editor/editor_asset_installer.cpp
@@ -331,7 +331,7 @@ void EditorAssetInstaller::ok_pressed() {
void EditorAssetInstaller::_bind_methods() {
- ObjectTypeDB::bind_method("_item_edited",&EditorAssetInstaller::_item_edited);
+ ClassDB::bind_method("_item_edited",&EditorAssetInstaller::_item_edited);
}
diff --git a/tools/editor/editor_asset_installer.h b/tools/editor/editor_asset_installer.h
index a8525d0fa3..2d0486a6f6 100644
--- a/tools/editor/editor_asset_installer.h
+++ b/tools/editor/editor_asset_installer.h
@@ -34,7 +34,7 @@
#include "scene/gui/tree.h"
class EditorAssetInstaller : public ConfirmationDialog {
- OBJ_TYPE( EditorAssetInstaller, ConfirmationDialog );
+ GDCLASS( EditorAssetInstaller, ConfirmationDialog );
Tree *tree;
String package_path;
diff --git a/tools/editor/editor_autoload_settings.cpp b/tools/editor/editor_autoload_settings.cpp
index cbe9c81984..e5758e41ee 100644
--- a/tools/editor/editor_autoload_settings.cpp
+++ b/tools/editor/editor_autoload_settings.cpp
@@ -62,7 +62,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String& p_name, Strin
return false;
}
- if (ObjectTypeDB::type_exists(p_name)) {
+ if (ClassDB::class_exists(p_name)) {
if (r_error)
*r_error = TTR("Invalid name. Must not collide with an existing engine class name.");
@@ -528,17 +528,17 @@ void EditorAutoloadSettings::drop_data_fw(const Point2& p_point, const Variant&
void EditorAutoloadSettings::_bind_methods() {
- ObjectTypeDB::bind_method("_autoload_add", &EditorAutoloadSettings::_autoload_add);
- ObjectTypeDB::bind_method("_autoload_selected", &EditorAutoloadSettings::_autoload_selected);
- ObjectTypeDB::bind_method("_autoload_edited", &EditorAutoloadSettings::_autoload_edited);
- ObjectTypeDB::bind_method("_autoload_button_pressed", &EditorAutoloadSettings::_autoload_button_pressed);
- ObjectTypeDB::bind_method("_autoload_file_callback", &EditorAutoloadSettings::_autoload_file_callback);
+ ClassDB::bind_method("_autoload_add", &EditorAutoloadSettings::_autoload_add);
+ ClassDB::bind_method("_autoload_selected", &EditorAutoloadSettings::_autoload_selected);
+ ClassDB::bind_method("_autoload_edited", &EditorAutoloadSettings::_autoload_edited);
+ ClassDB::bind_method("_autoload_button_pressed", &EditorAutoloadSettings::_autoload_button_pressed);
+ ClassDB::bind_method("_autoload_file_callback", &EditorAutoloadSettings::_autoload_file_callback);
- ObjectTypeDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
- ObjectTypeDB::bind_method("can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw);
- ObjectTypeDB::bind_method("drop_data_fw", &EditorAutoloadSettings::drop_data_fw);
+ ClassDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
+ ClassDB::bind_method("can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw);
+ ClassDB::bind_method("drop_data_fw", &EditorAutoloadSettings::drop_data_fw);
- ObjectTypeDB::bind_method("update_autoload", &EditorAutoloadSettings::update_autoload);
+ ClassDB::bind_method("update_autoload", &EditorAutoloadSettings::update_autoload);
ADD_SIGNAL(MethodInfo("autoload_changed"));
}
diff --git a/tools/editor/editor_autoload_settings.h b/tools/editor/editor_autoload_settings.h
index ad834f9e84..2afe239000 100644
--- a/tools/editor/editor_autoload_settings.h
+++ b/tools/editor/editor_autoload_settings.h
@@ -36,7 +36,7 @@
class EditorAutoloadSettings : public VBoxContainer {
- OBJ_TYPE( EditorAutoloadSettings, VBoxContainer );
+ GDCLASS( EditorAutoloadSettings, VBoxContainer );
enum {
BUTTON_MOVE_UP,
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp
index ddb786484e..11ba30f4f0 100644
--- a/tools/editor/editor_data.cpp
+++ b/tools/editor/editor_data.cpp
@@ -667,7 +667,7 @@ String EditorData::get_scene_type(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx,edited_scene.size(),String());
if (!edited_scene[p_idx].root)
return "";
- return edited_scene[p_idx].root->get_type();
+ return edited_scene[p_idx].root->get_class();
}
void EditorData::move_edited_scene_to_index(int p_idx) {
@@ -903,12 +903,12 @@ Array EditorSelection::_get_selected_nodes() {
void EditorSelection::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_node_removed"),&EditorSelection::_node_removed);
- ObjectTypeDB::bind_method(_MD("clear"),&EditorSelection::clear);
- ObjectTypeDB::bind_method(_MD("add_node","node:Node"),&EditorSelection::add_node);
- ObjectTypeDB::bind_method(_MD("remove_node","node:Node"),&EditorSelection::remove_node);
- ObjectTypeDB::bind_method(_MD("get_selected_nodes"),&EditorSelection::_get_selected_nodes);
- ObjectTypeDB::bind_method(_MD("get_transformable_selected_nodes"),&EditorSelection::_get_transformable_selected_nodes);
+ ClassDB::bind_method(_MD("_node_removed"),&EditorSelection::_node_removed);
+ ClassDB::bind_method(_MD("clear"),&EditorSelection::clear);
+ ClassDB::bind_method(_MD("add_node","node:Node"),&EditorSelection::add_node);
+ ClassDB::bind_method(_MD("remove_node","node:Node"),&EditorSelection::remove_node);
+ ClassDB::bind_method(_MD("get_selected_nodes"),&EditorSelection::_get_selected_nodes);
+ ClassDB::bind_method(_MD("get_transformable_selected_nodes"),&EditorSelection::_get_transformable_selected_nodes);
ADD_SIGNAL( MethodInfo("selection_changed") );
}
diff --git a/tools/editor/editor_data.h b/tools/editor/editor_data.h
index 345a1918d0..f0bc5983a2 100644
--- a/tools/editor/editor_data.h
+++ b/tools/editor/editor_data.h
@@ -218,7 +218,7 @@ public:
class EditorSelection : public Object {
- OBJ_TYPE(EditorSelection,Object);
+ GDCLASS(EditorSelection,Object);
public:
Map<Node*,Object*> selection;
diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp
index c542b1e7cc..46eafa0266 100644
--- a/tools/editor/editor_dir_dialog.cpp
+++ b/tools/editor/editor_dir_dialog.cpp
@@ -224,10 +224,10 @@ void EditorDirDialog::_make_dir_confirm() {
void EditorDirDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_item_collapsed"),&EditorDirDialog::_item_collapsed);
- ObjectTypeDB::bind_method(_MD("_make_dir"),&EditorDirDialog::_make_dir);
- ObjectTypeDB::bind_method(_MD("_make_dir_confirm"),&EditorDirDialog::_make_dir_confirm);
- ObjectTypeDB::bind_method(_MD("reload"),&EditorDirDialog::reload);
+ ClassDB::bind_method(_MD("_item_collapsed"),&EditorDirDialog::_item_collapsed);
+ ClassDB::bind_method(_MD("_make_dir"),&EditorDirDialog::_make_dir);
+ ClassDB::bind_method(_MD("_make_dir_confirm"),&EditorDirDialog::_make_dir_confirm);
+ ClassDB::bind_method(_MD("reload"),&EditorDirDialog::reload);
ADD_SIGNAL(MethodInfo("dir_selected",PropertyInfo(Variant::STRING,"dir")));
}
diff --git a/tools/editor/editor_dir_dialog.h b/tools/editor/editor_dir_dialog.h
index 8d0986b129..0577ff0442 100644
--- a/tools/editor/editor_dir_dialog.h
+++ b/tools/editor/editor_dir_dialog.h
@@ -34,7 +34,7 @@
#include "scene/gui/tree.h"
class EditorDirDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorDirDialog,ConfirmationDialog);
+ GDCLASS(EditorDirDialog,ConfirmationDialog);
ConfirmationDialog *makedialog;
diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp
index 28557648e5..e2202bbc21 100644
--- a/tools/editor/editor_file_dialog.cpp
+++ b/tools/editor/editor_file_dialog.cpp
@@ -1160,55 +1160,55 @@ EditorFileDialog::DisplayMode EditorFileDialog::get_display_mode() const{
void EditorFileDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_unhandled_input"),&EditorFileDialog::_unhandled_input);
-
- ObjectTypeDB::bind_method(_MD("_item_selected"),&EditorFileDialog::_item_selected);
- ObjectTypeDB::bind_method(_MD("_item_db_selected"),&EditorFileDialog::_item_dc_selected);
- ObjectTypeDB::bind_method(_MD("_dir_entered"),&EditorFileDialog::_dir_entered);
- ObjectTypeDB::bind_method(_MD("_file_entered"),&EditorFileDialog::_file_entered);
- ObjectTypeDB::bind_method(_MD("_action_pressed"),&EditorFileDialog::_action_pressed);
- ObjectTypeDB::bind_method(_MD("_cancel_pressed"),&EditorFileDialog::_cancel_pressed);
- ObjectTypeDB::bind_method(_MD("_filter_selected"),&EditorFileDialog::_filter_selected);
- ObjectTypeDB::bind_method(_MD("_save_confirm_pressed"),&EditorFileDialog::_save_confirm_pressed);
-
- ObjectTypeDB::bind_method(_MD("clear_filters"),&EditorFileDialog::clear_filters);
- ObjectTypeDB::bind_method(_MD("add_filter","filter"),&EditorFileDialog::add_filter);
- ObjectTypeDB::bind_method(_MD("get_current_dir"),&EditorFileDialog::get_current_dir);
- ObjectTypeDB::bind_method(_MD("get_current_file"),&EditorFileDialog::get_current_file);
- ObjectTypeDB::bind_method(_MD("get_current_path"),&EditorFileDialog::get_current_path);
- ObjectTypeDB::bind_method(_MD("set_current_dir","dir"),&EditorFileDialog::set_current_dir);
- ObjectTypeDB::bind_method(_MD("set_current_file","file"),&EditorFileDialog::set_current_file);
- ObjectTypeDB::bind_method(_MD("set_current_path","path"),&EditorFileDialog::set_current_path);
- ObjectTypeDB::bind_method(_MD("set_mode","mode"),&EditorFileDialog::set_mode);
- ObjectTypeDB::bind_method(_MD("get_mode"),&EditorFileDialog::get_mode);
- ObjectTypeDB::bind_method(_MD("get_vbox:VBoxContainer"),&EditorFileDialog::get_vbox);
- ObjectTypeDB::bind_method(_MD("set_access","access"),&EditorFileDialog::set_access);
- ObjectTypeDB::bind_method(_MD("get_access"),&EditorFileDialog::get_access);
- ObjectTypeDB::bind_method(_MD("set_show_hidden_files","show"),&EditorFileDialog::set_show_hidden_files);
- ObjectTypeDB::bind_method(_MD("is_showing_hidden_files"),&EditorFileDialog::is_showing_hidden_files);
- ObjectTypeDB::bind_method(_MD("_select_drive"),&EditorFileDialog::_select_drive);
- ObjectTypeDB::bind_method(_MD("_make_dir"),&EditorFileDialog::_make_dir);
- ObjectTypeDB::bind_method(_MD("_make_dir_confirm"),&EditorFileDialog::_make_dir_confirm);
- ObjectTypeDB::bind_method(_MD("_update_file_list"),&EditorFileDialog::update_file_list);
- ObjectTypeDB::bind_method(_MD("_update_dir"),&EditorFileDialog::update_dir);
- ObjectTypeDB::bind_method(_MD("_thumbnail_done"),&EditorFileDialog::_thumbnail_done);
- ObjectTypeDB::bind_method(_MD("set_display_mode","mode"),&EditorFileDialog::set_display_mode);
- ObjectTypeDB::bind_method(_MD("get_display_mode"),&EditorFileDialog::get_display_mode);
- ObjectTypeDB::bind_method(_MD("_thumbnail_result"),&EditorFileDialog::_thumbnail_result);
- ObjectTypeDB::bind_method(_MD("set_disable_overwrite_warning","disable"),&EditorFileDialog::set_disable_overwrite_warning);
- ObjectTypeDB::bind_method(_MD("is_overwrite_warning_disabled"),&EditorFileDialog::is_overwrite_warning_disabled);
-
- ObjectTypeDB::bind_method(_MD("_recent_selected"),&EditorFileDialog::_recent_selected);
- ObjectTypeDB::bind_method(_MD("_go_back"),&EditorFileDialog::_go_back);
- ObjectTypeDB::bind_method(_MD("_go_forward"),&EditorFileDialog::_go_forward);
- ObjectTypeDB::bind_method(_MD("_go_up"),&EditorFileDialog::_go_up);
-
- ObjectTypeDB::bind_method(_MD("_favorite_toggled"),&EditorFileDialog::_favorite_toggled);
- ObjectTypeDB::bind_method(_MD("_favorite_selected"),&EditorFileDialog::_favorite_selected);
- ObjectTypeDB::bind_method(_MD("_favorite_move_up"),&EditorFileDialog::_favorite_move_up);
- ObjectTypeDB::bind_method(_MD("_favorite_move_down"),&EditorFileDialog::_favorite_move_down);
-
- ObjectTypeDB::bind_method(_MD("invalidate"),&EditorFileDialog::invalidate);
+ ClassDB::bind_method(_MD("_unhandled_input"),&EditorFileDialog::_unhandled_input);
+
+ ClassDB::bind_method(_MD("_item_selected"),&EditorFileDialog::_item_selected);
+ ClassDB::bind_method(_MD("_item_db_selected"),&EditorFileDialog::_item_dc_selected);
+ ClassDB::bind_method(_MD("_dir_entered"),&EditorFileDialog::_dir_entered);
+ ClassDB::bind_method(_MD("_file_entered"),&EditorFileDialog::_file_entered);
+ ClassDB::bind_method(_MD("_action_pressed"),&EditorFileDialog::_action_pressed);
+ ClassDB::bind_method(_MD("_cancel_pressed"),&EditorFileDialog::_cancel_pressed);
+ ClassDB::bind_method(_MD("_filter_selected"),&EditorFileDialog::_filter_selected);
+ ClassDB::bind_method(_MD("_save_confirm_pressed"),&EditorFileDialog::_save_confirm_pressed);
+
+ ClassDB::bind_method(_MD("clear_filters"),&EditorFileDialog::clear_filters);
+ ClassDB::bind_method(_MD("add_filter","filter"),&EditorFileDialog::add_filter);
+ ClassDB::bind_method(_MD("get_current_dir"),&EditorFileDialog::get_current_dir);
+ ClassDB::bind_method(_MD("get_current_file"),&EditorFileDialog::get_current_file);
+ ClassDB::bind_method(_MD("get_current_path"),&EditorFileDialog::get_current_path);
+ ClassDB::bind_method(_MD("set_current_dir","dir"),&EditorFileDialog::set_current_dir);
+ ClassDB::bind_method(_MD("set_current_file","file"),&EditorFileDialog::set_current_file);
+ ClassDB::bind_method(_MD("set_current_path","path"),&EditorFileDialog::set_current_path);
+ ClassDB::bind_method(_MD("set_mode","mode"),&EditorFileDialog::set_mode);
+ ClassDB::bind_method(_MD("get_mode"),&EditorFileDialog::get_mode);
+ ClassDB::bind_method(_MD("get_vbox:VBoxContainer"),&EditorFileDialog::get_vbox);
+ ClassDB::bind_method(_MD("set_access","access"),&EditorFileDialog::set_access);
+ ClassDB::bind_method(_MD("get_access"),&EditorFileDialog::get_access);
+ ClassDB::bind_method(_MD("set_show_hidden_files","show"),&EditorFileDialog::set_show_hidden_files);
+ ClassDB::bind_method(_MD("is_showing_hidden_files"),&EditorFileDialog::is_showing_hidden_files);
+ ClassDB::bind_method(_MD("_select_drive"),&EditorFileDialog::_select_drive);
+ ClassDB::bind_method(_MD("_make_dir"),&EditorFileDialog::_make_dir);
+ ClassDB::bind_method(_MD("_make_dir_confirm"),&EditorFileDialog::_make_dir_confirm);
+ ClassDB::bind_method(_MD("_update_file_list"),&EditorFileDialog::update_file_list);
+ ClassDB::bind_method(_MD("_update_dir"),&EditorFileDialog::update_dir);
+ ClassDB::bind_method(_MD("_thumbnail_done"),&EditorFileDialog::_thumbnail_done);
+ ClassDB::bind_method(_MD("set_display_mode","mode"),&EditorFileDialog::set_display_mode);
+ ClassDB::bind_method(_MD("get_display_mode"),&EditorFileDialog::get_display_mode);
+ ClassDB::bind_method(_MD("_thumbnail_result"),&EditorFileDialog::_thumbnail_result);
+ ClassDB::bind_method(_MD("set_disable_overwrite_warning","disable"),&EditorFileDialog::set_disable_overwrite_warning);
+ ClassDB::bind_method(_MD("is_overwrite_warning_disabled"),&EditorFileDialog::is_overwrite_warning_disabled);
+
+ ClassDB::bind_method(_MD("_recent_selected"),&EditorFileDialog::_recent_selected);
+ ClassDB::bind_method(_MD("_go_back"),&EditorFileDialog::_go_back);
+ ClassDB::bind_method(_MD("_go_forward"),&EditorFileDialog::_go_forward);
+ ClassDB::bind_method(_MD("_go_up"),&EditorFileDialog::_go_up);
+
+ ClassDB::bind_method(_MD("_favorite_toggled"),&EditorFileDialog::_favorite_toggled);
+ ClassDB::bind_method(_MD("_favorite_selected"),&EditorFileDialog::_favorite_selected);
+ ClassDB::bind_method(_MD("_favorite_move_up"),&EditorFileDialog::_favorite_move_up);
+ ClassDB::bind_method(_MD("_favorite_move_down"),&EditorFileDialog::_favorite_move_down);
+
+ ClassDB::bind_method(_MD("invalidate"),&EditorFileDialog::invalidate);
ADD_SIGNAL(MethodInfo("file_selected",PropertyInfo( Variant::STRING,"path")));
ADD_SIGNAL(MethodInfo("files_selected",PropertyInfo( Variant::STRING_ARRAY,"paths")));
@@ -1490,11 +1490,11 @@ EditorFileDialog::~EditorFileDialog() {
void EditorLineEditFileChooser::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_browse"),&EditorLineEditFileChooser::_browse);
- ObjectTypeDB::bind_method(_MD("_chosen"),&EditorLineEditFileChooser::_chosen);
- ObjectTypeDB::bind_method(_MD("get_button:Button"),&EditorLineEditFileChooser::get_button);
- ObjectTypeDB::bind_method(_MD("get_line_edit:LineEdit"),&EditorLineEditFileChooser::get_line_edit);
- ObjectTypeDB::bind_method(_MD("get_file_dialog:EditorFileDialog"),&EditorLineEditFileChooser::get_file_dialog);
+ ClassDB::bind_method(_MD("_browse"),&EditorLineEditFileChooser::_browse);
+ ClassDB::bind_method(_MD("_chosen"),&EditorLineEditFileChooser::_chosen);
+ ClassDB::bind_method(_MD("get_button:Button"),&EditorLineEditFileChooser::get_button);
+ ClassDB::bind_method(_MD("get_line_edit:LineEdit"),&EditorLineEditFileChooser::get_line_edit);
+ ClassDB::bind_method(_MD("get_file_dialog:EditorFileDialog"),&EditorLineEditFileChooser::get_file_dialog);
}
diff --git a/tools/editor/editor_file_dialog.h b/tools/editor/editor_file_dialog.h
index c918f7bfb0..e2a40cd5df 100644
--- a/tools/editor/editor_file_dialog.h
+++ b/tools/editor/editor_file_dialog.h
@@ -42,7 +42,7 @@
*/
class EditorFileDialog : public ConfirmationDialog {
- OBJ_TYPE( EditorFileDialog, ConfirmationDialog );
+ GDCLASS( EditorFileDialog, ConfirmationDialog );
public:
@@ -227,7 +227,7 @@ public:
class EditorLineEditFileChooser : public HBoxContainer {
- OBJ_TYPE( EditorLineEditFileChooser, HBoxContainer );
+ GDCLASS( EditorLineEditFileChooser, HBoxContainer );
Button *button;
LineEdit *line_edit;
EditorFileDialog *dialog;
diff --git a/tools/editor/editor_file_system.cpp b/tools/editor/editor_file_system.cpp
index 1e2bd44b81..496ebf383c 100644
--- a/tools/editor/editor_file_system.cpp
+++ b/tools/editor/editor_file_system.cpp
@@ -203,18 +203,18 @@ EditorFileSystemDirectory *EditorFileSystemDirectory::get_parent() {
void EditorFileSystemDirectory::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_subdir_count"),&EditorFileSystemDirectory::get_subdir_count);
- ObjectTypeDB::bind_method(_MD("get_subdir","idx"),&EditorFileSystemDirectory::get_subdir);
- ObjectTypeDB::bind_method(_MD("get_file_count"),&EditorFileSystemDirectory::get_file_count);
- ObjectTypeDB::bind_method(_MD("get_file","idx"),&EditorFileSystemDirectory::get_file);
- ObjectTypeDB::bind_method(_MD("get_file_path","idx"),&EditorFileSystemDirectory::get_file_path);
- ObjectTypeDB::bind_method(_MD("get_file_type","idx"),&EditorFileSystemDirectory::get_file_type);
- ObjectTypeDB::bind_method(_MD("is_missing_sources","idx"),&EditorFileSystemDirectory::is_missing_sources);
- ObjectTypeDB::bind_method(_MD("get_name"),&EditorFileSystemDirectory::get_name);
- ObjectTypeDB::bind_method(_MD("get_path"),&EditorFileSystemDirectory::get_path);
- ObjectTypeDB::bind_method(_MD("get_parent:EditorFileSystemDirectory"),&EditorFileSystemDirectory::get_parent);
- ObjectTypeDB::bind_method(_MD("find_file_index","name"),&EditorFileSystemDirectory::find_file_index);
- ObjectTypeDB::bind_method(_MD("find_dir_index","name"),&EditorFileSystemDirectory::find_dir_index);
+ ClassDB::bind_method(_MD("get_subdir_count"),&EditorFileSystemDirectory::get_subdir_count);
+ ClassDB::bind_method(_MD("get_subdir","idx"),&EditorFileSystemDirectory::get_subdir);
+ ClassDB::bind_method(_MD("get_file_count"),&EditorFileSystemDirectory::get_file_count);
+ ClassDB::bind_method(_MD("get_file","idx"),&EditorFileSystemDirectory::get_file);
+ ClassDB::bind_method(_MD("get_file_path","idx"),&EditorFileSystemDirectory::get_file_path);
+ ClassDB::bind_method(_MD("get_file_type","idx"),&EditorFileSystemDirectory::get_file_type);
+ ClassDB::bind_method(_MD("is_missing_sources","idx"),&EditorFileSystemDirectory::is_missing_sources);
+ ClassDB::bind_method(_MD("get_name"),&EditorFileSystemDirectory::get_name);
+ ClassDB::bind_method(_MD("get_path"),&EditorFileSystemDirectory::get_path);
+ ClassDB::bind_method(_MD("get_parent:EditorFileSystemDirectory"),&EditorFileSystemDirectory::get_parent);
+ ClassDB::bind_method(_MD("find_file_index","name"),&EditorFileSystemDirectory::find_file_index);
+ ClassDB::bind_method(_MD("find_dir_index","name"),&EditorFileSystemDirectory::find_dir_index);
}
@@ -1346,14 +1346,14 @@ void EditorFileSystem::update_file(const String& p_file) {
void EditorFileSystem::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_filesystem:EditorFileSystemDirectory"),&EditorFileSystem::get_filesystem);
- ObjectTypeDB::bind_method(_MD("is_scanning"),&EditorFileSystem::is_scanning);
- ObjectTypeDB::bind_method(_MD("get_scanning_progress"),&EditorFileSystem::get_scanning_progress);
- ObjectTypeDB::bind_method(_MD("scan"),&EditorFileSystem::scan);
- ObjectTypeDB::bind_method(_MD("scan_sources"),&EditorFileSystem::scan_sources);
- ObjectTypeDB::bind_method(_MD("update_file","path"),&EditorFileSystem::update_file);
- ObjectTypeDB::bind_method(_MD("get_path:EditorFileSystemDirectory","path"),&EditorFileSystem::get_path);
- ObjectTypeDB::bind_method(_MD("get_file_type","path"),&EditorFileSystem::get_file_type);
+ ClassDB::bind_method(_MD("get_filesystem:EditorFileSystemDirectory"),&EditorFileSystem::get_filesystem);
+ ClassDB::bind_method(_MD("is_scanning"),&EditorFileSystem::is_scanning);
+ ClassDB::bind_method(_MD("get_scanning_progress"),&EditorFileSystem::get_scanning_progress);
+ ClassDB::bind_method(_MD("scan"),&EditorFileSystem::scan);
+ ClassDB::bind_method(_MD("scan_sources"),&EditorFileSystem::scan_sources);
+ ClassDB::bind_method(_MD("update_file","path"),&EditorFileSystem::update_file);
+ ClassDB::bind_method(_MD("get_path:EditorFileSystemDirectory","path"),&EditorFileSystem::get_path);
+ ClassDB::bind_method(_MD("get_file_type","path"),&EditorFileSystem::get_file_type);
ADD_SIGNAL( MethodInfo("filesystem_changed") );
ADD_SIGNAL( MethodInfo("sources_changed",PropertyInfo(Variant::BOOL,"exist")) );
diff --git a/tools/editor/editor_file_system.h b/tools/editor/editor_file_system.h
index f70b74b818..97c253c70b 100644
--- a/tools/editor/editor_file_system.h
+++ b/tools/editor/editor_file_system.h
@@ -39,7 +39,7 @@ class FileAccess;
struct EditorProgressBG;
class EditorFileSystemDirectory : public Object {
- OBJ_TYPE( EditorFileSystemDirectory,Object );
+ GDCLASS( EditorFileSystemDirectory,Object );
String name;
uint64_t modified_time;
@@ -122,7 +122,7 @@ public:
class EditorFileSystem : public Node {
- OBJ_TYPE( EditorFileSystem, Node );
+ GDCLASS( EditorFileSystem, Node );
_THREAD_SAFE_CLASS_
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp
index 611b6a48a7..82be76d13a 100644
--- a/tools/editor/editor_help.cpp
+++ b/tools/editor/editor_help.cpp
@@ -88,7 +88,7 @@ void EditorHelpSearch::_update_search() {
*/
List<StringName> type_list;
- ObjectTypeDB::get_type_list(&type_list);
+ ClassDB::get_class_list(&type_list);
DocData *doc=EditorHelp::get_doc_data();
String term = search_box->get_text();
@@ -299,10 +299,10 @@ void EditorHelpSearch::_notification(int p_what) {
void EditorHelpSearch::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&EditorHelpSearch::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&EditorHelpSearch::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&EditorHelpSearch::_sbox_input);
- ObjectTypeDB::bind_method(_MD("_update_search"),&EditorHelpSearch::_update_search);
+ ClassDB::bind_method(_MD("_text_changed"),&EditorHelpSearch::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&EditorHelpSearch::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&EditorHelpSearch::_sbox_input);
+ ClassDB::bind_method(_MD("_update_search"),&EditorHelpSearch::_update_search);
ADD_SIGNAL(MethodInfo("go_to_help"));
@@ -349,7 +349,7 @@ void EditorHelpIndex::add_type(const String& p_type,HashMap<String,TreeItem*>& p
if (p_types.has(p_type))
return;
-// if (!ObjectTypeDB::is_type(p_type,base) || p_type==base)
+// if (!ClassDB::is_type(p_type,base) || p_type==base)
// return;
String inherits=EditorHelp::get_doc_data()->class_list[p_type].inherits;
@@ -495,10 +495,10 @@ void EditorHelpIndex::_sbox_input(const InputEvent& p_ie) {
void EditorHelpIndex::_bind_methods() {
- ObjectTypeDB::bind_method("_tree_item_selected",&EditorHelpIndex::_tree_item_selected);
- ObjectTypeDB::bind_method("_text_changed",&EditorHelpIndex::_text_changed);
- ObjectTypeDB::bind_method("_sbox_input",&EditorHelpIndex::_sbox_input);
- ObjectTypeDB::bind_method("select_class",&EditorHelpIndex::select_class);
+ ClassDB::bind_method("_tree_item_selected",&EditorHelpIndex::_tree_item_selected);
+ ClassDB::bind_method("_text_changed",&EditorHelpIndex::_text_changed);
+ ClassDB::bind_method("_sbox_input",&EditorHelpIndex::_sbox_input);
+ ClassDB::bind_method("select_class",&EditorHelpIndex::select_class);
ADD_SIGNAL( MethodInfo("open_class"));
}
@@ -754,7 +754,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->add_newline();
}
- if (ObjectTypeDB::type_exists(cd.name)) {
+ if (ClassDB::class_exists(cd.name)) {
bool found = false;
bool prev = false;
@@ -1629,7 +1629,7 @@ void EditorHelp::_search_cbk() {
_search(search->get_text());
}
-String EditorHelp::get_class_name() {
+String EditorHelp::get_class() {
return edited_class;
}
@@ -1651,16 +1651,16 @@ void EditorHelp::set_scroll(int p_scroll) {
void EditorHelp::_bind_methods() {
- ObjectTypeDB::bind_method("_class_list_select",&EditorHelp::_class_list_select);
- ObjectTypeDB::bind_method("_class_desc_select",&EditorHelp::_class_desc_select);
- ObjectTypeDB::bind_method("_class_desc_input",&EditorHelp::_class_desc_input);
-// ObjectTypeDB::bind_method("_button_pressed",&EditorHelp::_button_pressed);
- ObjectTypeDB::bind_method("_scroll_changed",&EditorHelp::_scroll_changed);
- ObjectTypeDB::bind_method("_request_help",&EditorHelp::_request_help);
- ObjectTypeDB::bind_method("_unhandled_key_input",&EditorHelp::_unhandled_key_input);
- ObjectTypeDB::bind_method("_search",&EditorHelp::_search);
- ObjectTypeDB::bind_method("_search_cbk",&EditorHelp::_search_cbk);
- ObjectTypeDB::bind_method("_help_callback",&EditorHelp::_help_callback);
+ ClassDB::bind_method("_class_list_select",&EditorHelp::_class_list_select);
+ ClassDB::bind_method("_class_desc_select",&EditorHelp::_class_desc_select);
+ ClassDB::bind_method("_class_desc_input",&EditorHelp::_class_desc_input);
+// ClassDB::bind_method("_button_pressed",&EditorHelp::_button_pressed);
+ ClassDB::bind_method("_scroll_changed",&EditorHelp::_scroll_changed);
+ ClassDB::bind_method("_request_help",&EditorHelp::_request_help);
+ ClassDB::bind_method("_unhandled_key_input",&EditorHelp::_unhandled_key_input);
+ ClassDB::bind_method("_search",&EditorHelp::_search);
+ ClassDB::bind_method("_search_cbk",&EditorHelp::_search_cbk);
+ ClassDB::bind_method("_help_callback",&EditorHelp::_help_callback);
ADD_SIGNAL(MethodInfo("go_to_help"));
@@ -1765,7 +1765,7 @@ void EditorHelpBit::_meta_clicked(String p_select) {
void EditorHelpBit::_bind_methods() {
- ObjectTypeDB::bind_method("_meta_clicked",&EditorHelpBit::_meta_clicked);
+ ClassDB::bind_method("_meta_clicked",&EditorHelpBit::_meta_clicked);
ADD_SIGNAL(MethodInfo("request_hide"));
}
diff --git a/tools/editor/editor_help.h b/tools/editor/editor_help.h
index 6a6cd7439e..85bac27705 100644
--- a/tools/editor/editor_help.h
+++ b/tools/editor/editor_help.h
@@ -47,7 +47,7 @@ class EditorNode;
class EditorHelpSearch : public ConfirmationDialog {
- OBJ_TYPE(EditorHelpSearch,ConfirmationDialog )
+ GDCLASS(EditorHelpSearch,ConfirmationDialog )
EditorNode *editor;
LineEdit *search_box;
@@ -75,7 +75,7 @@ public:
};
class EditorHelpIndex : public ConfirmationDialog {
- OBJ_TYPE( EditorHelpIndex, ConfirmationDialog );
+ GDCLASS( EditorHelpIndex, ConfirmationDialog );
LineEdit *search_box;
Tree *class_list;
@@ -104,7 +104,7 @@ public:
class EditorHelp : public VBoxContainer {
- OBJ_TYPE( EditorHelp, VBoxContainer );
+ GDCLASS( EditorHelp, VBoxContainer );
enum Page {
@@ -187,7 +187,7 @@ public:
void popup_search();
void search_again();
- String get_class_name();
+ String get_class();
void set_focused() { class_desc->grab_focus(); }
@@ -202,7 +202,7 @@ public:
class EditorHelpBit : public Panel {
- OBJ_TYPE( EditorHelpBit, Panel);
+ GDCLASS( EditorHelpBit, Panel);
RichTextLabel *rich_text;
void _go_to_help(String p_what);
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index 90b96f7e1e..e921fd49b9 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -77,17 +77,17 @@ String EditorImportPlugin::_expand_source_path(const String& p_path) {
void EditorImportPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("validate_source_path","path"),&EditorImportPlugin::_validate_source_path);
- ObjectTypeDB::bind_method(_MD("expand_source_path","path"),&EditorImportPlugin::_expand_source_path);
-
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::STRING,"get_name"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::STRING,"get_visible_name"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("import_dialog",PropertyInfo(Variant::STRING,"from")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::INT,"import",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"from",PROPERTY_HINT_RESOURCE_TYPE,"ResourceImportMetadata")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::RAW_ARRAY,"custom_export",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"platform",PROPERTY_HINT_RESOURCE_TYPE,"EditorExportPlatform")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("import_from_drop",PropertyInfo(Variant::STRING_ARRAY,"files"),PropertyInfo(Variant::STRING,"dest_path")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("reimport_multiple_files",PropertyInfo(Variant::STRING_ARRAY,"files")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"can_reimport_multiple_files"));
+ ClassDB::bind_method(_MD("validate_source_path","path"),&EditorImportPlugin::_validate_source_path);
+ ClassDB::bind_method(_MD("expand_source_path","path"),&EditorImportPlugin::_expand_source_path);
+
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING,"get_name"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING,"get_visible_name"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("import_dialog",PropertyInfo(Variant::STRING,"from")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::INT,"import",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"from",PROPERTY_HINT_RESOURCE_TYPE,"ResourceImportMetadata")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::RAW_ARRAY,"custom_export",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"platform",PROPERTY_HINT_RESOURCE_TYPE,"EditorExportPlatform")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("import_from_drop",PropertyInfo(Variant::STRING_ARRAY,"files"),PropertyInfo(Variant::STRING,"dest_path")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("reimport_multiple_files",PropertyInfo(Variant::STRING_ARRAY,"files")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"can_reimport_multiple_files"));
// BIND_VMETHOD( mi );
}
@@ -2199,49 +2199,49 @@ DVector<String> EditorImportExport::_get_export_platforms() {
void EditorImportExport::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::add_import_plugin);
- ObjectTypeDB::bind_method(_MD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::remove_import_plugin);
- ObjectTypeDB::bind_method(_MD("get_import_plugin_count"),&EditorImportExport::get_import_plugin_count);
- ObjectTypeDB::bind_method(_MD("get_import_plugin:EditorImportPlugin","idx"),&EditorImportExport::get_import_plugin);
- ObjectTypeDB::bind_method(_MD("get_import_plugin_by_name:EditorImportPlugin","name"),&EditorImportExport::get_import_plugin_by_name);
-
- ObjectTypeDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::add_export_plugin);
- ObjectTypeDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::remove_export_plugin);
- ObjectTypeDB::bind_method(_MD("get_export_plugin_count"),&EditorImportExport::get_export_plugin_count);
- ObjectTypeDB::bind_method(_MD("get_export_plugin:EditorExportPlugin","idx"),&EditorImportExport::get_export_plugin);
-
- ObjectTypeDB::bind_method(_MD("set_export_file_action","file","action"),&EditorImportExport::set_export_file_action);
- ObjectTypeDB::bind_method(_MD("get_export_file_action","file"),&EditorImportExport::get_export_file_action);
- ObjectTypeDB::bind_method(_MD("get_export_file_list"),&EditorImportExport::_get_export_file_list);
-
- ObjectTypeDB::bind_method(_MD("add_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
- //ObjectTypeDB::bind_method(_MD("remove_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
- ObjectTypeDB::bind_method(_MD("get_export_platform:EditorExportPlatform","name"),&EditorImportExport::get_export_platform);
- ObjectTypeDB::bind_method(_MD("get_export_platforms"),&EditorImportExport::_get_export_platforms);
-
- ObjectTypeDB::bind_method(_MD("set_export_filter","filter"),&EditorImportExport::set_export_filter);
- ObjectTypeDB::bind_method(_MD("get_export_filter"),&EditorImportExport::get_export_filter);
-
- ObjectTypeDB::bind_method(_MD("set_export_custom_filter","filter"),&EditorImportExport::set_export_custom_filter);
- ObjectTypeDB::bind_method(_MD("get_export_custom_filter"),&EditorImportExport::get_export_custom_filter);
-
- ObjectTypeDB::bind_method(_MD("set_export_custom_filter_exclude","filter_exclude"),&EditorImportExport::set_export_custom_filter_exclude);
- ObjectTypeDB::bind_method(_MD("get_export_custom_filter_exclude"),&EditorImportExport::get_export_custom_filter_exclude);
-
-
- ObjectTypeDB::bind_method(_MD("image_export_group_create"),&EditorImportExport::image_export_group_create);
- ObjectTypeDB::bind_method(_MD("image_export_group_remove"),&EditorImportExport::image_export_group_remove);
- ObjectTypeDB::bind_method(_MD("image_export_group_set_image_action"),&EditorImportExport::image_export_group_set_image_action);
- ObjectTypeDB::bind_method(_MD("image_export_group_set_make_atlas"),&EditorImportExport::image_export_group_set_make_atlas);
- ObjectTypeDB::bind_method(_MD("image_export_group_set_shrink"),&EditorImportExport::image_export_group_set_shrink);
- ObjectTypeDB::bind_method(_MD("image_export_group_get_image_action"),&EditorImportExport::image_export_group_get_image_action);
- ObjectTypeDB::bind_method(_MD("image_export_group_get_make_atlas"),&EditorImportExport::image_export_group_get_make_atlas);
- ObjectTypeDB::bind_method(_MD("image_export_group_get_shrink"),&EditorImportExport::image_export_group_get_shrink);
- ObjectTypeDB::bind_method(_MD("image_add_to_export_group"),&EditorImportExport::image_add_to_export_group);
- ObjectTypeDB::bind_method(_MD("script_set_action"),&EditorImportExport::script_set_action);
- ObjectTypeDB::bind_method(_MD("script_set_encryption_key"),&EditorImportExport::script_set_encryption_key);
- ObjectTypeDB::bind_method(_MD("script_get_action"),&EditorImportExport::script_get_action);
- ObjectTypeDB::bind_method(_MD("script_get_encryption_key"),&EditorImportExport::script_get_encryption_key);
+ ClassDB::bind_method(_MD("add_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::add_import_plugin);
+ ClassDB::bind_method(_MD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::remove_import_plugin);
+ ClassDB::bind_method(_MD("get_import_plugin_count"),&EditorImportExport::get_import_plugin_count);
+ ClassDB::bind_method(_MD("get_import_plugin:EditorImportPlugin","idx"),&EditorImportExport::get_import_plugin);
+ ClassDB::bind_method(_MD("get_import_plugin_by_name:EditorImportPlugin","name"),&EditorImportExport::get_import_plugin_by_name);
+
+ ClassDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::add_export_plugin);
+ ClassDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::remove_export_plugin);
+ ClassDB::bind_method(_MD("get_export_plugin_count"),&EditorImportExport::get_export_plugin_count);
+ ClassDB::bind_method(_MD("get_export_plugin:EditorExportPlugin","idx"),&EditorImportExport::get_export_plugin);
+
+ ClassDB::bind_method(_MD("set_export_file_action","file","action"),&EditorImportExport::set_export_file_action);
+ ClassDB::bind_method(_MD("get_export_file_action","file"),&EditorImportExport::get_export_file_action);
+ ClassDB::bind_method(_MD("get_export_file_list"),&EditorImportExport::_get_export_file_list);
+
+ ClassDB::bind_method(_MD("add_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
+ //ClassDB::bind_method(_MD("remove_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
+ ClassDB::bind_method(_MD("get_export_platform:EditorExportPlatform","name"),&EditorImportExport::get_export_platform);
+ ClassDB::bind_method(_MD("get_export_platforms"),&EditorImportExport::_get_export_platforms);
+
+ ClassDB::bind_method(_MD("set_export_filter","filter"),&EditorImportExport::set_export_filter);
+ ClassDB::bind_method(_MD("get_export_filter"),&EditorImportExport::get_export_filter);
+
+ ClassDB::bind_method(_MD("set_export_custom_filter","filter"),&EditorImportExport::set_export_custom_filter);
+ ClassDB::bind_method(_MD("get_export_custom_filter"),&EditorImportExport::get_export_custom_filter);
+
+ ClassDB::bind_method(_MD("set_export_custom_filter_exclude","filter_exclude"),&EditorImportExport::set_export_custom_filter_exclude);
+ ClassDB::bind_method(_MD("get_export_custom_filter_exclude"),&EditorImportExport::get_export_custom_filter_exclude);
+
+
+ ClassDB::bind_method(_MD("image_export_group_create"),&EditorImportExport::image_export_group_create);
+ ClassDB::bind_method(_MD("image_export_group_remove"),&EditorImportExport::image_export_group_remove);
+ ClassDB::bind_method(_MD("image_export_group_set_image_action"),&EditorImportExport::image_export_group_set_image_action);
+ ClassDB::bind_method(_MD("image_export_group_set_make_atlas"),&EditorImportExport::image_export_group_set_make_atlas);
+ ClassDB::bind_method(_MD("image_export_group_set_shrink"),&EditorImportExport::image_export_group_set_shrink);
+ ClassDB::bind_method(_MD("image_export_group_get_image_action"),&EditorImportExport::image_export_group_get_image_action);
+ ClassDB::bind_method(_MD("image_export_group_get_make_atlas"),&EditorImportExport::image_export_group_get_make_atlas);
+ ClassDB::bind_method(_MD("image_export_group_get_shrink"),&EditorImportExport::image_export_group_get_shrink);
+ ClassDB::bind_method(_MD("image_add_to_export_group"),&EditorImportExport::image_add_to_export_group);
+ ClassDB::bind_method(_MD("script_set_action"),&EditorImportExport::script_set_action);
+ ClassDB::bind_method(_MD("script_set_encryption_key"),&EditorImportExport::script_set_encryption_key);
+ ClassDB::bind_method(_MD("script_get_action"),&EditorImportExport::script_get_action);
+ ClassDB::bind_method(_MD("script_get_encryption_key"),&EditorImportExport::script_get_encryption_key);
diff --git a/tools/editor/editor_import_export.h b/tools/editor/editor_import_export.h
index f9a02fe4fa..9109e9ae9f 100644
--- a/tools/editor/editor_import_export.h
+++ b/tools/editor/editor_import_export.h
@@ -40,7 +40,7 @@ struct EditorProgress;
class EditorImportPlugin : public Reference {
- OBJ_TYPE( EditorImportPlugin, Reference);
+ GDCLASS( EditorImportPlugin, Reference);
protected:
@@ -70,7 +70,7 @@ public:
class EditorExportPlugin : public Reference {
- OBJ_TYPE( EditorExportPlugin, Reference);
+ GDCLASS( EditorExportPlugin, Reference);
protected:
static void _bind_methods();
@@ -84,7 +84,7 @@ public:
class EditorExportPlatform : public Reference {
- OBJ_TYPE( EditorExportPlatform,Reference );
+ GDCLASS( EditorExportPlatform,Reference );
public:
@@ -187,7 +187,7 @@ public:
class EditorExportPlatformPC : public EditorExportPlatform {
- OBJ_TYPE( EditorExportPlatformPC,EditorExportPlatform );
+ GDCLASS( EditorExportPlatformPC,EditorExportPlatform );
public:
@@ -247,7 +247,7 @@ public:
class EditorImportExport : public Node {
- OBJ_TYPE(EditorImportExport,Node);
+ GDCLASS(EditorImportExport,Node);
public:
enum FileAction {
diff --git a/tools/editor/editor_log.cpp b/tools/editor/editor_log.cpp
index 808f32073f..06459928f0 100644
--- a/tools/editor/editor_log.cpp
+++ b/tools/editor/editor_log.cpp
@@ -164,9 +164,9 @@ void EditorLog::_undo_redo_cbk(void *p_self,const String& p_name) {
void EditorLog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
- ObjectTypeDB::bind_method("_override_logger_styles",&EditorLog::_override_logger_styles );
- //ObjectTypeDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
+ ClassDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
+ ClassDB::bind_method("_override_logger_styles",&EditorLog::_override_logger_styles );
+ //ClassDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
ADD_SIGNAL( MethodInfo("clear_request"));
}
diff --git a/tools/editor/editor_log.h b/tools/editor/editor_log.h
index f98ad8b75e..e59b877ea0 100644
--- a/tools/editor/editor_log.h
+++ b/tools/editor/editor_log.h
@@ -42,7 +42,7 @@
#include "os/thread.h"
class EditorLog : public VBoxContainer {
- OBJ_TYPE( EditorLog, VBoxContainer );
+ GDCLASS( EditorLog, VBoxContainer );
Button *clearbutton;
Label *title;
diff --git a/tools/editor/editor_name_dialog.cpp b/tools/editor/editor_name_dialog.cpp
index 77e393cecb..49e44a55c2 100644
--- a/tools/editor/editor_name_dialog.cpp
+++ b/tools/editor/editor_name_dialog.cpp
@@ -72,7 +72,7 @@ void EditorNameDialog::ok_pressed() {
void EditorNameDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_line_input_event",&EditorNameDialog::_line_input_event);
+ ClassDB::bind_method("_line_input_event",&EditorNameDialog::_line_input_event);
ADD_SIGNAL(MethodInfo("name_confirmed",PropertyInfo( Variant::STRING,"name")));
}
diff --git a/tools/editor/editor_name_dialog.h b/tools/editor/editor_name_dialog.h
index 1aabe8e962..f4bac7f1d9 100644
--- a/tools/editor/editor_name_dialog.h
+++ b/tools/editor/editor_name_dialog.h
@@ -35,7 +35,7 @@
class EditorNameDialog : public ConfirmationDialog {
- OBJ_TYPE( EditorNameDialog, ConfirmationDialog );
+ GDCLASS( EditorNameDialog, ConfirmationDialog );
LineEdit *name;
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 46e7f0a42f..83ddc76907 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -597,7 +597,7 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource,const String&
List<String> preferred;
for(int i=0;i<extensions.size();i++) {
- if (p_resource->is_type("Script") && (extensions[i]=="tres" || extensions[i]=="res" || extensions[i]=="xml")) {
+ if (p_resource->is_class("Script") && (extensions[i]=="tres" || extensions[i]=="res" || extensions[i]=="xml")) {
//this serves no purpose and confused people
continue;
}
@@ -614,7 +614,7 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource,const String&
file->set_current_file(p_resource->get_path().get_file());
} else {
if (extensions.size()) {
- file->set_current_file("new_"+p_resource->get_type().to_lower()+"."+preferred.front()->get().to_lower());
+ file->set_current_file("new_"+p_resource->get_class().to_lower()+"."+preferred.front()->get().to_lower());
} else {
file->set_current_file(String());
}
@@ -632,7 +632,7 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource,const String&
String existing;
if (extensions.size()) {
- existing="new_"+p_resource->get_type().to_lower()+"."+preferred.front()->get().to_lower();
+ existing="new_"+p_resource->get_class().to_lower()+"."+preferred.front()->get().to_lower();
}
file->set_current_path(existing);
@@ -864,12 +864,12 @@ void EditorNode::_save_edited_subresources(Node* scene,Map<RES,bool>& processed,
void EditorNode::_find_node_types(Node* p_node, int&count_2d, int&count_3d) {
- if (p_node->is_type("Viewport") || (p_node!=editor_data.get_edited_scene_root() && p_node->get_owner()!=editor_data.get_edited_scene_root()))
+ if (p_node->is_class("Viewport") || (p_node!=editor_data.get_edited_scene_root() && p_node->get_owner()!=editor_data.get_edited_scene_root()))
return;
- if (p_node->is_type("CanvasItem"))
+ if (p_node->is_class("CanvasItem"))
count_2d++;
- else if (p_node->is_type("Spatial"))
+ else if (p_node->is_class("Spatial"))
count_3d++;
for(int i=0;i<p_node->get_child_count();i++)
@@ -1511,8 +1511,8 @@ void EditorNode::_prepare_history() {
already.insert(id);
Ref<Texture> icon = gui_base->get_icon("Object","EditorIcons");
- if (gui_base->has_icon(obj->get_type(),"EditorIcons"))
- icon=gui_base->get_icon(obj->get_type(),"EditorIcons");
+ if (gui_base->has_icon(obj->get_class(),"EditorIcons"))
+ icon=gui_base->get_icon(obj->get_class(),"EditorIcons");
else
icon=base_icon;
@@ -1524,12 +1524,12 @@ void EditorNode::_prepare_history() {
else if (r->get_name()!=String()) {
text=r->get_name();
} else {
- text=r->get_type();
+ text=r->get_class();
}
} else if (obj->cast_to<Node>()) {
text=obj->cast_to<Node>()->get_name();
} else {
- text=obj->get_type();
+ text=obj->get_class();
}
if (i==editor_history.get_history_pos()) {
@@ -1617,8 +1617,8 @@ void EditorNode::_edit_current() {
object_menu->set_disabled(true);
- bool is_resource = current_obj->is_type("Resource");
- bool is_node = current_obj->is_type("Node");
+ bool is_resource = current_obj->is_class("Resource");
+ bool is_node = current_obj->is_class("Node");
resource_save_button->set_disabled(!is_resource);
if (is_resource) {
@@ -2581,7 +2581,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (current) {
_editor_select(EDITOR_SCRIPT);
- emit_signal("request_help",current->get_type());
+ emit_signal("request_help",current->get_class());
}
@@ -4150,25 +4150,25 @@ bool EditorNode::is_scene_in_use(const String& p_path) {
void EditorNode::register_editor_types() {
- ObjectTypeDB::register_type<EditorPlugin>();
- ObjectTypeDB::register_type<EditorImportPlugin>();
- ObjectTypeDB::register_type<EditorExportPlugin>();
- ObjectTypeDB::register_type<EditorScenePostImport>();
- ObjectTypeDB::register_type<EditorScript>();
- ObjectTypeDB::register_type<EditorSelection>();
- ObjectTypeDB::register_type<EditorFileDialog>();
- //ObjectTypeDB::register_type<EditorImportExport>();
- ObjectTypeDB::register_type<EditorSettings>();
- ObjectTypeDB::register_type<EditorSpatialGizmo>();
- ObjectTypeDB::register_type<EditorResourcePreview>();
- ObjectTypeDB::register_type<EditorResourcePreviewGenerator>();
- ObjectTypeDB::register_type<EditorFileSystem>();
- ObjectTypeDB::register_type<EditorFileSystemDirectory>();
+ ClassDB::register_class<EditorPlugin>();
+ ClassDB::register_class<EditorImportPlugin>();
+ ClassDB::register_class<EditorExportPlugin>();
+ ClassDB::register_class<EditorScenePostImport>();
+ ClassDB::register_class<EditorScript>();
+ ClassDB::register_class<EditorSelection>();
+ ClassDB::register_class<EditorFileDialog>();
+ //ClassDB::register_type<EditorImportExport>();
+ ClassDB::register_class<EditorSettings>();
+ ClassDB::register_class<EditorSpatialGizmo>();
+ ClassDB::register_class<EditorResourcePreview>();
+ ClassDB::register_class<EditorResourcePreviewGenerator>();
+ ClassDB::register_class<EditorFileSystem>();
+ ClassDB::register_class<EditorFileSystemDirectory>();
- //ObjectTypeDB::register_type<EditorImporter>();
-// ObjectTypeDB::register_type<EditorPostImport>();
+ //ClassDB::register_type<EditorImporter>();
+// ClassDB::register_type<EditorPostImport>();
}
void EditorNode::unregister_editor_types() {
@@ -5089,7 +5089,7 @@ Variant EditorNode::drag_resource(const Ref<Resource>& p_res,Control* p_from) {
} else if (p_res->get_name()!="") {
label->set_text(p_res->get_name());
} else {
- label->set_text(p_res->get_type());
+ label->set_text(p_res->get_class());
}
@@ -5288,79 +5288,79 @@ void EditorNode::_call_build() {
void EditorNode::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&EditorNode::_menu_option);
- ObjectTypeDB::bind_method("_menu_confirm_current",&EditorNode::_menu_confirm_current);
- ObjectTypeDB::bind_method("_dialog_action",&EditorNode::_dialog_action);
- ObjectTypeDB::bind_method("_resource_selected",&EditorNode::_resource_selected,DEFVAL(""));
- ObjectTypeDB::bind_method("_property_editor_forward",&EditorNode::_property_editor_forward);
- ObjectTypeDB::bind_method("_property_editor_back",&EditorNode::_property_editor_back);
- ObjectTypeDB::bind_method("_editor_select",&EditorNode::_editor_select);
- ObjectTypeDB::bind_method("_node_renamed",&EditorNode::_node_renamed);
- ObjectTypeDB::bind_method("edit_node",&EditorNode::edit_node);
- ObjectTypeDB::bind_method("_imported",&EditorNode::_imported);
- ObjectTypeDB::bind_method("_unhandled_input",&EditorNode::_unhandled_input);
-
- ObjectTypeDB::bind_method("_get_scene_metadata",&EditorNode::_get_scene_metadata);
- ObjectTypeDB::bind_method("set_edited_scene",&EditorNode::set_edited_scene);
- ObjectTypeDB::bind_method("open_request",&EditorNode::open_request);
- ObjectTypeDB::bind_method("_instance_request",&EditorNode::_instance_request);
- ObjectTypeDB::bind_method("update_keying",&EditorNode::update_keying);
- ObjectTypeDB::bind_method("_property_keyed",&EditorNode::_property_keyed);
- ObjectTypeDB::bind_method("_transform_keyed",&EditorNode::_transform_keyed);
- ObjectTypeDB::bind_method("_close_messages",&EditorNode::_close_messages);
- ObjectTypeDB::bind_method("_show_messages",&EditorNode::_show_messages);
- ObjectTypeDB::bind_method("_vp_resized",&EditorNode::_vp_resized);
- ObjectTypeDB::bind_method("_quick_opened",&EditorNode::_quick_opened);
- ObjectTypeDB::bind_method("_quick_run",&EditorNode::_quick_run);
-
- ObjectTypeDB::bind_method("_resource_created",&EditorNode::_resource_created);
-
- ObjectTypeDB::bind_method("_import_action",&EditorNode::_import_action);
- //ObjectTypeDB::bind_method("_import",&EditorNode::_import);
-// ObjectTypeDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved);
- ObjectTypeDB::bind_method("_open_recent_scene",&EditorNode::_open_recent_scene);
-// ObjectTypeDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm);
-
- ObjectTypeDB::bind_method("_save_optimized",&EditorNode::_save_optimized);
-
- ObjectTypeDB::bind_method("stop_child_process",&EditorNode::stop_child_process);
-
- ObjectTypeDB::bind_method("_sources_changed",&EditorNode::_sources_changed);
- ObjectTypeDB::bind_method("_fs_changed",&EditorNode::_fs_changed);
- ObjectTypeDB::bind_method("_dock_select_draw",&EditorNode::_dock_select_draw);
- ObjectTypeDB::bind_method("_dock_select_input",&EditorNode::_dock_select_input);
- ObjectTypeDB::bind_method("_dock_pre_popup",&EditorNode::_dock_pre_popup);
- ObjectTypeDB::bind_method("_dock_split_dragged",&EditorNode::_dock_split_dragged);
- ObjectTypeDB::bind_method("_save_docks",&EditorNode::_save_docks);
- ObjectTypeDB::bind_method("_dock_popup_exit",&EditorNode::_dock_popup_exit);
- ObjectTypeDB::bind_method("_dock_move_left",&EditorNode::_dock_move_left);
- ObjectTypeDB::bind_method("_dock_move_right",&EditorNode::_dock_move_right);
-
- ObjectTypeDB::bind_method("_layout_menu_option",&EditorNode::_layout_menu_option);
-
- ObjectTypeDB::bind_method("set_current_scene",&EditorNode::set_current_scene);
- ObjectTypeDB::bind_method("set_current_version",&EditorNode::set_current_version);
- ObjectTypeDB::bind_method("_scene_tab_changed",&EditorNode::_scene_tab_changed);
- ObjectTypeDB::bind_method("_scene_tab_closed",&EditorNode::_scene_tab_closed);
- ObjectTypeDB::bind_method("_scene_tab_script_edited",&EditorNode::_scene_tab_script_edited);
- ObjectTypeDB::bind_method("_set_main_scene_state",&EditorNode::_set_main_scene_state);
- ObjectTypeDB::bind_method("_update_scene_tabs",&EditorNode::_update_scene_tabs);
-
- ObjectTypeDB::bind_method("_prepare_history",&EditorNode::_prepare_history);
- ObjectTypeDB::bind_method("_select_history",&EditorNode::_select_history);
-
- ObjectTypeDB::bind_method("_toggle_search_bar",&EditorNode::_toggle_search_bar);
- ObjectTypeDB::bind_method("_clear_search_box",&EditorNode::_clear_search_box);
- ObjectTypeDB::bind_method("_clear_undo_history",&EditorNode::_clear_undo_history);
- ObjectTypeDB::bind_method("_dropped_files",&EditorNode::_dropped_files);
- ObjectTypeDB::bind_method("_toggle_distraction_free_mode",&EditorNode::_toggle_distraction_free_mode);
-
-
-
- ObjectTypeDB::bind_method(_MD("add_editor_import_plugin", "plugin"), &EditorNode::add_editor_import_plugin);
- ObjectTypeDB::bind_method(_MD("remove_editor_import_plugin", "plugin"), &EditorNode::remove_editor_import_plugin);
- ObjectTypeDB::bind_method(_MD("get_gui_base"), &EditorNode::get_gui_base);
- ObjectTypeDB::bind_method(_MD("_bottom_panel_switch"), &EditorNode::_bottom_panel_switch);
+ ClassDB::bind_method("_menu_option",&EditorNode::_menu_option);
+ ClassDB::bind_method("_menu_confirm_current",&EditorNode::_menu_confirm_current);
+ ClassDB::bind_method("_dialog_action",&EditorNode::_dialog_action);
+ ClassDB::bind_method("_resource_selected",&EditorNode::_resource_selected,DEFVAL(""));
+ ClassDB::bind_method("_property_editor_forward",&EditorNode::_property_editor_forward);
+ ClassDB::bind_method("_property_editor_back",&EditorNode::_property_editor_back);
+ ClassDB::bind_method("_editor_select",&EditorNode::_editor_select);
+ ClassDB::bind_method("_node_renamed",&EditorNode::_node_renamed);
+ ClassDB::bind_method("edit_node",&EditorNode::edit_node);
+ ClassDB::bind_method("_imported",&EditorNode::_imported);
+ ClassDB::bind_method("_unhandled_input",&EditorNode::_unhandled_input);
+
+ ClassDB::bind_method("_get_scene_metadata",&EditorNode::_get_scene_metadata);
+ ClassDB::bind_method("set_edited_scene",&EditorNode::set_edited_scene);
+ ClassDB::bind_method("open_request",&EditorNode::open_request);
+ ClassDB::bind_method("_instance_request",&EditorNode::_instance_request);
+ ClassDB::bind_method("update_keying",&EditorNode::update_keying);
+ ClassDB::bind_method("_property_keyed",&EditorNode::_property_keyed);
+ ClassDB::bind_method("_transform_keyed",&EditorNode::_transform_keyed);
+ ClassDB::bind_method("_close_messages",&EditorNode::_close_messages);
+ ClassDB::bind_method("_show_messages",&EditorNode::_show_messages);
+ ClassDB::bind_method("_vp_resized",&EditorNode::_vp_resized);
+ ClassDB::bind_method("_quick_opened",&EditorNode::_quick_opened);
+ ClassDB::bind_method("_quick_run",&EditorNode::_quick_run);
+
+ ClassDB::bind_method("_resource_created",&EditorNode::_resource_created);
+
+ ClassDB::bind_method("_import_action",&EditorNode::_import_action);
+ //ClassDB::bind_method("_import",&EditorNode::_import);
+// ClassDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved);
+ ClassDB::bind_method("_open_recent_scene",&EditorNode::_open_recent_scene);
+// ClassDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm);
+
+ ClassDB::bind_method("_save_optimized",&EditorNode::_save_optimized);
+
+ ClassDB::bind_method("stop_child_process",&EditorNode::stop_child_process);
+
+ ClassDB::bind_method("_sources_changed",&EditorNode::_sources_changed);
+ ClassDB::bind_method("_fs_changed",&EditorNode::_fs_changed);
+ ClassDB::bind_method("_dock_select_draw",&EditorNode::_dock_select_draw);
+ ClassDB::bind_method("_dock_select_input",&EditorNode::_dock_select_input);
+ ClassDB::bind_method("_dock_pre_popup",&EditorNode::_dock_pre_popup);
+ ClassDB::bind_method("_dock_split_dragged",&EditorNode::_dock_split_dragged);
+ ClassDB::bind_method("_save_docks",&EditorNode::_save_docks);
+ ClassDB::bind_method("_dock_popup_exit",&EditorNode::_dock_popup_exit);
+ ClassDB::bind_method("_dock_move_left",&EditorNode::_dock_move_left);
+ ClassDB::bind_method("_dock_move_right",&EditorNode::_dock_move_right);
+
+ ClassDB::bind_method("_layout_menu_option",&EditorNode::_layout_menu_option);
+
+ ClassDB::bind_method("set_current_scene",&EditorNode::set_current_scene);
+ ClassDB::bind_method("set_current_version",&EditorNode::set_current_version);
+ ClassDB::bind_method("_scene_tab_changed",&EditorNode::_scene_tab_changed);
+ ClassDB::bind_method("_scene_tab_closed",&EditorNode::_scene_tab_closed);
+ ClassDB::bind_method("_scene_tab_script_edited",&EditorNode::_scene_tab_script_edited);
+ ClassDB::bind_method("_set_main_scene_state",&EditorNode::_set_main_scene_state);
+ ClassDB::bind_method("_update_scene_tabs",&EditorNode::_update_scene_tabs);
+
+ ClassDB::bind_method("_prepare_history",&EditorNode::_prepare_history);
+ ClassDB::bind_method("_select_history",&EditorNode::_select_history);
+
+ ClassDB::bind_method("_toggle_search_bar",&EditorNode::_toggle_search_bar);
+ ClassDB::bind_method("_clear_search_box",&EditorNode::_clear_search_box);
+ ClassDB::bind_method("_clear_undo_history",&EditorNode::_clear_undo_history);
+ ClassDB::bind_method("_dropped_files",&EditorNode::_dropped_files);
+ ClassDB::bind_method("_toggle_distraction_free_mode",&EditorNode::_toggle_distraction_free_mode);
+
+
+
+ ClassDB::bind_method(_MD("add_editor_import_plugin", "plugin"), &EditorNode::add_editor_import_plugin);
+ ClassDB::bind_method(_MD("remove_editor_import_plugin", "plugin"), &EditorNode::remove_editor_import_plugin);
+ ClassDB::bind_method(_MD("get_gui_base"), &EditorNode::get_gui_base);
+ ClassDB::bind_method(_MD("_bottom_panel_switch"), &EditorNode::_bottom_panel_switch);
ADD_SIGNAL( MethodInfo("play_pressed") );
@@ -5466,9 +5466,9 @@ EditorNode::EditorNode() {
GLOBAL_DEF("editor/main_run_args","$scene");
- ObjectTypeDB::set_type_enabled("CollisionShape",true);
- ObjectTypeDB::set_type_enabled("CollisionShape2D",true);
- ObjectTypeDB::set_type_enabled("CollisionPolygon2D",true);
+ ClassDB::set_class_enabled("CollisionShape",true);
+ ClassDB::set_class_enabled("CollisionShape2D",true);
+ ClassDB::set_class_enabled("CollisionPolygon2D",true);
Control *theme_base = memnew( Control );
add_child(theme_base);
@@ -6710,7 +6710,7 @@ EditorNode::EditorNode() {
theme_base->get_theme()->get_icon_list(ei,&tl);
for(List<StringName>::Element *E=tl.front();E;E=E->next()) {
- if (!ObjectTypeDB::type_exists(E->get()))
+ if (!ClassDB::class_exists(E->get()))
continue;
icon_type_cache[E->get()]=theme_base->get_theme()->get_icon(E->get(),ei);
}
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index 20a7cf4061..8eebaf3d5c 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -101,7 +101,7 @@ class EditorPluginList;
class EditorNode : public Node {
- OBJ_TYPE( EditorNode, Node );
+ GDCLASS( EditorNode, Node );
public:
enum DockSlot {
diff --git a/tools/editor/editor_path.cpp b/tools/editor/editor_path.cpp
index f924c4a20c..9053d9bde0 100644
--- a/tools/editor/editor_path.cpp
+++ b/tools/editor/editor_path.cpp
@@ -53,8 +53,8 @@ void EditorPath::_add_children_to_popup(Object* p_obj,int p_depth) {
Ref<Texture> icon;
- if (has_icon(obj->get_type(),"EditorIcons"))
- icon=get_icon(obj->get_type(),"EditorIcons");
+ if (has_icon(obj->get_class(),"EditorIcons"))
+ icon=get_icon(obj->get_class(),"EditorIcons");
else
icon=get_icon("Object","EditorIcons");
@@ -121,12 +121,12 @@ void EditorPath::_notification(int p_what) {
if (!obj)
continue;
- String type = obj->get_type();
+ String type = obj->get_class();
Ref<Texture> icon;
- if (has_icon(obj->get_type(),"EditorIcons"))
- icon=get_icon(obj->get_type(),"EditorIcons");
+ if (has_icon(obj->get_class(),"EditorIcons"))
+ icon=get_icon(obj->get_class(),"EditorIcons");
else
icon=get_icon("Object","EditorIcons");
@@ -151,17 +151,17 @@ void EditorPath::_notification(int p_what) {
name=r->get_name();
if (name=="")
- name=r->get_type();
+ name=r->get_class();
} else if (obj->cast_to<Node>()) {
name=obj->cast_to<Node>()->get_name();
} else if (obj->cast_to<Resource>() && obj->cast_to<Resource>()->get_name()!="") {
name=obj->cast_to<Resource>()->get_name();
} else {
- name=obj->get_type();
+ name=obj->get_class();
}
- set_tooltip(obj->get_type());
+ set_tooltip(obj->get_class());
label_font->draw(ci,Point2i(ofs,(size.height-label_font->get_height())/2+label_font->get_ascent()),name,Color(1,1,1),left);
@@ -198,8 +198,8 @@ void EditorPath::_popup_select(int p_idx) {
void EditorPath::_bind_methods() {
- ObjectTypeDB::bind_method("_input_event",&EditorPath::_input_event);
- ObjectTypeDB::bind_method("_popup_select",&EditorPath::_popup_select);
+ ClassDB::bind_method("_input_event",&EditorPath::_input_event);
+ ClassDB::bind_method("_popup_select",&EditorPath::_popup_select);
}
EditorPath::EditorPath(EditorHistory *p_history) {
diff --git a/tools/editor/editor_path.h b/tools/editor/editor_path.h
index 86b8e77060..47ba4ea3de 100644
--- a/tools/editor/editor_path.h
+++ b/tools/editor/editor_path.h
@@ -35,7 +35,7 @@
class EditorPath : public Control {
- OBJ_TYPE(EditorPath,Control);
+ GDCLASS(EditorPath,Control);
EditorHistory *history;
diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp
index 106e91348e..a19e520c1a 100644
--- a/tools/editor/editor_plugin.cpp
+++ b/tools/editor/editor_plugin.cpp
@@ -346,57 +346,57 @@ EditorFileSystem *EditorPlugin::get_resource_file_system() {
void EditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_control_to_container","container","control:Control"),&EditorPlugin::add_control_to_container);
- ObjectTypeDB::bind_method(_MD("add_control_to_bottom_panel:ToolButton","control:Control","title"),&EditorPlugin::add_control_to_bottom_panel);
- ObjectTypeDB::bind_method(_MD("add_control_to_dock","slot","control:Control"),&EditorPlugin::add_control_to_dock);
- ObjectTypeDB::bind_method(_MD("remove_control_from_docks","control:Control"),&EditorPlugin::remove_control_from_docks);
- ObjectTypeDB::bind_method(_MD("remove_control_from_bottom_panel","control:Control"),&EditorPlugin::remove_control_from_bottom_panel);
- ObjectTypeDB::bind_method(_MD("add_custom_type","type","base","script:Script","icon:Texture"),&EditorPlugin::add_custom_type);
- ObjectTypeDB::bind_method(_MD("remove_custom_type","type"),&EditorPlugin::remove_custom_type);
- ObjectTypeDB::bind_method(_MD("get_editor_viewport:Control"), &EditorPlugin::get_editor_viewport);
-
- ObjectTypeDB::bind_method(_MD("add_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::add_import_plugin);
- ObjectTypeDB::bind_method(_MD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::remove_import_plugin);
-
- ObjectTypeDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::add_export_plugin);
- ObjectTypeDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::remove_export_plugin);
-
- ObjectTypeDB::bind_method(_MD("get_resource_previewer:EditorResourcePreview"),&EditorPlugin::get_resource_previewer);
- ObjectTypeDB::bind_method(_MD("get_resource_filesystem:EditorFileSystem"),&EditorPlugin::get_resource_file_system);
-
- ObjectTypeDB::bind_method(_MD("inspect_object","object","for_property"),&EditorPlugin::inspect_object,DEFVAL(String()));
- ObjectTypeDB::bind_method(_MD("update_canvas"),&EditorPlugin::update_canvas);
-
- ObjectTypeDB::bind_method(_MD("make_bottom_panel_item_visible","item:Control"), &EditorPlugin::make_bottom_panel_item_visible);
- ObjectTypeDB::bind_method(_MD("hide_bottom_panel"), &EditorPlugin::hide_bottom_panel);
-
- ObjectTypeDB::bind_method(_MD("get_base_control:Control"),&EditorPlugin::get_base_control);
- ObjectTypeDB::bind_method(_MD("get_undo_redo:UndoRedo"),&EditorPlugin::_get_undo_redo);
- ObjectTypeDB::bind_method(_MD("get_selection:EditorSelection"),&EditorPlugin::get_selection);
- ObjectTypeDB::bind_method(_MD("get_editor_settings:EditorSettings"),&EditorPlugin::get_editor_settings);
- ObjectTypeDB::bind_method(_MD("queue_save_layout"),&EditorPlugin::queue_save_layout);
- ObjectTypeDB::bind_method(_MD("edit_resource"),&EditorPlugin::edit_resource);
-
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"forward_canvas_input_event",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::INPUT_EVENT,"event")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("forward_draw_over_canvas",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::OBJECT,"canvas:Control")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"forward_spatial_input_event",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera"),PropertyInfo(Variant::INPUT_EVENT,"event")));
+ ClassDB::bind_method(_MD("add_control_to_container","container","control:Control"),&EditorPlugin::add_control_to_container);
+ ClassDB::bind_method(_MD("add_control_to_bottom_panel:ToolButton","control:Control","title"),&EditorPlugin::add_control_to_bottom_panel);
+ ClassDB::bind_method(_MD("add_control_to_dock","slot","control:Control"),&EditorPlugin::add_control_to_dock);
+ ClassDB::bind_method(_MD("remove_control_from_docks","control:Control"),&EditorPlugin::remove_control_from_docks);
+ ClassDB::bind_method(_MD("remove_control_from_bottom_panel","control:Control"),&EditorPlugin::remove_control_from_bottom_panel);
+ ClassDB::bind_method(_MD("add_custom_type","type","base","script:Script","icon:Texture"),&EditorPlugin::add_custom_type);
+ ClassDB::bind_method(_MD("remove_custom_type","type"),&EditorPlugin::remove_custom_type);
+ ClassDB::bind_method(_MD("get_editor_viewport:Control"), &EditorPlugin::get_editor_viewport);
+
+ ClassDB::bind_method(_MD("add_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::add_import_plugin);
+ ClassDB::bind_method(_MD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::remove_import_plugin);
+
+ ClassDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::add_export_plugin);
+ ClassDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::remove_export_plugin);
+
+ ClassDB::bind_method(_MD("get_resource_previewer:EditorResourcePreview"),&EditorPlugin::get_resource_previewer);
+ ClassDB::bind_method(_MD("get_resource_filesystem:EditorFileSystem"),&EditorPlugin::get_resource_file_system);
+
+ ClassDB::bind_method(_MD("inspect_object","object","for_property"),&EditorPlugin::inspect_object,DEFVAL(String()));
+ ClassDB::bind_method(_MD("update_canvas"),&EditorPlugin::update_canvas);
+
+ ClassDB::bind_method(_MD("make_bottom_panel_item_visible","item:Control"), &EditorPlugin::make_bottom_panel_item_visible);
+ ClassDB::bind_method(_MD("hide_bottom_panel"), &EditorPlugin::hide_bottom_panel);
+
+ ClassDB::bind_method(_MD("get_base_control:Control"),&EditorPlugin::get_base_control);
+ ClassDB::bind_method(_MD("get_undo_redo:UndoRedo"),&EditorPlugin::_get_undo_redo);
+ ClassDB::bind_method(_MD("get_selection:EditorSelection"),&EditorPlugin::get_selection);
+ ClassDB::bind_method(_MD("get_editor_settings:EditorSettings"),&EditorPlugin::get_editor_settings);
+ ClassDB::bind_method(_MD("queue_save_layout"),&EditorPlugin::queue_save_layout);
+ ClassDB::bind_method(_MD("edit_resource"),&EditorPlugin::edit_resource);
+
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"forward_canvas_input_event",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::INPUT_EVENT,"event")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("forward_draw_over_canvas",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::OBJECT,"canvas:Control")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"forward_spatial_input_event",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera"),PropertyInfo(Variant::INPUT_EVENT,"event")));
MethodInfo gizmo = MethodInfo(Variant::OBJECT,"create_spatial_gizmo",PropertyInfo(Variant::OBJECT,"for_spatial:Spatial"));
gizmo.return_val.hint=PROPERTY_HINT_RESOURCE_TYPE;
gizmo.return_val.hint_string="EditorSpatialGizmo";
- ObjectTypeDB::add_virtual_method(get_type_static(),gizmo);
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::STRING,"get_name"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"has_main_screen"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("make_visible",PropertyInfo(Variant::BOOL,"visible")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("edit",PropertyInfo(Variant::OBJECT,"object")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"handles",PropertyInfo(Variant::OBJECT,"object")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::DICTIONARY,"get_state"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("set_state",PropertyInfo(Variant::DICTIONARY,"state")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("clear"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("save_external_data"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("apply_changes"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::STRING_ARRAY,"get_breakpoints"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("set_window_layout",PropertyInfo(Variant::OBJECT,"layout",PROPERTY_HINT_RESOURCE_TYPE,"ConfigFile")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("get_window_layout",PropertyInfo(Variant::OBJECT,"layout",PROPERTY_HINT_RESOURCE_TYPE,"ConfigFile")));
+ ClassDB::add_virtual_method(get_class_static(),gizmo);
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING,"get_name"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"has_main_screen"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("make_visible",PropertyInfo(Variant::BOOL,"visible")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("edit",PropertyInfo(Variant::OBJECT,"object")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"handles",PropertyInfo(Variant::OBJECT,"object")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::DICTIONARY,"get_state"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("set_state",PropertyInfo(Variant::DICTIONARY,"state")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("clear"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("save_external_data"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("apply_changes"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING_ARRAY,"get_breakpoints"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("set_window_layout",PropertyInfo(Variant::OBJECT,"layout",PROPERTY_HINT_RESOURCE_TYPE,"ConfigFile")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("get_window_layout",PropertyInfo(Variant::OBJECT,"layout",PROPERTY_HINT_RESOURCE_TYPE,"ConfigFile")));
BIND_CONSTANT( CONTAINER_TOOLBAR );
BIND_CONSTANT( CONTAINER_SPATIAL_EDITOR_MENU );
diff --git a/tools/editor/editor_plugin.h b/tools/editor/editor_plugin.h
index 9e7449f7fa..c8fd1c2256 100644
--- a/tools/editor/editor_plugin.h
+++ b/tools/editor/editor_plugin.h
@@ -53,7 +53,7 @@ class EditorFileSystem;
class EditorPlugin : public Node {
- OBJ_TYPE( EditorPlugin, Node );
+ GDCLASS( EditorPlugin, Node );
friend class EditorData;
UndoRedo *undo_redo;
diff --git a/tools/editor/editor_plugin_settings.cpp b/tools/editor/editor_plugin_settings.cpp
index 23738848bf..6031448bbd 100644
--- a/tools/editor/editor_plugin_settings.cpp
+++ b/tools/editor/editor_plugin_settings.cpp
@@ -171,8 +171,8 @@ void EditorPluginSettings::_plugin_activity_changed() {
void EditorPluginSettings::_bind_methods() {
- ObjectTypeDB::bind_method("update_plugins",&EditorPluginSettings::update_plugins);
- ObjectTypeDB::bind_method("_plugin_activity_changed",&EditorPluginSettings::_plugin_activity_changed);
+ ClassDB::bind_method("update_plugins",&EditorPluginSettings::update_plugins);
+ ClassDB::bind_method("_plugin_activity_changed",&EditorPluginSettings::_plugin_activity_changed);
}
EditorPluginSettings::EditorPluginSettings() {
diff --git a/tools/editor/editor_plugin_settings.h b/tools/editor/editor_plugin_settings.h
index 8d3e22bfc9..e24880a21d 100644
--- a/tools/editor/editor_plugin_settings.h
+++ b/tools/editor/editor_plugin_settings.h
@@ -37,7 +37,7 @@
class EditorPluginSettings : public VBoxContainer {
- OBJ_TYPE(EditorPluginSettings,VBoxContainer);
+ GDCLASS(EditorPluginSettings,VBoxContainer);
Button* update_list;
Tree *plugin_list;
diff --git a/tools/editor/editor_profiler.cpp b/tools/editor/editor_profiler.cpp
index 435ad78b89..417b1615cf 100644
--- a/tools/editor/editor_profiler.cpp
+++ b/tools/editor/editor_profiler.cpp
@@ -617,16 +617,16 @@ void EditorProfiler::_combo_changed(int) {
void EditorProfiler::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_update_frame"),&EditorProfiler::_update_frame);
- ObjectTypeDB::bind_method(_MD("_update_plot"),&EditorProfiler::_update_plot);
- ObjectTypeDB::bind_method(_MD("_activate_pressed"),&EditorProfiler::_activate_pressed);
- ObjectTypeDB::bind_method(_MD("_graph_tex_draw"),&EditorProfiler::_graph_tex_draw);
- ObjectTypeDB::bind_method(_MD("_graph_tex_input"),&EditorProfiler::_graph_tex_input);
- ObjectTypeDB::bind_method(_MD("_graph_tex_mouse_exit"),&EditorProfiler::_graph_tex_mouse_exit);
- ObjectTypeDB::bind_method(_MD("_cursor_metric_changed"),&EditorProfiler::_cursor_metric_changed);
- ObjectTypeDB::bind_method(_MD("_combo_changed"),&EditorProfiler::_combo_changed);
-
- ObjectTypeDB::bind_method(_MD("_item_edited"),&EditorProfiler::_item_edited);
+ ClassDB::bind_method(_MD("_update_frame"),&EditorProfiler::_update_frame);
+ ClassDB::bind_method(_MD("_update_plot"),&EditorProfiler::_update_plot);
+ ClassDB::bind_method(_MD("_activate_pressed"),&EditorProfiler::_activate_pressed);
+ ClassDB::bind_method(_MD("_graph_tex_draw"),&EditorProfiler::_graph_tex_draw);
+ ClassDB::bind_method(_MD("_graph_tex_input"),&EditorProfiler::_graph_tex_input);
+ ClassDB::bind_method(_MD("_graph_tex_mouse_exit"),&EditorProfiler::_graph_tex_mouse_exit);
+ ClassDB::bind_method(_MD("_cursor_metric_changed"),&EditorProfiler::_cursor_metric_changed);
+ ClassDB::bind_method(_MD("_combo_changed"),&EditorProfiler::_combo_changed);
+
+ ClassDB::bind_method(_MD("_item_edited"),&EditorProfiler::_item_edited);
ADD_SIGNAL( MethodInfo("enable_profiling",PropertyInfo(Variant::BOOL,"enable")));
ADD_SIGNAL( MethodInfo("break_request"));
diff --git a/tools/editor/editor_profiler.h b/tools/editor/editor_profiler.h
index f5cea118ce..4e18f2e29a 100644
--- a/tools/editor/editor_profiler.h
+++ b/tools/editor/editor_profiler.h
@@ -14,7 +14,7 @@
class EditorProfiler : public VBoxContainer {
- OBJ_TYPE(EditorProfiler,VBoxContainer)
+ GDCLASS(EditorProfiler,VBoxContainer)
public:
diff --git a/tools/editor/editor_reimport_dialog.h b/tools/editor/editor_reimport_dialog.h
index 0b006dce6d..68e1ca0597 100644
--- a/tools/editor/editor_reimport_dialog.h
+++ b/tools/editor/editor_reimport_dialog.h
@@ -34,7 +34,7 @@
class EditorReImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorReImportDialog,ConfirmationDialog);
+ GDCLASS(EditorReImportDialog,ConfirmationDialog);
Tree *tree;
Vector<TreeItem*> items;
diff --git a/tools/editor/editor_resource_preview.cpp b/tools/editor/editor_resource_preview.cpp
index 7b3a3b7e3f..5f7157781d 100644
--- a/tools/editor/editor_resource_preview.cpp
+++ b/tools/editor/editor_resource_preview.cpp
@@ -69,9 +69,9 @@ Ref<Texture> EditorResourcePreviewGenerator::generate_from_path(const String& p_
void EditorResourcePreviewGenerator::_bind_methods() {
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"handles",PropertyInfo(Variant::STRING,"type")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::OBJECT,"generate:Texture",PropertyInfo(Variant::OBJECT,"from",PROPERTY_HINT_RESOURCE_TYPE,"Resource")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::OBJECT,"generate_from_path:Texture",PropertyInfo(Variant::STRING,"path",PROPERTY_HINT_FILE)));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"handles",PropertyInfo(Variant::STRING,"type")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::OBJECT,"generate:Texture",PropertyInfo(Variant::OBJECT,"from",PROPERTY_HINT_RESOURCE_TYPE,"Resource")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::OBJECT,"generate_from_path:Texture",PropertyInfo(Variant::STRING,"path",PROPERTY_HINT_FILE)));
}
@@ -127,7 +127,7 @@ Ref<Texture> EditorResourcePreview::_generate_preview(const QueueItem& p_item,co
String type;
if (p_item.resource.is_valid())
- type=p_item.resource->get_type();
+ type=p_item.resource->get_class();
else
type=ResourceLoader::get_resource_type(p_item.path);
//print_line("resource type is: "+type);
@@ -376,13 +376,13 @@ EditorResourcePreview* EditorResourcePreview::get_singleton() {
void EditorResourcePreview::_bind_methods() {
- ObjectTypeDB::bind_method("_preview_ready",&EditorResourcePreview::_preview_ready);
+ ClassDB::bind_method("_preview_ready",&EditorResourcePreview::_preview_ready);
- ObjectTypeDB::bind_method(_MD("queue_resource_preview","path","receiver","receiver_func","userdata:Variant"),&EditorResourcePreview::queue_resource_preview);
- ObjectTypeDB::bind_method(_MD("queue_edited_resource_preview","resource:Resource","receiver","receiver_func","userdata:Variant"),&EditorResourcePreview::queue_edited_resource_preview);
- ObjectTypeDB::bind_method(_MD("add_preview_generator","generator:EditorResourcePreviewGenerator"),&EditorResourcePreview::add_preview_generator);
- ObjectTypeDB::bind_method(_MD("remove_preview_generator","generator:EditorResourcePreviewGenerator"),&EditorResourcePreview::remove_preview_generator);
- ObjectTypeDB::bind_method(_MD("check_for_invalidation","path"),&EditorResourcePreview::check_for_invalidation);
+ ClassDB::bind_method(_MD("queue_resource_preview","path","receiver","receiver_func","userdata:Variant"),&EditorResourcePreview::queue_resource_preview);
+ ClassDB::bind_method(_MD("queue_edited_resource_preview","resource:Resource","receiver","receiver_func","userdata:Variant"),&EditorResourcePreview::queue_edited_resource_preview);
+ ClassDB::bind_method(_MD("add_preview_generator","generator:EditorResourcePreviewGenerator"),&EditorResourcePreview::add_preview_generator);
+ ClassDB::bind_method(_MD("remove_preview_generator","generator:EditorResourcePreviewGenerator"),&EditorResourcePreview::remove_preview_generator);
+ ClassDB::bind_method(_MD("check_for_invalidation","path"),&EditorResourcePreview::check_for_invalidation);
ADD_SIGNAL(MethodInfo("preview_invalidated",PropertyInfo(Variant::STRING,"path")));
diff --git a/tools/editor/editor_resource_preview.h b/tools/editor/editor_resource_preview.h
index 9dfdb0ec15..e4a593330d 100644
--- a/tools/editor/editor_resource_preview.h
+++ b/tools/editor/editor_resource_preview.h
@@ -55,7 +55,7 @@
class EditorResourcePreviewGenerator : public Reference {
- OBJ_TYPE(EditorResourcePreviewGenerator,Reference );
+ GDCLASS(EditorResourcePreviewGenerator,Reference );
protected:
@@ -72,7 +72,7 @@ public:
class EditorResourcePreview : public Node {
- OBJ_TYPE(EditorResourcePreview,Node);
+ GDCLASS(EditorResourcePreview,Node);
static EditorResourcePreview* singleton;
diff --git a/tools/editor/editor_run_native.cpp b/tools/editor/editor_run_native.cpp
index 236618f62b..f41db62787 100644
--- a/tools/editor/editor_run_native.cpp
+++ b/tools/editor/editor_run_native.cpp
@@ -129,7 +129,7 @@ void EditorRunNative::_run_native(int p_idx,const String& p_platform) {
void EditorRunNative::_bind_methods() {
- ObjectTypeDB::bind_method("_run_native",&EditorRunNative::_run_native);
+ ClassDB::bind_method("_run_native",&EditorRunNative::_run_native);
ADD_SIGNAL(MethodInfo("native_run"));
}
diff --git a/tools/editor/editor_run_native.h b/tools/editor/editor_run_native.h
index ac72685452..c62021148b 100644
--- a/tools/editor/editor_run_native.h
+++ b/tools/editor/editor_run_native.h
@@ -34,7 +34,7 @@
class EditorRunNative : public HBoxContainer {
- OBJ_TYPE(EditorRunNative,BoxContainer);
+ GDCLASS(EditorRunNative,BoxContainer);
Map<StringName,MenuButton*> menus;
bool first;
diff --git a/tools/editor/editor_run_script.cpp b/tools/editor/editor_run_script.cpp
index 932acb11df..c8f3f9fc5d 100644
--- a/tools/editor/editor_run_script.cpp
+++ b/tools/editor/editor_run_script.cpp
@@ -86,8 +86,8 @@ void EditorScript::set_editor(EditorNode *p_editor) {
void EditorScript::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_root_node","node"),&EditorScript::add_root_node);
- ObjectTypeDB::bind_method(_MD("get_scene"),&EditorScript::get_scene);
+ ClassDB::bind_method(_MD("add_root_node","node"),&EditorScript::add_root_node);
+ ClassDB::bind_method(_MD("get_scene"),&EditorScript::get_scene);
BIND_VMETHOD( MethodInfo("_run") );
diff --git a/tools/editor/editor_run_script.h b/tools/editor/editor_run_script.h
index da4d9def17..3ab8525cc6 100644
--- a/tools/editor/editor_run_script.h
+++ b/tools/editor/editor_run_script.h
@@ -35,7 +35,7 @@
class EditorNode;
class EditorScript : public Reference {
- OBJ_TYPE( EditorScript, Reference );
+ GDCLASS( EditorScript, Reference );
EditorNode *editor;
protected:
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 4f5e8f6a4b..e7de62e4cb 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -257,7 +257,7 @@ void EditorSettings::create() {
}
};
- ObjectTypeDB::register_type<EditorSettings>(); //otherwise it can't be unserialized
+ ClassDB::register_class<EditorSettings>(); //otherwise it can't be unserialized
String config_file_path;
if (config_path!=""){
@@ -1051,17 +1051,17 @@ void EditorSettings::set_last_selected_language(String p_language)
void EditorSettings::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("erase","property"),&EditorSettings::erase);
- ObjectTypeDB::bind_method(_MD("get_settings_path"),&EditorSettings::get_settings_path);
- ObjectTypeDB::bind_method(_MD("get_project_settings_path"),&EditorSettings::get_project_settings_path);
+ ClassDB::bind_method(_MD("erase","property"),&EditorSettings::erase);
+ ClassDB::bind_method(_MD("get_settings_path"),&EditorSettings::get_settings_path);
+ ClassDB::bind_method(_MD("get_project_settings_path"),&EditorSettings::get_project_settings_path);
- ObjectTypeDB::bind_method(_MD("add_property_info", "info"),&EditorSettings::_add_property_info_bind);
+ ClassDB::bind_method(_MD("add_property_info", "info"),&EditorSettings::_add_property_info_bind);
- ObjectTypeDB::bind_method(_MD("set_favorite_dirs","dirs"),&EditorSettings::set_favorite_dirs);
- ObjectTypeDB::bind_method(_MD("get_favorite_dirs"),&EditorSettings::get_favorite_dirs);
+ ClassDB::bind_method(_MD("set_favorite_dirs","dirs"),&EditorSettings::set_favorite_dirs);
+ ClassDB::bind_method(_MD("get_favorite_dirs"),&EditorSettings::get_favorite_dirs);
- ObjectTypeDB::bind_method(_MD("set_recent_dirs","dirs"),&EditorSettings::set_recent_dirs);
- ObjectTypeDB::bind_method(_MD("get_recent_dirs"),&EditorSettings::get_recent_dirs);
+ ClassDB::bind_method(_MD("set_recent_dirs","dirs"),&EditorSettings::set_recent_dirs);
+ ClassDB::bind_method(_MD("get_recent_dirs"),&EditorSettings::get_recent_dirs);
ADD_SIGNAL(MethodInfo("settings_changed"));
diff --git a/tools/editor/editor_settings.h b/tools/editor/editor_settings.h
index 1f99748ec0..c11feef667 100644
--- a/tools/editor/editor_settings.h
+++ b/tools/editor/editor_settings.h
@@ -41,7 +41,7 @@ class EditorPlugin;
class EditorSettings : public Resource {
- OBJ_TYPE( EditorSettings, Resource );
+ GDCLASS( EditorSettings, Resource );
private:
_THREAD_SAFE_CLASS_
diff --git a/tools/editor/editor_sub_scene.cpp b/tools/editor/editor_sub_scene.cpp
index 57bf4b3975..f60e0ff11a 100644
--- a/tools/editor/editor_sub_scene.cpp
+++ b/tools/editor/editor_sub_scene.cpp
@@ -90,8 +90,8 @@ void EditorSubScene::_fill_tree(Node* p_node,TreeItem *p_parent) {
it->set_text(0,p_node->get_name());
it->set_editable(0,false);
it->set_selectable(0,true);
- if (has_icon(p_node->get_type(),"EditorIcons")) {
- it->set_icon(0,get_icon(p_node->get_type(),"EditorIcons"));
+ if (has_icon(p_node->get_class(),"EditorIcons")) {
+ it->set_icon(0,get_icon(p_node->get_class(),"EditorIcons"));
}
@@ -186,9 +186,9 @@ void EditorSubScene::clear() {
void EditorSubScene::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_path_selected"),&EditorSubScene::_path_selected);
- ObjectTypeDB::bind_method(_MD("_path_changed"),&EditorSubScene::_path_changed);
- ObjectTypeDB::bind_method(_MD("_path_browse"),&EditorSubScene::_path_browse);
+ ClassDB::bind_method(_MD("_path_selected"),&EditorSubScene::_path_selected);
+ ClassDB::bind_method(_MD("_path_changed"),&EditorSubScene::_path_changed);
+ ClassDB::bind_method(_MD("_path_browse"),&EditorSubScene::_path_browse);
ADD_SIGNAL( MethodInfo("subscene_selected"));
}
diff --git a/tools/editor/editor_sub_scene.h b/tools/editor/editor_sub_scene.h
index 5022cf3be5..cc9faffc77 100644
--- a/tools/editor/editor_sub_scene.h
+++ b/tools/editor/editor_sub_scene.h
@@ -35,7 +35,7 @@
class EditorSubScene : public ConfirmationDialog {
- OBJ_TYPE(EditorSubScene,ConfirmationDialog);
+ GDCLASS(EditorSubScene,ConfirmationDialog);
LineEdit *path;
diff --git a/tools/editor/file_type_cache.h b/tools/editor/file_type_cache.h
index eb9a0759d3..25755f168c 100644
--- a/tools/editor/file_type_cache.h
+++ b/tools/editor/file_type_cache.h
@@ -33,7 +33,7 @@
class FileTypeCache : Object {
- OBJ_TYPE(FileTypeCache,Object);
+ GDCLASS(FileTypeCache,Object);
HashMap<String,String> file_type_map;
diff --git a/tools/editor/fileserver/editor_file_server.h b/tools/editor/fileserver/editor_file_server.h
index 498314a1b9..31f8ae84b8 100644
--- a/tools/editor/fileserver/editor_file_server.h
+++ b/tools/editor/fileserver/editor_file_server.h
@@ -37,7 +37,7 @@
class EditorFileServer : public Object {
- OBJ_TYPE(EditorFileServer,Object);
+ GDCLASS(EditorFileServer,Object);
enum Command {
CMD_NONE,
diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp
index 86c2fe2a6a..d985f07b3d 100644
--- a/tools/editor/filesystem_dock.cpp
+++ b/tools/editor/filesystem_dock.cpp
@@ -1581,33 +1581,33 @@ void FileSystemDock::_files_list_rmb_select(int p_item,const Vector2& p_pos) {
void FileSystemDock::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_update_tree"),&FileSystemDock::_update_tree);
- ObjectTypeDB::bind_method(_MD("_rescan"),&FileSystemDock::_rescan);
- ObjectTypeDB::bind_method(_MD("_favorites_pressed"),&FileSystemDock::_favorites_pressed);
-// ObjectTypeDB::bind_method(_MD("_instance_pressed"),&ScenesDock::_instance_pressed);
- ObjectTypeDB::bind_method(_MD("_open_pressed"),&FileSystemDock::_open_pressed);
-
- ObjectTypeDB::bind_method(_MD("_thumbnail_done"),&FileSystemDock::_thumbnail_done);
- ObjectTypeDB::bind_method(_MD("_select_file"), &FileSystemDock::_select_file);
- ObjectTypeDB::bind_method(_MD("_go_to_tree"), &FileSystemDock::_go_to_tree);
- ObjectTypeDB::bind_method(_MD("_go_to_dir"), &FileSystemDock::_go_to_dir);
- ObjectTypeDB::bind_method(_MD("_change_file_display"), &FileSystemDock::_change_file_display);
- ObjectTypeDB::bind_method(_MD("_fw_history"), &FileSystemDock::_fw_history);
- ObjectTypeDB::bind_method(_MD("_bw_history"), &FileSystemDock::_bw_history);
- ObjectTypeDB::bind_method(_MD("_fs_changed"), &FileSystemDock::_fs_changed);
- ObjectTypeDB::bind_method(_MD("_dir_selected"), &FileSystemDock::_dir_selected);
- ObjectTypeDB::bind_method(_MD("_file_option"), &FileSystemDock::_file_option);
- ObjectTypeDB::bind_method(_MD("_move_operation"), &FileSystemDock::_move_operation);
- ObjectTypeDB::bind_method(_MD("_rename_operation"), &FileSystemDock::_rename_operation);
-
- ObjectTypeDB::bind_method(_MD("_search_changed"), &FileSystemDock::_search_changed);
-
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &FileSystemDock::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &FileSystemDock::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &FileSystemDock::drop_data_fw);
- ObjectTypeDB::bind_method(_MD("_files_list_rmb_select"),&FileSystemDock::_files_list_rmb_select);
-
- ObjectTypeDB::bind_method(_MD("_preview_invalidated"),&FileSystemDock::_preview_invalidated);
+ ClassDB::bind_method(_MD("_update_tree"),&FileSystemDock::_update_tree);
+ ClassDB::bind_method(_MD("_rescan"),&FileSystemDock::_rescan);
+ ClassDB::bind_method(_MD("_favorites_pressed"),&FileSystemDock::_favorites_pressed);
+// ClassDB::bind_method(_MD("_instance_pressed"),&ScenesDock::_instance_pressed);
+ ClassDB::bind_method(_MD("_open_pressed"),&FileSystemDock::_open_pressed);
+
+ ClassDB::bind_method(_MD("_thumbnail_done"),&FileSystemDock::_thumbnail_done);
+ ClassDB::bind_method(_MD("_select_file"), &FileSystemDock::_select_file);
+ ClassDB::bind_method(_MD("_go_to_tree"), &FileSystemDock::_go_to_tree);
+ ClassDB::bind_method(_MD("_go_to_dir"), &FileSystemDock::_go_to_dir);
+ ClassDB::bind_method(_MD("_change_file_display"), &FileSystemDock::_change_file_display);
+ ClassDB::bind_method(_MD("_fw_history"), &FileSystemDock::_fw_history);
+ ClassDB::bind_method(_MD("_bw_history"), &FileSystemDock::_bw_history);
+ ClassDB::bind_method(_MD("_fs_changed"), &FileSystemDock::_fs_changed);
+ ClassDB::bind_method(_MD("_dir_selected"), &FileSystemDock::_dir_selected);
+ ClassDB::bind_method(_MD("_file_option"), &FileSystemDock::_file_option);
+ ClassDB::bind_method(_MD("_move_operation"), &FileSystemDock::_move_operation);
+ ClassDB::bind_method(_MD("_rename_operation"), &FileSystemDock::_rename_operation);
+
+ ClassDB::bind_method(_MD("_search_changed"), &FileSystemDock::_search_changed);
+
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &FileSystemDock::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &FileSystemDock::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &FileSystemDock::drop_data_fw);
+ ClassDB::bind_method(_MD("_files_list_rmb_select"),&FileSystemDock::_files_list_rmb_select);
+
+ ClassDB::bind_method(_MD("_preview_invalidated"),&FileSystemDock::_preview_invalidated);
ADD_SIGNAL(MethodInfo("instance", PropertyInfo(Variant::STRING_ARRAY, "files")));
diff --git a/tools/editor/filesystem_dock.h b/tools/editor/filesystem_dock.h
index c23428fcb8..12fc36bff0 100644
--- a/tools/editor/filesystem_dock.h
+++ b/tools/editor/filesystem_dock.h
@@ -52,7 +52,7 @@ class EditorNode;
class FileSystemDock : public VBoxContainer {
- OBJ_TYPE( FileSystemDock, VBoxContainer );
+ GDCLASS( FileSystemDock, VBoxContainer );
public:
enum DisplayMode {
diff --git a/tools/editor/groups_editor.cpp b/tools/editor/groups_editor.cpp
index fe9b9c27f8..07b2bca385 100644
--- a/tools/editor/groups_editor.cpp
+++ b/tools/editor/groups_editor.cpp
@@ -147,9 +147,9 @@ void GroupsEditor::set_current(Node* p_node) {
void GroupsEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_add_group",&GroupsEditor::_add_group);
- ObjectTypeDB::bind_method("_remove_group",&GroupsEditor::_remove_group);
- ObjectTypeDB::bind_method("update_tree",&GroupsEditor::update_tree);
+ ClassDB::bind_method("_add_group",&GroupsEditor::_add_group);
+ ClassDB::bind_method("_remove_group",&GroupsEditor::_remove_group);
+ ClassDB::bind_method("update_tree",&GroupsEditor::update_tree);
}
GroupsEditor::GroupsEditor() {
diff --git a/tools/editor/groups_editor.h b/tools/editor/groups_editor.h
index 203d56ace5..9ab75c6cfd 100644
--- a/tools/editor/groups_editor.h
+++ b/tools/editor/groups_editor.h
@@ -41,7 +41,7 @@
class GroupsEditor : public VBoxContainer {
- OBJ_TYPE(GroupsEditor,VBoxContainer);
+ GDCLASS(GroupsEditor,VBoxContainer);
Node *node;
diff --git a/tools/editor/inspector_dock.h b/tools/editor/inspector_dock.h
index df8d299781..be6ed5fa87 100644
--- a/tools/editor/inspector_dock.h
+++ b/tools/editor/inspector_dock.h
@@ -38,7 +38,7 @@
#if 0
class InspectorDock : public VBoxContainer
{
- OBJ_TYPE(InspectorDock,VBoxContainer);
+ GDCLASS(InspectorDock,VBoxContainer);
PropertyEditor *property_editor;
diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
index 757d2ed5d4..dd36ce6dbd 100644
--- a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
@@ -11,7 +11,7 @@
class _EditorBitMaskImportOptions : public Object {
- OBJ_TYPE(_EditorBitMaskImportOptions, Object);
+ GDCLASS(_EditorBitMaskImportOptions, Object);
public:
bool _set(const StringName& p_name, const Variant& p_value) {
@@ -42,7 +42,7 @@ public:
class EditorBitMaskImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorBitMaskImportDialog, ConfirmationDialog);
+ GDCLASS(EditorBitMaskImportDialog, ConfirmationDialog);
EditorBitMaskImportPlugin *plugin;
@@ -162,11 +162,11 @@ public:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_choose_files", &EditorBitMaskImportDialog::_choose_files);
- ObjectTypeDB::bind_method("_choose_save_dir", &EditorBitMaskImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import", &EditorBitMaskImportDialog::_import);
- ObjectTypeDB::bind_method("_browse", &EditorBitMaskImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target", &EditorBitMaskImportDialog::_browse_target);
+ ClassDB::bind_method("_choose_files", &EditorBitMaskImportDialog::_choose_files);
+ ClassDB::bind_method("_choose_save_dir", &EditorBitMaskImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import", &EditorBitMaskImportDialog::_import);
+ ClassDB::bind_method("_browse", &EditorBitMaskImportDialog::_browse);
+ ClassDB::bind_method("_browse_target", &EditorBitMaskImportDialog::_browse_target);
// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
}
diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.h b/tools/editor/io_plugins/editor_bitmask_import_plugin.h
index d9ca33cd97..28dddca50a 100644
--- a/tools/editor/io_plugins/editor_bitmask_import_plugin.h
+++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.h
@@ -9,7 +9,7 @@ class EditorBitMaskImportDialog;
class EditorBitMaskImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorBitMaskImportPlugin, EditorImportPlugin);
+ GDCLASS(EditorBitMaskImportPlugin, EditorImportPlugin);
EditorBitMaskImportDialog *dialog;
public:
@@ -30,7 +30,7 @@ public:
class EditorBitMaskExportPlugin : public EditorExportPlugin {
- OBJ_TYPE(EditorBitMaskExportPlugin, EditorExportPlugin);
+ GDCLASS(EditorBitMaskExportPlugin, EditorExportPlugin);
public:
diff --git a/tools/editor/io_plugins/editor_export_scene.h b/tools/editor/io_plugins/editor_export_scene.h
index 098a5bd5b8..13493220cb 100644
--- a/tools/editor/io_plugins/editor_export_scene.h
+++ b/tools/editor/io_plugins/editor_export_scene.h
@@ -33,7 +33,7 @@
class EditorSceneExportPlugin : public EditorExportPlugin {
- OBJ_TYPE( EditorSceneExportPlugin, EditorExportPlugin );
+ GDCLASS( EditorSceneExportPlugin, EditorExportPlugin );
public:
virtual Vector<uint8_t> custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform);
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index 0bf9b32b08..02990e9ed0 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -44,7 +44,7 @@
class _EditorFontImportOptions : public Object {
- OBJ_TYPE(_EditorFontImportOptions,Object);
+ GDCLASS(_EditorFontImportOptions,Object);
public:
enum FontMode {
@@ -384,7 +384,7 @@ public:
class EditorFontImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorFontImportDialog, ConfirmationDialog);
+ GDCLASS(EditorFontImportDialog, ConfirmationDialog);
EditorLineEditFileChooser *source;
@@ -572,14 +572,14 @@ class EditorFontImportDialog : public ConfirmationDialog {
static void _bind_methods() {
- ObjectTypeDB::bind_method("_update",&EditorFontImportDialog::_update);
- ObjectTypeDB::bind_method("_update_text",&EditorFontImportDialog::_update_text);
- ObjectTypeDB::bind_method("_update_text2",&EditorFontImportDialog::_update_text2);
- ObjectTypeDB::bind_method("_update_text3",&EditorFontImportDialog::_update_text3);
- ObjectTypeDB::bind_method("_prop_changed",&EditorFontImportDialog::_prop_changed);
- ObjectTypeDB::bind_method("_src_changed",&EditorFontImportDialog::_src_changed);
- ObjectTypeDB::bind_method("_font_size_changed",&EditorFontImportDialog::_font_size_changed);
- ObjectTypeDB::bind_method("_import",&EditorFontImportDialog::_import);
+ ClassDB::bind_method("_update",&EditorFontImportDialog::_update);
+ ClassDB::bind_method("_update_text",&EditorFontImportDialog::_update_text);
+ ClassDB::bind_method("_update_text2",&EditorFontImportDialog::_update_text2);
+ ClassDB::bind_method("_update_text3",&EditorFontImportDialog::_update_text3);
+ ClassDB::bind_method("_prop_changed",&EditorFontImportDialog::_prop_changed);
+ ClassDB::bind_method("_src_changed",&EditorFontImportDialog::_src_changed);
+ ClassDB::bind_method("_font_size_changed",&EditorFontImportDialog::_font_size_changed);
+ ClassDB::bind_method("_import",&EditorFontImportDialog::_import);
}
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.h b/tools/editor/io_plugins/editor_font_import_plugin.h
index 2af81f66d0..73c699c090 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.h
+++ b/tools/editor/io_plugins/editor_font_import_plugin.h
@@ -37,7 +37,7 @@ class EditorFontImportDialog;
class EditorFontImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorFontImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorFontImportPlugin,EditorImportPlugin);
EditorFontImportDialog *dialog;
public:
diff --git a/tools/editor/io_plugins/editor_import_collada.h b/tools/editor/io_plugins/editor_import_collada.h
index b98bf18976..f6642778ed 100644
--- a/tools/editor/io_plugins/editor_import_collada.h
+++ b/tools/editor/io_plugins/editor_import_collada.h
@@ -35,7 +35,7 @@
class EditorSceneImporterCollada : public EditorSceneImporter {
- OBJ_TYPE(EditorSceneImporterCollada,EditorSceneImporter );
+ GDCLASS(EditorSceneImporterCollada,EditorSceneImporter );
public:
virtual uint32_t get_import_flags() const;
diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
index f74b1b3c7f..819984e210 100644
--- a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
@@ -40,7 +40,7 @@
class _EditorMeshImportOptions : public Object {
- OBJ_TYPE(_EditorMeshImportOptions,Object);
+ GDCLASS(_EditorMeshImportOptions,Object);
public:
@@ -148,7 +148,7 @@ public:
class EditorMeshImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorMeshImportDialog,ConfirmationDialog);
+ GDCLASS(EditorMeshImportDialog,ConfirmationDialog);
EditorMeshImportPlugin *plugin;
@@ -278,11 +278,11 @@ public:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_choose_files",&EditorMeshImportDialog::_choose_files);
- ObjectTypeDB::bind_method("_choose_save_dir",&EditorMeshImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import",&EditorMeshImportDialog::_import);
- ObjectTypeDB::bind_method("_browse",&EditorMeshImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorMeshImportDialog::_browse_target);
+ ClassDB::bind_method("_choose_files",&EditorMeshImportDialog::_choose_files);
+ ClassDB::bind_method("_choose_save_dir",&EditorMeshImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import",&EditorMeshImportDialog::_import);
+ ClassDB::bind_method("_browse",&EditorMeshImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorMeshImportDialog::_browse_target);
}
EditorMeshImportDialog(EditorMeshImportPlugin *p_plugin) {
diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.h b/tools/editor/io_plugins/editor_mesh_import_plugin.h
index 3769dd8b0f..1f15fee3a7 100644
--- a/tools/editor/io_plugins/editor_mesh_import_plugin.h
+++ b/tools/editor/io_plugins/editor_mesh_import_plugin.h
@@ -38,7 +38,7 @@ class EditorMeshImportDialog;
class EditorMeshImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorMeshImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorMeshImportPlugin,EditorImportPlugin);
EditorMeshImportDialog *dialog;
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
index 662f4ffee9..b776fdeec0 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -39,7 +39,7 @@
class _EditorSampleImportOptions : public Object {
- OBJ_TYPE(_EditorSampleImportOptions,Object);
+ GDCLASS(_EditorSampleImportOptions,Object);
public:
enum CompressMode {
@@ -166,7 +166,7 @@ public:
class EditorSampleImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorSampleImportDialog,ConfirmationDialog);
+ GDCLASS(EditorSampleImportDialog,ConfirmationDialog);
EditorSampleImportPlugin *plugin;
@@ -318,11 +318,11 @@ public:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_choose_files",&EditorSampleImportDialog::_choose_files);
- ObjectTypeDB::bind_method("_choose_save_dir",&EditorSampleImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import",&EditorSampleImportDialog::_import);
- ObjectTypeDB::bind_method("_browse",&EditorSampleImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorSampleImportDialog::_browse_target);
+ ClassDB::bind_method("_choose_files",&EditorSampleImportDialog::_choose_files);
+ ClassDB::bind_method("_choose_save_dir",&EditorSampleImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import",&EditorSampleImportDialog::_import);
+ ClassDB::bind_method("_browse",&EditorSampleImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorSampleImportDialog::_browse_target);
// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
}
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.h b/tools/editor/io_plugins/editor_sample_import_plugin.h
index 8c17a8cb6b..915ca3883c 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.h
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.h
@@ -37,7 +37,7 @@ class EditorSampleImportDialog;
class EditorSampleImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorSampleImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorSampleImportPlugin,EditorImportPlugin);
EditorSampleImportDialog *dialog;
void _compress_ima_adpcm(const Vector<float>& p_data,DVector<uint8_t>& dst_data);
@@ -59,7 +59,7 @@ public:
class EditorSampleExportPlugin : public EditorExportPlugin {
- OBJ_TYPE( EditorSampleExportPlugin, EditorExportPlugin);
+ GDCLASS( EditorSampleExportPlugin, EditorExportPlugin);
public:
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index de75bd41a2..972076f106 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -82,7 +82,7 @@ EditorScenePostImport::EditorScenePostImport() {
class EditorImportAnimationOptions : public VBoxContainer {
- OBJ_TYPE( EditorImportAnimationOptions, VBoxContainer );
+ GDCLASS( EditorImportAnimationOptions, VBoxContainer );
@@ -147,7 +147,7 @@ public:
class EditorSceneImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorSceneImportDialog,ConfirmationDialog);
+ GDCLASS(EditorSceneImportDialog,ConfirmationDialog);
struct FlagInfo {
@@ -374,10 +374,10 @@ void EditorImportAnimationOptions::_item_edited() {
void EditorImportAnimationOptions::_bind_methods() {
- ObjectTypeDB::bind_method("_changed",&EditorImportAnimationOptions::_changed);
- ObjectTypeDB::bind_method("_item_edited",&EditorImportAnimationOptions::_item_edited);
- ObjectTypeDB::bind_method("_button_action",&EditorImportAnimationOptions::_button_action);
-// ObjectTypeDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp);
+ ClassDB::bind_method("_changed",&EditorImportAnimationOptions::_changed);
+ ClassDB::bind_method("_item_edited",&EditorImportAnimationOptions::_item_edited);
+ ClassDB::bind_method("_button_action",&EditorImportAnimationOptions::_button_action);
+// ClassDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp);
ADD_SIGNAL(MethodInfo("changed"));
}
@@ -1058,19 +1058,19 @@ void EditorSceneImportDialog::_set_root_type() {
void EditorSceneImportDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_choose_file",&EditorSceneImportDialog::_choose_file);
- ObjectTypeDB::bind_method("_choose_save_file",&EditorSceneImportDialog::_choose_save_file);
- ObjectTypeDB::bind_method("_choose_script",&EditorSceneImportDialog::_choose_script);
- ObjectTypeDB::bind_method("_import",&EditorSceneImportDialog::_import,DEFVAL(false));
- ObjectTypeDB::bind_method("_browse",&EditorSceneImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorSceneImportDialog::_browse_target);
- ObjectTypeDB::bind_method("_browse_script",&EditorSceneImportDialog::_browse_script);
- ObjectTypeDB::bind_method("_dialog_hid",&EditorSceneImportDialog::_dialog_hid);
- ObjectTypeDB::bind_method("_import_confirm",&EditorSceneImportDialog::_import_confirm);
- ObjectTypeDB::bind_method("_open_and_import",&EditorSceneImportDialog::_open_and_import);
- ObjectTypeDB::bind_method("_root_default_pressed",&EditorSceneImportDialog::_root_default_pressed);
- ObjectTypeDB::bind_method("_root_type_pressed",&EditorSceneImportDialog::_root_type_pressed);
- ObjectTypeDB::bind_method("_set_root_type",&EditorSceneImportDialog::_set_root_type);
+ ClassDB::bind_method("_choose_file",&EditorSceneImportDialog::_choose_file);
+ ClassDB::bind_method("_choose_save_file",&EditorSceneImportDialog::_choose_save_file);
+ ClassDB::bind_method("_choose_script",&EditorSceneImportDialog::_choose_script);
+ ClassDB::bind_method("_import",&EditorSceneImportDialog::_import,DEFVAL(false));
+ ClassDB::bind_method("_browse",&EditorSceneImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorSceneImportDialog::_browse_target);
+ ClassDB::bind_method("_browse_script",&EditorSceneImportDialog::_browse_script);
+ ClassDB::bind_method("_dialog_hid",&EditorSceneImportDialog::_dialog_hid);
+ ClassDB::bind_method("_import_confirm",&EditorSceneImportDialog::_import_confirm);
+ ClassDB::bind_method("_open_and_import",&EditorSceneImportDialog::_open_and_import);
+ ClassDB::bind_method("_root_default_pressed",&EditorSceneImportDialog::_root_default_pressed);
+ ClassDB::bind_method("_root_type_pressed",&EditorSceneImportDialog::_root_type_pressed);
+ ClassDB::bind_method("_set_root_type",&EditorSceneImportDialog::_set_root_type);
ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
@@ -1394,7 +1394,7 @@ void EditorSceneImportPlugin::_find_resources(const Variant& p_var, Map<Ref<Imag
Ref<Resource> res = p_var;
if (res.is_valid()) {
- if (res->is_type("Texture") && !image_map.has(res)) {
+ if (res->is_class("Texture") && !image_map.has(res)) {
image_map.insert(res,TEXTURE_ROLE_DEFAULT);
@@ -2189,7 +2189,7 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from
if (from->has_option("root_type")) {
String type = from->get_option("root_type");
- Object *base = ObjectTypeDB::instance(type);
+ Object *base = ClassDB::instance(type);
Node *base_node = NULL;
if (base)
base_node=base->cast_to<Node>();
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.h b/tools/editor/io_plugins/editor_scene_import_plugin.h
index 820e9ce6dd..61153e3654 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.h
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.h
@@ -51,7 +51,7 @@ class EditorSceneImportDialog;
class EditorSceneImporter : public Reference {
- OBJ_TYPE(EditorSceneImporter,Reference );
+ GDCLASS(EditorSceneImporter,Reference );
public:
enum ImportFlags {
@@ -83,7 +83,7 @@ public:
class EditorScenePostImport : public Reference {
- OBJ_TYPE(EditorScenePostImport,Reference );
+ GDCLASS(EditorScenePostImport,Reference );
protected:
static void _bind_methods();
@@ -96,7 +96,7 @@ public:
class EditorSceneImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorSceneImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorSceneImportPlugin,EditorImportPlugin);
EditorSceneImportDialog *dialog;
@@ -174,7 +174,7 @@ public:
class EditorSceneAnimationImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorSceneAnimationImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorSceneAnimationImportPlugin,EditorImportPlugin);
public:
diff --git a/tools/editor/io_plugins/editor_scene_importer_fbxconv.h b/tools/editor/io_plugins/editor_scene_importer_fbxconv.h
index e3ed1dcafe..1bf96ba0e5 100644
--- a/tools/editor/io_plugins/editor_scene_importer_fbxconv.h
+++ b/tools/editor/io_plugins/editor_scene_importer_fbxconv.h
@@ -36,7 +36,7 @@
class EditorSceneImporterFBXConv : public EditorSceneImporter {
- OBJ_TYPE(EditorSceneImporterFBXConv,EditorSceneImporter );
+ GDCLASS(EditorSceneImporterFBXConv,EditorSceneImporter );
struct BoneInfo {
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
index 39ac5ecb16..99ba208226 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -148,8 +148,8 @@ void EditorImportTextureOptions::_changed() {
void EditorImportTextureOptions::_bind_methods() {
- ObjectTypeDB::bind_method("_changed",&EditorImportTextureOptions::_changed);
- ObjectTypeDB::bind_method("_changedp",&EditorImportTextureOptions::_changedp);
+ ClassDB::bind_method("_changed",&EditorImportTextureOptions::_changed);
+ ClassDB::bind_method("_changedp",&EditorImportTextureOptions::_changedp);
ADD_SIGNAL(MethodInfo("changed"));
}
@@ -236,7 +236,7 @@ EditorImportTextureOptions::EditorImportTextureOptions() {
class EditorTextureImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorTextureImportDialog,ConfirmationDialog);
+ GDCLASS(EditorTextureImportDialog,ConfirmationDialog);
@@ -636,13 +636,13 @@ void EditorTextureImportDialog::_mode_changed(int p_mode) {
void EditorTextureImportDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_choose_files",&EditorTextureImportDialog::_choose_files);
- ObjectTypeDB::bind_method("_choose_file",&EditorTextureImportDialog::_choose_file);
- ObjectTypeDB::bind_method("_choose_save_dir",&EditorTextureImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import",&EditorTextureImportDialog::_import);
- ObjectTypeDB::bind_method("_browse",&EditorTextureImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorTextureImportDialog::_browse_target);
- ObjectTypeDB::bind_method("_mode_changed",&EditorTextureImportDialog::_mode_changed);
+ ClassDB::bind_method("_choose_files",&EditorTextureImportDialog::_choose_files);
+ ClassDB::bind_method("_choose_file",&EditorTextureImportDialog::_choose_file);
+ ClassDB::bind_method("_choose_save_dir",&EditorTextureImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import",&EditorTextureImportDialog::_import);
+ ClassDB::bind_method("_browse",&EditorTextureImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorTextureImportDialog::_browse_target);
+ ClassDB::bind_method("_mode_changed",&EditorTextureImportDialog::_mode_changed);
// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
}
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.h b/tools/editor/io_plugins/editor_texture_import_plugin.h
index 3e20efde34..b2117f1475 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.h
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.h
@@ -49,7 +49,7 @@ class EditorTextureImportDialog;
class EditorTextureImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorTextureImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorTextureImportPlugin,EditorImportPlugin);
public:
@@ -119,7 +119,7 @@ public:
class EditorTextureExportPlugin : public EditorExportPlugin {
- OBJ_TYPE( EditorTextureExportPlugin, EditorExportPlugin);
+ GDCLASS( EditorTextureExportPlugin, EditorExportPlugin);
public:
@@ -130,7 +130,7 @@ public:
class EditorImportTextureOptions : public VBoxContainer {
- OBJ_TYPE( EditorImportTextureOptions, VBoxContainer );
+ GDCLASS( EditorImportTextureOptions, VBoxContainer );
OptionButton *format;
diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.cpp b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
index 47670e239f..d05bab968d 100644
--- a/tools/editor/io_plugins/editor_translation_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
@@ -41,7 +41,7 @@
class EditorTranslationImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorTranslationImportDialog,ConfirmationDialog);
+ GDCLASS(EditorTranslationImportDialog,ConfirmationDialog);
EditorTranslationImportPlugin *plugin;
@@ -282,11 +282,11 @@ public:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_choose_file",&EditorTranslationImportDialog::_choose_file);
- ObjectTypeDB::bind_method("_choose_save_dir",&EditorTranslationImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import",&EditorTranslationImportDialog::_import);
- ObjectTypeDB::bind_method("_browse",&EditorTranslationImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorTranslationImportDialog::_browse_target);
+ ClassDB::bind_method("_choose_file",&EditorTranslationImportDialog::_choose_file);
+ ClassDB::bind_method("_choose_save_dir",&EditorTranslationImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import",&EditorTranslationImportDialog::_import);
+ ClassDB::bind_method("_browse",&EditorTranslationImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorTranslationImportDialog::_browse_target);
// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
}
diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.h b/tools/editor/io_plugins/editor_translation_import_plugin.h
index 16ad4d6c08..38727bd778 100644
--- a/tools/editor/io_plugins/editor_translation_import_plugin.h
+++ b/tools/editor/io_plugins/editor_translation_import_plugin.h
@@ -37,7 +37,7 @@ class EditorTranslationImportDialog;
class EditorTranslationImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorTranslationImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorTranslationImportPlugin,EditorImportPlugin);
EditorTranslationImportDialog *dialog;
public:
diff --git a/tools/editor/multi_node_edit.h b/tools/editor/multi_node_edit.h
index 170a11221a..290c529d48 100644
--- a/tools/editor/multi_node_edit.h
+++ b/tools/editor/multi_node_edit.h
@@ -33,7 +33,7 @@
class MultiNodeEdit : public Reference {
- OBJ_TYPE(MultiNodeEdit,Reference);
+ GDCLASS(MultiNodeEdit,Reference);
List<NodePath> nodes;
struct PLData {
diff --git a/tools/editor/node_dock.cpp b/tools/editor/node_dock.cpp
index fb5a50e633..a8e66a8680 100644
--- a/tools/editor/node_dock.cpp
+++ b/tools/editor/node_dock.cpp
@@ -20,8 +20,8 @@ void NodeDock::show_connections(){
void NodeDock::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("show_groups"),&NodeDock::show_groups);
- ObjectTypeDB::bind_method(_MD("show_connections"),&NodeDock::show_connections);
+ ClassDB::bind_method(_MD("show_groups"),&NodeDock::show_groups);
+ ClassDB::bind_method(_MD("show_connections"),&NodeDock::show_connections);
}
void NodeDock::_notification(int p_what) {
diff --git a/tools/editor/node_dock.h b/tools/editor/node_dock.h
index 02312b90b5..fd4105d1b2 100644
--- a/tools/editor/node_dock.h
+++ b/tools/editor/node_dock.h
@@ -6,7 +6,7 @@
class NodeDock : public VBoxContainer {
- OBJ_TYPE(NodeDock,VBoxContainer);
+ GDCLASS(NodeDock,VBoxContainer);
ToolButton *connections_button;
ToolButton *groups_button;
diff --git a/tools/editor/output_strings.cpp b/tools/editor/output_strings.cpp
index 9e3455afd0..57d4887492 100644
--- a/tools/editor/output_strings.cpp
+++ b/tools/editor/output_strings.cpp
@@ -194,8 +194,8 @@ void OutputStrings::add_line(const String& p_text, const Variant& p_meta, const
void OutputStrings::_bind_methods() {
- ObjectTypeDB::bind_method("_vscroll_changed",&OutputStrings::_vscroll_changed);
- ObjectTypeDB::bind_method("_hscroll_changed",&OutputStrings::_hscroll_changed);
+ ClassDB::bind_method("_vscroll_changed",&OutputStrings::_vscroll_changed);
+ ClassDB::bind_method("_hscroll_changed",&OutputStrings::_hscroll_changed);
}
OutputStrings::OutputStrings() {
diff --git a/tools/editor/output_strings.h b/tools/editor/output_strings.h
index c1e234eb76..cc721ef652 100644
--- a/tools/editor/output_strings.h
+++ b/tools/editor/output_strings.h
@@ -36,7 +36,7 @@
class OutputStrings : public Control {
- OBJ_TYPE( OutputStrings, Control );
+ GDCLASS( OutputStrings, Control );
public:
enum LineType {
diff --git a/tools/editor/pane_drag.cpp b/tools/editor/pane_drag.cpp
index 95806ebe8b..f328f88b6f 100644
--- a/tools/editor/pane_drag.cpp
+++ b/tools/editor/pane_drag.cpp
@@ -64,7 +64,7 @@ Size2 PaneDrag::get_minimum_size() const {
void PaneDrag::_bind_methods() {
- ObjectTypeDB::bind_method("_input_event",&PaneDrag::_input_event);
+ ClassDB::bind_method("_input_event",&PaneDrag::_input_event);
ADD_SIGNAL(MethodInfo("dragged",PropertyInfo(Variant::VECTOR2,"amount")));
}
diff --git a/tools/editor/pane_drag.h b/tools/editor/pane_drag.h
index 3e8988836f..83b145e2e6 100644
--- a/tools/editor/pane_drag.h
+++ b/tools/editor/pane_drag.h
@@ -33,7 +33,7 @@
class PaneDrag : public Control {
- OBJ_TYPE( PaneDrag, Control );
+ GDCLASS( PaneDrag, Control );
bool mouse_over;
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp
index 18a3e98b2f..ae12ad2a67 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -431,7 +431,7 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource>& p_resource)
String existing;
if (extensions.size()) {
- existing = "new_" + p_resource->get_type().to_lower() + "." + extensions.front()->get().to_lower();
+ existing = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower();
}
file->set_current_path(existing);
@@ -723,7 +723,7 @@ void AnimationPlayerEditor::_dialog_action(String p_file) {
Ref<Resource> res = ResourceLoader::load(p_file, "Animation");
ERR_FAIL_COND(res.is_null());
- ERR_FAIL_COND(!res->is_type("Animation"));
+ ERR_FAIL_COND(!res->is_class("Animation"));
if (p_file.find_last("/") != -1) {
p_file = p_file.substr(p_file.find_last("/") + 1, p_file.length());
@@ -1245,42 +1245,42 @@ void AnimationPlayerEditor::_unhandled_key_input(const InputEvent& p_ev) {
void AnimationPlayerEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&AnimationPlayerEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&AnimationPlayerEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_play_pressed"),&AnimationPlayerEditor::_play_pressed);
- ObjectTypeDB::bind_method(_MD("_play_from_pressed"),&AnimationPlayerEditor::_play_from_pressed);
- ObjectTypeDB::bind_method(_MD("_play_bw_pressed"),&AnimationPlayerEditor::_play_bw_pressed);
- ObjectTypeDB::bind_method(_MD("_play_bw_from_pressed"),&AnimationPlayerEditor::_play_bw_from_pressed);
- ObjectTypeDB::bind_method(_MD("_stop_pressed"),&AnimationPlayerEditor::_stop_pressed);
- ObjectTypeDB::bind_method(_MD("_autoplay_pressed"),&AnimationPlayerEditor::_autoplay_pressed);
- ObjectTypeDB::bind_method(_MD("_pause_pressed"),&AnimationPlayerEditor::_pause_pressed);
- ObjectTypeDB::bind_method(_MD("_animation_selected"),&AnimationPlayerEditor::_animation_selected);
- ObjectTypeDB::bind_method(_MD("_animation_name_edited"),&AnimationPlayerEditor::_animation_name_edited);
- ObjectTypeDB::bind_method(_MD("_animation_new"),&AnimationPlayerEditor::_animation_new);
- ObjectTypeDB::bind_method(_MD("_animation_rename"),&AnimationPlayerEditor::_animation_rename);
- ObjectTypeDB::bind_method(_MD("_animation_load"),&AnimationPlayerEditor::_animation_load);
- ObjectTypeDB::bind_method(_MD("_animation_remove"),&AnimationPlayerEditor::_animation_remove);
- ObjectTypeDB::bind_method(_MD("_animation_blend"),&AnimationPlayerEditor::_animation_blend);
- ObjectTypeDB::bind_method(_MD("_animation_edit"),&AnimationPlayerEditor::_animation_edit);
- ObjectTypeDB::bind_method(_MD("_animation_resource_edit"),&AnimationPlayerEditor::_animation_resource_edit);
- ObjectTypeDB::bind_method(_MD("_dialog_action"),&AnimationPlayerEditor::_dialog_action);
- ObjectTypeDB::bind_method(_MD("_seek_value_changed"),&AnimationPlayerEditor::_seek_value_changed,DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("_animation_player_changed"),&AnimationPlayerEditor::_animation_player_changed);
- ObjectTypeDB::bind_method(_MD("_blend_edited"),&AnimationPlayerEditor::_blend_edited);
-// ObjectTypeDB::bind_method(_MD("_seek_frame_changed"),&AnimationPlayerEditor::_seek_frame_changed);
- ObjectTypeDB::bind_method(_MD("_scale_changed"),&AnimationPlayerEditor::_scale_changed);
- //ObjectTypeDB::bind_method(_MD("_editor_store_all"),&AnimationPlayerEditor::_editor_store_all);
+ ClassDB::bind_method(_MD("_input_event"),&AnimationPlayerEditor::_input_event);
+ ClassDB::bind_method(_MD("_node_removed"),&AnimationPlayerEditor::_node_removed);
+ ClassDB::bind_method(_MD("_play_pressed"),&AnimationPlayerEditor::_play_pressed);
+ ClassDB::bind_method(_MD("_play_from_pressed"),&AnimationPlayerEditor::_play_from_pressed);
+ ClassDB::bind_method(_MD("_play_bw_pressed"),&AnimationPlayerEditor::_play_bw_pressed);
+ ClassDB::bind_method(_MD("_play_bw_from_pressed"),&AnimationPlayerEditor::_play_bw_from_pressed);
+ ClassDB::bind_method(_MD("_stop_pressed"),&AnimationPlayerEditor::_stop_pressed);
+ ClassDB::bind_method(_MD("_autoplay_pressed"),&AnimationPlayerEditor::_autoplay_pressed);
+ ClassDB::bind_method(_MD("_pause_pressed"),&AnimationPlayerEditor::_pause_pressed);
+ ClassDB::bind_method(_MD("_animation_selected"),&AnimationPlayerEditor::_animation_selected);
+ ClassDB::bind_method(_MD("_animation_name_edited"),&AnimationPlayerEditor::_animation_name_edited);
+ ClassDB::bind_method(_MD("_animation_new"),&AnimationPlayerEditor::_animation_new);
+ ClassDB::bind_method(_MD("_animation_rename"),&AnimationPlayerEditor::_animation_rename);
+ ClassDB::bind_method(_MD("_animation_load"),&AnimationPlayerEditor::_animation_load);
+ ClassDB::bind_method(_MD("_animation_remove"),&AnimationPlayerEditor::_animation_remove);
+ ClassDB::bind_method(_MD("_animation_blend"),&AnimationPlayerEditor::_animation_blend);
+ ClassDB::bind_method(_MD("_animation_edit"),&AnimationPlayerEditor::_animation_edit);
+ ClassDB::bind_method(_MD("_animation_resource_edit"),&AnimationPlayerEditor::_animation_resource_edit);
+ ClassDB::bind_method(_MD("_dialog_action"),&AnimationPlayerEditor::_dialog_action);
+ ClassDB::bind_method(_MD("_seek_value_changed"),&AnimationPlayerEditor::_seek_value_changed,DEFVAL(true));
+ ClassDB::bind_method(_MD("_animation_player_changed"),&AnimationPlayerEditor::_animation_player_changed);
+ ClassDB::bind_method(_MD("_blend_edited"),&AnimationPlayerEditor::_blend_edited);
+// ClassDB::bind_method(_MD("_seek_frame_changed"),&AnimationPlayerEditor::_seek_frame_changed);
+ ClassDB::bind_method(_MD("_scale_changed"),&AnimationPlayerEditor::_scale_changed);
+ //ClassDB::bind_method(_MD("_editor_store_all"),&AnimationPlayerEditor::_editor_store_all);
///jectTypeDB::bind_method(_MD("_editor_load_all"),&AnimationPlayerEditor::_editor_load_all);
- ObjectTypeDB::bind_method(_MD("_list_changed"),&AnimationPlayerEditor::_list_changed);
- ObjectTypeDB::bind_method(_MD("_animation_key_editor_seek"),&AnimationPlayerEditor::_animation_key_editor_seek);
- ObjectTypeDB::bind_method(_MD("_animation_key_editor_anim_len_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_len_changed);
- ObjectTypeDB::bind_method(_MD("_animation_key_editor_anim_step_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_step_changed);
- ObjectTypeDB::bind_method(_MD("_hide_anim_editors"),&AnimationPlayerEditor::_hide_anim_editors);
- ObjectTypeDB::bind_method(_MD("_animation_duplicate"),&AnimationPlayerEditor::_animation_duplicate);
- ObjectTypeDB::bind_method(_MD("_blend_editor_next_changed"),&AnimationPlayerEditor::_blend_editor_next_changed);
- ObjectTypeDB::bind_method(_MD("_unhandled_key_input"),&AnimationPlayerEditor::_unhandled_key_input);
- ObjectTypeDB::bind_method(_MD("_animation_tool_menu"),&AnimationPlayerEditor::_animation_tool_menu);
- ObjectTypeDB::bind_method(_MD("_animation_save_menu"), &AnimationPlayerEditor::_animation_save_menu);
+ ClassDB::bind_method(_MD("_list_changed"),&AnimationPlayerEditor::_list_changed);
+ ClassDB::bind_method(_MD("_animation_key_editor_seek"),&AnimationPlayerEditor::_animation_key_editor_seek);
+ ClassDB::bind_method(_MD("_animation_key_editor_anim_len_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_len_changed);
+ ClassDB::bind_method(_MD("_animation_key_editor_anim_step_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_step_changed);
+ ClassDB::bind_method(_MD("_hide_anim_editors"),&AnimationPlayerEditor::_hide_anim_editors);
+ ClassDB::bind_method(_MD("_animation_duplicate"),&AnimationPlayerEditor::_animation_duplicate);
+ ClassDB::bind_method(_MD("_blend_editor_next_changed"),&AnimationPlayerEditor::_blend_editor_next_changed);
+ ClassDB::bind_method(_MD("_unhandled_key_input"),&AnimationPlayerEditor::_unhandled_key_input);
+ ClassDB::bind_method(_MD("_animation_tool_menu"),&AnimationPlayerEditor::_animation_tool_menu);
+ ClassDB::bind_method(_MD("_animation_save_menu"), &AnimationPlayerEditor::_animation_save_menu);
@@ -1542,7 +1542,7 @@ void AnimationPlayerEditorPlugin::edit(Object *p_object) {
bool AnimationPlayerEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("AnimationPlayer");
+ return p_object->is_class("AnimationPlayer");
}
void AnimationPlayerEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/animation_player_editor_plugin.h b/tools/editor/plugins/animation_player_editor_plugin.h
index ecd0c65cb7..dc37c77701 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.h
+++ b/tools/editor/plugins/animation_player_editor_plugin.h
@@ -44,7 +44,7 @@
class AnimationKeyEditor;
class AnimationPlayerEditor : public VBoxContainer {
- OBJ_TYPE(AnimationPlayerEditor, VBoxContainer );
+ GDCLASS(AnimationPlayerEditor, VBoxContainer );
EditorNode *editor;
AnimationPlayer *player;
@@ -193,7 +193,7 @@ public:
class AnimationPlayerEditorPlugin : public EditorPlugin {
- OBJ_TYPE( AnimationPlayerEditorPlugin, EditorPlugin );
+ GDCLASS( AnimationPlayerEditorPlugin, EditorPlugin );
AnimationPlayerEditor *anim_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp
index 3c25bf4596..18753b6383 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp
@@ -1323,23 +1323,23 @@ void AnimationTreeEditor::_edit_filters() {
void AnimationTreeEditor::_bind_methods() {
- ObjectTypeDB::bind_method( "_add_menu_item", &AnimationTreeEditor::_add_menu_item );
- ObjectTypeDB::bind_method( "_node_menu_item", &AnimationTreeEditor::_node_menu_item );
- ObjectTypeDB::bind_method( "_input_event", &AnimationTreeEditor::_input_event );
-// ObjectTypeDB::bind_method( "_node_param_changed", &AnimationTreeEditor::_node_param_changed );
- ObjectTypeDB::bind_method( "_scroll_moved", &AnimationTreeEditor::_scroll_moved );
- ObjectTypeDB::bind_method( "_edit_dialog_changeds", &AnimationTreeEditor::_edit_dialog_changeds );
- ObjectTypeDB::bind_method( "_edit_dialog_changede", &AnimationTreeEditor::_edit_dialog_changede );
- ObjectTypeDB::bind_method( "_edit_dialog_changedf", &AnimationTreeEditor::_edit_dialog_changedf );
- ObjectTypeDB::bind_method( "_edit_dialog_changed", &AnimationTreeEditor::_edit_dialog_changed );
- ObjectTypeDB::bind_method( "_edit_dialog_animation_changed", &AnimationTreeEditor::_edit_dialog_animation_changed );
- ObjectTypeDB::bind_method( "_edit_dialog_edit_animation", &AnimationTreeEditor::_edit_dialog_edit_animation );
- ObjectTypeDB::bind_method( "_play_toggled", &AnimationTreeEditor::_play_toggled );
- ObjectTypeDB::bind_method( "_edit_oneshot_start", &AnimationTreeEditor::_edit_oneshot_start );
- ObjectTypeDB::bind_method( "_file_dialog_selected", &AnimationTreeEditor::_file_dialog_selected);
- ObjectTypeDB::bind_method( "_master_anim_menu_item", &AnimationTreeEditor::_master_anim_menu_item);
- ObjectTypeDB::bind_method( "_edit_filters", &AnimationTreeEditor::_edit_filters);
- ObjectTypeDB::bind_method( "_filter_edited", &AnimationTreeEditor::_filter_edited);
+ ClassDB::bind_method( "_add_menu_item", &AnimationTreeEditor::_add_menu_item );
+ ClassDB::bind_method( "_node_menu_item", &AnimationTreeEditor::_node_menu_item );
+ ClassDB::bind_method( "_input_event", &AnimationTreeEditor::_input_event );
+// ClassDB::bind_method( "_node_param_changed", &AnimationTreeEditor::_node_param_changed );
+ ClassDB::bind_method( "_scroll_moved", &AnimationTreeEditor::_scroll_moved );
+ ClassDB::bind_method( "_edit_dialog_changeds", &AnimationTreeEditor::_edit_dialog_changeds );
+ ClassDB::bind_method( "_edit_dialog_changede", &AnimationTreeEditor::_edit_dialog_changede );
+ ClassDB::bind_method( "_edit_dialog_changedf", &AnimationTreeEditor::_edit_dialog_changedf );
+ ClassDB::bind_method( "_edit_dialog_changed", &AnimationTreeEditor::_edit_dialog_changed );
+ ClassDB::bind_method( "_edit_dialog_animation_changed", &AnimationTreeEditor::_edit_dialog_animation_changed );
+ ClassDB::bind_method( "_edit_dialog_edit_animation", &AnimationTreeEditor::_edit_dialog_edit_animation );
+ ClassDB::bind_method( "_play_toggled", &AnimationTreeEditor::_play_toggled );
+ ClassDB::bind_method( "_edit_oneshot_start", &AnimationTreeEditor::_edit_oneshot_start );
+ ClassDB::bind_method( "_file_dialog_selected", &AnimationTreeEditor::_file_dialog_selected);
+ ClassDB::bind_method( "_master_anim_menu_item", &AnimationTreeEditor::_master_anim_menu_item);
+ ClassDB::bind_method( "_edit_filters", &AnimationTreeEditor::_edit_filters);
+ ClassDB::bind_method( "_filter_edited", &AnimationTreeEditor::_filter_edited);
}
@@ -1496,7 +1496,7 @@ void AnimationTreeEditorPlugin::edit(Object *p_object) {
bool AnimationTreeEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("AnimationTreePlayer");
+ return p_object->is_class("AnimationTreePlayer");
}
void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.h b/tools/editor/plugins/animation_tree_editor_plugin.h
index 90cac65504..36c64bfcd5 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.h
+++ b/tools/editor/plugins/animation_tree_editor_plugin.h
@@ -42,7 +42,7 @@
class AnimationTreeEditor : public Control {
- OBJ_TYPE(AnimationTreeEditor, Control );
+ GDCLASS(AnimationTreeEditor, Control );
static const char* _node_type_names[];
@@ -172,7 +172,7 @@ public:
class AnimationTreeEditorPlugin : public EditorPlugin {
- OBJ_TYPE( AnimationTreeEditorPlugin, EditorPlugin );
+ GDCLASS( AnimationTreeEditorPlugin, EditorPlugin );
AnimationTreeEditor *anim_tree_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp
index 0b576a2d2c..e6d969c399 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.cpp
+++ b/tools/editor/plugins/baked_light_editor_plugin.cpp
@@ -283,10 +283,10 @@ void BakedLightEditor::_bake_lightmaps() {
void BakedLightEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&BakedLightEditor::_menu_option);
- ObjectTypeDB::bind_method("_bake_pressed",&BakedLightEditor::_bake_pressed);
- ObjectTypeDB::bind_method("_clear_pressed",&BakedLightEditor::_clear_pressed);
- ObjectTypeDB::bind_method("_bake_lightmaps",&BakedLightEditor::_bake_lightmaps);
+ ClassDB::bind_method("_menu_option",&BakedLightEditor::_menu_option);
+ ClassDB::bind_method("_bake_pressed",&BakedLightEditor::_bake_pressed);
+ ClassDB::bind_method("_clear_pressed",&BakedLightEditor::_clear_pressed);
+ ClassDB::bind_method("_bake_lightmaps",&BakedLightEditor::_bake_lightmaps);
}
BakedLightEditor::BakedLightEditor() {
diff --git a/tools/editor/plugins/baked_light_editor_plugin.h b/tools/editor/plugins/baked_light_editor_plugin.h
index 64f3295b48..82310dc07e 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.h
+++ b/tools/editor/plugins/baked_light_editor_plugin.h
@@ -46,7 +46,7 @@ class MeshInstance;
class BakedLightEditor : public Control {
- OBJ_TYPE(BakedLightEditor, Control );
+ GDCLASS(BakedLightEditor, Control );
float update_timeout;
@@ -97,7 +97,7 @@ public:
class BakedLightEditorPlugin : public EditorPlugin {
- OBJ_TYPE( BakedLightEditorPlugin, EditorPlugin );
+ GDCLASS( BakedLightEditorPlugin, EditorPlugin );
BakedLightEditor *baked_light_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/camera_editor_plugin.cpp b/tools/editor/plugins/camera_editor_plugin.cpp
index 0881bfd912..67f776ba0b 100644
--- a/tools/editor/plugins/camera_editor_plugin.cpp
+++ b/tools/editor/plugins/camera_editor_plugin.cpp
@@ -61,7 +61,7 @@ void CameraEditor::_pressed() {
void CameraEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_pressed"),&CameraEditor::_pressed);
+ ClassDB::bind_method(_MD("_pressed"),&CameraEditor::_pressed);
}
@@ -108,7 +108,7 @@ void CameraEditorPlugin::edit(Object *p_object) {
bool CameraEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Camera");
+ return p_object->is_class("Camera");
}
void CameraEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/camera_editor_plugin.h b/tools/editor/plugins/camera_editor_plugin.h
index e968028a34..56702f174b 100644
--- a/tools/editor/plugins/camera_editor_plugin.h
+++ b/tools/editor/plugins/camera_editor_plugin.h
@@ -39,7 +39,7 @@
class CameraEditor : public Control {
- OBJ_TYPE(CameraEditor, Control );
+ GDCLASS(CameraEditor, Control );
Panel *panel;
Button * preview;
@@ -58,7 +58,7 @@ public:
class CameraEditorPlugin : public EditorPlugin {
- OBJ_TYPE( CameraEditorPlugin, EditorPlugin );
+ GDCLASS( CameraEditorPlugin, EditorPlugin );
// CameraEditor *camera_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index a5e388ea90..dda7fedf76 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -55,7 +55,7 @@
class SnapDialog : public ConfirmationDialog {
- OBJ_TYPE(SnapDialog,ConfirmationDialog);
+ GDCLASS(SnapDialog,ConfirmationDialog);
friend class CanvasItemEditor;
@@ -1040,7 +1040,7 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton& b) {
if (item->has_meta("_editor_icon"))
icon=item->get_meta("_editor_icon");
else
- icon=get_icon( has_icon(item->get_type(),"EditorIcons")?item->get_type():String("Object"),"EditorIcons");
+ icon=get_icon( has_icon(item->get_class(),"EditorIcons")?item->get_class():String("Object"),"EditorIcons");
String node_path="/"+root_name+"/"+root_path.rel_path_to(item->get_path());
@@ -1048,7 +1048,7 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton& b) {
selection_menu->set_item_icon(i, icon );
selection_menu->set_item_metadata(i, node_path);
selection_menu->set_item_tooltip(i,String(item->get_name())+
- "\nType: "+item->get_type()+"\nPath: "+node_path);
+ "\nType: "+item->get_class()+"\nPath: "+node_path);
}
additive_selection=b.mod.shift;
@@ -1519,7 +1519,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
Node* n = c;
- while ((n && n != scene && n->get_owner() != scene) || (n && !n->is_type("CanvasItem"))) {
+ while ((n && n != scene && n->get_owner() != scene) || (n && !n->is_class("CanvasItem"))) {
n = n->get_parent();
};
c = n->cast_to<CanvasItem>();
@@ -3199,20 +3199,20 @@ void CanvasItemEditor::_focus_selection(int p_op) {
void CanvasItemEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_node_removed",&CanvasItemEditor::_node_removed);
- ObjectTypeDB::bind_method("_update_scroll",&CanvasItemEditor::_update_scroll);
- ObjectTypeDB::bind_method("_popup_callback",&CanvasItemEditor::_popup_callback);
- ObjectTypeDB::bind_method("_visibility_changed",&CanvasItemEditor::_visibility_changed);
- ObjectTypeDB::bind_method("_dialog_value_changed",&CanvasItemEditor::_dialog_value_changed);
- ObjectTypeDB::bind_method("_get_editor_data",&CanvasItemEditor::_get_editor_data);
- ObjectTypeDB::bind_method("_tool_select",&CanvasItemEditor::_tool_select);
- ObjectTypeDB::bind_method("_keying_changed",&CanvasItemEditor::_keying_changed);
- ObjectTypeDB::bind_method("_unhandled_key_input",&CanvasItemEditor::_unhandled_key_input);
- ObjectTypeDB::bind_method("_viewport_draw",&CanvasItemEditor::_viewport_draw);
- ObjectTypeDB::bind_method("_viewport_input_event",&CanvasItemEditor::_viewport_input_event);
- ObjectTypeDB::bind_method("_snap_changed",&CanvasItemEditor::_snap_changed);
- ObjectTypeDB::bind_method(_MD("_selection_result_pressed"),&CanvasItemEditor::_selection_result_pressed);
- ObjectTypeDB::bind_method(_MD("_selection_menu_hide"),&CanvasItemEditor::_selection_menu_hide);
+ ClassDB::bind_method("_node_removed",&CanvasItemEditor::_node_removed);
+ ClassDB::bind_method("_update_scroll",&CanvasItemEditor::_update_scroll);
+ ClassDB::bind_method("_popup_callback",&CanvasItemEditor::_popup_callback);
+ ClassDB::bind_method("_visibility_changed",&CanvasItemEditor::_visibility_changed);
+ ClassDB::bind_method("_dialog_value_changed",&CanvasItemEditor::_dialog_value_changed);
+ ClassDB::bind_method("_get_editor_data",&CanvasItemEditor::_get_editor_data);
+ ClassDB::bind_method("_tool_select",&CanvasItemEditor::_tool_select);
+ ClassDB::bind_method("_keying_changed",&CanvasItemEditor::_keying_changed);
+ ClassDB::bind_method("_unhandled_key_input",&CanvasItemEditor::_unhandled_key_input);
+ ClassDB::bind_method("_viewport_draw",&CanvasItemEditor::_viewport_draw);
+ ClassDB::bind_method("_viewport_input_event",&CanvasItemEditor::_viewport_input_event);
+ ClassDB::bind_method("_snap_changed",&CanvasItemEditor::_snap_changed);
+ ClassDB::bind_method(_MD("_selection_result_pressed"),&CanvasItemEditor::_selection_result_pressed);
+ ClassDB::bind_method(_MD("_selection_menu_hide"),&CanvasItemEditor::_selection_menu_hide);
ADD_SIGNAL( MethodInfo("item_lock_status_changed") );
ADD_SIGNAL( MethodInfo("item_group_status_changed") );
@@ -3611,7 +3611,7 @@ void CanvasItemEditorPlugin::edit(Object *p_object) {
bool CanvasItemEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("CanvasItem");
+ return p_object->is_class("CanvasItem");
}
void CanvasItemEditorPlugin::make_visible(bool p_visible) {
@@ -3683,7 +3683,7 @@ void CanvasItemEditorViewport::_create_preview(const Vector<String>& files) cons
for (int i=0;i<files.size();i++) {
String path=files[i];
RES res=ResourceLoader::load(path);
- String type=res->get_type();
+ String type=res->get_class();
if (type=="ImageTexture" || type=="PackedScene") {
if (type=="ImageTexture") {
Ref<ImageTexture> texture=Ref<ImageTexture> ( ResourceCache::get(path)->cast_to<ImageTexture>() );
@@ -3746,7 +3746,7 @@ void CanvasItemEditorViewport::_create_nodes(Node* parent, Node* child, String&
String new_name=parent->validate_child_name(child);
ScriptEditorDebugger *sed=ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed,"live_debug_create_node",editor->get_edited_scene()->get_path_to(parent),child->get_type(),new_name);
+ editor_data->get_undo_redo().add_do_method(sed,"live_debug_create_node",editor->get_edited_scene()->get_path_to(parent),child->get_class(),new_name);
editor_data->get_undo_redo().add_undo_method(sed,"live_debug_remove_node",NodePath(String(editor->get_edited_scene()->get_path_to(parent))+"/"+new_name));
// handle with different property for texture
@@ -3851,7 +3851,7 @@ void CanvasItemEditorViewport::_perform_drop_data(){
if (res.is_null()) {
continue;
}
- String type=res->get_type();
+ String type=res->get_class();
if (type=="ImageTexture") {
Node* child;
if (default_type=="Light2D") child=memnew(Light2D);
@@ -3896,7 +3896,7 @@ bool CanvasItemEditorViewport::can_drop_data(const Point2& p_point,const Variant
if (res.is_null()) {
continue;
}
- String type=res->get_type();
+ String type=res->get_class();
if (type=="PackedScene") {
Ref<PackedScene> sdata=ResourceLoader::load(files[i]);
Node* instanced_scene=sdata->instance(true);
@@ -3978,9 +3978,9 @@ void CanvasItemEditorViewport::_notification(int p_what) {
}
void CanvasItemEditorViewport::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_on_select_type"),&CanvasItemEditorViewport::_on_select_type);
- ObjectTypeDB::bind_method(_MD("_on_change_type"),&CanvasItemEditorViewport::_on_change_type);
- ObjectTypeDB::bind_method(_MD("_on_mouse_exit"),&CanvasItemEditorViewport::_on_mouse_exit);
+ ClassDB::bind_method(_MD("_on_select_type"),&CanvasItemEditorViewport::_on_select_type);
+ ClassDB::bind_method(_MD("_on_change_type"),&CanvasItemEditorViewport::_on_change_type);
+ ClassDB::bind_method(_MD("_on_mouse_exit"),&CanvasItemEditorViewport::_on_mouse_exit);
}
CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasItemEditor* p_canvas) {
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.h b/tools/editor/plugins/canvas_item_editor_plugin.h
index 00eba68b7e..de6d0c088f 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.h
+++ b/tools/editor/plugins/canvas_item_editor_plugin.h
@@ -46,7 +46,7 @@ class CanvasItemEditorViewport;
class CanvasItemEditorSelectedItem : public Object {
- OBJ_TYPE(CanvasItemEditorSelectedItem,Object);
+ GDCLASS(CanvasItemEditorSelectedItem,Object);
public:
Variant undo_state;
Vector2 undo_pivot;
@@ -60,7 +60,7 @@ public:
class CanvasItemEditor : public VBoxContainer {
- OBJ_TYPE(CanvasItemEditor, VBoxContainer );
+ GDCLASS(CanvasItemEditor, VBoxContainer );
EditorNode *editor;
@@ -431,7 +431,7 @@ public:
class CanvasItemEditorPlugin : public EditorPlugin {
- OBJ_TYPE( CanvasItemEditorPlugin, EditorPlugin );
+ GDCLASS( CanvasItemEditorPlugin, EditorPlugin );
CanvasItemEditor *canvas_item_editor;
EditorNode *editor;
@@ -455,7 +455,7 @@ public:
};
class CanvasItemEditorViewport : public VBoxContainer {
- OBJ_TYPE( CanvasItemEditorViewport, VBoxContainer );
+ GDCLASS( CanvasItemEditorViewport, VBoxContainer );
String default_type;
Vector<String> types;
diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index 9c3f27162b..0f82f8eefc 100644
--- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -398,9 +398,9 @@ void CollisionPolygon2DEditor::edit(Node *p_collision_polygon) {
void CollisionPolygon2DEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&CollisionPolygon2DEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&CollisionPolygon2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&CollisionPolygon2DEditor::_node_removed);
+ ClassDB::bind_method(_MD("_menu_option"),&CollisionPolygon2DEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&CollisionPolygon2DEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_node_removed"),&CollisionPolygon2DEditor::_node_removed);
}
@@ -448,7 +448,7 @@ void CollisionPolygon2DEditorPlugin::edit(Object *p_object) {
bool CollisionPolygon2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("CollisionPolygon2D");
+ return p_object->is_class("CollisionPolygon2D");
}
void CollisionPolygon2DEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.h b/tools/editor/plugins/collision_polygon_2d_editor_plugin.h
index 65d3ef4605..5230867515 100644
--- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.h
+++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.h
@@ -43,7 +43,7 @@ class CanvasItemEditor;
class CollisionPolygon2DEditor : public HBoxContainer {
- OBJ_TYPE(CollisionPolygon2DEditor, HBoxContainer );
+ GDCLASS(CollisionPolygon2DEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -88,7 +88,7 @@ public:
class CollisionPolygon2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( CollisionPolygon2DEditorPlugin, EditorPlugin );
+ GDCLASS( CollisionPolygon2DEditorPlugin, EditorPlugin );
CollisionPolygon2DEditor *collision_polygon_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
index bdd1e325b5..8420f04eef 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -529,9 +529,9 @@ void CollisionPolygonEditor::edit(Node *p_collision_polygon) {
void CollisionPolygonEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&CollisionPolygonEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_polygon_draw"),&CollisionPolygonEditor::_polygon_draw);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&CollisionPolygonEditor::_node_removed);
+ ClassDB::bind_method(_MD("_menu_option"),&CollisionPolygonEditor::_menu_option);
+ ClassDB::bind_method(_MD("_polygon_draw"),&CollisionPolygonEditor::_polygon_draw);
+ ClassDB::bind_method(_MD("_node_removed"),&CollisionPolygonEditor::_node_removed);
}
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.h b/tools/editor/plugins/collision_polygon_editor_plugin.h
index 43a9f0b5fc..2434a24cc8 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.h
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.h
@@ -46,7 +46,7 @@ class CanvasItemEditor;
class CollisionPolygonEditor : public HBoxContainer {
- OBJ_TYPE(CollisionPolygonEditor, HBoxContainer );
+ GDCLASS(CollisionPolygonEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -100,7 +100,7 @@ public:
class CollisionPolygonEditorPlugin : public EditorPlugin {
- OBJ_TYPE( CollisionPolygonEditorPlugin, EditorPlugin );
+ GDCLASS( CollisionPolygonEditorPlugin, EditorPlugin );
CollisionPolygonEditor *collision_polygon_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 6787aeba0f..3761ab6185 100644
--- a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -555,8 +555,8 @@ void CollisionShape2DEditor::edit(Node* p_node) {
void CollisionShape2DEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_canvas_draw",&CollisionShape2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method("_get_current_shape_type",&CollisionShape2DEditor::_get_current_shape_type);
+ ClassDB::bind_method("_canvas_draw",&CollisionShape2DEditor::_canvas_draw);
+ ClassDB::bind_method("_get_current_shape_type",&CollisionShape2DEditor::_get_current_shape_type);
}
CollisionShape2DEditor::CollisionShape2DEditor(EditorNode* p_editor) {
@@ -578,7 +578,7 @@ void CollisionShape2DEditorPlugin::edit(Object* p_obj) {
bool CollisionShape2DEditorPlugin::handles(Object* p_obj) const {
- return p_obj->is_type("CollisionShape2D");
+ return p_obj->is_class("CollisionShape2D");
}
void CollisionShape2DEditorPlugin::make_visible(bool visible) {
diff --git a/tools/editor/plugins/collision_shape_2d_editor_plugin.h b/tools/editor/plugins/collision_shape_2d_editor_plugin.h
index 3dca5e6cab..2ea7ae9535 100644
--- a/tools/editor/plugins/collision_shape_2d_editor_plugin.h
+++ b/tools/editor/plugins/collision_shape_2d_editor_plugin.h
@@ -37,7 +37,7 @@
class CanvasItemEditor;
class CollisionShape2DEditor : public Control {
- OBJ_TYPE(CollisionShape2DEditor, Control);
+ GDCLASS(CollisionShape2DEditor, Control);
enum ShapeType {
CAPSULE_SHAPE,
@@ -80,7 +80,7 @@ public:
};
class CollisionShape2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE(CollisionShape2DEditorPlugin, EditorPlugin);
+ GDCLASS(CollisionShape2DEditorPlugin, EditorPlugin);
CollisionShape2DEditor* collision_shape_2d_editor;
EditorNode* editor;
diff --git a/tools/editor/plugins/color_ramp_editor_plugin.cpp b/tools/editor/plugins/color_ramp_editor_plugin.cpp
index ad0ed7cef0..09bed1c2d0 100644
--- a/tools/editor/plugins/color_ramp_editor_plugin.cpp
+++ b/tools/editor/plugins/color_ramp_editor_plugin.cpp
@@ -54,7 +54,7 @@ void ColorRampEditorPlugin::edit(Object *p_object) {
bool ColorRampEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("ColorRamp");
+ return p_object->is_class("ColorRamp");
}
@@ -106,6 +106,6 @@ ColorRampEditorPlugin::~ColorRampEditorPlugin(){
}
void ColorRampEditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("ramp_changed"),&ColorRampEditorPlugin::_ramp_changed);
- ObjectTypeDB::bind_method(_MD("undo_redo_color_ramp","offsets","colors"),&ColorRampEditorPlugin::_undo_redo_color_ramp);
+ ClassDB::bind_method(_MD("ramp_changed"),&ColorRampEditorPlugin::_ramp_changed);
+ ClassDB::bind_method(_MD("undo_redo_color_ramp","offsets","colors"),&ColorRampEditorPlugin::_undo_redo_color_ramp);
}
diff --git a/tools/editor/plugins/color_ramp_editor_plugin.h b/tools/editor/plugins/color_ramp_editor_plugin.h
index 64e073086a..2f55ad65f1 100644
--- a/tools/editor/plugins/color_ramp_editor_plugin.h
+++ b/tools/editor/plugins/color_ramp_editor_plugin.h
@@ -35,7 +35,7 @@
class ColorRampEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ColorRampEditorPlugin, EditorPlugin );
+ GDCLASS( ColorRampEditorPlugin, EditorPlugin );
bool _2d;
Ref<ColorRamp> color_ramp_ref;
diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
index c18f611a49..0c2ec15367 100644
--- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
+++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
@@ -276,9 +276,9 @@ void MeshLibraryEditor::_menu_cbk(int p_option) {
void MeshLibraryEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_cbk",&MeshLibraryEditor::_menu_cbk);
- ObjectTypeDB::bind_method("_menu_confirm",&MeshLibraryEditor::_menu_confirm);
- ObjectTypeDB::bind_method("_import_scene_cbk",&MeshLibraryEditor::_import_scene_cbk);
+ ClassDB::bind_method("_menu_cbk",&MeshLibraryEditor::_menu_cbk);
+ ClassDB::bind_method("_menu_confirm",&MeshLibraryEditor::_menu_confirm);
+ ClassDB::bind_method("_import_scene_cbk",&MeshLibraryEditor::_import_scene_cbk);
}
MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.h b/tools/editor/plugins/cube_grid_theme_editor_plugin.h
index d50e3156c3..f32f601023 100644
--- a/tools/editor/plugins/cube_grid_theme_editor_plugin.h
+++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.h
@@ -35,7 +35,7 @@
#if 0
class MeshLibraryEditor : public Control {
- OBJ_TYPE( MeshLibraryEditor, Control );
+ GDCLASS( MeshLibraryEditor, Control );
Ref<MeshLibrary> theme;
@@ -74,7 +74,7 @@ public:
class MeshLibraryEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MeshLibraryEditorPlugin, EditorPlugin );
+ GDCLASS( MeshLibraryEditorPlugin, EditorPlugin );
MeshLibraryEditor *theme_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/editor_preview_plugins.cpp b/tools/editor/plugins/editor_preview_plugins.cpp
index 0886edb073..fbda0776b0 100644
--- a/tools/editor/plugins/editor_preview_plugins.cpp
+++ b/tools/editor/plugins/editor_preview_plugins.cpp
@@ -40,7 +40,7 @@
#if 0
bool EditorTexturePreviewPlugin::handles(const String& p_type) const {
- return (ObjectTypeDB::is_type(p_type,"ImageTexture") || ObjectTypeDB::is_type(p_type, "AtlasTexture"));
+ return (ClassDB::is_type(p_type,"ImageTexture") || ClassDB::is_type(p_type, "AtlasTexture"));
}
Ref<Texture> EditorTexturePreviewPlugin::generate(const RES& p_from) {
@@ -107,7 +107,7 @@ EditorTexturePreviewPlugin::EditorTexturePreviewPlugin() {
bool EditorBitmapPreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"BitMap");
+ return ClassDB::is_type(p_type,"BitMap");
}
Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES& p_from) {
@@ -214,7 +214,7 @@ Ref<Texture> EditorPackedScenePreviewPlugin::_gen_from_imd(Ref<ResourceImportMet
bool EditorPackedScenePreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"PackedScene");
+ return ClassDB::is_type(p_type,"PackedScene");
}
Ref<Texture> EditorPackedScenePreviewPlugin::generate(const RES& p_from) {
@@ -236,7 +236,7 @@ EditorPackedScenePreviewPlugin::EditorPackedScenePreviewPlugin() {
bool EditorMaterialPreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Material"); //any material
+ return ClassDB::is_type(p_type,"Material"); //any material
}
Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES& p_from) {
@@ -405,7 +405,7 @@ static bool _is_text_char(CharType c) {
bool EditorScriptPreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Script");
+ return ClassDB::is_type(p_type,"Script");
}
Ref<Texture> EditorScriptPreviewPlugin::generate(const RES& p_from) {
@@ -524,7 +524,7 @@ EditorScriptPreviewPlugin::EditorScriptPreviewPlugin() {
bool EditorSamplePreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Sample");
+ return ClassDB::is_type(p_type,"Sample");
}
Ref<Texture> EditorSamplePreviewPlugin::generate(const RES& p_from) {
@@ -793,7 +793,7 @@ EditorSamplePreviewPlugin::EditorSamplePreviewPlugin() {
bool EditorMeshPreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Mesh"); //any Mesh
+ return ClassDB::is_type(p_type,"Mesh"); //any Mesh
}
Ref<Texture> EditorMeshPreviewPlugin::generate(const RES& p_from) {
diff --git a/tools/editor/plugins/gi_probe_editor_plugin.cpp b/tools/editor/plugins/gi_probe_editor_plugin.cpp
index 4ec95eb8c6..f550b7972a 100644
--- a/tools/editor/plugins/gi_probe_editor_plugin.cpp
+++ b/tools/editor/plugins/gi_probe_editor_plugin.cpp
@@ -20,7 +20,7 @@ void GIProbeEditorPlugin::edit(Object *p_object) {
bool GIProbeEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("GIProbe");
+ return p_object->is_class("GIProbe");
}
void GIProbeEditorPlugin::make_visible(bool p_visible) {
@@ -36,7 +36,7 @@ void GIProbeEditorPlugin::make_visible(bool p_visible) {
void GIProbeEditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method("_bake",&GIProbeEditorPlugin::_bake);
+ ClassDB::bind_method("_bake",&GIProbeEditorPlugin::_bake);
}
GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
diff --git a/tools/editor/plugins/gi_probe_editor_plugin.h b/tools/editor/plugins/gi_probe_editor_plugin.h
index 7db91bebaf..8d2ec17d2f 100644
--- a/tools/editor/plugins/gi_probe_editor_plugin.h
+++ b/tools/editor/plugins/gi_probe_editor_plugin.h
@@ -10,7 +10,7 @@
class GIProbeEditorPlugin : public EditorPlugin {
- OBJ_TYPE( GIProbeEditorPlugin, EditorPlugin );
+ GDCLASS( GIProbeEditorPlugin, EditorPlugin );
GIProbe *gi_probe;
diff --git a/tools/editor/plugins/item_list_editor_plugin.cpp b/tools/editor/plugins/item_list_editor_plugin.cpp
index ea29e9ef07..d519ce43ca 100644
--- a/tools/editor/plugins/item_list_editor_plugin.cpp
+++ b/tools/editor/plugins/item_list_editor_plugin.cpp
@@ -119,7 +119,7 @@ void ItemListOptionButtonPlugin::set_object(Object *p_object) {
bool ItemListOptionButtonPlugin::handles(Object *p_object) const {
- return p_object->is_type("OptionButton");
+ return p_object->is_class("OptionButton");
}
int ItemListOptionButtonPlugin::get_flags() const {
@@ -153,7 +153,7 @@ ItemListOptionButtonPlugin::ItemListOptionButtonPlugin() {
void ItemListPopupMenuPlugin::set_object(Object *p_object) {
- if (p_object->is_type("MenuButton"))
+ if (p_object->is_class("MenuButton"))
pp = p_object->cast_to<MenuButton>()->get_popup();
else
pp = p_object->cast_to<PopupMenu>();
@@ -161,7 +161,7 @@ void ItemListPopupMenuPlugin::set_object(Object *p_object) {
bool ItemListPopupMenuPlugin::handles(Object *p_object) const {
- return p_object->is_type("PopupMenu") || p_object->is_type("MenuButton");
+ return p_object->is_class("PopupMenu") || p_object->is_class("MenuButton");
}
int ItemListPopupMenuPlugin::get_flags() const {
@@ -260,8 +260,8 @@ void ItemListEditor::edit(Node *p_item_list) {
item_plugins[i]->set_object(p_item_list);
property_editor->edit(item_plugins[i]);
- if (has_icon(item_list->get_type(), "EditorIcons"))
- toolbar_button->set_icon(get_icon(item_list->get_type(), "EditorIcons"));
+ if (has_icon(item_list->get_class(), "EditorIcons"))
+ toolbar_button->set_icon(get_icon(item_list->get_class(), "EditorIcons"));
else
toolbar_button->set_icon(Ref<Texture>());
@@ -287,9 +287,9 @@ bool ItemListEditor::handles(Object *p_object) const {
void ItemListEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_edit_items",&ItemListEditor::_edit_items);
- ObjectTypeDB::bind_method("_add_button",&ItemListEditor::_add_pressed);
- ObjectTypeDB::bind_method("_delete_button",&ItemListEditor::_delete_pressed);
+ ClassDB::bind_method("_edit_items",&ItemListEditor::_edit_items);
+ ClassDB::bind_method("_add_button",&ItemListEditor::_add_pressed);
+ ClassDB::bind_method("_delete_button",&ItemListEditor::_delete_pressed);
}
ItemListEditor::ItemListEditor() {
diff --git a/tools/editor/plugins/item_list_editor_plugin.h b/tools/editor/plugins/item_list_editor_plugin.h
index 559a295101..74700d615e 100644
--- a/tools/editor/plugins/item_list_editor_plugin.h
+++ b/tools/editor/plugins/item_list_editor_plugin.h
@@ -44,7 +44,7 @@
class ItemListPlugin : public Object {
- OBJ_TYPE(ItemListPlugin,Object);
+ GDCLASS(ItemListPlugin,Object);
protected:
@@ -100,7 +100,7 @@ public:
class ItemListOptionButtonPlugin : public ItemListPlugin {
- OBJ_TYPE(ItemListOptionButtonPlugin,ItemListPlugin);
+ GDCLASS(ItemListOptionButtonPlugin,ItemListPlugin);
OptionButton *ob;
public:
@@ -130,7 +130,7 @@ public:
class ItemListPopupMenuPlugin : public ItemListPlugin {
- OBJ_TYPE(ItemListPopupMenuPlugin,ItemListPlugin);
+ GDCLASS(ItemListPopupMenuPlugin,ItemListPlugin);
PopupMenu *pp;
public:
@@ -171,7 +171,7 @@ public:
class ItemListEditor : public HBoxContainer {
- OBJ_TYPE(ItemListEditor,HBoxContainer);
+ GDCLASS(ItemListEditor,HBoxContainer);
Node *item_list;
@@ -209,7 +209,7 @@ public:
class ItemListEditorPlugin : public EditorPlugin {
- OBJ_TYPE(ItemListEditorPlugin,EditorPlugin);
+ GDCLASS(ItemListEditorPlugin,EditorPlugin);
ItemListEditor *item_list_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp
index 5367a1c9ef..b468c1da7b 100644
--- a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -427,10 +427,10 @@ void LightOccluder2DEditor::_create_poly() {
void LightOccluder2DEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&LightOccluder2DEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&LightOccluder2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&LightOccluder2DEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_create_poly"),&LightOccluder2DEditor::_create_poly);
+ ClassDB::bind_method(_MD("_menu_option"),&LightOccluder2DEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&LightOccluder2DEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_node_removed"),&LightOccluder2DEditor::_node_removed);
+ ClassDB::bind_method(_MD("_create_poly"),&LightOccluder2DEditor::_create_poly);
}
@@ -484,7 +484,7 @@ void LightOccluder2DEditorPlugin::edit(Object *p_object) {
bool LightOccluder2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("LightOccluder2D");
+ return p_object->is_class("LightOccluder2D");
}
void LightOccluder2DEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.h b/tools/editor/plugins/light_occluder_2d_editor_plugin.h
index 4e229618d0..c5c692dbc7 100644
--- a/tools/editor/plugins/light_occluder_2d_editor_plugin.h
+++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.h
@@ -44,7 +44,7 @@ class CanvasItemEditor;
class LightOccluder2DEditor : public HBoxContainer {
- OBJ_TYPE(LightOccluder2DEditor, HBoxContainer );
+ GDCLASS(LightOccluder2DEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -92,7 +92,7 @@ public:
class LightOccluder2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( LightOccluder2DEditorPlugin, EditorPlugin );
+ GDCLASS( LightOccluder2DEditorPlugin, EditorPlugin );
LightOccluder2DEditor *collision_polygon_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/material_editor_plugin.cpp b/tools/editor/plugins/material_editor_plugin.cpp
index 1036016194..9c279fa967 100644
--- a/tools/editor/plugins/material_editor_plugin.cpp
+++ b/tools/editor/plugins/material_editor_plugin.cpp
@@ -93,8 +93,8 @@ void MaterialEditor::_button_pressed(Node* p_button) {
void MaterialEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&MaterialEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_button_pressed"),&MaterialEditor::_button_pressed);
+ ClassDB::bind_method(_MD("_input_event"),&MaterialEditor::_input_event);
+ ClassDB::bind_method(_MD("_button_pressed"),&MaterialEditor::_button_pressed);
}
diff --git a/tools/editor/plugins/material_editor_plugin.h b/tools/editor/plugins/material_editor_plugin.h
index 68b3b3b1a7..ebdbda9683 100644
--- a/tools/editor/plugins/material_editor_plugin.h
+++ b/tools/editor/plugins/material_editor_plugin.h
@@ -11,7 +11,7 @@
#if 0
class MaterialEditor : public Control {
- OBJ_TYPE(MaterialEditor, Control);
+ GDCLASS(MaterialEditor, Control);
Viewport *viewport;
@@ -50,7 +50,7 @@ public:
class MaterialEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MaterialEditorPlugin, EditorPlugin );
+ GDCLASS( MaterialEditorPlugin, EditorPlugin );
MaterialEditor *material_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp
index 6574bb8e1a..785efebfc8 100644
--- a/tools/editor/plugins/mesh_editor_plugin.cpp
+++ b/tools/editor/plugins/mesh_editor_plugin.cpp
@@ -136,8 +136,8 @@ void MeshEditor::_button_pressed(Node* p_button) {
void MeshEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&MeshEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_button_pressed"),&MeshEditor::_button_pressed);
+ ClassDB::bind_method(_MD("_input_event"),&MeshEditor::_input_event);
+ ClassDB::bind_method(_MD("_button_pressed"),&MeshEditor::_button_pressed);
}
diff --git a/tools/editor/plugins/mesh_editor_plugin.h b/tools/editor/plugins/mesh_editor_plugin.h
index cd52c5c05c..dc1ae98245 100644
--- a/tools/editor/plugins/mesh_editor_plugin.h
+++ b/tools/editor/plugins/mesh_editor_plugin.h
@@ -40,7 +40,7 @@
class MeshEditor : public Control {
- OBJ_TYPE(MeshEditor, Control);
+ GDCLASS(MeshEditor, Control);
@@ -76,7 +76,7 @@ public:
class MeshEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MeshEditorPlugin, EditorPlugin );
+ GDCLASS( MeshEditorPlugin, EditorPlugin );
MeshEditor *mesh_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/mesh_instance_editor_plugin.cpp b/tools/editor/plugins/mesh_instance_editor_plugin.cpp
index c952feb1da..acf1a3c96a 100644
--- a/tools/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/tools/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -218,8 +218,8 @@ void MeshInstanceEditor::_create_outline_mesh() {
void MeshInstanceEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&MeshInstanceEditor::_menu_option);
- ObjectTypeDB::bind_method("_create_outline_mesh",&MeshInstanceEditor::_create_outline_mesh);
+ ClassDB::bind_method("_menu_option",&MeshInstanceEditor::_menu_option);
+ ClassDB::bind_method("_create_outline_mesh",&MeshInstanceEditor::_create_outline_mesh);
}
MeshInstanceEditor::MeshInstanceEditor() {
@@ -274,7 +274,7 @@ void MeshInstanceEditorPlugin::edit(Object *p_object) {
bool MeshInstanceEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("MeshInstance");
+ return p_object->is_class("MeshInstance");
}
void MeshInstanceEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/mesh_instance_editor_plugin.h b/tools/editor/plugins/mesh_instance_editor_plugin.h
index a698cf382f..23dcbfc9b1 100644
--- a/tools/editor/plugins/mesh_instance_editor_plugin.h
+++ b/tools/editor/plugins/mesh_instance_editor_plugin.h
@@ -10,7 +10,7 @@
class MeshInstanceEditor : public Node {
- OBJ_TYPE(MeshInstanceEditor, Node );
+ GDCLASS(MeshInstanceEditor, Node );
enum Menu {
@@ -48,7 +48,7 @@ public:
class MeshInstanceEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MeshInstanceEditorPlugin, EditorPlugin );
+ GDCLASS( MeshInstanceEditorPlugin, EditorPlugin );
MeshInstanceEditor *mesh_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp
index c0f5f6491d..22981a2877 100644
--- a/tools/editor/plugins/multimesh_editor_plugin.cpp
+++ b/tools/editor/plugins/multimesh_editor_plugin.cpp
@@ -317,10 +317,10 @@ void MultiMeshEditor::_browse(bool p_source) {
void MultiMeshEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&MultiMeshEditor::_menu_option);
- ObjectTypeDB::bind_method("_populate",&MultiMeshEditor::_populate);
- ObjectTypeDB::bind_method("_browsed",&MultiMeshEditor::_browsed);
- ObjectTypeDB::bind_method("_browse",&MultiMeshEditor::_browse);
+ ClassDB::bind_method("_menu_option",&MultiMeshEditor::_menu_option);
+ ClassDB::bind_method("_populate",&MultiMeshEditor::_populate);
+ ClassDB::bind_method("_browsed",&MultiMeshEditor::_browsed);
+ ClassDB::bind_method("_browse",&MultiMeshEditor::_browse);
}
MultiMeshEditor::MultiMeshEditor() {
@@ -431,7 +431,7 @@ void MultiMeshEditorPlugin::edit(Object *p_object) {
bool MultiMeshEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("MultiMeshInstance");
+ return p_object->is_class("MultiMeshInstance");
}
void MultiMeshEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/multimesh_editor_plugin.h b/tools/editor/plugins/multimesh_editor_plugin.h
index c7fa2fc1ad..e322850238 100644
--- a/tools/editor/plugins/multimesh_editor_plugin.h
+++ b/tools/editor/plugins/multimesh_editor_plugin.h
@@ -40,7 +40,7 @@
class MultiMeshEditor : public Control {
- OBJ_TYPE(MultiMeshEditor, Control );
+ GDCLASS(MultiMeshEditor, Control );
friend class MultiMeshEditorPlugin;
@@ -86,7 +86,7 @@ public:
class MultiMeshEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MultiMeshEditorPlugin, EditorPlugin );
+ GDCLASS( MultiMeshEditorPlugin, EditorPlugin );
MultiMeshEditor *multimesh_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
index c395868ef4..031fca0b7b 100644
--- a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -477,10 +477,10 @@ void NavigationPolygonEditor::edit(Node *p_collision_polygon) {
void NavigationPolygonEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&NavigationPolygonEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&NavigationPolygonEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&NavigationPolygonEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_create_nav"),&NavigationPolygonEditor::_create_nav);
+ ClassDB::bind_method(_MD("_menu_option"),&NavigationPolygonEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&NavigationPolygonEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_node_removed"),&NavigationPolygonEditor::_node_removed);
+ ClassDB::bind_method(_MD("_create_nav"),&NavigationPolygonEditor::_create_nav);
}
@@ -532,7 +532,7 @@ void NavigationPolygonEditorPlugin::edit(Object *p_object) {
bool NavigationPolygonEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("NavigationPolygonInstance");
+ return p_object->is_class("NavigationPolygonInstance");
}
void NavigationPolygonEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.h b/tools/editor/plugins/navigation_polygon_editor_plugin.h
index 11f5321230..50ba0cfedb 100644
--- a/tools/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/tools/editor/plugins/navigation_polygon_editor_plugin.h
@@ -44,7 +44,7 @@ class CanvasItemEditor;
class NavigationPolygonEditor : public HBoxContainer {
- OBJ_TYPE(NavigationPolygonEditor, HBoxContainer );
+ GDCLASS(NavigationPolygonEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -94,7 +94,7 @@ public:
class NavigationPolygonEditorPlugin : public EditorPlugin {
- OBJ_TYPE( NavigationPolygonEditorPlugin, EditorPlugin );
+ GDCLASS( NavigationPolygonEditorPlugin, EditorPlugin );
NavigationPolygonEditor *collision_polygon_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/particles_2d_editor_plugin.cpp b/tools/editor/plugins/particles_2d_editor_plugin.cpp
index 5ba46dc802..9a6c3d4458 100644
--- a/tools/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_2d_editor_plugin.cpp
@@ -43,7 +43,7 @@ void Particles2DEditorPlugin::edit(Object *p_object) {
bool Particles2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Particles2D");
+ return p_object->is_class("Particles2D");
}
void Particles2DEditorPlugin::make_visible(bool p_visible) {
@@ -152,8 +152,8 @@ void Particles2DEditorPlugin::_notification(int p_what) {
void Particles2DEditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_callback"),&Particles2DEditorPlugin::_menu_callback);
- ObjectTypeDB::bind_method(_MD("_file_selected"),&Particles2DEditorPlugin::_file_selected);
+ ClassDB::bind_method(_MD("_menu_callback"),&Particles2DEditorPlugin::_menu_callback);
+ ClassDB::bind_method(_MD("_file_selected"),&Particles2DEditorPlugin::_file_selected);
}
diff --git a/tools/editor/plugins/particles_2d_editor_plugin.h b/tools/editor/plugins/particles_2d_editor_plugin.h
index 01b44c492b..c532a5fe73 100644
--- a/tools/editor/plugins/particles_2d_editor_plugin.h
+++ b/tools/editor/plugins/particles_2d_editor_plugin.h
@@ -39,7 +39,7 @@
class Particles2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( Particles2DEditorPlugin, EditorPlugin );
+ GDCLASS( Particles2DEditorPlugin, EditorPlugin );
enum {
diff --git a/tools/editor/plugins/particles_editor_plugin.cpp b/tools/editor/plugins/particles_editor_plugin.cpp
index b17867ffd9..4f4477070b 100644
--- a/tools/editor/plugins/particles_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_editor_plugin.cpp
@@ -332,12 +332,12 @@ void ParticlesEditor::_generate_emission_points() {
void ParticlesEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&ParticlesEditor::_menu_option);
- ObjectTypeDB::bind_method("_resource_seleted",&ParticlesEditor::_resource_seleted);
- ObjectTypeDB::bind_method("_node_selected",&ParticlesEditor::_node_selected);
- ObjectTypeDB::bind_method("_generate_emission_points",&ParticlesEditor::_generate_emission_points);
+ ClassDB::bind_method("_menu_option",&ParticlesEditor::_menu_option);
+ ClassDB::bind_method("_resource_seleted",&ParticlesEditor::_resource_seleted);
+ ClassDB::bind_method("_node_selected",&ParticlesEditor::_node_selected);
+ ClassDB::bind_method("_generate_emission_points",&ParticlesEditor::_generate_emission_points);
- //ObjectTypeDB::bind_method("_populate",&ParticlesEditor::_populate);
+ //ClassDB::bind_method("_populate",&ParticlesEditor::_populate);
}
diff --git a/tools/editor/plugins/particles_editor_plugin.h b/tools/editor/plugins/particles_editor_plugin.h
index 0dd759bc75..fa4ca3b9ec 100644
--- a/tools/editor/plugins/particles_editor_plugin.h
+++ b/tools/editor/plugins/particles_editor_plugin.h
@@ -40,7 +40,7 @@
#if 0
class ParticlesEditor : public Control {
- OBJ_TYPE(ParticlesEditor, Control );
+ GDCLASS(ParticlesEditor, Control );
Panel *panel;
MenuButton *options;
@@ -94,7 +94,7 @@ public:
class ParticlesEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ParticlesEditorPlugin, EditorPlugin );
+ GDCLASS( ParticlesEditorPlugin, EditorPlugin );
ParticlesEditor *particles_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp
index 4b024bf319..2a5dfbdb80 100644
--- a/tools/editor/plugins/path_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/path_2d_editor_plugin.cpp
@@ -550,10 +550,10 @@ void Path2DEditor::edit(Node *p_path2d) {
void Path2DEditor::_bind_methods() {
- //ObjectTypeDB::bind_method(_MD("_menu_option"),&Path2DEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&Path2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_node_visibility_changed"),&Path2DEditor::_node_visibility_changed);
- ObjectTypeDB::bind_method(_MD("_mode_selected"),&Path2DEditor::_mode_selected);
+ //ClassDB::bind_method(_MD("_menu_option"),&Path2DEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&Path2DEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_node_visibility_changed"),&Path2DEditor::_node_visibility_changed);
+ ClassDB::bind_method(_MD("_mode_selected"),&Path2DEditor::_mode_selected);
}
void Path2DEditor::_mode_selected(int p_mode) {
@@ -683,7 +683,7 @@ void Path2DEditorPlugin::edit(Object *p_object) {
bool Path2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Path2D");
+ return p_object->is_class("Path2D");
}
void Path2DEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/path_2d_editor_plugin.h b/tools/editor/plugins/path_2d_editor_plugin.h
index d4b132cedd..d17ecd77db 100644
--- a/tools/editor/plugins/path_2d_editor_plugin.h
+++ b/tools/editor/plugins/path_2d_editor_plugin.h
@@ -42,7 +42,7 @@ class CanvasItemEditor;
class Path2DEditor : public HBoxContainer {
- OBJ_TYPE(Path2DEditor, HBoxContainer);
+ GDCLASS(Path2DEditor, HBoxContainer);
UndoRedo *undo_redo;
@@ -101,7 +101,7 @@ public:
class Path2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( Path2DEditorPlugin, EditorPlugin );
+ GDCLASS( Path2DEditorPlugin, EditorPlugin );
Path2DEditor *path2d_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp
index c4e88d3aa8..4d52549533 100644
--- a/tools/editor/plugins/path_editor_plugin.cpp
+++ b/tools/editor/plugins/path_editor_plugin.cpp
@@ -516,8 +516,8 @@ void PathEditorPlugin::_notification(int p_what) {
void PathEditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_mode_changed"),&PathEditorPlugin::_mode_changed);
- ObjectTypeDB::bind_method(_MD("_close_curve"),&PathEditorPlugin::_close_curve);
+ ClassDB::bind_method(_MD("_mode_changed"),&PathEditorPlugin::_mode_changed);
+ ClassDB::bind_method(_MD("_close_curve"),&PathEditorPlugin::_close_curve);
}
PathEditorPlugin* PathEditorPlugin::singleton=NULL;
diff --git a/tools/editor/plugins/path_editor_plugin.h b/tools/editor/plugins/path_editor_plugin.h
index 55920516a2..14c1bf0df7 100644
--- a/tools/editor/plugins/path_editor_plugin.h
+++ b/tools/editor/plugins/path_editor_plugin.h
@@ -35,7 +35,7 @@
# if 0
class PathSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(PathSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(PathSpatialGizmo,EditorSpatialGizmo);
Path* path;
mutable Vector3 original;
@@ -54,7 +54,7 @@ public:
class PathEditorPlugin : public EditorPlugin {
- OBJ_TYPE( PathEditorPlugin, EditorPlugin );
+ GDCLASS( PathEditorPlugin, EditorPlugin );
Separator *sep;
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
index 6949f0256e..deb3944ad6 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -776,19 +776,19 @@ void Polygon2DEditor::edit(Node *p_collision_polygon) {
void Polygon2DEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&Polygon2DEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&Polygon2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_uv_mode"),&Polygon2DEditor::_uv_mode);
- ObjectTypeDB::bind_method(_MD("_uv_draw"),&Polygon2DEditor::_uv_draw);
- ObjectTypeDB::bind_method(_MD("_uv_input"),&Polygon2DEditor::_uv_input);
- ObjectTypeDB::bind_method(_MD("_uv_scroll_changed"),&Polygon2DEditor::_uv_scroll_changed);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&Polygon2DEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_set_use_snap"),&Polygon2DEditor::_set_use_snap);
- ObjectTypeDB::bind_method(_MD("_set_show_grid"),&Polygon2DEditor::_set_show_grid);
- ObjectTypeDB::bind_method(_MD("_set_snap_off_x"),&Polygon2DEditor::_set_snap_off_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_off_y"),&Polygon2DEditor::_set_snap_off_y);
- ObjectTypeDB::bind_method(_MD("_set_snap_step_x"),&Polygon2DEditor::_set_snap_step_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_step_y"),&Polygon2DEditor::_set_snap_step_y);
+ ClassDB::bind_method(_MD("_menu_option"),&Polygon2DEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&Polygon2DEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_uv_mode"),&Polygon2DEditor::_uv_mode);
+ ClassDB::bind_method(_MD("_uv_draw"),&Polygon2DEditor::_uv_draw);
+ ClassDB::bind_method(_MD("_uv_input"),&Polygon2DEditor::_uv_input);
+ ClassDB::bind_method(_MD("_uv_scroll_changed"),&Polygon2DEditor::_uv_scroll_changed);
+ ClassDB::bind_method(_MD("_node_removed"),&Polygon2DEditor::_node_removed);
+ ClassDB::bind_method(_MD("_set_use_snap"),&Polygon2DEditor::_set_use_snap);
+ ClassDB::bind_method(_MD("_set_show_grid"),&Polygon2DEditor::_set_show_grid);
+ ClassDB::bind_method(_MD("_set_snap_off_x"),&Polygon2DEditor::_set_snap_off_x);
+ ClassDB::bind_method(_MD("_set_snap_off_y"),&Polygon2DEditor::_set_snap_off_y);
+ ClassDB::bind_method(_MD("_set_snap_step_x"),&Polygon2DEditor::_set_snap_step_x);
+ ClassDB::bind_method(_MD("_set_snap_step_y"),&Polygon2DEditor::_set_snap_step_y);
}
@@ -995,7 +995,7 @@ void Polygon2DEditorPlugin::edit(Object *p_object) {
bool Polygon2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Polygon2D");
+ return p_object->is_class("Polygon2D");
}
void Polygon2DEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.h b/tools/editor/plugins/polygon_2d_editor_plugin.h
index 03de6c3d43..a2fd3dc4d0 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.h
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.h
@@ -42,7 +42,7 @@ class CanvasItemEditor;
class Polygon2DEditor : public HBoxContainer {
- OBJ_TYPE(Polygon2DEditor, HBoxContainer );
+ GDCLASS(Polygon2DEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -144,7 +144,7 @@ public:
class Polygon2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( Polygon2DEditorPlugin, EditorPlugin );
+ GDCLASS( Polygon2DEditorPlugin, EditorPlugin );
Polygon2DEditor *collision_polygon_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
index 4aabb5a90c..4ccd2462dd 100644
--- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -179,7 +179,7 @@ void ResourcePreloaderEditor::_paste_pressed() {
if (name=="")
name=r->get_path().get_file();
if (name=="")
- name=r->get_type();
+ name=r->get_class();
String basename = name;
int counter=1;
@@ -248,7 +248,7 @@ void ResourcePreloaderEditor::_update_library() {
ERR_CONTINUE(r.is_null());
ti->set_tooltip(0,r->get_path());
- String type = r->get_type();
+ String type = r->get_class();
ti->set_text(1,type);
ti->set_selectable(1,false);
@@ -381,19 +381,19 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2& p_point,const Variant&
void ResourcePreloaderEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&ResourcePreloaderEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_load_pressed"),&ResourcePreloaderEditor::_load_pressed);
- ObjectTypeDB::bind_method(_MD("_item_edited"),&ResourcePreloaderEditor::_item_edited);
- ObjectTypeDB::bind_method(_MD("_delete_pressed"),&ResourcePreloaderEditor::_delete_pressed);
- ObjectTypeDB::bind_method(_MD("_paste_pressed"),&ResourcePreloaderEditor::_paste_pressed);
- ObjectTypeDB::bind_method(_MD("_delete_confirm_pressed"),&ResourcePreloaderEditor::_delete_confirm_pressed);
- ObjectTypeDB::bind_method(_MD("_files_load_request"),&ResourcePreloaderEditor::_files_load_request);
- ObjectTypeDB::bind_method(_MD("_update_library"),&ResourcePreloaderEditor::_update_library);
+ ClassDB::bind_method(_MD("_input_event"),&ResourcePreloaderEditor::_input_event);
+ ClassDB::bind_method(_MD("_load_pressed"),&ResourcePreloaderEditor::_load_pressed);
+ ClassDB::bind_method(_MD("_item_edited"),&ResourcePreloaderEditor::_item_edited);
+ ClassDB::bind_method(_MD("_delete_pressed"),&ResourcePreloaderEditor::_delete_pressed);
+ ClassDB::bind_method(_MD("_paste_pressed"),&ResourcePreloaderEditor::_paste_pressed);
+ ClassDB::bind_method(_MD("_delete_confirm_pressed"),&ResourcePreloaderEditor::_delete_confirm_pressed);
+ ClassDB::bind_method(_MD("_files_load_request"),&ResourcePreloaderEditor::_files_load_request);
+ ClassDB::bind_method(_MD("_update_library"),&ResourcePreloaderEditor::_update_library);
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &ResourcePreloaderEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &ResourcePreloaderEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &ResourcePreloaderEditor::drop_data_fw);
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &ResourcePreloaderEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &ResourcePreloaderEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &ResourcePreloaderEditor::drop_data_fw);
}
@@ -462,7 +462,7 @@ void ResourcePreloaderEditorPlugin::edit(Object *p_object) {
bool ResourcePreloaderEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("ResourcePreloader");
+ return p_object->is_class("ResourcePreloader");
}
void ResourcePreloaderEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.h b/tools/editor/plugins/resource_preloader_editor_plugin.h
index 8e60976f2e..e7d883d20a 100644
--- a/tools/editor/plugins/resource_preloader_editor_plugin.h
+++ b/tools/editor/plugins/resource_preloader_editor_plugin.h
@@ -40,7 +40,7 @@
class ResourcePreloaderEditor : public PanelContainer {
- OBJ_TYPE(ResourcePreloaderEditor, PanelContainer );
+ GDCLASS(ResourcePreloaderEditor, PanelContainer );
Button *load;
Button *_delete;
@@ -86,7 +86,7 @@ public:
class ResourcePreloaderEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ResourcePreloaderEditorPlugin, EditorPlugin );
+ GDCLASS( ResourcePreloaderEditorPlugin, EditorPlugin );
ResourcePreloaderEditor *preloader_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/rich_text_editor_plugin.cpp b/tools/editor/plugins/rich_text_editor_plugin.cpp
index f5a6bb6b48..0817279068 100644
--- a/tools/editor/plugins/rich_text_editor_plugin.cpp
+++ b/tools/editor/plugins/rich_text_editor_plugin.cpp
@@ -89,8 +89,8 @@ void RichTextEditor::_menu_option(int p_option) {
void RichTextEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&RichTextEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_file_selected"),&RichTextEditor::_file_selected);
+ ClassDB::bind_method(_MD("_menu_option"),&RichTextEditor::_menu_option);
+ ClassDB::bind_method(_MD("_file_selected"),&RichTextEditor::_file_selected);
}
@@ -126,7 +126,7 @@ void RichTextEditorPlugin::edit(Object *p_object) {
bool RichTextEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("RichTextLabel");
+ return p_object->is_class("RichTextLabel");
}
void RichTextEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/rich_text_editor_plugin.h b/tools/editor/plugins/rich_text_editor_plugin.h
index e94e6b08ed..cf97d7517c 100644
--- a/tools/editor/plugins/rich_text_editor_plugin.h
+++ b/tools/editor/plugins/rich_text_editor_plugin.h
@@ -40,7 +40,7 @@
class RichTextEditor : public Control {
- OBJ_TYPE(RichTextEditor, Control );
+ GDCLASS(RichTextEditor, Control );
friend class RichTextEditorPlugin;
@@ -70,7 +70,7 @@ public:
class RichTextEditorPlugin : public EditorPlugin {
- OBJ_TYPE( RichTextEditorPlugin, EditorPlugin );
+ GDCLASS( RichTextEditorPlugin, EditorPlugin );
RichTextEditor *rich_text_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp
index 423e6f6f1f..0130ca41aa 100644
--- a/tools/editor/plugins/sample_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_editor_plugin.cpp
@@ -348,9 +348,9 @@ void SampleEditor::edit(Ref<Sample> p_sample) {
void SampleEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&SampleEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_play_pressed"),&SampleEditor::_play_pressed);
- ObjectTypeDB::bind_method(_MD("_stop_pressed"),&SampleEditor::_stop_pressed);
+ ClassDB::bind_method(_MD("_input_event"),&SampleEditor::_input_event);
+ ClassDB::bind_method(_MD("_play_pressed"),&SampleEditor::_play_pressed);
+ ClassDB::bind_method(_MD("_stop_pressed"),&SampleEditor::_stop_pressed);
}
@@ -415,7 +415,7 @@ void SampleEditorPlugin::edit(Object *p_object) {
bool SampleEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Sample");
+ return p_object->is_class("Sample");
}
void SampleEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/sample_editor_plugin.h b/tools/editor/plugins/sample_editor_plugin.h
index 33f1a54f89..ad6fffc3ef 100644
--- a/tools/editor/plugins/sample_editor_plugin.h
+++ b/tools/editor/plugins/sample_editor_plugin.h
@@ -39,7 +39,7 @@
class SampleEditor : public Panel {
- OBJ_TYPE(SampleEditor, Panel );
+ GDCLASS(SampleEditor, Panel );
SamplePlayer *player;
@@ -69,7 +69,7 @@ public:
class SampleEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SampleEditorPlugin, EditorPlugin );
+ GDCLASS( SampleEditorPlugin, EditorPlugin );
SampleEditor *sample_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index 82321962eb..730c3b69a2 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -411,17 +411,17 @@ void SampleLibraryEditor::drop_data_fw(const Point2& p_point,const Variant& p_da
void SampleLibraryEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&SampleLibraryEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_load_pressed"),&SampleLibraryEditor::_load_pressed);
- ObjectTypeDB::bind_method(_MD("_item_edited"),&SampleLibraryEditor::_item_edited);
- ObjectTypeDB::bind_method(_MD("_delete_pressed"),&SampleLibraryEditor::_delete_pressed);
- ObjectTypeDB::bind_method(_MD("_file_load_request"),&SampleLibraryEditor::_file_load_request);
- ObjectTypeDB::bind_method(_MD("_update_library"),&SampleLibraryEditor::_update_library);
- ObjectTypeDB::bind_method(_MD("_button_pressed"),&SampleLibraryEditor::_button_pressed);
-
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &SampleLibraryEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &SampleLibraryEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &SampleLibraryEditor::drop_data_fw);
+ ClassDB::bind_method(_MD("_input_event"),&SampleLibraryEditor::_input_event);
+ ClassDB::bind_method(_MD("_load_pressed"),&SampleLibraryEditor::_load_pressed);
+ ClassDB::bind_method(_MD("_item_edited"),&SampleLibraryEditor::_item_edited);
+ ClassDB::bind_method(_MD("_delete_pressed"),&SampleLibraryEditor::_delete_pressed);
+ ClassDB::bind_method(_MD("_file_load_request"),&SampleLibraryEditor::_file_load_request);
+ ClassDB::bind_method(_MD("_update_library"),&SampleLibraryEditor::_update_library);
+ ClassDB::bind_method(_MD("_button_pressed"),&SampleLibraryEditor::_button_pressed);
+
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &SampleLibraryEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &SampleLibraryEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &SampleLibraryEditor::drop_data_fw);
}
@@ -497,7 +497,7 @@ void SampleLibraryEditorPlugin::edit(Object *p_object) {
bool SampleLibraryEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("SampleLibrary");
+ return p_object->is_class("SampleLibrary");
}
void SampleLibraryEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/sample_library_editor_plugin.h b/tools/editor/plugins/sample_library_editor_plugin.h
index 415314a9e4..46b216af82 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.h
+++ b/tools/editor/plugins/sample_library_editor_plugin.h
@@ -42,7 +42,7 @@
class SampleLibraryEditor : public Panel {
- OBJ_TYPE(SampleLibraryEditor, Panel );
+ GDCLASS(SampleLibraryEditor, Panel );
@@ -85,7 +85,7 @@ public:
class SampleLibraryEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SampleLibraryEditorPlugin, EditorPlugin );
+ GDCLASS( SampleLibraryEditorPlugin, EditorPlugin );
SampleLibraryEditor *sample_library_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/sample_player_editor_plugin.cpp b/tools/editor/plugins/sample_player_editor_plugin.cpp
index d0873a3cec..ae958a5c6e 100644
--- a/tools/editor/plugins/sample_player_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_player_editor_plugin.cpp
@@ -50,8 +50,8 @@ void SamplePlayerEditor::_node_removed(Node *p_node) {
void SamplePlayerEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_play"),&SamplePlayerEditor::_play);
- ObjectTypeDB::bind_method(_MD("_stop"),&SamplePlayerEditor::_stop);
+ ClassDB::bind_method(_MD("_play"),&SamplePlayerEditor::_play);
+ ClassDB::bind_method(_MD("_stop"),&SamplePlayerEditor::_stop);
}
@@ -153,7 +153,7 @@ void SamplePlayerEditorPlugin::edit(Object *p_object) {
bool SamplePlayerEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("SamplePlayer2D") || p_object->is_type("SamplePlayer") || p_object->is_type("SpatialSamplePlayer");
+ return p_object->is_class("SamplePlayer2D") || p_object->is_class("SamplePlayer") || p_object->is_class("SpatialSamplePlayer");
}
void SamplePlayerEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/sample_player_editor_plugin.h b/tools/editor/plugins/sample_player_editor_plugin.h
index c84a691682..d18496b4fd 100644
--- a/tools/editor/plugins/sample_player_editor_plugin.h
+++ b/tools/editor/plugins/sample_player_editor_plugin.h
@@ -41,7 +41,7 @@
class SamplePlayerEditor : public Control {
- OBJ_TYPE(SamplePlayerEditor, Control );
+ GDCLASS(SamplePlayerEditor, Control );
Panel *panel;
Button * play;
@@ -66,7 +66,7 @@ public:
class SamplePlayerEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SamplePlayerEditorPlugin, EditorPlugin );
+ GDCLASS( SamplePlayerEditorPlugin, EditorPlugin );
SamplePlayerEditor *sample_player_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 6988d8c6f2..c25f8191fe 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -240,9 +240,9 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
void ScriptEditorQuickOpen::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&ScriptEditorQuickOpen::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&ScriptEditorQuickOpen::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&ScriptEditorQuickOpen::_sbox_input);
+ ClassDB::bind_method(_MD("_text_changed"),&ScriptEditorQuickOpen::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&ScriptEditorQuickOpen::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&ScriptEditorQuickOpen::_sbox_input);
ADD_SIGNAL(MethodInfo("goto_line",PropertyInfo(Variant::INT,"line")));
@@ -431,7 +431,7 @@ void ScriptEditor::_go_to_tab(int p_idx) {
}
if (c->cast_to<EditorHelp>()) {
- script_name_label->set_text(c->cast_to<EditorHelp>()->get_class_name());
+ script_name_label->set_text(c->cast_to<EditorHelp>()->get_class());
script_icon->set_texture(get_icon("Help","EditorIcons"));
if (is_visible())
c->cast_to<EditorHelp>()->set_focused();
@@ -605,7 +605,7 @@ void ScriptEditor::_reload_scripts(){
}
- Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_type(),true);
+ Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_class(),true);
ERR_CONTINUE(!rel_script.is_valid());
script->set_source_code( rel_script->get_source_code() );
script->set_last_modified_time( rel_script->get_last_modified_time() );
@@ -798,7 +798,7 @@ void ScriptEditor::_menu_option(int p_option) {
if (tab_container->get_tab_count()>0) {
EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to<EditorHelp>();
if (eh) {
- current=eh->get_class_name();
+ current=eh->get_class();
}
}
@@ -1423,7 +1423,7 @@ void ScriptEditor::_update_script_names() {
EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
if (eh) {
- String name = eh->get_class_name();
+ String name = eh->get_class();
Ref<Texture> icon = get_icon("Help","EditorIcons");
String tooltip = name+" Class Reference";
@@ -1827,7 +1827,7 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
if (eh) {
- helps.push_back(eh->get_class_name());
+ helps.push_back(eh->get_class());
}
@@ -1848,7 +1848,7 @@ void ScriptEditor::_help_class_open(const String& p_class) {
EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
- if (eh && eh->get_class_name()==p_class) {
+ if (eh && eh->get_class()==p_class) {
_go_to_tab(i);
_update_script_names();
@@ -1876,7 +1876,7 @@ void ScriptEditor::_help_class_goto(const String& p_desc) {
EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
- if (eh && eh->get_class_name()==cname) {
+ if (eh && eh->get_class()==cname) {
_go_to_tab(i);
eh->go_to_help(p_desc);
@@ -2029,43 +2029,43 @@ void ScriptEditor::register_create_script_editor_function(CreateScriptEditorFunc
void ScriptEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_file_dialog_action",&ScriptEditor::_file_dialog_action);
- ObjectTypeDB::bind_method("_tab_changed",&ScriptEditor::_tab_changed);
- ObjectTypeDB::bind_method("_menu_option",&ScriptEditor::_menu_option);
- ObjectTypeDB::bind_method("_close_current_tab",&ScriptEditor::_close_current_tab);
- ObjectTypeDB::bind_method("_close_docs_tab", &ScriptEditor::_close_docs_tab);
- ObjectTypeDB::bind_method("_close_all_tabs", &ScriptEditor::_close_all_tabs);
- ObjectTypeDB::bind_method("_editor_play",&ScriptEditor::_editor_play);
- ObjectTypeDB::bind_method("_editor_pause",&ScriptEditor::_editor_pause);
- ObjectTypeDB::bind_method("_editor_stop",&ScriptEditor::_editor_stop);
- ObjectTypeDB::bind_method("_add_callback",&ScriptEditor::_add_callback);
- ObjectTypeDB::bind_method("_reload_scripts",&ScriptEditor::_reload_scripts);
- ObjectTypeDB::bind_method("_resave_scripts",&ScriptEditor::_resave_scripts);
- ObjectTypeDB::bind_method("_res_saved_callback",&ScriptEditor::_res_saved_callback);
- ObjectTypeDB::bind_method("_goto_script_line",&ScriptEditor::_goto_script_line);
- ObjectTypeDB::bind_method("_goto_script_line2",&ScriptEditor::_goto_script_line2);
- ObjectTypeDB::bind_method("_help_search",&ScriptEditor::_help_search);
- ObjectTypeDB::bind_method("_save_history",&ScriptEditor::_save_history);
-
-
-
- ObjectTypeDB::bind_method("_breaked",&ScriptEditor::_breaked);
- ObjectTypeDB::bind_method("_show_debugger",&ScriptEditor::_show_debugger);
- ObjectTypeDB::bind_method("_get_debug_tooltip",&ScriptEditor::_get_debug_tooltip);
- ObjectTypeDB::bind_method("_autosave_scripts",&ScriptEditor::_autosave_scripts);
- ObjectTypeDB::bind_method("_editor_settings_changed",&ScriptEditor::_editor_settings_changed);
- ObjectTypeDB::bind_method("_update_script_names",&ScriptEditor::_update_script_names);
- ObjectTypeDB::bind_method("_tree_changed",&ScriptEditor::_tree_changed);
- ObjectTypeDB::bind_method("_script_selected",&ScriptEditor::_script_selected);
- ObjectTypeDB::bind_method("_script_created",&ScriptEditor::_script_created);
- ObjectTypeDB::bind_method("_script_split_dragged",&ScriptEditor::_script_split_dragged);
- ObjectTypeDB::bind_method("_help_class_open",&ScriptEditor::_help_class_open);
- ObjectTypeDB::bind_method("_help_class_goto",&ScriptEditor::_help_class_goto);
- ObjectTypeDB::bind_method("_request_help",&ScriptEditor::_help_class_open);
- ObjectTypeDB::bind_method("_history_forward",&ScriptEditor::_history_forward);
- ObjectTypeDB::bind_method("_history_back",&ScriptEditor::_history_back);
- ObjectTypeDB::bind_method("_live_auto_reload_running_scripts",&ScriptEditor::_live_auto_reload_running_scripts);
- ObjectTypeDB::bind_method("_unhandled_input",&ScriptEditor::_unhandled_input);
+ ClassDB::bind_method("_file_dialog_action",&ScriptEditor::_file_dialog_action);
+ ClassDB::bind_method("_tab_changed",&ScriptEditor::_tab_changed);
+ ClassDB::bind_method("_menu_option",&ScriptEditor::_menu_option);
+ ClassDB::bind_method("_close_current_tab",&ScriptEditor::_close_current_tab);
+ ClassDB::bind_method("_close_docs_tab", &ScriptEditor::_close_docs_tab);
+ ClassDB::bind_method("_close_all_tabs", &ScriptEditor::_close_all_tabs);
+ ClassDB::bind_method("_editor_play",&ScriptEditor::_editor_play);
+ ClassDB::bind_method("_editor_pause",&ScriptEditor::_editor_pause);
+ ClassDB::bind_method("_editor_stop",&ScriptEditor::_editor_stop);
+ ClassDB::bind_method("_add_callback",&ScriptEditor::_add_callback);
+ ClassDB::bind_method("_reload_scripts",&ScriptEditor::_reload_scripts);
+ ClassDB::bind_method("_resave_scripts",&ScriptEditor::_resave_scripts);
+ ClassDB::bind_method("_res_saved_callback",&ScriptEditor::_res_saved_callback);
+ ClassDB::bind_method("_goto_script_line",&ScriptEditor::_goto_script_line);
+ ClassDB::bind_method("_goto_script_line2",&ScriptEditor::_goto_script_line2);
+ ClassDB::bind_method("_help_search",&ScriptEditor::_help_search);
+ ClassDB::bind_method("_save_history",&ScriptEditor::_save_history);
+
+
+
+ ClassDB::bind_method("_breaked",&ScriptEditor::_breaked);
+ ClassDB::bind_method("_show_debugger",&ScriptEditor::_show_debugger);
+ ClassDB::bind_method("_get_debug_tooltip",&ScriptEditor::_get_debug_tooltip);
+ ClassDB::bind_method("_autosave_scripts",&ScriptEditor::_autosave_scripts);
+ ClassDB::bind_method("_editor_settings_changed",&ScriptEditor::_editor_settings_changed);
+ ClassDB::bind_method("_update_script_names",&ScriptEditor::_update_script_names);
+ ClassDB::bind_method("_tree_changed",&ScriptEditor::_tree_changed);
+ ClassDB::bind_method("_script_selected",&ScriptEditor::_script_selected);
+ ClassDB::bind_method("_script_created",&ScriptEditor::_script_created);
+ ClassDB::bind_method("_script_split_dragged",&ScriptEditor::_script_split_dragged);
+ ClassDB::bind_method("_help_class_open",&ScriptEditor::_help_class_open);
+ ClassDB::bind_method("_help_class_goto",&ScriptEditor::_help_class_goto);
+ ClassDB::bind_method("_request_help",&ScriptEditor::_help_class_open);
+ ClassDB::bind_method("_history_forward",&ScriptEditor::_history_forward);
+ ClassDB::bind_method("_history_back",&ScriptEditor::_history_back);
+ ClassDB::bind_method("_live_auto_reload_running_scripts",&ScriptEditor::_live_auto_reload_running_scripts);
+ ClassDB::bind_method("_unhandled_input",&ScriptEditor::_unhandled_input);
}
@@ -2328,7 +2328,7 @@ bool ScriptEditorPlugin::handles(Object *p_object) const {
return valid;
}
- return p_object->is_type("Script");
+ return p_object->is_class("Script");
}
void ScriptEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/script_editor_plugin.h b/tools/editor/plugins/script_editor_plugin.h
index 310778c2bd..e84c0af9e0 100644
--- a/tools/editor/plugins/script_editor_plugin.h
+++ b/tools/editor/plugins/script_editor_plugin.h
@@ -45,7 +45,7 @@
class ScriptEditorQuickOpen : public ConfirmationDialog {
- OBJ_TYPE(ScriptEditorQuickOpen,ConfirmationDialog )
+ GDCLASS(ScriptEditorQuickOpen,ConfirmationDialog )
LineEdit *search_box;
Tree *search_options;
@@ -77,7 +77,7 @@ class ScriptEditorDebugger;
class ScriptEditorBase : public Control {
- OBJ_TYPE( ScriptEditorBase, Control );
+ GDCLASS( ScriptEditorBase, Control );
protected:
static void _bind_methods();
public:
@@ -118,7 +118,7 @@ class EditorScriptCodeCompletionCache;
class ScriptEditor : public VBoxContainer {
- OBJ_TYPE(ScriptEditor, VBoxContainer );
+ GDCLASS(ScriptEditor, VBoxContainer );
EditorNode *editor;
@@ -343,7 +343,7 @@ public:
class ScriptEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ScriptEditorPlugin, EditorPlugin );
+ GDCLASS( ScriptEditorPlugin, EditorPlugin );
ScriptEditor *script_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp
index 1811b4fa21..63a859a2e4 100644
--- a/tools/editor/plugins/script_text_editor.cpp
+++ b/tools/editor/plugins/script_text_editor.cpp
@@ -154,7 +154,7 @@ void ScriptTextEditor::_load_theme_settings() {
Color type_color= EDITOR_DEF("text_editor/engine_type_color",Color(0.0,0.2,0.4));
List<StringName> types;
- ObjectTypeDB::get_type_list(&types);
+ ClassDB::get_class_list(&types);
for(List<StringName>::Element *E=types.front();E;E=E->next()) {
@@ -332,7 +332,7 @@ String ScriptTextEditor::get_name() {
} else if (script->get_name()!="")
name=script->get_name();
else
- name=script->get_type()+"("+itos(script->get_instance_ID())+")";
+ name=script->get_class()+"("+itos(script->get_instance_ID())+")";
return name;
@@ -340,8 +340,8 @@ String ScriptTextEditor::get_name() {
Ref<Texture> ScriptTextEditor::get_icon() {
- if (get_parent_control() && get_parent_control()->has_icon(script->get_type(),"EditorIcons")) {
- return get_parent_control()->get_icon(script->get_type(),"EditorIcons");
+ if (get_parent_control() && get_parent_control()->has_icon(script->get_class(),"EditorIcons")) {
+ return get_parent_control()->get_icon(script->get_class(),"EditorIcons");
}
return Ref<Texture>();
@@ -465,7 +465,7 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo
if (last_date!=date) {
- Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_type(),true);
+ Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_class(),true);
ERR_CONTINUE(!rel_script.is_valid());
script->set_source_code( rel_script->get_source_code() );
script->set_last_modified_time( rel_script->get_last_modified_time() );
@@ -544,10 +544,10 @@ void ScriptTextEditor::_lookup_symbol(const String& p_symbol,int p_row, int p_co
StringName cname = result.class_name;
bool success;
while(true) {
- ObjectTypeDB::get_integer_constant(cname,result.class_member,&success);
+ ClassDB::get_integer_constant(cname,result.class_member,&success);
if (success) {
result.class_name=cname;
- cname=ObjectTypeDB::type_inherits_from(cname);
+ cname=ClassDB::get_parent_class(cname);
} else {
break;
}
@@ -566,9 +566,9 @@ void ScriptTextEditor::_lookup_symbol(const String& p_symbol,int p_row, int p_co
StringName cname = result.class_name;
while(true) {
- if (ObjectTypeDB::has_method(cname,result.class_member)) {
+ if (ClassDB::has_method(cname,result.class_member)) {
result.class_name=cname;
- cname=ObjectTypeDB::type_inherits_from(cname);
+ cname=ClassDB::get_parent_class(cname);
} else {
break;
}
@@ -973,19 +973,19 @@ void ScriptTextEditor::_edit_option(int p_op) {
void ScriptTextEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_validate_script",&ScriptTextEditor::_validate_script);
- ObjectTypeDB::bind_method("_load_theme_settings",&ScriptTextEditor::_load_theme_settings);
- ObjectTypeDB::bind_method("_breakpoint_toggled",&ScriptTextEditor::_breakpoint_toggled);
- ObjectTypeDB::bind_method("_edit_option",&ScriptTextEditor::_edit_option);
- ObjectTypeDB::bind_method("_goto_line",&ScriptTextEditor::_goto_line);
- ObjectTypeDB::bind_method("_lookup_symbol",&ScriptTextEditor::_lookup_symbol);
- ObjectTypeDB::bind_method("_text_edit_input_event", &ScriptTextEditor::_text_edit_input_event);
- ObjectTypeDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed);
+ ClassDB::bind_method("_validate_script",&ScriptTextEditor::_validate_script);
+ ClassDB::bind_method("_load_theme_settings",&ScriptTextEditor::_load_theme_settings);
+ ClassDB::bind_method("_breakpoint_toggled",&ScriptTextEditor::_breakpoint_toggled);
+ ClassDB::bind_method("_edit_option",&ScriptTextEditor::_edit_option);
+ ClassDB::bind_method("_goto_line",&ScriptTextEditor::_goto_line);
+ ClassDB::bind_method("_lookup_symbol",&ScriptTextEditor::_lookup_symbol);
+ ClassDB::bind_method("_text_edit_input_event", &ScriptTextEditor::_text_edit_input_event);
+ ClassDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed);
- ObjectTypeDB::bind_method("get_drag_data_fw",&ScriptTextEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method("can_drop_data_fw",&ScriptTextEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method("drop_data_fw",&ScriptTextEditor::drop_data_fw);
+ ClassDB::bind_method("get_drag_data_fw",&ScriptTextEditor::get_drag_data_fw);
+ ClassDB::bind_method("can_drop_data_fw",&ScriptTextEditor::can_drop_data_fw);
+ ClassDB::bind_method("drop_data_fw",&ScriptTextEditor::drop_data_fw);
}
diff --git a/tools/editor/plugins/script_text_editor.h b/tools/editor/plugins/script_text_editor.h
index 37bb880dc8..064e8552b8 100644
--- a/tools/editor/plugins/script_text_editor.h
+++ b/tools/editor/plugins/script_text_editor.h
@@ -35,7 +35,7 @@
class ScriptTextEditor : public ScriptEditorBase {
- OBJ_TYPE( ScriptTextEditor, ScriptEditorBase );
+ GDCLASS( ScriptTextEditor, ScriptEditorBase );
CodeTextEditor *code_editor;
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index 789fdcd6b0..f8dfbad744 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -391,12 +391,12 @@ void ShaderEditor::_editor_settings_changed() {
void ShaderEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_editor_settings_changed",&ShaderEditor::_editor_settings_changed);
+ ClassDB::bind_method("_editor_settings_changed",&ShaderEditor::_editor_settings_changed);
- ObjectTypeDB::bind_method("_menu_option",&ShaderEditor::_menu_option);
- ObjectTypeDB::bind_method("_params_changed",&ShaderEditor::_params_changed);
- ObjectTypeDB::bind_method("apply_shaders",&ShaderEditor::apply_shaders);
-// ObjectTypeDB::bind_method("_close_current_tab",&ShaderEditor::_close_current_tab);
+ ClassDB::bind_method("_menu_option",&ShaderEditor::_menu_option);
+ ClassDB::bind_method("_params_changed",&ShaderEditor::_params_changed);
+ ClassDB::bind_method("apply_shaders",&ShaderEditor::apply_shaders);
+// ClassDB::bind_method("_close_current_tab",&ShaderEditor::_close_current_tab);
}
void ShaderEditor::ensure_select_current() {
diff --git a/tools/editor/plugins/shader_editor_plugin.h b/tools/editor/plugins/shader_editor_plugin.h
index c13d4256a1..e94b4d9c25 100644
--- a/tools/editor/plugins/shader_editor_plugin.h
+++ b/tools/editor/plugins/shader_editor_plugin.h
@@ -40,7 +40,7 @@
class ShaderTextEditor : public CodeTextEditor {
- OBJ_TYPE( ShaderTextEditor, CodeTextEditor );
+ GDCLASS( ShaderTextEditor, CodeTextEditor );
Ref<Shader> shader;
@@ -65,7 +65,7 @@ public:
class ShaderEditor : public VBoxContainer {
- OBJ_TYPE(ShaderEditor, VBoxContainer );
+ GDCLASS(ShaderEditor, VBoxContainer );
enum {
@@ -125,7 +125,7 @@ public:
class ShaderEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ShaderEditorPlugin, EditorPlugin );
+ GDCLASS( ShaderEditorPlugin, EditorPlugin );
bool _2d;
ShaderEditor *shader_editor;
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index 0a00e47f37..15906563c7 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp
@@ -296,8 +296,8 @@ Vector<Color> GraphColorRampEdit::get_colors() const{
void GraphColorRampEdit::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("_input_event"),&GraphColorRampEdit::_input_event);
- ObjectTypeDB::bind_method(_MD("_color_changed"),&GraphColorRampEdit::_color_changed);
+ ClassDB::bind_method(_MD("_input_event"),&GraphColorRampEdit::_input_event);
+ ClassDB::bind_method(_MD("_color_changed"),&GraphColorRampEdit::_color_changed);
ADD_SIGNAL(MethodInfo("ramp_changed"));
}
@@ -658,7 +658,7 @@ Vector<Vector2> GraphCurveMapEdit::get_points() const {
void GraphCurveMapEdit::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("_input_event"),&GraphCurveMapEdit::_input_event);
+ ClassDB::bind_method(_MD("_input_event"),&GraphCurveMapEdit::_input_event);
ADD_SIGNAL(MethodInfo("curve_changed"));
}
@@ -2695,49 +2695,49 @@ void ShaderGraphView::add_node(int p_type, const Vector2 &location) {
void ShaderGraphView::_bind_methods() {
- ObjectTypeDB::bind_method("_update_graph",&ShaderGraphView::_update_graph);
- ObjectTypeDB::bind_method("_begin_node_move", &ShaderGraphView::_begin_node_move);
- ObjectTypeDB::bind_method("_node_moved",&ShaderGraphView::_node_moved);
- ObjectTypeDB::bind_method("_end_node_move", &ShaderGraphView::_end_node_move);
- ObjectTypeDB::bind_method("_move_node",&ShaderGraphView::_move_node);
- ObjectTypeDB::bind_method("_node_removed",&ShaderGraphView::_node_removed);
- ObjectTypeDB::bind_method("_connection_request",&ShaderGraphView::_connection_request);
- ObjectTypeDB::bind_method("_disconnection_request",&ShaderGraphView::_disconnection_request);
- ObjectTypeDB::bind_method("_duplicate_nodes_request", &ShaderGraphView::_duplicate_nodes_request);
- ObjectTypeDB::bind_method("_duplicate_nodes", &ShaderGraphView::_duplicate_nodes);
- ObjectTypeDB::bind_method("_delete_nodes_request", &ShaderGraphView::_delete_nodes_request);
-
- ObjectTypeDB::bind_method("_default_changed",&ShaderGraphView::_default_changed);
- ObjectTypeDB::bind_method("_scalar_const_changed",&ShaderGraphView::_scalar_const_changed);
- ObjectTypeDB::bind_method("_vec_const_changed",&ShaderGraphView::_vec_const_changed);
- ObjectTypeDB::bind_method("_rgb_const_changed",&ShaderGraphView::_rgb_const_changed);
- ObjectTypeDB::bind_method("_xform_const_changed",&ShaderGraphView::_xform_const_changed);
- ObjectTypeDB::bind_method("_scalar_op_changed",&ShaderGraphView::_scalar_op_changed);
- ObjectTypeDB::bind_method("_vec_op_changed",&ShaderGraphView::_vec_op_changed);
- ObjectTypeDB::bind_method("_vec_scalar_op_changed",&ShaderGraphView::_vec_scalar_op_changed);
- ObjectTypeDB::bind_method("_rgb_op_changed",&ShaderGraphView::_rgb_op_changed);
- ObjectTypeDB::bind_method("_xform_inv_rev_changed",&ShaderGraphView::_xform_inv_rev_changed);
- ObjectTypeDB::bind_method("_scalar_func_changed",&ShaderGraphView::_scalar_func_changed);
- ObjectTypeDB::bind_method("_vec_func_changed",&ShaderGraphView::_vec_func_changed);
- ObjectTypeDB::bind_method("_scalar_input_changed",&ShaderGraphView::_scalar_input_changed);
- ObjectTypeDB::bind_method("_vec_input_changed",&ShaderGraphView::_vec_input_changed);
- ObjectTypeDB::bind_method("_xform_input_changed",&ShaderGraphView::_xform_input_changed);
- ObjectTypeDB::bind_method("_rgb_input_changed",&ShaderGraphView::_rgb_input_changed);
- ObjectTypeDB::bind_method("_tex_input_change",&ShaderGraphView::_tex_input_change);
- ObjectTypeDB::bind_method("_cube_input_change",&ShaderGraphView::_cube_input_change);
- ObjectTypeDB::bind_method("_input_name_changed",&ShaderGraphView::_input_name_changed);
- ObjectTypeDB::bind_method("_tex_edited",&ShaderGraphView::_tex_edited);
- ObjectTypeDB::bind_method("_variant_edited",&ShaderGraphView::_variant_edited);
- ObjectTypeDB::bind_method("_cube_edited",&ShaderGraphView::_cube_edited);
- ObjectTypeDB::bind_method("_comment_edited",&ShaderGraphView::_comment_edited);
- ObjectTypeDB::bind_method("_color_ramp_changed",&ShaderGraphView::_color_ramp_changed);
- ObjectTypeDB::bind_method("_curve_changed",&ShaderGraphView::_curve_changed);
-
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &ShaderGraphView::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &ShaderGraphView::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &ShaderGraphView::drop_data_fw);
-
- ObjectTypeDB::bind_method("_sg_updated",&ShaderGraphView::_sg_updated);
+ ClassDB::bind_method("_update_graph",&ShaderGraphView::_update_graph);
+ ClassDB::bind_method("_begin_node_move", &ShaderGraphView::_begin_node_move);
+ ClassDB::bind_method("_node_moved",&ShaderGraphView::_node_moved);
+ ClassDB::bind_method("_end_node_move", &ShaderGraphView::_end_node_move);
+ ClassDB::bind_method("_move_node",&ShaderGraphView::_move_node);
+ ClassDB::bind_method("_node_removed",&ShaderGraphView::_node_removed);
+ ClassDB::bind_method("_connection_request",&ShaderGraphView::_connection_request);
+ ClassDB::bind_method("_disconnection_request",&ShaderGraphView::_disconnection_request);
+ ClassDB::bind_method("_duplicate_nodes_request", &ShaderGraphView::_duplicate_nodes_request);
+ ClassDB::bind_method("_duplicate_nodes", &ShaderGraphView::_duplicate_nodes);
+ ClassDB::bind_method("_delete_nodes_request", &ShaderGraphView::_delete_nodes_request);
+
+ ClassDB::bind_method("_default_changed",&ShaderGraphView::_default_changed);
+ ClassDB::bind_method("_scalar_const_changed",&ShaderGraphView::_scalar_const_changed);
+ ClassDB::bind_method("_vec_const_changed",&ShaderGraphView::_vec_const_changed);
+ ClassDB::bind_method("_rgb_const_changed",&ShaderGraphView::_rgb_const_changed);
+ ClassDB::bind_method("_xform_const_changed",&ShaderGraphView::_xform_const_changed);
+ ClassDB::bind_method("_scalar_op_changed",&ShaderGraphView::_scalar_op_changed);
+ ClassDB::bind_method("_vec_op_changed",&ShaderGraphView::_vec_op_changed);
+ ClassDB::bind_method("_vec_scalar_op_changed",&ShaderGraphView::_vec_scalar_op_changed);
+ ClassDB::bind_method("_rgb_op_changed",&ShaderGraphView::_rgb_op_changed);
+ ClassDB::bind_method("_xform_inv_rev_changed",&ShaderGraphView::_xform_inv_rev_changed);
+ ClassDB::bind_method("_scalar_func_changed",&ShaderGraphView::_scalar_func_changed);
+ ClassDB::bind_method("_vec_func_changed",&ShaderGraphView::_vec_func_changed);
+ ClassDB::bind_method("_scalar_input_changed",&ShaderGraphView::_scalar_input_changed);
+ ClassDB::bind_method("_vec_input_changed",&ShaderGraphView::_vec_input_changed);
+ ClassDB::bind_method("_xform_input_changed",&ShaderGraphView::_xform_input_changed);
+ ClassDB::bind_method("_rgb_input_changed",&ShaderGraphView::_rgb_input_changed);
+ ClassDB::bind_method("_tex_input_change",&ShaderGraphView::_tex_input_change);
+ ClassDB::bind_method("_cube_input_change",&ShaderGraphView::_cube_input_change);
+ ClassDB::bind_method("_input_name_changed",&ShaderGraphView::_input_name_changed);
+ ClassDB::bind_method("_tex_edited",&ShaderGraphView::_tex_edited);
+ ClassDB::bind_method("_variant_edited",&ShaderGraphView::_variant_edited);
+ ClassDB::bind_method("_cube_edited",&ShaderGraphView::_cube_edited);
+ ClassDB::bind_method("_comment_edited",&ShaderGraphView::_comment_edited);
+ ClassDB::bind_method("_color_ramp_changed",&ShaderGraphView::_color_ramp_changed);
+ ClassDB::bind_method("_curve_changed",&ShaderGraphView::_curve_changed);
+
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &ShaderGraphView::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &ShaderGraphView::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &ShaderGraphView::drop_data_fw);
+
+ ClassDB::bind_method("_sg_updated",&ShaderGraphView::_sg_updated);
}
ShaderGraphView::ShaderGraphView(ShaderGraph::ShaderType p_type) {
@@ -2815,8 +2815,8 @@ void ShaderGraphEditor::_notification(int p_what) {
void ShaderGraphEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_add_node",&ShaderGraphEditor::_add_node);
- ObjectTypeDB::bind_method("_popup_requested",&ShaderGraphEditor::_popup_requested);
+ ClassDB::bind_method("_add_node",&ShaderGraphEditor::_add_node);
+ ClassDB::bind_method("_popup_requested",&ShaderGraphEditor::_popup_requested);
}
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.h b/tools/editor/plugins/shader_graph_editor_plugin.h
index 7b33e586b5..c9887718f8 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.h
+++ b/tools/editor/plugins/shader_graph_editor_plugin.h
@@ -46,7 +46,7 @@
#if 0
class GraphColorRampEdit : public Control {
- OBJ_TYPE(GraphColorRampEdit,Control);
+ GDCLASS(GraphColorRampEdit,Control);
struct Point {
@@ -85,7 +85,7 @@ public:
class GraphCurveMapEdit : public Control {
- OBJ_TYPE(GraphCurveMapEdit,Control);
+ GDCLASS(GraphCurveMapEdit,Control);
struct Point {
@@ -117,7 +117,7 @@ public:
class ShaderGraphView : public Control {
- OBJ_TYPE(ShaderGraphView,Control);
+ GDCLASS(ShaderGraphView,Control);
@@ -198,7 +198,7 @@ public:
class ShaderGraphEditor : public VBoxContainer {
- OBJ_TYPE(ShaderGraphEditor,VBoxContainer);
+ GDCLASS(ShaderGraphEditor,VBoxContainer);
PopupMenu *popup;
TabContainer *tabs;
@@ -220,7 +220,7 @@ public:
class ShaderGraphEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ShaderGraphEditorPlugin, EditorPlugin );
+ GDCLASS( ShaderGraphEditorPlugin, EditorPlugin );
bool _2d;
ShaderGraphEditor *shader_editor;
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 83e3cb77f3..44d3b63335 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -792,7 +792,7 @@ void SpatialEditorViewport::_list_select(InputEventMouseButton b) {
if (spat->has_meta("_editor_icon"))
icon=spat->get_meta("_editor_icon");
else
- icon=get_icon( has_icon(spat->get_type(),"EditorIcons")?spat->get_type():String("Object"),"EditorIcons");
+ icon=get_icon( has_icon(spat->get_class(),"EditorIcons")?spat->get_class():String("Object"),"EditorIcons");
String node_path="/"+root_name+"/"+root_path.rel_path_to(spat->get_path());
@@ -800,7 +800,7 @@ void SpatialEditorViewport::_list_select(InputEventMouseButton b) {
selection_menu->set_item_icon(i, icon );
selection_menu->set_item_metadata(i, node_path);
selection_menu->set_item_tooltip(i,String(spat->get_name())+
- "\nType: "+spat->get_type()+"\nPath: "+node_path);
+ "\nType: "+spat->get_class()+"\nPath: "+node_path);
}
selection_menu->set_global_pos(Vector2( b.global_x, b.global_y ));
@@ -2296,15 +2296,15 @@ Dictionary SpatialEditorViewport::get_state() const {
void SpatialEditorViewport::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("_draw"),&SpatialEditorViewport::_draw);
- ObjectTypeDB::bind_method(_MD("_smouseenter"),&SpatialEditorViewport::_smouseenter);
- ObjectTypeDB::bind_method(_MD("_sinput"),&SpatialEditorViewport::_sinput);
- ObjectTypeDB::bind_method(_MD("_menu_option"),&SpatialEditorViewport::_menu_option);
- ObjectTypeDB::bind_method(_MD("_toggle_camera_preview"),&SpatialEditorViewport::_toggle_camera_preview);
- ObjectTypeDB::bind_method(_MD("_preview_exited_scene"),&SpatialEditorViewport::_preview_exited_scene);
- ObjectTypeDB::bind_method(_MD("update_transform_gizmo_view"),&SpatialEditorViewport::update_transform_gizmo_view);
- ObjectTypeDB::bind_method(_MD("_selection_result_pressed"),&SpatialEditorViewport::_selection_result_pressed);
- ObjectTypeDB::bind_method(_MD("_selection_menu_hide"),&SpatialEditorViewport::_selection_menu_hide);
+ ClassDB::bind_method(_MD("_draw"),&SpatialEditorViewport::_draw);
+ ClassDB::bind_method(_MD("_smouseenter"),&SpatialEditorViewport::_smouseenter);
+ ClassDB::bind_method(_MD("_sinput"),&SpatialEditorViewport::_sinput);
+ ClassDB::bind_method(_MD("_menu_option"),&SpatialEditorViewport::_menu_option);
+ ClassDB::bind_method(_MD("_toggle_camera_preview"),&SpatialEditorViewport::_toggle_camera_preview);
+ ClassDB::bind_method(_MD("_preview_exited_scene"),&SpatialEditorViewport::_preview_exited_scene);
+ ClassDB::bind_method(_MD("update_transform_gizmo_view"),&SpatialEditorViewport::update_transform_gizmo_view);
+ ClassDB::bind_method(_MD("_selection_result_pressed"),&SpatialEditorViewport::_selection_result_pressed);
+ ClassDB::bind_method(_MD("_selection_menu_hide"),&SpatialEditorViewport::_selection_menu_hide);
ADD_SIGNAL( MethodInfo("toggle_maximize_view", PropertyInfo(Variant::OBJECT, "viewport")) );
}
@@ -3702,17 +3702,17 @@ void SpatialEditor::_node_removed(Node* p_node) {
void SpatialEditor::_bind_methods() {
-// ObjectTypeDB::bind_method("_input_event",&SpatialEditor::_input_event);
- ObjectTypeDB::bind_method("_unhandled_key_input",&SpatialEditor::_unhandled_key_input);
- ObjectTypeDB::bind_method("_node_removed",&SpatialEditor::_node_removed);
- ObjectTypeDB::bind_method("_menu_item_pressed",&SpatialEditor::_menu_item_pressed);
- ObjectTypeDB::bind_method("_xform_dialog_action",&SpatialEditor::_xform_dialog_action);
- ObjectTypeDB::bind_method("_instance_scene",&SpatialEditor::_instance_scene);
- ObjectTypeDB::bind_method("_get_editor_data",&SpatialEditor::_get_editor_data);
- ObjectTypeDB::bind_method("_request_gizmo",&SpatialEditor::_request_gizmo);
- ObjectTypeDB::bind_method("_default_light_angle_input",&SpatialEditor::_default_light_angle_input);
- ObjectTypeDB::bind_method("_update_ambient_light_color",&SpatialEditor::_update_ambient_light_color);
- ObjectTypeDB::bind_method("_toggle_maximize_view",&SpatialEditor::_toggle_maximize_view);
+// ClassDB::bind_method("_input_event",&SpatialEditor::_input_event);
+ ClassDB::bind_method("_unhandled_key_input",&SpatialEditor::_unhandled_key_input);
+ ClassDB::bind_method("_node_removed",&SpatialEditor::_node_removed);
+ ClassDB::bind_method("_menu_item_pressed",&SpatialEditor::_menu_item_pressed);
+ ClassDB::bind_method("_xform_dialog_action",&SpatialEditor::_xform_dialog_action);
+ ClassDB::bind_method("_instance_scene",&SpatialEditor::_instance_scene);
+ ClassDB::bind_method("_get_editor_data",&SpatialEditor::_get_editor_data);
+ ClassDB::bind_method("_request_gizmo",&SpatialEditor::_request_gizmo);
+ ClassDB::bind_method("_default_light_angle_input",&SpatialEditor::_default_light_angle_input);
+ ClassDB::bind_method("_update_ambient_light_color",&SpatialEditor::_update_ambient_light_color);
+ ClassDB::bind_method("_toggle_maximize_view",&SpatialEditor::_toggle_maximize_view);
ADD_SIGNAL( MethodInfo("transform_key_request") );
@@ -4168,7 +4168,7 @@ void SpatialEditorPlugin::edit(Object *p_object) {
bool SpatialEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Spatial");
+ return p_object->is_class("Spatial");
}
Dictionary SpatialEditorPlugin::get_state() const {
@@ -4187,7 +4187,7 @@ void SpatialEditor::snap_cursor_to_plane(const Plane& p_plane) {
void SpatialEditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method("snap_cursor_to_plane",&SpatialEditorPlugin::snap_cursor_to_plane);
+ ClassDB::bind_method("snap_cursor_to_plane",&SpatialEditorPlugin::snap_cursor_to_plane);
}
diff --git a/tools/editor/plugins/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h
index deed5072d4..9ccc6008cb 100644
--- a/tools/editor/plugins/spatial_editor_plugin.h
+++ b/tools/editor/plugins/spatial_editor_plugin.h
@@ -45,7 +45,7 @@ class SpatialEditorGizmos;
class SpatialEditorGizmo : public SpatialGizmo {
- OBJ_TYPE(SpatialEditorGizmo,SpatialGizmo);
+ GDCLASS(SpatialEditorGizmo,SpatialGizmo);
bool selected;
public:
@@ -66,7 +66,7 @@ public:
class SpatialEditorViewport : public Control {
- OBJ_TYPE( SpatialEditorViewport, Control );
+ GDCLASS( SpatialEditorViewport, Control );
friend class SpatialEditor;
enum {
@@ -267,7 +267,7 @@ public:
class SpatialEditorSelectedItem : public Object {
- OBJ_TYPE(SpatialEditorSelectedItem,Object);
+ GDCLASS(SpatialEditorSelectedItem,Object);
public:
@@ -283,7 +283,7 @@ public:
class SpatialEditor : public VBoxContainer {
- OBJ_TYPE(SpatialEditor, VBoxContainer );
+ GDCLASS(SpatialEditor, VBoxContainer );
public:
enum ToolMode {
@@ -546,7 +546,7 @@ public:
class SpatialEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SpatialEditorPlugin, EditorPlugin );
+ GDCLASS( SpatialEditorPlugin, EditorPlugin );
SpatialEditor *spatial_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
index 161b7bbdf6..f5ff635959 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -700,7 +700,7 @@ bool SpriteFramesEditor::can_drop_data_fw(const Point2& p_point,const Variant& p
String file = files[0];
String ftype = EditorFileSystem::get_singleton()->get_file_type(file);
- if (!ObjectTypeDB::is_type(ftype,"Texture")) {
+ if (!ClassDB::is_parent_class(ftype,"Texture")) {
return false;
}
@@ -754,27 +754,27 @@ void SpriteFramesEditor::drop_data_fw(const Point2& p_point,const Variant& p_dat
void SpriteFramesEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&SpriteFramesEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_load_pressed"),&SpriteFramesEditor::_load_pressed);
- ObjectTypeDB::bind_method(_MD("_empty_pressed"),&SpriteFramesEditor::_empty_pressed);
- ObjectTypeDB::bind_method(_MD("_empty2_pressed"),&SpriteFramesEditor::_empty2_pressed);
- ObjectTypeDB::bind_method(_MD("_item_edited"),&SpriteFramesEditor::_item_edited);
- ObjectTypeDB::bind_method(_MD("_delete_pressed"),&SpriteFramesEditor::_delete_pressed);
- ObjectTypeDB::bind_method(_MD("_paste_pressed"),&SpriteFramesEditor::_paste_pressed);
- ObjectTypeDB::bind_method(_MD("_delete_confirm_pressed"),&SpriteFramesEditor::_delete_confirm_pressed);
- ObjectTypeDB::bind_method(_MD("_file_load_request","files","atpos"),&SpriteFramesEditor::_file_load_request,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("_update_library","skipsel"),&SpriteFramesEditor::_update_library,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("_up_pressed"),&SpriteFramesEditor::_up_pressed);
- ObjectTypeDB::bind_method(_MD("_down_pressed"),&SpriteFramesEditor::_down_pressed);
- ObjectTypeDB::bind_method(_MD("_animation_select"),&SpriteFramesEditor::_animation_select);
- ObjectTypeDB::bind_method(_MD("_animation_name_edited"),&SpriteFramesEditor::_animation_name_edited);
- ObjectTypeDB::bind_method(_MD("_animation_add"),&SpriteFramesEditor::_animation_add);
- ObjectTypeDB::bind_method(_MD("_animation_remove"),&SpriteFramesEditor::_animation_remove);
- ObjectTypeDB::bind_method(_MD("_animation_loop_changed"),&SpriteFramesEditor::_animation_loop_changed);
- ObjectTypeDB::bind_method(_MD("_animation_fps_changed"),&SpriteFramesEditor::_animation_fps_changed);
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &SpriteFramesEditor::drop_data_fw);
+ ClassDB::bind_method(_MD("_input_event"),&SpriteFramesEditor::_input_event);
+ ClassDB::bind_method(_MD("_load_pressed"),&SpriteFramesEditor::_load_pressed);
+ ClassDB::bind_method(_MD("_empty_pressed"),&SpriteFramesEditor::_empty_pressed);
+ ClassDB::bind_method(_MD("_empty2_pressed"),&SpriteFramesEditor::_empty2_pressed);
+ ClassDB::bind_method(_MD("_item_edited"),&SpriteFramesEditor::_item_edited);
+ ClassDB::bind_method(_MD("_delete_pressed"),&SpriteFramesEditor::_delete_pressed);
+ ClassDB::bind_method(_MD("_paste_pressed"),&SpriteFramesEditor::_paste_pressed);
+ ClassDB::bind_method(_MD("_delete_confirm_pressed"),&SpriteFramesEditor::_delete_confirm_pressed);
+ ClassDB::bind_method(_MD("_file_load_request","files","atpos"),&SpriteFramesEditor::_file_load_request,DEFVAL(-1));
+ ClassDB::bind_method(_MD("_update_library","skipsel"),&SpriteFramesEditor::_update_library,DEFVAL(false));
+ ClassDB::bind_method(_MD("_up_pressed"),&SpriteFramesEditor::_up_pressed);
+ ClassDB::bind_method(_MD("_down_pressed"),&SpriteFramesEditor::_down_pressed);
+ ClassDB::bind_method(_MD("_animation_select"),&SpriteFramesEditor::_animation_select);
+ ClassDB::bind_method(_MD("_animation_name_edited"),&SpriteFramesEditor::_animation_name_edited);
+ ClassDB::bind_method(_MD("_animation_add"),&SpriteFramesEditor::_animation_add);
+ ClassDB::bind_method(_MD("_animation_remove"),&SpriteFramesEditor::_animation_remove);
+ ClassDB::bind_method(_MD("_animation_loop_changed"),&SpriteFramesEditor::_animation_loop_changed);
+ ClassDB::bind_method(_MD("_animation_fps_changed"),&SpriteFramesEditor::_animation_fps_changed);
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &SpriteFramesEditor::drop_data_fw);
}
@@ -929,7 +929,7 @@ void SpriteFramesEditorPlugin::edit(Object *p_object) {
bool SpriteFramesEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("SpriteFrames");
+ return p_object->is_class("SpriteFrames");
}
void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.h b/tools/editor/plugins/sprite_frames_editor_plugin.h
index e4cd8884d6..a6fc53d344 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.h
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.h
@@ -41,7 +41,7 @@
class SpriteFramesEditor : public PanelContainer {
- OBJ_TYPE(SpriteFramesEditor, PanelContainer );
+ GDCLASS(SpriteFramesEditor, PanelContainer );
Button *load;
Button *_delete;
@@ -116,7 +116,7 @@ public:
class SpriteFramesEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SpriteFramesEditorPlugin, EditorPlugin );
+ GDCLASS( SpriteFramesEditorPlugin, EditorPlugin );
SpriteFramesEditor *frames_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/stream_editor_plugin.cpp b/tools/editor/plugins/stream_editor_plugin.cpp
index 06ae4c33cf..00d7b208c8 100644
--- a/tools/editor/plugins/stream_editor_plugin.cpp
+++ b/tools/editor/plugins/stream_editor_plugin.cpp
@@ -59,8 +59,8 @@ void StreamEditor::_stop() {
void StreamEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_play"),&StreamEditor::_play);
- ObjectTypeDB::bind_method(_MD("_stop"),&StreamEditor::_stop);
+ ClassDB::bind_method(_MD("_play"),&StreamEditor::_play);
+ ClassDB::bind_method(_MD("_stop"),&StreamEditor::_stop);
}
@@ -104,7 +104,7 @@ void StreamEditorPlugin::edit(Object *p_object) {
bool StreamEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("StreamPlayer") || p_object->is_type("SpatialStreamPlayer");
+ return p_object->is_class("StreamPlayer") || p_object->is_class("SpatialStreamPlayer");
}
void StreamEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/stream_editor_plugin.h b/tools/editor/plugins/stream_editor_plugin.h
index 13fb558a71..af29f64f93 100644
--- a/tools/editor/plugins/stream_editor_plugin.h
+++ b/tools/editor/plugins/stream_editor_plugin.h
@@ -40,7 +40,7 @@
class StreamEditor : public Control {
- OBJ_TYPE(StreamEditor, Control );
+ GDCLASS(StreamEditor, Control );
Button * play;
Button * stop;
@@ -62,7 +62,7 @@ public:
class StreamEditorPlugin : public EditorPlugin {
- OBJ_TYPE( StreamEditorPlugin, EditorPlugin );
+ GDCLASS( StreamEditorPlugin, EditorPlugin );
StreamEditor *stream_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/style_box_editor_plugin.cpp b/tools/editor/plugins/style_box_editor_plugin.cpp
index b14046ff03..4319832adb 100644
--- a/tools/editor/plugins/style_box_editor_plugin.cpp
+++ b/tools/editor/plugins/style_box_editor_plugin.cpp
@@ -48,10 +48,10 @@ void StyleBoxEditor::_sb_changed() {
void StyleBoxEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_sb_changed",&StyleBoxEditor::_sb_changed);
-// ObjectTypeDB::bind_method("_import",&StyleBoxEditor::_import);
-// ObjectTypeDB::bind_method("_import_accept",&StyleBoxEditor::_import_accept);
-// ObjectTypeDB::bind_method("_preview_text_changed",&StyleBoxEditor::_preview_text_changed);
+ ClassDB::bind_method("_sb_changed",&StyleBoxEditor::_sb_changed);
+// ClassDB::bind_method("_import",&StyleBoxEditor::_import);
+// ClassDB::bind_method("_import_accept",&StyleBoxEditor::_import_accept);
+// ClassDB::bind_method("_preview_text_changed",&StyleBoxEditor::_preview_text_changed);
}
StyleBoxEditor::StyleBoxEditor() {
@@ -85,7 +85,7 @@ void StyleBoxEditorPlugin::edit(Object *p_node) {
bool StyleBoxEditorPlugin::handles(Object *p_node) const{
- return p_node->is_type("StyleBox");
+ return p_node->is_class("StyleBox");
}
void StyleBoxEditorPlugin::make_visible(bool p_visible){
diff --git a/tools/editor/plugins/style_box_editor_plugin.h b/tools/editor/plugins/style_box_editor_plugin.h
index c4649bcbb8..b2288b8e74 100644
--- a/tools/editor/plugins/style_box_editor_plugin.h
+++ b/tools/editor/plugins/style_box_editor_plugin.h
@@ -37,7 +37,7 @@
class StyleBoxEditor : public Control {
- OBJ_TYPE( StyleBoxEditor, Control );
+ GDCLASS( StyleBoxEditor, Control );
Panel *panel;
Panel *preview;
@@ -61,7 +61,7 @@ public:
class StyleBoxEditorPlugin : public EditorPlugin {
- OBJ_TYPE( StyleBoxEditorPlugin, EditorPlugin );
+ GDCLASS( StyleBoxEditorPlugin, EditorPlugin );
StyleBoxEditor *stylebox_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/texture_editor_plugin.cpp b/tools/editor/plugins/texture_editor_plugin.cpp
index 1305e91105..c8cf3d9701 100644
--- a/tools/editor/plugins/texture_editor_plugin.cpp
+++ b/tools/editor/plugins/texture_editor_plugin.cpp
@@ -49,7 +49,7 @@ void TextureEditor::_notification(int p_what) {
if (texture->cast_to<ImageTexture>()) {
format = Image::get_format_name(texture->cast_to<ImageTexture>()->get_format());
} else {
- format=texture->get_type();
+ format=texture->get_class();
}
String text = itos(texture->get_width())+"x"+itos(texture->get_height())+" "+format;
@@ -84,7 +84,7 @@ void TextureEditor::edit(Ref<Texture> p_texture) {
void TextureEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&TextureEditor::_input_event);
+ ClassDB::bind_method(_MD("_input_event"),&TextureEditor::_input_event);
}
@@ -106,7 +106,7 @@ void TextureEditorPlugin::edit(Object *p_object) {
bool TextureEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Texture");
+ return p_object->is_class("Texture");
}
void TextureEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/texture_editor_plugin.h b/tools/editor/plugins/texture_editor_plugin.h
index 5f58f4fcdb..5695e18f4f 100644
--- a/tools/editor/plugins/texture_editor_plugin.h
+++ b/tools/editor/plugins/texture_editor_plugin.h
@@ -10,7 +10,7 @@
class TextureEditor : public Control {
- OBJ_TYPE(TextureEditor, Control);
+ GDCLASS(TextureEditor, Control);
Ref<Texture> texture;
@@ -28,7 +28,7 @@ public:
class TextureEditorPlugin : public EditorPlugin {
- OBJ_TYPE( TextureEditorPlugin, EditorPlugin );
+ GDCLASS( TextureEditorPlugin, EditorPlugin );
TextureEditor *texture_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/texture_region_editor_plugin.cpp b/tools/editor/plugins/texture_region_editor_plugin.cpp
index 3b9b387001..5c2d5ccaa4 100644
--- a/tools/editor/plugins/texture_region_editor_plugin.cpp
+++ b/tools/editor/plugins/texture_region_editor_plugin.cpp
@@ -615,21 +615,21 @@ void TextureRegionEditor::_node_removed(Object *p_obj)
void TextureRegionEditor::_bind_methods()
{
- ObjectTypeDB::bind_method(_MD("_edit_region"),&TextureRegionEditor::_edit_region);
- ObjectTypeDB::bind_method(_MD("_region_draw"),&TextureRegionEditor::_region_draw);
- ObjectTypeDB::bind_method(_MD("_region_input"),&TextureRegionEditor::_region_input);
- ObjectTypeDB::bind_method(_MD("_scroll_changed"),&TextureRegionEditor::_scroll_changed);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&TextureRegionEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_set_snap_mode"),&TextureRegionEditor::_set_snap_mode);
- ObjectTypeDB::bind_method(_MD("_set_snap_off_x"),&TextureRegionEditor::_set_snap_off_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_off_y"),&TextureRegionEditor::_set_snap_off_y);
- ObjectTypeDB::bind_method(_MD("_set_snap_step_x"),&TextureRegionEditor::_set_snap_step_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_step_y"),&TextureRegionEditor::_set_snap_step_y);
- ObjectTypeDB::bind_method(_MD("_set_snap_sep_x"),&TextureRegionEditor::_set_snap_sep_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_sep_y"),&TextureRegionEditor::_set_snap_sep_y);
- ObjectTypeDB::bind_method(_MD("_zoom_in"),&TextureRegionEditor::_zoom_in);
- ObjectTypeDB::bind_method(_MD("_zoom_reset"),&TextureRegionEditor::_zoom_reset);
- ObjectTypeDB::bind_method(_MD("_zoom_out"),&TextureRegionEditor::_zoom_out);
+ ClassDB::bind_method(_MD("_edit_region"),&TextureRegionEditor::_edit_region);
+ ClassDB::bind_method(_MD("_region_draw"),&TextureRegionEditor::_region_draw);
+ ClassDB::bind_method(_MD("_region_input"),&TextureRegionEditor::_region_input);
+ ClassDB::bind_method(_MD("_scroll_changed"),&TextureRegionEditor::_scroll_changed);
+ ClassDB::bind_method(_MD("_node_removed"),&TextureRegionEditor::_node_removed);
+ ClassDB::bind_method(_MD("_set_snap_mode"),&TextureRegionEditor::_set_snap_mode);
+ ClassDB::bind_method(_MD("_set_snap_off_x"),&TextureRegionEditor::_set_snap_off_x);
+ ClassDB::bind_method(_MD("_set_snap_off_y"),&TextureRegionEditor::_set_snap_off_y);
+ ClassDB::bind_method(_MD("_set_snap_step_x"),&TextureRegionEditor::_set_snap_step_x);
+ ClassDB::bind_method(_MD("_set_snap_step_y"),&TextureRegionEditor::_set_snap_step_y);
+ ClassDB::bind_method(_MD("_set_snap_sep_x"),&TextureRegionEditor::_set_snap_sep_x);
+ ClassDB::bind_method(_MD("_set_snap_sep_y"),&TextureRegionEditor::_set_snap_sep_y);
+ ClassDB::bind_method(_MD("_zoom_in"),&TextureRegionEditor::_zoom_in);
+ ClassDB::bind_method(_MD("_zoom_reset"),&TextureRegionEditor::_zoom_reset);
+ ClassDB::bind_method(_MD("_zoom_out"),&TextureRegionEditor::_zoom_out);
}
void TextureRegionEditor::edit(Object *p_obj)
@@ -934,7 +934,7 @@ void TextureRegionEditorPlugin::edit(Object *p_node)
bool TextureRegionEditorPlugin::handles(Object *p_obj) const
{
- return p_obj->is_type("Sprite") || p_obj->is_type("Patch9Frame") || p_obj->is_type("StyleBoxTexture") || p_obj->is_type("AtlasTexture");
+ return p_obj->is_class("Sprite") || p_obj->is_class("Patch9Frame") || p_obj->is_class("StyleBoxTexture") || p_obj->is_class("AtlasTexture");
}
void TextureRegionEditorPlugin::make_visible(bool p_visible)
diff --git a/tools/editor/plugins/texture_region_editor_plugin.h b/tools/editor/plugins/texture_region_editor_plugin.h
index 35eb7d06bc..32cf389c35 100644
--- a/tools/editor/plugins/texture_region_editor_plugin.h
+++ b/tools/editor/plugins/texture_region_editor_plugin.h
@@ -42,7 +42,7 @@
class TextureRegionEditor : public Control {
- OBJ_TYPE(TextureRegionEditor, Control );
+ GDCLASS(TextureRegionEditor, Control );
enum SnapMode {
SNAP_NONE,
@@ -132,7 +132,7 @@ public:
class TextureRegionEditorPlugin : public EditorPlugin
{
- OBJ_TYPE( TextureRegionEditorPlugin, EditorPlugin );
+ GDCLASS( TextureRegionEditorPlugin, EditorPlugin );
Button *region_button;
TextureRegionEditor *region_editor;
diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp
index 3f5064b86a..fdd3b6156b 100644
--- a/tools/editor/plugins/theme_editor_plugin.cpp
+++ b/tools/editor/plugins/theme_editor_plugin.cpp
@@ -631,12 +631,12 @@ void ThemeEditor::_notification(int p_what) {
void ThemeEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_type_menu_cbk",&ThemeEditor::_type_menu_cbk);
- ObjectTypeDB::bind_method("_name_menu_about_to_show",&ThemeEditor::_name_menu_about_to_show);
- ObjectTypeDB::bind_method("_name_menu_cbk",&ThemeEditor::_name_menu_cbk);
- ObjectTypeDB::bind_method("_theme_menu_cbk",&ThemeEditor::_theme_menu_cbk);
- ObjectTypeDB::bind_method("_dialog_cbk",&ThemeEditor::_dialog_cbk);
- ObjectTypeDB::bind_method("_save_template_cbk",&ThemeEditor::_save_template_cbk);
+ ClassDB::bind_method("_type_menu_cbk",&ThemeEditor::_type_menu_cbk);
+ ClassDB::bind_method("_name_menu_about_to_show",&ThemeEditor::_name_menu_about_to_show);
+ ClassDB::bind_method("_name_menu_cbk",&ThemeEditor::_name_menu_cbk);
+ ClassDB::bind_method("_theme_menu_cbk",&ThemeEditor::_theme_menu_cbk);
+ ClassDB::bind_method("_dialog_cbk",&ThemeEditor::_dialog_cbk);
+ ClassDB::bind_method("_save_template_cbk",&ThemeEditor::_save_template_cbk);
}
ThemeEditor::ThemeEditor() {
@@ -963,7 +963,7 @@ void ThemeEditorPlugin::edit(Object *p_node) {
bool ThemeEditorPlugin::handles(Object *p_node) const{
- return p_node->is_type("Theme");
+ return p_node->is_class("Theme");
}
void ThemeEditorPlugin::make_visible(bool p_visible){
diff --git a/tools/editor/plugins/theme_editor_plugin.h b/tools/editor/plugins/theme_editor_plugin.h
index e8f37e265f..0af9128bf2 100644
--- a/tools/editor/plugins/theme_editor_plugin.h
+++ b/tools/editor/plugins/theme_editor_plugin.h
@@ -44,7 +44,7 @@
class ThemeEditor : public Control {
- OBJ_TYPE( ThemeEditor, Control );
+ GDCLASS( ThemeEditor, Control );
ScrollContainer *scroll;
@@ -103,7 +103,7 @@ public:
class ThemeEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ThemeEditorPlugin, EditorPlugin );
+ GDCLASS( ThemeEditorPlugin, EditorPlugin );
ThemeEditor *theme_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index 5d4e3fd874..8904739f08 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -1346,20 +1346,20 @@ void TileMapEditor::_icon_size_changed(float p_value) {
void TileMapEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_entered"),&TileMapEditor::_text_entered);
- ObjectTypeDB::bind_method(_MD("_text_changed"),&TileMapEditor::_text_changed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&TileMapEditor::_sbox_input);
- ObjectTypeDB::bind_method(_MD("_menu_option"),&TileMapEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&TileMapEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_canvas_mouse_enter"),&TileMapEditor::_canvas_mouse_enter);
- ObjectTypeDB::bind_method(_MD("_canvas_mouse_exit"),&TileMapEditor::_canvas_mouse_exit);
- ObjectTypeDB::bind_method(_MD("_tileset_settings_changed"),&TileMapEditor::_tileset_settings_changed);
- ObjectTypeDB::bind_method(_MD("_update_transform_buttons"),&TileMapEditor::_update_transform_buttons);
-
- ObjectTypeDB::bind_method(_MD("_fill_points"),&TileMapEditor::_fill_points);
- ObjectTypeDB::bind_method(_MD("_erase_points"),&TileMapEditor::_erase_points);
-
- ObjectTypeDB::bind_method(_MD("_icon_size_changed"), &TileMapEditor::_icon_size_changed);
+ ClassDB::bind_method(_MD("_text_entered"),&TileMapEditor::_text_entered);
+ ClassDB::bind_method(_MD("_text_changed"),&TileMapEditor::_text_changed);
+ ClassDB::bind_method(_MD("_sbox_input"),&TileMapEditor::_sbox_input);
+ ClassDB::bind_method(_MD("_menu_option"),&TileMapEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&TileMapEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_canvas_mouse_enter"),&TileMapEditor::_canvas_mouse_enter);
+ ClassDB::bind_method(_MD("_canvas_mouse_exit"),&TileMapEditor::_canvas_mouse_exit);
+ ClassDB::bind_method(_MD("_tileset_settings_changed"),&TileMapEditor::_tileset_settings_changed);
+ ClassDB::bind_method(_MD("_update_transform_buttons"),&TileMapEditor::_update_transform_buttons);
+
+ ClassDB::bind_method(_MD("_fill_points"),&TileMapEditor::_fill_points);
+ ClassDB::bind_method(_MD("_erase_points"),&TileMapEditor::_erase_points);
+
+ ClassDB::bind_method(_MD("_icon_size_changed"), &TileMapEditor::_icon_size_changed);
}
TileMapEditor::CellOp TileMapEditor::_get_op_from_cell(const Point2i& p_pos)
@@ -1560,7 +1560,7 @@ void TileMapEditorPlugin::edit(Object *p_object) {
bool TileMapEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("TileMap");
+ return p_object->is_class("TileMap");
}
void TileMapEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/tile_map_editor_plugin.h b/tools/editor/plugins/tile_map_editor_plugin.h
index 44b83fe745..612593c56a 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.h
+++ b/tools/editor/plugins/tile_map_editor_plugin.h
@@ -44,7 +44,7 @@
class TileMapEditor : public VBoxContainer {
- OBJ_TYPE(TileMapEditor, VBoxContainer );
+ GDCLASS(TileMapEditor, VBoxContainer );
enum Tool {
@@ -184,7 +184,7 @@ public:
class TileMapEditorPlugin : public EditorPlugin {
- OBJ_TYPE( TileMapEditorPlugin, EditorPlugin );
+ GDCLASS( TileMapEditorPlugin, EditorPlugin );
TileMapEditor *tile_map_editor;
diff --git a/tools/editor/plugins/tile_set_editor_plugin.cpp b/tools/editor/plugins/tile_set_editor_plugin.cpp
index 9172e0fc54..aae2f5c9bc 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_set_editor_plugin.cpp
@@ -221,9 +221,9 @@ Error TileSetEditor::update_library_file(Node *p_base_scene, Ref<TileSet> ml,boo
void TileSetEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_cbk",&TileSetEditor::_menu_cbk);
- ObjectTypeDB::bind_method("_menu_confirm",&TileSetEditor::_menu_confirm);
- ObjectTypeDB::bind_method("_name_dialog_confirm",&TileSetEditor::_name_dialog_confirm);
+ ClassDB::bind_method("_menu_cbk",&TileSetEditor::_menu_cbk);
+ ClassDB::bind_method("_menu_confirm",&TileSetEditor::_menu_confirm);
+ ClassDB::bind_method("_name_dialog_confirm",&TileSetEditor::_name_dialog_confirm);
}
TileSetEditor::TileSetEditor(EditorNode *p_editor) {
@@ -268,7 +268,7 @@ void TileSetEditorPlugin::edit(Object *p_node) {
bool TileSetEditorPlugin::handles(Object *p_node) const{
- return p_node->is_type("TileSet");
+ return p_node->is_class("TileSet");
}
void TileSetEditorPlugin::make_visible(bool p_visible){
diff --git a/tools/editor/plugins/tile_set_editor_plugin.h b/tools/editor/plugins/tile_set_editor_plugin.h
index 36573c0e85..7fec7fa162 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.h
+++ b/tools/editor/plugins/tile_set_editor_plugin.h
@@ -38,7 +38,7 @@
class TileSetEditor : public Control {
- OBJ_TYPE( TileSetEditor, Control );
+ GDCLASS( TileSetEditor, Control );
Ref<TileSet> tileset;
@@ -78,7 +78,7 @@ public:
class TileSetEditorPlugin : public EditorPlugin {
- OBJ_TYPE( TileSetEditorPlugin, EditorPlugin );
+ GDCLASS( TileSetEditorPlugin, EditorPlugin );
TileSetEditor *tileset_editor;
EditorNode *editor;
diff --git a/tools/editor/progress_dialog.cpp b/tools/editor/progress_dialog.cpp
index 25cf0bdf01..5c667564fe 100644
--- a/tools/editor/progress_dialog.cpp
+++ b/tools/editor/progress_dialog.cpp
@@ -101,10 +101,10 @@ void BackgroundProgress::_end_task(const String& p_task){
void BackgroundProgress::_bind_methods(){
- ObjectTypeDB::bind_method("_add_task",&BackgroundProgress::_add_task);
- ObjectTypeDB::bind_method("_task_step",&BackgroundProgress::_task_step);
- ObjectTypeDB::bind_method("_end_task",&BackgroundProgress::_end_task);
- ObjectTypeDB::bind_method("_update",&BackgroundProgress::_update);
+ ClassDB::bind_method("_add_task",&BackgroundProgress::_add_task);
+ ClassDB::bind_method("_task_step",&BackgroundProgress::_task_step);
+ ClassDB::bind_method("_end_task",&BackgroundProgress::_end_task);
+ ClassDB::bind_method("_update",&BackgroundProgress::_update);
}
diff --git a/tools/editor/progress_dialog.h b/tools/editor/progress_dialog.h
index 8a6ab7696b..60acf825a9 100644
--- a/tools/editor/progress_dialog.h
+++ b/tools/editor/progress_dialog.h
@@ -37,7 +37,7 @@
class BackgroundProgress : public HBoxContainer {
- OBJ_TYPE(BackgroundProgress,HBoxContainer);
+ GDCLASS(BackgroundProgress,HBoxContainer);
_THREAD_SAFE_CLASS_
@@ -72,7 +72,7 @@ public:
class ProgressDialog : public Popup {
- OBJ_TYPE( ProgressDialog, Popup );
+ GDCLASS( ProgressDialog, Popup );
struct Task {
String task;
diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp
index afcd82644a..60fbcce65b 100644
--- a/tools/editor/project_export.cpp
+++ b/tools/editor/project_export.cpp
@@ -1292,44 +1292,44 @@ void ProjectExportDialog::_image_filter_changed(String) {
void ProjectExportDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_rescan"),&ProjectExportDialog::_rescan);
- ObjectTypeDB::bind_method(_MD("_tree_changed"),&ProjectExportDialog::_tree_changed);
- ObjectTypeDB::bind_method(_MD("_scan_finished"),&ProjectExportDialog::_scan_finished);
- ObjectTypeDB::bind_method(_MD("_platform_selected"),&ProjectExportDialog::_platform_selected);
- ObjectTypeDB::bind_method(_MD("_prop_edited"),&ProjectExportDialog::_prop_edited);
- ObjectTypeDB::bind_method(_MD("_export_mode_changed"),&ProjectExportDialog::_export_mode_changed);
- ObjectTypeDB::bind_method(_MD("_filters_edited"),&ProjectExportDialog::_filters_edited);
- ObjectTypeDB::bind_method(_MD("_filters_exclude_edited"),&ProjectExportDialog::_filters_exclude_edited);
- ObjectTypeDB::bind_method(_MD("_export_action"),&ProjectExportDialog::_export_action);
- ObjectTypeDB::bind_method(_MD("_export_action_pck"),&ProjectExportDialog::_export_action_pck);
- ObjectTypeDB::bind_method(_MD("_quality_edited"),&ProjectExportDialog::_quality_edited);
- ObjectTypeDB::bind_method(_MD("_shrink_edited"),&ProjectExportDialog::_shrink_edited);
- ObjectTypeDB::bind_method(_MD("_image_export_edited"),&ProjectExportDialog::_image_export_edited);
- ObjectTypeDB::bind_method(_MD("_format_toggled"),&ProjectExportDialog::_format_toggled);
- ObjectTypeDB::bind_method(_MD("_group_changed"),&ProjectExportDialog::_group_changed);
- ObjectTypeDB::bind_method(_MD("_group_add"),&ProjectExportDialog::_group_add);
- ObjectTypeDB::bind_method(_MD("_group_del"),&ProjectExportDialog::_group_del);
- ObjectTypeDB::bind_method(_MD("_group_selected"),&ProjectExportDialog::_group_selected);
- ObjectTypeDB::bind_method(_MD("_update_group"),&ProjectExportDialog::_update_group);
- ObjectTypeDB::bind_method(_MD("_update_group_list"),&ProjectExportDialog::_update_group_list);
- ObjectTypeDB::bind_method(_MD("_select_group"),&ProjectExportDialog::_select_group);
- ObjectTypeDB::bind_method(_MD("_update_group_tree"),&ProjectExportDialog::_update_group_tree);
- ObjectTypeDB::bind_method(_MD("_group_item_edited"),&ProjectExportDialog::_group_item_edited);
- ObjectTypeDB::bind_method(_MD("_save_export_cfg"),&ProjectExportDialog::_save_export_cfg);
- ObjectTypeDB::bind_method(_MD("_image_filter_changed"),&ProjectExportDialog::_image_filter_changed);
- ObjectTypeDB::bind_method(_MD("_group_atlas_preview"),&ProjectExportDialog::_group_atlas_preview);
- ObjectTypeDB::bind_method(_MD("_group_select_all"),&ProjectExportDialog::_group_select_all);
- ObjectTypeDB::bind_method(_MD("_group_select_none"),&ProjectExportDialog::_group_select_none);
- ObjectTypeDB::bind_method(_MD("_script_edited"),&ProjectExportDialog::_script_edited);
- ObjectTypeDB::bind_method(_MD("_update_script"),&ProjectExportDialog::_update_script);
- ObjectTypeDB::bind_method(_MD("_sample_convert_edited"),&ProjectExportDialog::_sample_convert_edited);
-
-
- ObjectTypeDB::bind_method(_MD("export_platform"),&ProjectExportDialog::export_platform);
- ObjectTypeDB::bind_method(_MD("_create_android_keystore"),&ProjectExportDialog::_create_android_keystore);
- ObjectTypeDB::bind_method(_MD("_check_keystore_path"),&ProjectExportDialog::_check_keystore_path);
- ObjectTypeDB::bind_method(_MD("_keystore_dir_selected"),&ProjectExportDialog::_keystore_dir_selected);
- ObjectTypeDB::bind_method(_MD("_keystore_created"),&ProjectExportDialog::_keystore_created);
+ ClassDB::bind_method(_MD("_rescan"),&ProjectExportDialog::_rescan);
+ ClassDB::bind_method(_MD("_tree_changed"),&ProjectExportDialog::_tree_changed);
+ ClassDB::bind_method(_MD("_scan_finished"),&ProjectExportDialog::_scan_finished);
+ ClassDB::bind_method(_MD("_platform_selected"),&ProjectExportDialog::_platform_selected);
+ ClassDB::bind_method(_MD("_prop_edited"),&ProjectExportDialog::_prop_edited);
+ ClassDB::bind_method(_MD("_export_mode_changed"),&ProjectExportDialog::_export_mode_changed);
+ ClassDB::bind_method(_MD("_filters_edited"),&ProjectExportDialog::_filters_edited);
+ ClassDB::bind_method(_MD("_filters_exclude_edited"),&ProjectExportDialog::_filters_exclude_edited);
+ ClassDB::bind_method(_MD("_export_action"),&ProjectExportDialog::_export_action);
+ ClassDB::bind_method(_MD("_export_action_pck"),&ProjectExportDialog::_export_action_pck);
+ ClassDB::bind_method(_MD("_quality_edited"),&ProjectExportDialog::_quality_edited);
+ ClassDB::bind_method(_MD("_shrink_edited"),&ProjectExportDialog::_shrink_edited);
+ ClassDB::bind_method(_MD("_image_export_edited"),&ProjectExportDialog::_image_export_edited);
+ ClassDB::bind_method(_MD("_format_toggled"),&ProjectExportDialog::_format_toggled);
+ ClassDB::bind_method(_MD("_group_changed"),&ProjectExportDialog::_group_changed);
+ ClassDB::bind_method(_MD("_group_add"),&ProjectExportDialog::_group_add);
+ ClassDB::bind_method(_MD("_group_del"),&ProjectExportDialog::_group_del);
+ ClassDB::bind_method(_MD("_group_selected"),&ProjectExportDialog::_group_selected);
+ ClassDB::bind_method(_MD("_update_group"),&ProjectExportDialog::_update_group);
+ ClassDB::bind_method(_MD("_update_group_list"),&ProjectExportDialog::_update_group_list);
+ ClassDB::bind_method(_MD("_select_group"),&ProjectExportDialog::_select_group);
+ ClassDB::bind_method(_MD("_update_group_tree"),&ProjectExportDialog::_update_group_tree);
+ ClassDB::bind_method(_MD("_group_item_edited"),&ProjectExportDialog::_group_item_edited);
+ ClassDB::bind_method(_MD("_save_export_cfg"),&ProjectExportDialog::_save_export_cfg);
+ ClassDB::bind_method(_MD("_image_filter_changed"),&ProjectExportDialog::_image_filter_changed);
+ ClassDB::bind_method(_MD("_group_atlas_preview"),&ProjectExportDialog::_group_atlas_preview);
+ ClassDB::bind_method(_MD("_group_select_all"),&ProjectExportDialog::_group_select_all);
+ ClassDB::bind_method(_MD("_group_select_none"),&ProjectExportDialog::_group_select_none);
+ ClassDB::bind_method(_MD("_script_edited"),&ProjectExportDialog::_script_edited);
+ ClassDB::bind_method(_MD("_update_script"),&ProjectExportDialog::_update_script);
+ ClassDB::bind_method(_MD("_sample_convert_edited"),&ProjectExportDialog::_sample_convert_edited);
+
+
+ ClassDB::bind_method(_MD("export_platform"),&ProjectExportDialog::export_platform);
+ ClassDB::bind_method(_MD("_create_android_keystore"),&ProjectExportDialog::_create_android_keystore);
+ ClassDB::bind_method(_MD("_check_keystore_path"),&ProjectExportDialog::_check_keystore_path);
+ ClassDB::bind_method(_MD("_keystore_dir_selected"),&ProjectExportDialog::_keystore_dir_selected);
+ ClassDB::bind_method(_MD("_keystore_created"),&ProjectExportDialog::_keystore_created);
// ADD_SIGNAL(MethodInfo("instance"));
diff --git a/tools/editor/project_export.h b/tools/editor/project_export.h
index cd790ea42f..2110c54b9d 100644
--- a/tools/editor/project_export.h
+++ b/tools/editor/project_export.h
@@ -49,7 +49,7 @@
class EditorNode;
class ProjectExportDialog : public ConfirmationDialog {
- OBJ_TYPE( ProjectExportDialog, ConfirmationDialog );
+ GDCLASS( ProjectExportDialog, ConfirmationDialog );
public:
enum ExportAction {
@@ -223,7 +223,7 @@ public:
class EditorData;
class ProjectExport : public ConfirmationDialog {
- OBJ_TYPE( ProjectExport, ConfirmationDialog );
+ GDCLASS( ProjectExport, ConfirmationDialog );
EditorData *editor_data;
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index af2a18ce2b..7c775ac188 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -54,7 +54,7 @@
class NewProjectDialog : public ConfirmationDialog {
- OBJ_TYPE(NewProjectDialog,ConfirmationDialog);
+ GDCLASS(NewProjectDialog,ConfirmationDialog);
public:
@@ -335,11 +335,11 @@ protected:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_browse_path",&NewProjectDialog::_browse_path);
- ObjectTypeDB::bind_method("_text_changed",&NewProjectDialog::_text_changed);
- ObjectTypeDB::bind_method("_path_text_changed",&NewProjectDialog::_path_text_changed);
- ObjectTypeDB::bind_method("_path_selected",&NewProjectDialog::_path_selected);
- ObjectTypeDB::bind_method("_file_selected",&NewProjectDialog::_file_selected);
+ ClassDB::bind_method("_browse_path",&NewProjectDialog::_browse_path);
+ ClassDB::bind_method("_text_changed",&NewProjectDialog::_text_changed);
+ ClassDB::bind_method("_path_text_changed",&NewProjectDialog::_path_text_changed);
+ ClassDB::bind_method("_path_selected",&NewProjectDialog::_path_selected);
+ ClassDB::bind_method("_file_selected",&NewProjectDialog::_file_selected);
ADD_SIGNAL( MethodInfo("project_created") );
}
@@ -1183,27 +1183,27 @@ void ProjectManager::_scan_multiple_folders(StringArray p_files)
void ProjectManager::_bind_methods() {
- ObjectTypeDB::bind_method("_open_project",&ProjectManager::_open_project);
- ObjectTypeDB::bind_method("_open_project_confirm",&ProjectManager::_open_project_confirm);
- ObjectTypeDB::bind_method("_run_project",&ProjectManager::_run_project);
- ObjectTypeDB::bind_method("_run_project_confirm",&ProjectManager::_run_project_confirm);
- ObjectTypeDB::bind_method("_scan_projects",&ProjectManager::_scan_projects);
- ObjectTypeDB::bind_method("_scan_begin",&ProjectManager::_scan_begin);
- ObjectTypeDB::bind_method("_import_project",&ProjectManager::_import_project);
- ObjectTypeDB::bind_method("_new_project",&ProjectManager::_new_project);
- ObjectTypeDB::bind_method("_erase_project",&ProjectManager::_erase_project);
- ObjectTypeDB::bind_method("_erase_project_confirm",&ProjectManager::_erase_project_confirm);
- ObjectTypeDB::bind_method("_exit_dialog",&ProjectManager::_exit_dialog);
- ObjectTypeDB::bind_method("_load_recent_projects",&ProjectManager::_load_recent_projects);
- ObjectTypeDB::bind_method("_on_project_created",&ProjectManager::_on_project_created);
- ObjectTypeDB::bind_method("_update_scroll_pos",&ProjectManager::_update_scroll_pos);
- ObjectTypeDB::bind_method("_panel_draw",&ProjectManager::_panel_draw);
- ObjectTypeDB::bind_method("_panel_input",&ProjectManager::_panel_input);
- ObjectTypeDB::bind_method("_unhandled_input",&ProjectManager::_unhandled_input);
- ObjectTypeDB::bind_method("_favorite_pressed",&ProjectManager::_favorite_pressed);
- ObjectTypeDB::bind_method("_install_project",&ProjectManager::_install_project);
- ObjectTypeDB::bind_method("_files_dropped",&ProjectManager::_files_dropped);
- ObjectTypeDB::bind_method(_MD("_scan_multiple_folders", "files"),&ProjectManager::_scan_multiple_folders);
+ ClassDB::bind_method("_open_project",&ProjectManager::_open_project);
+ ClassDB::bind_method("_open_project_confirm",&ProjectManager::_open_project_confirm);
+ ClassDB::bind_method("_run_project",&ProjectManager::_run_project);
+ ClassDB::bind_method("_run_project_confirm",&ProjectManager::_run_project_confirm);
+ ClassDB::bind_method("_scan_projects",&ProjectManager::_scan_projects);
+ ClassDB::bind_method("_scan_begin",&ProjectManager::_scan_begin);
+ ClassDB::bind_method("_import_project",&ProjectManager::_import_project);
+ ClassDB::bind_method("_new_project",&ProjectManager::_new_project);
+ ClassDB::bind_method("_erase_project",&ProjectManager::_erase_project);
+ ClassDB::bind_method("_erase_project_confirm",&ProjectManager::_erase_project_confirm);
+ ClassDB::bind_method("_exit_dialog",&ProjectManager::_exit_dialog);
+ ClassDB::bind_method("_load_recent_projects",&ProjectManager::_load_recent_projects);
+ ClassDB::bind_method("_on_project_created",&ProjectManager::_on_project_created);
+ ClassDB::bind_method("_update_scroll_pos",&ProjectManager::_update_scroll_pos);
+ ClassDB::bind_method("_panel_draw",&ProjectManager::_panel_draw);
+ ClassDB::bind_method("_panel_input",&ProjectManager::_panel_input);
+ ClassDB::bind_method("_unhandled_input",&ProjectManager::_unhandled_input);
+ ClassDB::bind_method("_favorite_pressed",&ProjectManager::_favorite_pressed);
+ ClassDB::bind_method("_install_project",&ProjectManager::_install_project);
+ ClassDB::bind_method("_files_dropped",&ProjectManager::_files_dropped);
+ ClassDB::bind_method(_MD("_scan_multiple_folders", "files"),&ProjectManager::_scan_multiple_folders);
}
@@ -1486,9 +1486,9 @@ void ProjectListFilter::_notification(int p_what) {
void ProjectListFilter::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_command"),&ProjectListFilter::_command);
- ObjectTypeDB::bind_method(_MD("_search_text_changed"), &ProjectListFilter::_search_text_changed);
- ObjectTypeDB::bind_method(_MD("_filter_option_selected"), &ProjectListFilter::_filter_option_selected);
+ ClassDB::bind_method(_MD("_command"),&ProjectListFilter::_command);
+ ClassDB::bind_method(_MD("_search_text_changed"), &ProjectListFilter::_search_text_changed);
+ ClassDB::bind_method(_MD("_filter_option_selected"), &ProjectListFilter::_filter_option_selected);
ADD_SIGNAL( MethodInfo("filter_changed") );
}
diff --git a/tools/editor/project_manager.h b/tools/editor/project_manager.h
index d30d1afd83..2240e252fc 100644
--- a/tools/editor/project_manager.h
+++ b/tools/editor/project_manager.h
@@ -40,7 +40,7 @@ class NewProjectDialog;
class ProjectListFilter;
class ProjectManager : public Control {
- OBJ_TYPE( ProjectManager, Control );
+ GDCLASS( ProjectManager, Control );
Button *erase_btn;
Button *open_btn;
@@ -109,7 +109,7 @@ public:
class ProjectListFilter : public HBoxContainer {
- OBJ_TYPE( ProjectListFilter, HBoxContainer );
+ GDCLASS( ProjectListFilter, HBoxContainer );
private:
diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp
index 7cf99c51fe..382b39592d 100644
--- a/tools/editor/project_settings.cpp
+++ b/tools/editor/project_settings.cpp
@@ -1213,41 +1213,41 @@ void ProjectSettings::set_plugins_page() {
void ProjectSettings::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_item_selected"),&ProjectSettings::_item_selected);
- ObjectTypeDB::bind_method(_MD("_item_add"),&ProjectSettings::_item_add);
- ObjectTypeDB::bind_method(_MD("_item_adds"),&ProjectSettings::_item_adds);
- ObjectTypeDB::bind_method(_MD("_item_del"),&ProjectSettings::_item_del);
- ObjectTypeDB::bind_method(_MD("_item_checked"),&ProjectSettings::_item_checked);
- ObjectTypeDB::bind_method(_MD("_save"),&ProjectSettings::_save);
- ObjectTypeDB::bind_method(_MD("_action_add"),&ProjectSettings::_action_add);
- ObjectTypeDB::bind_method(_MD("_action_adds"),&ProjectSettings::_action_adds);
- ObjectTypeDB::bind_method(_MD("_action_selected"),&ProjectSettings::_action_selected);
- ObjectTypeDB::bind_method(_MD("_action_edited"),&ProjectSettings::_action_edited);
- ObjectTypeDB::bind_method(_MD("_action_button_pressed"),&ProjectSettings::_action_button_pressed);
- ObjectTypeDB::bind_method(_MD("_update_actions"),&ProjectSettings::_update_actions);
- ObjectTypeDB::bind_method(_MD("_wait_for_key"),&ProjectSettings::_wait_for_key);
- ObjectTypeDB::bind_method(_MD("_add_item"),&ProjectSettings::_add_item);
- ObjectTypeDB::bind_method(_MD("_device_input_add"),&ProjectSettings::_device_input_add);
- ObjectTypeDB::bind_method(_MD("_press_a_key_confirm"),&ProjectSettings::_press_a_key_confirm);
- ObjectTypeDB::bind_method(_MD("_settings_prop_edited"),&ProjectSettings::_settings_prop_edited);
- ObjectTypeDB::bind_method(_MD("_copy_to_platform"),&ProjectSettings::_copy_to_platform);
- ObjectTypeDB::bind_method(_MD("_update_translations"),&ProjectSettings::_update_translations);
- ObjectTypeDB::bind_method(_MD("_translation_delete"),&ProjectSettings::_translation_delete);
- ObjectTypeDB::bind_method(_MD("_settings_changed"),&ProjectSettings::_settings_changed);
- ObjectTypeDB::bind_method(_MD("_translation_add"),&ProjectSettings::_translation_add);
- ObjectTypeDB::bind_method(_MD("_translation_file_open"),&ProjectSettings::_translation_file_open);
-
- ObjectTypeDB::bind_method(_MD("_translation_res_add"),&ProjectSettings::_translation_res_add);
- ObjectTypeDB::bind_method(_MD("_translation_res_file_open"),&ProjectSettings::_translation_res_file_open);
- ObjectTypeDB::bind_method(_MD("_translation_res_option_add"),&ProjectSettings::_translation_res_option_add);
- ObjectTypeDB::bind_method(_MD("_translation_res_option_file_open"),&ProjectSettings::_translation_res_option_file_open);
- ObjectTypeDB::bind_method(_MD("_translation_res_select"),&ProjectSettings::_translation_res_select);
- ObjectTypeDB::bind_method(_MD("_translation_res_option_changed"),&ProjectSettings::_translation_res_option_changed);
- ObjectTypeDB::bind_method(_MD("_translation_res_delete"),&ProjectSettings::_translation_res_delete);
- ObjectTypeDB::bind_method(_MD("_translation_res_option_delete"),&ProjectSettings::_translation_res_option_delete);
-
- ObjectTypeDB::bind_method(_MD("_clear_search_box"),&ProjectSettings::_clear_search_box);
- ObjectTypeDB::bind_method(_MD("_toggle_search_bar"),&ProjectSettings::_toggle_search_bar);
+ ClassDB::bind_method(_MD("_item_selected"),&ProjectSettings::_item_selected);
+ ClassDB::bind_method(_MD("_item_add"),&ProjectSettings::_item_add);
+ ClassDB::bind_method(_MD("_item_adds"),&ProjectSettings::_item_adds);
+ ClassDB::bind_method(_MD("_item_del"),&ProjectSettings::_item_del);
+ ClassDB::bind_method(_MD("_item_checked"),&ProjectSettings::_item_checked);
+ ClassDB::bind_method(_MD("_save"),&ProjectSettings::_save);
+ ClassDB::bind_method(_MD("_action_add"),&ProjectSettings::_action_add);
+ ClassDB::bind_method(_MD("_action_adds"),&ProjectSettings::_action_adds);
+ ClassDB::bind_method(_MD("_action_selected"),&ProjectSettings::_action_selected);
+ ClassDB::bind_method(_MD("_action_edited"),&ProjectSettings::_action_edited);
+ ClassDB::bind_method(_MD("_action_button_pressed"),&ProjectSettings::_action_button_pressed);
+ ClassDB::bind_method(_MD("_update_actions"),&ProjectSettings::_update_actions);
+ ClassDB::bind_method(_MD("_wait_for_key"),&ProjectSettings::_wait_for_key);
+ ClassDB::bind_method(_MD("_add_item"),&ProjectSettings::_add_item);
+ ClassDB::bind_method(_MD("_device_input_add"),&ProjectSettings::_device_input_add);
+ ClassDB::bind_method(_MD("_press_a_key_confirm"),&ProjectSettings::_press_a_key_confirm);
+ ClassDB::bind_method(_MD("_settings_prop_edited"),&ProjectSettings::_settings_prop_edited);
+ ClassDB::bind_method(_MD("_copy_to_platform"),&ProjectSettings::_copy_to_platform);
+ ClassDB::bind_method(_MD("_update_translations"),&ProjectSettings::_update_translations);
+ ClassDB::bind_method(_MD("_translation_delete"),&ProjectSettings::_translation_delete);
+ ClassDB::bind_method(_MD("_settings_changed"),&ProjectSettings::_settings_changed);
+ ClassDB::bind_method(_MD("_translation_add"),&ProjectSettings::_translation_add);
+ ClassDB::bind_method(_MD("_translation_file_open"),&ProjectSettings::_translation_file_open);
+
+ ClassDB::bind_method(_MD("_translation_res_add"),&ProjectSettings::_translation_res_add);
+ ClassDB::bind_method(_MD("_translation_res_file_open"),&ProjectSettings::_translation_res_file_open);
+ ClassDB::bind_method(_MD("_translation_res_option_add"),&ProjectSettings::_translation_res_option_add);
+ ClassDB::bind_method(_MD("_translation_res_option_file_open"),&ProjectSettings::_translation_res_option_file_open);
+ ClassDB::bind_method(_MD("_translation_res_select"),&ProjectSettings::_translation_res_select);
+ ClassDB::bind_method(_MD("_translation_res_option_changed"),&ProjectSettings::_translation_res_option_changed);
+ ClassDB::bind_method(_MD("_translation_res_delete"),&ProjectSettings::_translation_res_delete);
+ ClassDB::bind_method(_MD("_translation_res_option_delete"),&ProjectSettings::_translation_res_option_delete);
+
+ ClassDB::bind_method(_MD("_clear_search_box"),&ProjectSettings::_clear_search_box);
+ ClassDB::bind_method(_MD("_toggle_search_bar"),&ProjectSettings::_toggle_search_bar);
}
diff --git a/tools/editor/project_settings.h b/tools/editor/project_settings.h
index e3b7a5eba9..bb925a5fd9 100644
--- a/tools/editor/project_settings.h
+++ b/tools/editor/project_settings.h
@@ -40,7 +40,7 @@
//#include "project_export_settings.h"
class ProjectSettings : public AcceptDialog {
- OBJ_TYPE( ProjectSettings, AcceptDialog );
+ GDCLASS( ProjectSettings, AcceptDialog );
TabContainer *tab_container;
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index f50128ee28..d38210616e 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -173,9 +173,9 @@ void CustomPropertyEditor::_menu_option(int p_which) {
propvalues.push_back(p);
}
- String orig_type = res_orig->get_type();
+ String orig_type = res_orig->get_class();
- Object *inst = ObjectTypeDB::instance( orig_type );
+ Object *inst = ClassDB::instance( orig_type );
Ref<Resource> res = Ref<Resource>( inst->cast_to<Resource>() );
@@ -228,13 +228,13 @@ void CustomPropertyEditor::_menu_option(int p_which) {
String intype=inheritors_array[p_which-TYPE_BASE_ID];
- Object *obj = ObjectTypeDB::instance(intype);
+ Object *obj = ClassDB::instance(intype);
ERR_BREAK( !obj );
Resource *res=obj->cast_to<Resource>();
ERR_BREAK( !res );
if (owner && hint==PROPERTY_HINT_RESOURCE_TYPE && hint_text=="Script") {
//make visual script the right type
- res->call("set_instance_base_type",owner->get_type());
+ res->call("set_instance_base_type",owner->get_class());
}
v=Ref<Resource>(res).get_ref_ptr();
@@ -871,7 +871,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
Set<String> valid_inheritors;
valid_inheritors.insert(base);
List<StringName> inheritors;
- ObjectTypeDB::get_inheriters_from(base.strip_edges(),&inheritors);
+ ClassDB::get_inheriters_from_class(base.strip_edges(),&inheritors);
List<StringName>::Element *E=inheritors.front();
while(E) {
valid_inheritors.insert(E->get());
@@ -880,7 +880,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
for(Set<String>::Element *E=valid_inheritors.front();E;E=E->next()) {
String t = E->get();
- if (!ObjectTypeDB::can_instance(t))
+ if (!ClassDB::can_instance(t))
continue;
inheritors_array.push_back(t);
@@ -934,7 +934,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
paste_valid=true;
else
for (int i = 0; i < hint_text.get_slice_count(",");i++)
- if (ObjectTypeDB::is_type(cb->get_type(),hint_text.get_slice(",",i))) {
+ if (ClassDB::is_parent_class(cb->get_class(),hint_text.get_slice(",",i))) {
paste_valid=true;
break;
}
@@ -1095,13 +1095,13 @@ void CustomPropertyEditor::_type_create_selected(int p_idx) {
ERR_FAIL_INDEX(p_idx,inheritors_array.size());
//List<String> inheritors;
- //ObjectTypeDB::get_inheriters_from(hint_text,&inheritors);
+ //ClassDB::get_inheriters_from(hint_text,&inheritors);
//inheritors.push_front(hint_text);
//ERR_FAIL_INDEX( p_idx, inheritors.size() );
String intype=inheritors_array[p_idx];
- Object *obj = ObjectTypeDB::instance(intype);
+ Object *obj = ClassDB::instance(intype);
ERR_FAIL_COND( !obj );
@@ -1142,9 +1142,9 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
Node *node=NULL;
- if (owner->is_type("Node"))
+ if (owner->is_class("Node"))
node = owner->cast_to<Node>();
- else if (owner->is_type("ArrayPropertyEdit"))
+ else if (owner->is_class("ArrayPropertyEdit"))
node = owner->cast_to<ArrayPropertyEdit>()->get_node();
if (!node) {
@@ -1285,7 +1285,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
if (hint==PROPERTY_HINT_RESOURCE_TYPE) {
- Object *obj = ObjectTypeDB::instance(intype);
+ Object *obj = ClassDB::instance(intype);
ERR_BREAK( !obj );
Resource *res=obj->cast_to<Resource>();
ERR_BREAK( !res );
@@ -1353,7 +1353,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
propvalues.push_back(p);
}
- Ref<Resource> res = Ref<Resource>( ObjectTypeDB::instance( res_orig->get_type() ));
+ Ref<Resource> res = Ref<Resource>( ClassDB::instance( res_orig->get_class() ));
ERR_FAIL_COND(res.is_null());
@@ -1914,22 +1914,22 @@ void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns,int
void CustomPropertyEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_focus_enter", &CustomPropertyEditor::_focus_enter);
- ObjectTypeDB::bind_method("_focus_exit", &CustomPropertyEditor::_focus_exit);
- ObjectTypeDB::bind_method("_modified",&CustomPropertyEditor::_modified);
- ObjectTypeDB::bind_method("_range_modified", &CustomPropertyEditor::_range_modified);
- ObjectTypeDB::bind_method("_scroll_modified",&CustomPropertyEditor::_scroll_modified);
- ObjectTypeDB::bind_method("_action_pressed",&CustomPropertyEditor::_action_pressed);
- ObjectTypeDB::bind_method("_file_selected",&CustomPropertyEditor::_file_selected);
- ObjectTypeDB::bind_method("_type_create_selected",&CustomPropertyEditor::_type_create_selected);
- ObjectTypeDB::bind_method("_node_path_selected",&CustomPropertyEditor::_node_path_selected);
- ObjectTypeDB::bind_method("_color_changed",&CustomPropertyEditor::_color_changed);
- ObjectTypeDB::bind_method("_draw_easing",&CustomPropertyEditor::_draw_easing);
- ObjectTypeDB::bind_method("_drag_easing",&CustomPropertyEditor::_drag_easing);
- ObjectTypeDB::bind_method( "_text_edit_changed",&CustomPropertyEditor::_text_edit_changed);
- ObjectTypeDB::bind_method( "_menu_option",&CustomPropertyEditor::_menu_option);
- ObjectTypeDB::bind_method( "_create_dialog_callback",&CustomPropertyEditor::_create_dialog_callback);
- ObjectTypeDB::bind_method( "_create_selected_property",&CustomPropertyEditor::_create_selected_property);
+ ClassDB::bind_method("_focus_enter", &CustomPropertyEditor::_focus_enter);
+ ClassDB::bind_method("_focus_exit", &CustomPropertyEditor::_focus_exit);
+ ClassDB::bind_method("_modified",&CustomPropertyEditor::_modified);
+ ClassDB::bind_method("_range_modified", &CustomPropertyEditor::_range_modified);
+ ClassDB::bind_method("_scroll_modified",&CustomPropertyEditor::_scroll_modified);
+ ClassDB::bind_method("_action_pressed",&CustomPropertyEditor::_action_pressed);
+ ClassDB::bind_method("_file_selected",&CustomPropertyEditor::_file_selected);
+ ClassDB::bind_method("_type_create_selected",&CustomPropertyEditor::_type_create_selected);
+ ClassDB::bind_method("_node_path_selected",&CustomPropertyEditor::_node_path_selected);
+ ClassDB::bind_method("_color_changed",&CustomPropertyEditor::_color_changed);
+ ClassDB::bind_method("_draw_easing",&CustomPropertyEditor::_draw_easing);
+ ClassDB::bind_method("_drag_easing",&CustomPropertyEditor::_drag_easing);
+ ClassDB::bind_method( "_text_edit_changed",&CustomPropertyEditor::_text_edit_changed);
+ ClassDB::bind_method( "_menu_option",&CustomPropertyEditor::_menu_option);
+ ClassDB::bind_method( "_create_dialog_callback",&CustomPropertyEditor::_create_dialog_callback);
+ ClassDB::bind_method( "_create_selected_property",&CustomPropertyEditor::_create_selected_property);
@@ -2404,7 +2404,7 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p
} else {
RES res = obj->get( p_name ).operator RefPtr();
- if (res->is_type("Texture")) {
+ if (res->is_class("Texture")) {
int tw = EditorSettings::get_singleton()->get("property_editor/texture_preview_width");
p_item->set_icon_max_width(1,tw);
p_item->set_icon(1,res);
@@ -2416,20 +2416,20 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p
} else if (res->get_path()!="" && !res->get_path().begins_with("local://")) {
p_item->set_text(1, res->get_path().get_file());
} else {
- p_item->set_text(1,"<"+res->get_type()+">");
+ p_item->set_text(1,"<"+res->get_class()+">");
};
if (res.is_valid() && res->get_path().is_resource_file()) {
p_item->set_tooltip(1,res->get_path());
} else if (res.is_valid()) {
- p_item->set_tooltip(1,res->get_name()+" ("+res->get_type()+")");
+ p_item->set_tooltip(1,res->get_name()+" ("+res->get_class()+")");
}
- if (has_icon(res->get_type(),"EditorIcons")) {
+ if (has_icon(res->get_class(),"EditorIcons")) {
- p_item->set_icon(0,get_icon(res->get_type(),"EditorIcons"));
+ p_item->set_icon(0,get_icon(res->get_class(),"EditorIcons"));
} else {
Dictionary d = p_item->get_metadata(0);
@@ -2448,7 +2448,7 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p
}
}
- if (!res->is_type("Texture")) {
+ if (!res->is_class("Texture")) {
//texture already previews via itself
EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res,this,"_resource_preview_done",p_item->get_instance_ID());
}
@@ -2555,7 +2555,7 @@ bool PropertyEditor::_is_drop_valid(const Dictionary& p_drag_data, const Diction
Ref<Resource> res = drag_data["resource"];
for(int i=0;i<allowed_type.get_slice_count(",");i++) {
String at = allowed_type.get_slice(",",i).strip_edges();
- if (res.is_valid() && ObjectTypeDB::is_type(res->get_type(),at)) {
+ if (res.is_valid() && ClassDB::is_parent_class(res->get_class(),at)) {
return true;
}
}
@@ -2573,7 +2573,7 @@ bool PropertyEditor::_is_drop_valid(const Dictionary& p_drag_data, const Diction
for(int i=0;i<allowed_type.get_slice_count(",");i++) {
String at = allowed_type.get_slice(",",i).strip_edges();
- if (ObjectTypeDB::is_type(ftype,at)) {
+ if (ClassDB::is_parent_class(ftype,at)) {
return true;
}
}
@@ -3122,7 +3122,7 @@ void PropertyEditor::update_tree() {
if (use_doc_hints) {
StringName setter;
StringName type;
- if (ObjectTypeDB::get_setter_and_type_for_property(obj->get_type_name(),p.name,type,setter)) {
+ if (ClassDB::get_setter_and_type_for_property(obj->get_class_name(),p.name,type,setter)) {
String descr;
bool found=false;
@@ -3635,7 +3635,7 @@ void PropertyEditor::update_tree() {
} else {
RES res = obj->get( p.name ).operator RefPtr();
- if (res->is_type("Texture")) {
+ if (res->is_class("Texture")) {
int tw = EditorSettings::get_singleton()->get("property_editor/texture_preview_width");
item->set_icon_max_width(1,tw);
item->set_icon(1,res);
@@ -3648,19 +3648,19 @@ void PropertyEditor::update_tree() {
item->set_text(1, res->get_path().get_file());
} else {
- item->set_text(1,"<"+res->get_type()+">");
+ item->set_text(1,"<"+res->get_class()+">");
}
- if (has_icon(res->get_type(),"EditorIcons")) {
- type=res->get_type();
+ if (has_icon(res->get_class(),"EditorIcons")) {
+ type=res->get_class();
}
if (res.is_valid() && res->get_path().is_resource_file()) {
item->set_tooltip(1,res->get_path());
} else if (res.is_valid()) {
- item->set_tooltip(1,res->get_name()+" ("+res->get_type()+")");
+ item->set_tooltip(1,res->get_name()+" ("+res->get_class()+")");
}
- if (!res->is_type("Texture")) {
+ if (!res->is_class("Texture")) {
//texture already previews via itself
EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res,this,"_resource_preview_done",item->get_instance_ID());
}
@@ -4214,24 +4214,24 @@ void PropertyEditor::_resource_preview_done(const String& p_path,const Ref<Textu
}
void PropertyEditor::_bind_methods() {
- ObjectTypeDB::bind_method( "_item_edited",&PropertyEditor::_item_edited);
- ObjectTypeDB::bind_method( "_item_selected",&PropertyEditor::_item_selected);
- ObjectTypeDB::bind_method( "_custom_editor_request",&PropertyEditor::_custom_editor_request);
- ObjectTypeDB::bind_method( "_custom_editor_edited",&PropertyEditor::_custom_editor_edited);
- ObjectTypeDB::bind_method( "_resource_edit_request",&PropertyEditor::_resource_edit_request);
- ObjectTypeDB::bind_method( "_node_removed",&PropertyEditor::_node_removed);
- ObjectTypeDB::bind_method( "_edit_button",&PropertyEditor::_edit_button);
- ObjectTypeDB::bind_method( "_changed_callback",&PropertyEditor::_changed_callbacks);
- ObjectTypeDB::bind_method( "_draw_flags",&PropertyEditor::_draw_flags);
- ObjectTypeDB::bind_method( "_set_range_def",&PropertyEditor::_set_range_def);
- ObjectTypeDB::bind_method( "_filter_changed",&PropertyEditor::_filter_changed);
- ObjectTypeDB::bind_method( "update_tree",&PropertyEditor::update_tree);
- ObjectTypeDB::bind_method( "_resource_preview_done",&PropertyEditor::_resource_preview_done);
- ObjectTypeDB::bind_method( "refresh",&PropertyEditor::refresh);
-
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &PropertyEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &PropertyEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &PropertyEditor::drop_data_fw);
+ ClassDB::bind_method( "_item_edited",&PropertyEditor::_item_edited);
+ ClassDB::bind_method( "_item_selected",&PropertyEditor::_item_selected);
+ ClassDB::bind_method( "_custom_editor_request",&PropertyEditor::_custom_editor_request);
+ ClassDB::bind_method( "_custom_editor_edited",&PropertyEditor::_custom_editor_edited);
+ ClassDB::bind_method( "_resource_edit_request",&PropertyEditor::_resource_edit_request);
+ ClassDB::bind_method( "_node_removed",&PropertyEditor::_node_removed);
+ ClassDB::bind_method( "_edit_button",&PropertyEditor::_edit_button);
+ ClassDB::bind_method( "_changed_callback",&PropertyEditor::_changed_callbacks);
+ ClassDB::bind_method( "_draw_flags",&PropertyEditor::_draw_flags);
+ ClassDB::bind_method( "_set_range_def",&PropertyEditor::_set_range_def);
+ ClassDB::bind_method( "_filter_changed",&PropertyEditor::_filter_changed);
+ ClassDB::bind_method( "update_tree",&PropertyEditor::update_tree);
+ ClassDB::bind_method( "_resource_preview_done",&PropertyEditor::_resource_preview_done);
+ ClassDB::bind_method( "refresh",&PropertyEditor::refresh);
+
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &PropertyEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &PropertyEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &PropertyEditor::drop_data_fw);
ADD_SIGNAL( MethodInfo("property_toggled",PropertyInfo( Variant::STRING, "property"),PropertyInfo( Variant::BOOL, "value")));
ADD_SIGNAL( MethodInfo("resource_selected", PropertyInfo( Variant::OBJECT, "res"),PropertyInfo( Variant::STRING, "prop") ) );
@@ -4398,7 +4398,7 @@ PropertyEditor::~PropertyEditor()
class SectionedPropertyEditorFilter : public Object {
- OBJ_TYPE( SectionedPropertyEditorFilter, Object );
+ GDCLASS( SectionedPropertyEditorFilter, Object );
Object *edited;
String section;
@@ -4482,9 +4482,9 @@ public:
void SectionedPropertyEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_section_selected",&SectionedPropertyEditor::_section_selected);
+ ClassDB::bind_method("_section_selected",&SectionedPropertyEditor::_section_selected);
- ObjectTypeDB::bind_method("update_category_list", &SectionedPropertyEditor::update_category_list);
+ ClassDB::bind_method("update_category_list", &SectionedPropertyEditor::update_category_list);
}
void SectionedPropertyEditor::_section_selected(int p_which) {
diff --git a/tools/editor/property_editor.h b/tools/editor/property_editor.h
index 1792b34d60..cc78546d05 100644
--- a/tools/editor/property_editor.h
+++ b/tools/editor/property_editor.h
@@ -53,7 +53,7 @@ class PropertySelector;
class CustomPropertyEditor : public Popup {
- OBJ_TYPE( CustomPropertyEditor, Popup );
+ GDCLASS( CustomPropertyEditor, Popup );
enum {
MAX_VALUE_EDITORS=12,
@@ -163,7 +163,7 @@ public:
class PropertyEditor : public Control {
- OBJ_TYPE( PropertyEditor, Control );
+ GDCLASS( PropertyEditor, Control );
Tree *tree;
Label *top_label;
@@ -289,7 +289,7 @@ class SectionedPropertyEditorFilter;
class SectionedPropertyEditor : public HBoxContainer {
- OBJ_TYPE(SectionedPropertyEditor,HBoxContainer);
+ GDCLASS(SectionedPropertyEditor,HBoxContainer);
ObjectID obj;
@@ -317,7 +317,7 @@ public:
};
class PropertyValueEvaluator : public ValueEvaluator {
- OBJ_TYPE( PropertyValueEvaluator, ValueEvaluator );
+ GDCLASS( PropertyValueEvaluator, ValueEvaluator );
Object *obj;
ScriptLanguage *script_language;
diff --git a/tools/editor/property_selector.cpp b/tools/editor/property_selector.cpp
index 20b72240d9..a5b3b9324d 100644
--- a/tools/editor/property_selector.cpp
+++ b/tools/editor/property_selector.cpp
@@ -87,8 +87,8 @@ void PropertySelector::_update_search() {
StringName base=base_type;
while(base) {
props.push_back(PropertyInfo(Variant::NIL,base,PROPERTY_HINT_NONE,"",PROPERTY_USAGE_CATEGORY));
- ObjectTypeDB::get_property_list(base,&props,true);
- base=ObjectTypeDB::type_inherits_from(base);
+ ClassDB::get_property_list(base,&props,true);
+ base=ClassDB::get_parent_class(base);
}
}
@@ -194,8 +194,8 @@ void PropertySelector::_update_search() {
StringName base=base_type;
while(base) {
methods.push_back(MethodInfo("*"+String(base)));
- ObjectTypeDB::get_method_list(base,&methods,true);
- base=ObjectTypeDB::type_inherits_from(base);
+ ClassDB::get_method_list(base,&methods,true);
+ base=ClassDB::get_parent_class(base);
}
}
@@ -358,14 +358,14 @@ void PropertySelector::_item_selected() {
}
}
- at_class=ObjectTypeDB::type_inherits_from(at_class);
+ at_class=ClassDB::get_parent_class(at_class);
}
if (text==String()) {
StringName setter;
StringName type;
- if (ObjectTypeDB::get_setter_and_type_for_property(class_type,name,type,setter)) {
+ if (ClassDB::get_setter_and_type_for_property(class_type,name,type,setter)) {
Map<String,DocData::ClassDoc>::Element *E=dd->class_list.find(type);
if (E) {
for(int i=0;i<E->get().methods.size();i++) {
@@ -395,7 +395,7 @@ void PropertySelector::_item_selected() {
}
}
- at_class=ObjectTypeDB::type_inherits_from(at_class);
+ at_class=ClassDB::get_parent_class(at_class);
}
}
@@ -470,7 +470,7 @@ void PropertySelector::select_method_from_basic_type(Variant::Type p_type, const
void PropertySelector::select_method_from_instance(Object* p_instance, const String &p_current){
- base_type=p_instance->get_type();
+ base_type=p_instance->get_class();
selected=p_current;
type=Variant::NIL;
script=0;
@@ -559,10 +559,10 @@ void PropertySelector::select_property_from_instance(Object* p_instance, const S
void PropertySelector::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&PropertySelector::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&PropertySelector::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&PropertySelector::_sbox_input);
- ObjectTypeDB::bind_method(_MD("_item_selected"),&PropertySelector::_item_selected);
+ ClassDB::bind_method(_MD("_text_changed"),&PropertySelector::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&PropertySelector::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&PropertySelector::_sbox_input);
+ ClassDB::bind_method(_MD("_item_selected"),&PropertySelector::_item_selected);
ADD_SIGNAL(MethodInfo("selected",PropertyInfo(Variant::STRING,"name")));
diff --git a/tools/editor/property_selector.h b/tools/editor/property_selector.h
index f7f0e7e167..4823d50e0f 100644
--- a/tools/editor/property_selector.h
+++ b/tools/editor/property_selector.h
@@ -6,7 +6,7 @@
#include "editor_help.h"
class PropertySelector : public ConfirmationDialog {
- OBJ_TYPE(PropertySelector,ConfirmationDialog )
+ GDCLASS(PropertySelector,ConfirmationDialog )
LineEdit *search_box;
diff --git a/tools/editor/quick_open.cpp b/tools/editor/quick_open.cpp
index 5339705ccf..f129a365ce 100644
--- a/tools/editor/quick_open.cpp
+++ b/tools/editor/quick_open.cpp
@@ -166,7 +166,7 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector< Pair< S
String file = efsd->get_file_path(i);
file=file.substr(6,file.length());
- if (ObjectTypeDB::is_type(efsd->get_file_type(i),base_type) && (search_text.is_subsequence_ofi(file))) {
+ if (ClassDB::is_parent_class(efsd->get_file_type(i),base_type) && (search_text.is_subsequence_ofi(file))) {
Pair< String, Ref<Texture> > pair;
pair.first = file;
pair.second = get_icon((has_icon(efsd->get_file_type(i), ei) ? efsd->get_file_type(i) : ot), ei);
@@ -252,9 +252,9 @@ StringName EditorQuickOpen::get_base_type() const {
void EditorQuickOpen::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&EditorQuickOpen::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&EditorQuickOpen::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&EditorQuickOpen::_sbox_input);
+ ClassDB::bind_method(_MD("_text_changed"),&EditorQuickOpen::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&EditorQuickOpen::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&EditorQuickOpen::_sbox_input);
ADD_SIGNAL(MethodInfo("quick_open"));
diff --git a/tools/editor/quick_open.h b/tools/editor/quick_open.h
index 6177fc735e..ef91d910b1 100644
--- a/tools/editor/quick_open.h
+++ b/tools/editor/quick_open.h
@@ -35,7 +35,7 @@
#include "pair.h"
class EditorQuickOpen : public ConfirmationDialog {
- OBJ_TYPE(EditorQuickOpen,ConfirmationDialog )
+ GDCLASS(EditorQuickOpen,ConfirmationDialog )
LineEdit *search_box;
Tree *search_options;
diff --git a/tools/editor/reparent_dialog.cpp b/tools/editor/reparent_dialog.cpp
index fb2ecae55a..c15bc2f482 100644
--- a/tools/editor/reparent_dialog.cpp
+++ b/tools/editor/reparent_dialog.cpp
@@ -75,8 +75,8 @@ void ReparentDialog::set_current(const Set<Node*>& p_selection) {
void ReparentDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_reparent",&ReparentDialog::_reparent);
- ObjectTypeDB::bind_method("_cancel",&ReparentDialog::_cancel);
+ ClassDB::bind_method("_reparent",&ReparentDialog::_reparent);
+ ClassDB::bind_method("_cancel",&ReparentDialog::_cancel);
ADD_SIGNAL( MethodInfo("reparent",PropertyInfo(Variant::NODE_PATH,"path"),PropertyInfo(Variant::BOOL,"keep_global_xform")));
}
diff --git a/tools/editor/reparent_dialog.h b/tools/editor/reparent_dialog.h
index 0d67b38daa..5e21f84581 100644
--- a/tools/editor/reparent_dialog.h
+++ b/tools/editor/reparent_dialog.h
@@ -40,7 +40,7 @@
*/
class ReparentDialog : public ConfirmationDialog {
- OBJ_TYPE( ReparentDialog, ConfirmationDialog );
+ GDCLASS( ReparentDialog, ConfirmationDialog );
SceneTreeEditor *tree;
CheckBox *keep_transform;
diff --git a/tools/editor/resources_dock.cpp b/tools/editor/resources_dock.cpp
index f3909db1a5..c881b000e9 100644
--- a/tools/editor/resources_dock.cpp
+++ b/tools/editor/resources_dock.cpp
@@ -161,7 +161,7 @@ void ResourcesDock::save_resource_as(const Ref<Resource>& p_resource) {
String existing;
if (extensions.size()) {
- existing="new_"+res->get_type().to_lower()+"."+extensions.front()->get().to_lower();
+ existing="new_"+res->get_class().to_lower()+"."+extensions.front()->get().to_lower();
}
file->set_current_file(existing);
@@ -214,7 +214,7 @@ void ResourcesDock::_update_name(TreeItem *item) {
else if (res->get_path()!="" && res->get_path().find("::")==-1)
item->set_text(0,res->get_path().get_file());
else
- item->set_text(0,res->get_type()+" ("+itos(res->get_instance_ID())+")");
+ item->set_text(0,res->get_class()+" ("+itos(res->get_instance_ID())+")");
}
@@ -267,8 +267,8 @@ void ResourcesDock::add_resource(const Ref<Resource>& p_resource) {
TreeItem *res = resources->create_item(root);
res->set_metadata(0,p_resource);
- if (has_icon(p_resource->get_type(),"EditorIcons")) {
- res->set_icon(0,get_icon(p_resource->get_type(),"EditorIcons"));
+ if (has_icon(p_resource->get_class(),"EditorIcons")) {
+ res->set_icon(0,get_icon(p_resource->get_class(),"EditorIcons"));
}
_update_name(res);
@@ -319,12 +319,12 @@ void ResourcesDock::_create() {
void ResourcesDock::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_tool_selected"),&ResourcesDock::_tool_selected);
- ObjectTypeDB::bind_method(_MD("_create"),&ResourcesDock::_create);
- ObjectTypeDB::bind_method(_MD("_resource_selected"),&ResourcesDock::_resource_selected);
- ObjectTypeDB::bind_method(_MD("_delete"),&ResourcesDock::_delete);
- ObjectTypeDB::bind_method(_MD("remove_resource"),&ResourcesDock::remove_resource);
- ObjectTypeDB::bind_method(_MD("_file_action"),&ResourcesDock::_file_action);
+ ClassDB::bind_method(_MD("_tool_selected"),&ResourcesDock::_tool_selected);
+ ClassDB::bind_method(_MD("_create"),&ResourcesDock::_create);
+ ClassDB::bind_method(_MD("_resource_selected"),&ResourcesDock::_resource_selected);
+ ClassDB::bind_method(_MD("_delete"),&ResourcesDock::_delete);
+ ClassDB::bind_method(_MD("remove_resource"),&ResourcesDock::remove_resource);
+ ClassDB::bind_method(_MD("_file_action"),&ResourcesDock::_file_action);
diff --git a/tools/editor/resources_dock.h b/tools/editor/resources_dock.h
index 6340863a61..e225786583 100644
--- a/tools/editor/resources_dock.h
+++ b/tools/editor/resources_dock.h
@@ -45,7 +45,7 @@ class EditorNode;
class ResourcesDock : public VBoxContainer {
- OBJ_TYPE( ResourcesDock, VBoxContainer );
+ GDCLASS( ResourcesDock, VBoxContainer );
enum {
TOOL_NEW,
diff --git a/tools/editor/run_settings_dialog.cpp b/tools/editor/run_settings_dialog.cpp
index 437c43e83c..68fab09bf1 100644
--- a/tools/editor/run_settings_dialog.cpp
+++ b/tools/editor/run_settings_dialog.cpp
@@ -47,8 +47,8 @@ String RunSettingsDialog::get_custom_arguments() const {
void RunSettingsDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_run_mode_changed",&RunSettingsDialog::_run_mode_changed);
- //ObjectTypeDB::bind_method("_browse_selected_file",&RunSettingsDialog::_browse_selected_file);
+ ClassDB::bind_method("_run_mode_changed",&RunSettingsDialog::_run_mode_changed);
+ //ClassDB::bind_method("_browse_selected_file",&RunSettingsDialog::_browse_selected_file);
}
void RunSettingsDialog::_run_mode_changed(int idx) {
diff --git a/tools/editor/run_settings_dialog.h b/tools/editor/run_settings_dialog.h
index b632e0eda4..2efc18e43f 100644
--- a/tools/editor/run_settings_dialog.h
+++ b/tools/editor/run_settings_dialog.h
@@ -36,7 +36,7 @@
class RunSettingsDialog : public AcceptDialog {
- OBJ_TYPE( RunSettingsDialog, AcceptDialog);
+ GDCLASS( RunSettingsDialog, AcceptDialog);
public:
enum RunMode {
RUN_LOCAL_SCENE,
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index 293329f440..111478f7c8 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -375,7 +375,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor->push_item(existing.ptr());
else {
String path = selected->get_filename();
- script_create_dialog->config(selected->get_type(),path);
+ script_create_dialog->config(selected->get_class(),path);
script_create_dialog->popup_centered(Size2(300,290));
//script_create_dialog->popup_centered_minsize();
@@ -748,7 +748,7 @@ Node *SceneTreeDock::_duplicate(Node *p_node, Map<Node*,Node*> &duplimap) {
ERR_FAIL_COND_V(!node,NULL);
//node->generate_instance_state();
} else {
- Object *obj = ObjectTypeDB::instance(p_node->get_type());
+ Object *obj = ClassDB::instance(p_node->get_class());
ERR_FAIL_COND_V(!obj,NULL);
node = obj->cast_to<Node>();
if (!node)
@@ -1378,7 +1378,7 @@ void SceneTreeDock::_create() {
String new_name = parent->validate_child_name(child);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed,"live_debug_create_node",edited_scene->get_path_to(parent),child->get_type(),new_name);
+ editor_data->get_undo_redo().add_do_method(sed,"live_debug_create_node",edited_scene->get_path_to(parent),child->get_class(),new_name);
editor_data->get_undo_redo().add_undo_method(sed,"live_debug_remove_node",NodePath(String(edited_scene->get_path_to(parent))+"/"+new_name));
} else {
@@ -1831,7 +1831,7 @@ void SceneTreeDock::_focus_node() {
Node *node = scene_tree->get_selected();
ERR_FAIL_COND(!node);
- if (node->is_type("CanvasItem")) {
+ if (node->is_class("CanvasItem")) {
CanvasItemEditorPlugin *editor = editor_data->get_editor("2D")->cast_to<CanvasItemEditorPlugin>();
editor->get_canvas_item_editor()->focus_selection();
} else {
@@ -1848,33 +1848,33 @@ void SceneTreeDock::open_script_dialog(Node* p_for_node) {
void SceneTreeDock::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_tool_selected"),&SceneTreeDock::_tool_selected,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("_create"),&SceneTreeDock::_create);
- //ObjectTypeDB::bind_method(_MD("_script_created"),&SceneTreeDock::_script_created);
- ObjectTypeDB::bind_method(_MD("_node_reparent"),&SceneTreeDock::_node_reparent);
- ObjectTypeDB::bind_method(_MD("_set_owners"),&SceneTreeDock::_set_owners);
- ObjectTypeDB::bind_method(_MD("_node_selected"),&SceneTreeDock::_node_selected);
- ObjectTypeDB::bind_method(_MD("_node_renamed"),&SceneTreeDock::_node_renamed);
- ObjectTypeDB::bind_method(_MD("_script_created"),&SceneTreeDock::_script_created);
- ObjectTypeDB::bind_method(_MD("_load_request"),&SceneTreeDock::_load_request);
- ObjectTypeDB::bind_method(_MD("_script_open_request"),&SceneTreeDock::_script_open_request);
- ObjectTypeDB::bind_method(_MD("_unhandled_key_input"),&SceneTreeDock::_unhandled_key_input);
- ObjectTypeDB::bind_method(_MD("_input"),&SceneTreeDock::_input);
- ObjectTypeDB::bind_method(_MD("_nodes_drag_begin"),&SceneTreeDock::_nodes_drag_begin);
- ObjectTypeDB::bind_method(_MD("_delete_confirm"),&SceneTreeDock::_delete_confirm);
- ObjectTypeDB::bind_method(_MD("_node_prerenamed"),&SceneTreeDock::_node_prerenamed);
- ObjectTypeDB::bind_method(_MD("_import_subscene"),&SceneTreeDock::_import_subscene);
- ObjectTypeDB::bind_method(_MD("_selection_changed"),&SceneTreeDock::_selection_changed);
- ObjectTypeDB::bind_method(_MD("_new_scene_from"),&SceneTreeDock::_new_scene_from);
- ObjectTypeDB::bind_method(_MD("_nodes_dragged"),&SceneTreeDock::_nodes_dragged);
- ObjectTypeDB::bind_method(_MD("_files_dropped"),&SceneTreeDock::_files_dropped);
- ObjectTypeDB::bind_method(_MD("_script_dropped"),&SceneTreeDock::_script_dropped);
- ObjectTypeDB::bind_method(_MD("_tree_rmb"),&SceneTreeDock::_tree_rmb);
- ObjectTypeDB::bind_method(_MD("_filter_changed"),&SceneTreeDock::_filter_changed);
- ObjectTypeDB::bind_method(_MD("_focus_node"),&SceneTreeDock::_focus_node);
-
-
- ObjectTypeDB::bind_method(_MD("instance"),&SceneTreeDock::instance);
+ ClassDB::bind_method(_MD("_tool_selected"),&SceneTreeDock::_tool_selected,DEFVAL(false));
+ ClassDB::bind_method(_MD("_create"),&SceneTreeDock::_create);
+ //ClassDB::bind_method(_MD("_script_created"),&SceneTreeDock::_script_created);
+ ClassDB::bind_method(_MD("_node_reparent"),&SceneTreeDock::_node_reparent);
+ ClassDB::bind_method(_MD("_set_owners"),&SceneTreeDock::_set_owners);
+ ClassDB::bind_method(_MD("_node_selected"),&SceneTreeDock::_node_selected);
+ ClassDB::bind_method(_MD("_node_renamed"),&SceneTreeDock::_node_renamed);
+ ClassDB::bind_method(_MD("_script_created"),&SceneTreeDock::_script_created);
+ ClassDB::bind_method(_MD("_load_request"),&SceneTreeDock::_load_request);
+ ClassDB::bind_method(_MD("_script_open_request"),&SceneTreeDock::_script_open_request);
+ ClassDB::bind_method(_MD("_unhandled_key_input"),&SceneTreeDock::_unhandled_key_input);
+ ClassDB::bind_method(_MD("_input"),&SceneTreeDock::_input);
+ ClassDB::bind_method(_MD("_nodes_drag_begin"),&SceneTreeDock::_nodes_drag_begin);
+ ClassDB::bind_method(_MD("_delete_confirm"),&SceneTreeDock::_delete_confirm);
+ ClassDB::bind_method(_MD("_node_prerenamed"),&SceneTreeDock::_node_prerenamed);
+ ClassDB::bind_method(_MD("_import_subscene"),&SceneTreeDock::_import_subscene);
+ ClassDB::bind_method(_MD("_selection_changed"),&SceneTreeDock::_selection_changed);
+ ClassDB::bind_method(_MD("_new_scene_from"),&SceneTreeDock::_new_scene_from);
+ ClassDB::bind_method(_MD("_nodes_dragged"),&SceneTreeDock::_nodes_dragged);
+ ClassDB::bind_method(_MD("_files_dropped"),&SceneTreeDock::_files_dropped);
+ ClassDB::bind_method(_MD("_script_dropped"),&SceneTreeDock::_script_dropped);
+ ClassDB::bind_method(_MD("_tree_rmb"),&SceneTreeDock::_tree_rmb);
+ ClassDB::bind_method(_MD("_filter_changed"),&SceneTreeDock::_filter_changed);
+ ClassDB::bind_method(_MD("_focus_node"),&SceneTreeDock::_focus_node);
+
+
+ ClassDB::bind_method(_MD("instance"),&SceneTreeDock::instance);
}
diff --git a/tools/editor/scene_tree_dock.h b/tools/editor/scene_tree_dock.h
index 0990437395..8dade67337 100644
--- a/tools/editor/scene_tree_dock.h
+++ b/tools/editor/scene_tree_dock.h
@@ -49,7 +49,7 @@ class EditorNode;
class SceneTreeDock : public VBoxContainer {
- OBJ_TYPE( SceneTreeDock, VBoxContainer );
+ GDCLASS( SceneTreeDock, VBoxContainer );
enum Tool {
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index e0cc9573cd..b02372bae7 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -206,14 +206,14 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id)
} else if (p_id==BUTTON_VISIBILITY) {
- if (n->is_type("Spatial")) {
+ if (n->is_class("Spatial")) {
bool v = !bool(n->call("is_hidden"));
undo_redo->create_action(TTR("Toggle Spatial Visible"));
undo_redo->add_do_method(n,"_set_visible_",!v);
undo_redo->add_undo_method(n,"_set_visible_",v);
undo_redo->commit_action();
- } else if (n->is_type("CanvasItem")) {
+ } else if (n->is_class("CanvasItem")) {
bool v = !bool(n->call("is_hidden"));
undo_redo->create_action(TTR("Toggle CanvasItem Visible"));
@@ -224,14 +224,14 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id)
} else if (p_id==BUTTON_LOCK) {
- if (n->is_type("CanvasItem")) {
+ if (n->is_class("CanvasItem")) {
n->set_meta("_edit_lock_", Variant());
_update_tree();
emit_signal("node_changed");
}
} else if (p_id==BUTTON_GROUP) {
- if (n->is_type("CanvasItem")) {
+ if (n->is_class("CanvasItem")) {
n->set_meta("_edit_group_", Variant());
_update_tree();
emit_signal("node_changed");
@@ -314,7 +314,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
if (p_node->has_meta("_editor_icon"))
icon=p_node->get_meta("_editor_icon");
else
- icon=get_icon( (has_icon(p_node->get_type(),"EditorIcons")?p_node->get_type():String("Object")),"EditorIcons");
+ icon=get_icon( (has_icon(p_node->get_class(),"EditorIcons")?p_node->get_class():String("Object")),"EditorIcons");
item->set_icon(0, icon );
item->set_metadata( 0,p_node->get_path() );
@@ -363,13 +363,13 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
if (p_node==get_scene_node() && p_node->get_scene_inherited_state().is_valid()) {
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
- item->set_tooltip(0,TTR("Inherits:")+" "+p_node->get_scene_inherited_state()->get_path()+"\n"+TTR("Type:")+" "+p_node->get_type());
+ item->set_tooltip(0,TTR("Inherits:")+" "+p_node->get_scene_inherited_state()->get_path()+"\n"+TTR("Type:")+" "+p_node->get_class());
} else if (p_node!=get_scene_node() && p_node->get_filename()!="" && can_open_instance) {
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
- item->set_tooltip(0,TTR("Instance:")+" "+p_node->get_filename()+"\n"+TTR("Type:")+" "+p_node->get_type());
+ item->set_tooltip(0,TTR("Instance:")+" "+p_node->get_filename()+"\n"+TTR("Type:")+" "+p_node->get_class());
} else {
- item->set_tooltip(0,String(p_node->get_name())+"\n"+TTR("Type:")+" "+p_node->get_type());
+ item->set_tooltip(0,String(p_node->get_name())+"\n"+TTR("Type:")+" "+p_node->get_class());
}
if (can_open_instance) {
@@ -383,7 +383,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
item->add_button(0,get_icon("Script","EditorIcons"),BUTTON_SCRIPT);
}
- if (p_node->is_type("CanvasItem")) {
+ if (p_node->is_class("CanvasItem")) {
bool is_locked = p_node->has_meta("_edit_lock_");//_edit_group_
if (is_locked)
@@ -403,7 +403,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
p_node->connect("visibility_changed",this,"_node_visibility_changed",varray(p_node));
_update_visibility_color(p_node, item);
- } else if (p_node->is_type("Spatial")) {
+ } else if (p_node->is_class("Spatial")) {
bool h = p_node->call("is_hidden");
if (h)
@@ -469,9 +469,9 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) {
bool visible=false;
- if (p_node->is_type("CanvasItem")) {
+ if (p_node->is_class("CanvasItem")) {
visible = !p_node->call("is_hidden");
- } else if (p_node->is_type("Spatial")) {
+ } else if (p_node->is_class("Spatial")) {
visible = !p_node->call("is_hidden");
}
@@ -484,7 +484,7 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) {
}
void SceneTreeEditor::_update_visibility_color(Node *p_node, TreeItem *p_item) {
- if (p_node->is_type("CanvasItem") || p_node->is_type("Spatial")) {
+ if (p_node->is_class("CanvasItem") || p_node->is_class("Spatial")) {
Color color(1,1,1,1);
bool visible_on_screen = p_node->call("is_visible");
if (!visible_on_screen) {
@@ -524,7 +524,7 @@ void SceneTreeEditor::_node_removed(Node *p_node) {
if (p_node->is_connected("script_changed",this,"_node_script_changed"))
p_node->disconnect("script_changed",this,"_node_script_changed");
- if (p_node->is_type("Spatial") || p_node->is_type("CanvasItem")) {
+ if (p_node->is_class("Spatial") || p_node->is_class("CanvasItem")) {
if (p_node->is_connected("visibility_changed",this,"_node_visibility_changed"))
p_node->disconnect("visibility_changed",this,"_node_visibility_changed");
}
@@ -1102,31 +1102,31 @@ void SceneTreeEditor::_editor_settings_changed() {
void SceneTreeEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_tree_changed",&SceneTreeEditor::_tree_changed);
- ObjectTypeDB::bind_method("_update_tree",&SceneTreeEditor::_update_tree);
- ObjectTypeDB::bind_method("_node_removed",&SceneTreeEditor::_node_removed);
- ObjectTypeDB::bind_method("_selected_changed",&SceneTreeEditor::_selected_changed);
- ObjectTypeDB::bind_method("_renamed",&SceneTreeEditor::_renamed);
- ObjectTypeDB::bind_method("_rename_node",&SceneTreeEditor::_rename_node);
- ObjectTypeDB::bind_method("_test_update_tree",&SceneTreeEditor::_test_update_tree);
- ObjectTypeDB::bind_method("_cell_multi_selected",&SceneTreeEditor::_cell_multi_selected);
- ObjectTypeDB::bind_method("_selection_changed",&SceneTreeEditor::_selection_changed);
- ObjectTypeDB::bind_method("_cell_button_pressed",&SceneTreeEditor::_cell_button_pressed);
- ObjectTypeDB::bind_method("_cell_collapsed",&SceneTreeEditor::_cell_collapsed);
- ObjectTypeDB::bind_method("_subscene_option",&SceneTreeEditor::_subscene_option);
- ObjectTypeDB::bind_method("_rmb_select",&SceneTreeEditor::_rmb_select);
- ObjectTypeDB::bind_method("_warning_changed",&SceneTreeEditor::_warning_changed);
+ ClassDB::bind_method("_tree_changed",&SceneTreeEditor::_tree_changed);
+ ClassDB::bind_method("_update_tree",&SceneTreeEditor::_update_tree);
+ ClassDB::bind_method("_node_removed",&SceneTreeEditor::_node_removed);
+ ClassDB::bind_method("_selected_changed",&SceneTreeEditor::_selected_changed);
+ ClassDB::bind_method("_renamed",&SceneTreeEditor::_renamed);
+ ClassDB::bind_method("_rename_node",&SceneTreeEditor::_rename_node);
+ ClassDB::bind_method("_test_update_tree",&SceneTreeEditor::_test_update_tree);
+ ClassDB::bind_method("_cell_multi_selected",&SceneTreeEditor::_cell_multi_selected);
+ ClassDB::bind_method("_selection_changed",&SceneTreeEditor::_selection_changed);
+ ClassDB::bind_method("_cell_button_pressed",&SceneTreeEditor::_cell_button_pressed);
+ ClassDB::bind_method("_cell_collapsed",&SceneTreeEditor::_cell_collapsed);
+ ClassDB::bind_method("_subscene_option",&SceneTreeEditor::_subscene_option);
+ ClassDB::bind_method("_rmb_select",&SceneTreeEditor::_rmb_select);
+ ClassDB::bind_method("_warning_changed",&SceneTreeEditor::_warning_changed);
- ObjectTypeDB::bind_method("_node_script_changed",&SceneTreeEditor::_node_script_changed);
- ObjectTypeDB::bind_method("_node_visibility_changed",&SceneTreeEditor::_node_visibility_changed);
+ ClassDB::bind_method("_node_script_changed",&SceneTreeEditor::_node_script_changed);
+ ClassDB::bind_method("_node_visibility_changed",&SceneTreeEditor::_node_visibility_changed);
- ObjectTypeDB::bind_method("_editor_settings_changed", &SceneTreeEditor::_editor_settings_changed);
+ ClassDB::bind_method("_editor_settings_changed", &SceneTreeEditor::_editor_settings_changed);
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &SceneTreeEditor::drop_data_fw);
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &SceneTreeEditor::drop_data_fw);
- ObjectTypeDB::bind_method(_MD("update_tree"), &SceneTreeEditor::update_tree);
+ ClassDB::bind_method(_MD("update_tree"), &SceneTreeEditor::update_tree);
ADD_SIGNAL( MethodInfo("node_selected") );
ADD_SIGNAL( MethodInfo("node_renamed") );
@@ -1233,7 +1233,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label,bool p_can_rename, bool p_can_open
add_child(update_timer);
script_types = memnew(List<StringName>);
- ObjectTypeDB::get_inheriters_from("Script", script_types);
+ ClassDB::get_inheriters_from_class("Script", script_types);
}
@@ -1289,8 +1289,8 @@ void SceneTreeDialog::_select() {
void SceneTreeDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_select",&SceneTreeDialog::_select);
- ObjectTypeDB::bind_method("_cancel",&SceneTreeDialog::_cancel);
+ ClassDB::bind_method("_select",&SceneTreeDialog::_select);
+ ClassDB::bind_method("_cancel",&SceneTreeDialog::_cancel);
ADD_SIGNAL( MethodInfo("selected",PropertyInfo(Variant::NODE_PATH,"path")));
}
diff --git a/tools/editor/scene_tree_editor.h b/tools/editor/scene_tree_editor.h
index 3e0e2f1677..3cc1bd2388 100644
--- a/tools/editor/scene_tree_editor.h
+++ b/tools/editor/scene_tree_editor.h
@@ -40,7 +40,7 @@
*/
class SceneTreeEditor : public Control {
- OBJ_TYPE( SceneTreeEditor, Control );
+ GDCLASS( SceneTreeEditor, Control );
EditorSelection *editor_selection;
@@ -172,7 +172,7 @@ public:
class SceneTreeDialog : public ConfirmationDialog {
- OBJ_TYPE( SceneTreeDialog, ConfirmationDialog );
+ GDCLASS( SceneTreeDialog, ConfirmationDialog );
SceneTreeEditor *tree;
// Button *select;
diff --git a/tools/editor/script_create_dialog.cpp b/tools/editor/script_create_dialog.cpp
index bb67dede5a..d0c25442b6 100644
--- a/tools/editor/script_create_dialog.cpp
+++ b/tools/editor/script_create_dialog.cpp
@@ -338,12 +338,12 @@ void ScriptCreateDialog::_update_controls() {
void ScriptCreateDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_class_name_changed",&ScriptCreateDialog::_class_name_changed);
- ObjectTypeDB::bind_method("_lang_changed",&ScriptCreateDialog::_lang_changed);
- ObjectTypeDB::bind_method("_built_in_pressed",&ScriptCreateDialog::_built_in_pressed);
- ObjectTypeDB::bind_method("_browse_path",&ScriptCreateDialog::_browse_path);
- ObjectTypeDB::bind_method("_file_selected",&ScriptCreateDialog::_file_selected);
- ObjectTypeDB::bind_method("_path_changed",&ScriptCreateDialog::_path_changed);
+ ClassDB::bind_method("_class_name_changed",&ScriptCreateDialog::_class_name_changed);
+ ClassDB::bind_method("_lang_changed",&ScriptCreateDialog::_lang_changed);
+ ClassDB::bind_method("_built_in_pressed",&ScriptCreateDialog::_built_in_pressed);
+ ClassDB::bind_method("_browse_path",&ScriptCreateDialog::_browse_path);
+ ClassDB::bind_method("_file_selected",&ScriptCreateDialog::_file_selected);
+ ClassDB::bind_method("_path_changed",&ScriptCreateDialog::_path_changed);
ADD_SIGNAL(MethodInfo("script_created",PropertyInfo(Variant::OBJECT,"script",PROPERTY_HINT_RESOURCE_TYPE,"Script")));
}
diff --git a/tools/editor/script_create_dialog.h b/tools/editor/script_create_dialog.h
index db40710cdc..df16efc73c 100644
--- a/tools/editor/script_create_dialog.h
+++ b/tools/editor/script_create_dialog.h
@@ -37,7 +37,7 @@
#include "scene/gui/check_button.h"
class ScriptCreateDialog : public ConfirmationDialog {
- OBJ_TYPE(ScriptCreateDialog,ConfirmationDialog);
+ GDCLASS(ScriptCreateDialog,ConfirmationDialog);
LineEdit *class_name;
Label *error_label;
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index 88cb357148..bc587e7ef6 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -46,7 +46,7 @@
class ScriptEditorDebuggerVariables : public Object {
- OBJ_TYPE( ScriptEditorDebuggerVariables, Object );
+ GDCLASS( ScriptEditorDebuggerVariables, Object );
List<PropertyInfo> props;
Map<StringName,Variant> values;
@@ -114,7 +114,7 @@ public:
class ScriptEditorDebuggerInspectedObject : public Object {
- OBJ_TYPE( ScriptEditorDebuggerInspectedObject, Object);
+ GDCLASS( ScriptEditorDebuggerInspectedObject, Object);
@@ -1634,39 +1634,39 @@ void ScriptEditorDebugger::_paused() {
void ScriptEditorDebugger::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_stack_dump_frame_selected"),&ScriptEditorDebugger::_stack_dump_frame_selected);
- ObjectTypeDB::bind_method(_MD("debug_next"),&ScriptEditorDebugger::debug_next);
- ObjectTypeDB::bind_method(_MD("debug_step"),&ScriptEditorDebugger::debug_step);
- ObjectTypeDB::bind_method(_MD("debug_break"),&ScriptEditorDebugger::debug_break);
- ObjectTypeDB::bind_method(_MD("debug_continue"),&ScriptEditorDebugger::debug_continue);
- ObjectTypeDB::bind_method(_MD("_output_clear"),&ScriptEditorDebugger::_output_clear);
- ObjectTypeDB::bind_method(_MD("_performance_draw"),&ScriptEditorDebugger::_performance_draw);
- ObjectTypeDB::bind_method(_MD("_performance_select"),&ScriptEditorDebugger::_performance_select);
- ObjectTypeDB::bind_method(_MD("_scene_tree_request"),&ScriptEditorDebugger::_scene_tree_request);
- ObjectTypeDB::bind_method(_MD("_video_mem_request"),&ScriptEditorDebugger::_video_mem_request);
- ObjectTypeDB::bind_method(_MD("_live_edit_set"),&ScriptEditorDebugger::_live_edit_set);
- ObjectTypeDB::bind_method(_MD("_live_edit_clear"),&ScriptEditorDebugger::_live_edit_clear);
-
- ObjectTypeDB::bind_method(_MD("_error_selected"),&ScriptEditorDebugger::_error_selected);
- ObjectTypeDB::bind_method(_MD("_error_stack_selected"),&ScriptEditorDebugger::_error_stack_selected);
- ObjectTypeDB::bind_method(_MD("_profiler_activate"),&ScriptEditorDebugger::_profiler_activate);
- ObjectTypeDB::bind_method(_MD("_profiler_seeked"),&ScriptEditorDebugger::_profiler_seeked);
-
- ObjectTypeDB::bind_method(_MD("_paused"),&ScriptEditorDebugger::_paused);
-
- ObjectTypeDB::bind_method(_MD("_scene_tree_selected"),&ScriptEditorDebugger::_scene_tree_selected);
- ObjectTypeDB::bind_method(_MD("_scene_tree_folded"),&ScriptEditorDebugger::_scene_tree_folded);
-
-
- ObjectTypeDB::bind_method(_MD("live_debug_create_node"),&ScriptEditorDebugger::live_debug_create_node);
- ObjectTypeDB::bind_method(_MD("live_debug_instance_node"),&ScriptEditorDebugger::live_debug_instance_node);
- ObjectTypeDB::bind_method(_MD("live_debug_remove_node"),&ScriptEditorDebugger::live_debug_remove_node);
- ObjectTypeDB::bind_method(_MD("live_debug_remove_and_keep_node"),&ScriptEditorDebugger::live_debug_remove_and_keep_node);
- ObjectTypeDB::bind_method(_MD("live_debug_restore_node"),&ScriptEditorDebugger::live_debug_restore_node);
- ObjectTypeDB::bind_method(_MD("live_debug_duplicate_node"),&ScriptEditorDebugger::live_debug_duplicate_node);
- ObjectTypeDB::bind_method(_MD("live_debug_reparent_node"),&ScriptEditorDebugger::live_debug_reparent_node);
- ObjectTypeDB::bind_method(_MD("_scene_tree_property_select_object"),&ScriptEditorDebugger::_scene_tree_property_select_object);
- ObjectTypeDB::bind_method(_MD("_scene_tree_property_value_edited"),&ScriptEditorDebugger::_scene_tree_property_value_edited);
+ ClassDB::bind_method(_MD("_stack_dump_frame_selected"),&ScriptEditorDebugger::_stack_dump_frame_selected);
+ ClassDB::bind_method(_MD("debug_next"),&ScriptEditorDebugger::debug_next);
+ ClassDB::bind_method(_MD("debug_step"),&ScriptEditorDebugger::debug_step);
+ ClassDB::bind_method(_MD("debug_break"),&ScriptEditorDebugger::debug_break);
+ ClassDB::bind_method(_MD("debug_continue"),&ScriptEditorDebugger::debug_continue);
+ ClassDB::bind_method(_MD("_output_clear"),&ScriptEditorDebugger::_output_clear);
+ ClassDB::bind_method(_MD("_performance_draw"),&ScriptEditorDebugger::_performance_draw);
+ ClassDB::bind_method(_MD("_performance_select"),&ScriptEditorDebugger::_performance_select);
+ ClassDB::bind_method(_MD("_scene_tree_request"),&ScriptEditorDebugger::_scene_tree_request);
+ ClassDB::bind_method(_MD("_video_mem_request"),&ScriptEditorDebugger::_video_mem_request);
+ ClassDB::bind_method(_MD("_live_edit_set"),&ScriptEditorDebugger::_live_edit_set);
+ ClassDB::bind_method(_MD("_live_edit_clear"),&ScriptEditorDebugger::_live_edit_clear);
+
+ ClassDB::bind_method(_MD("_error_selected"),&ScriptEditorDebugger::_error_selected);
+ ClassDB::bind_method(_MD("_error_stack_selected"),&ScriptEditorDebugger::_error_stack_selected);
+ ClassDB::bind_method(_MD("_profiler_activate"),&ScriptEditorDebugger::_profiler_activate);
+ ClassDB::bind_method(_MD("_profiler_seeked"),&ScriptEditorDebugger::_profiler_seeked);
+
+ ClassDB::bind_method(_MD("_paused"),&ScriptEditorDebugger::_paused);
+
+ ClassDB::bind_method(_MD("_scene_tree_selected"),&ScriptEditorDebugger::_scene_tree_selected);
+ ClassDB::bind_method(_MD("_scene_tree_folded"),&ScriptEditorDebugger::_scene_tree_folded);
+
+
+ ClassDB::bind_method(_MD("live_debug_create_node"),&ScriptEditorDebugger::live_debug_create_node);
+ ClassDB::bind_method(_MD("live_debug_instance_node"),&ScriptEditorDebugger::live_debug_instance_node);
+ ClassDB::bind_method(_MD("live_debug_remove_node"),&ScriptEditorDebugger::live_debug_remove_node);
+ ClassDB::bind_method(_MD("live_debug_remove_and_keep_node"),&ScriptEditorDebugger::live_debug_remove_and_keep_node);
+ ClassDB::bind_method(_MD("live_debug_restore_node"),&ScriptEditorDebugger::live_debug_restore_node);
+ ClassDB::bind_method(_MD("live_debug_duplicate_node"),&ScriptEditorDebugger::live_debug_duplicate_node);
+ ClassDB::bind_method(_MD("live_debug_reparent_node"),&ScriptEditorDebugger::live_debug_reparent_node);
+ ClassDB::bind_method(_MD("_scene_tree_property_select_object"),&ScriptEditorDebugger::_scene_tree_property_select_object);
+ ClassDB::bind_method(_MD("_scene_tree_property_value_edited"),&ScriptEditorDebugger::_scene_tree_property_value_edited);
ADD_SIGNAL(MethodInfo("goto_script_line"));
ADD_SIGNAL(MethodInfo("breaked",PropertyInfo(Variant::BOOL,"reallydid"),PropertyInfo(Variant::BOOL,"can_debug")));
diff --git a/tools/editor/script_editor_debugger.h b/tools/editor/script_editor_debugger.h
index 985edd8df3..a02934bbaf 100644
--- a/tools/editor/script_editor_debugger.h
+++ b/tools/editor/script_editor_debugger.h
@@ -55,7 +55,7 @@ class ScriptEditorDebuggerInspectedObject;
class ScriptEditorDebugger : public Control {
- OBJ_TYPE( ScriptEditorDebugger, Control );
+ GDCLASS( ScriptEditorDebugger, Control );
AcceptDialog *msgdialog;
diff --git a/tools/editor/settings_config_dialog.cpp b/tools/editor/settings_config_dialog.cpp
index 476a2ed693..97dc2647e4 100644
--- a/tools/editor/settings_config_dialog.cpp
+++ b/tools/editor/settings_config_dialog.cpp
@@ -288,16 +288,16 @@ void EditorSettingsDialog::_press_a_key_confirm() {
void EditorSettingsDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_settings_save"),&EditorSettingsDialog::_settings_save);
- ObjectTypeDB::bind_method(_MD("_settings_changed"),&EditorSettingsDialog::_settings_changed);
- ObjectTypeDB::bind_method(_MD("_settings_property_edited"),&EditorSettingsDialog::_settings_property_edited);
- ObjectTypeDB::bind_method(_MD("_clear_search_box"),&EditorSettingsDialog::_clear_search_box);
- ObjectTypeDB::bind_method(_MD("_clear_shortcut_search_box"),&EditorSettingsDialog::_clear_shortcut_search_box);
- ObjectTypeDB::bind_method(_MD("_shortcut_button_pressed"),&EditorSettingsDialog::_shortcut_button_pressed);
- ObjectTypeDB::bind_method(_MD("_filter_shortcuts"),&EditorSettingsDialog::_filter_shortcuts);
- ObjectTypeDB::bind_method(_MD("_update_shortcuts"),&EditorSettingsDialog::_update_shortcuts);
- ObjectTypeDB::bind_method(_MD("_press_a_key_confirm"),&EditorSettingsDialog::_press_a_key_confirm);
- ObjectTypeDB::bind_method(_MD("_wait_for_key"),&EditorSettingsDialog::_wait_for_key);
+ ClassDB::bind_method(_MD("_settings_save"),&EditorSettingsDialog::_settings_save);
+ ClassDB::bind_method(_MD("_settings_changed"),&EditorSettingsDialog::_settings_changed);
+ ClassDB::bind_method(_MD("_settings_property_edited"),&EditorSettingsDialog::_settings_property_edited);
+ ClassDB::bind_method(_MD("_clear_search_box"),&EditorSettingsDialog::_clear_search_box);
+ ClassDB::bind_method(_MD("_clear_shortcut_search_box"),&EditorSettingsDialog::_clear_shortcut_search_box);
+ ClassDB::bind_method(_MD("_shortcut_button_pressed"),&EditorSettingsDialog::_shortcut_button_pressed);
+ ClassDB::bind_method(_MD("_filter_shortcuts"),&EditorSettingsDialog::_filter_shortcuts);
+ ClassDB::bind_method(_MD("_update_shortcuts"),&EditorSettingsDialog::_update_shortcuts);
+ ClassDB::bind_method(_MD("_press_a_key_confirm"),&EditorSettingsDialog::_press_a_key_confirm);
+ ClassDB::bind_method(_MD("_wait_for_key"),&EditorSettingsDialog::_wait_for_key);
}
diff --git a/tools/editor/settings_config_dialog.h b/tools/editor/settings_config_dialog.h
index 8a4bdc3b8c..17a05c27d3 100644
--- a/tools/editor/settings_config_dialog.h
+++ b/tools/editor/settings_config_dialog.h
@@ -36,7 +36,7 @@
class EditorSettingsDialog : public AcceptDialog {
- OBJ_TYPE(EditorSettingsDialog,AcceptDialog);
+ GDCLASS(EditorSettingsDialog,AcceptDialog);
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index f170c9b717..809c824d91 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -616,14 +616,14 @@ void EditorSpatialGizmo::free(){
void EditorSpatialGizmo::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_lines","lines","material:Material","billboard"),&EditorSpatialGizmo::add_lines,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("add_mesh","mesh:Mesh","billboard","skeleton"),&EditorSpatialGizmo::add_mesh,DEFVAL(false),DEFVAL(RID()));
- ObjectTypeDB::bind_method(_MD("add_collision_segments","segments"),&EditorSpatialGizmo::add_collision_segments);
- ObjectTypeDB::bind_method(_MD("add_collision_triangles","triangles:TriangleMesh"),&EditorSpatialGizmo::add_collision_triangles);
- ObjectTypeDB::bind_method(_MD("add_unscaled_billboard","material:Material","default_scale"),&EditorSpatialGizmo::add_unscaled_billboard,DEFVAL(1));
- ObjectTypeDB::bind_method(_MD("add_handles","handles","billboard","secondary"),&EditorSpatialGizmo::add_handles,DEFVAL(false),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("set_spatial_node","node:Spatial"),&EditorSpatialGizmo::_set_spatial_node);
- ObjectTypeDB::bind_method(_MD("clear"),&EditorSpatialGizmo::clear);
+ ClassDB::bind_method(_MD("add_lines","lines","material:Material","billboard"),&EditorSpatialGizmo::add_lines,DEFVAL(false));
+ ClassDB::bind_method(_MD("add_mesh","mesh:Mesh","billboard","skeleton"),&EditorSpatialGizmo::add_mesh,DEFVAL(false),DEFVAL(RID()));
+ ClassDB::bind_method(_MD("add_collision_segments","segments"),&EditorSpatialGizmo::add_collision_segments);
+ ClassDB::bind_method(_MD("add_collision_triangles","triangles:TriangleMesh"),&EditorSpatialGizmo::add_collision_triangles);
+ ClassDB::bind_method(_MD("add_unscaled_billboard","material:Material","default_scale"),&EditorSpatialGizmo::add_unscaled_billboard,DEFVAL(1));
+ ClassDB::bind_method(_MD("add_handles","handles","billboard","secondary"),&EditorSpatialGizmo::add_handles,DEFVAL(false),DEFVAL(false));
+ ClassDB::bind_method(_MD("set_spatial_node","node:Spatial"),&EditorSpatialGizmo::_set_spatial_node);
+ ClassDB::bind_method(_MD("clear"),&EditorSpatialGizmo::clear);
BIND_VMETHOD( MethodInfo("redraw"));
BIND_VMETHOD( MethodInfo(Variant::STRING,"get_handle_name",PropertyInfo(Variant::INT,"index")));
diff --git a/tools/editor/spatial_editor_gizmos.h b/tools/editor/spatial_editor_gizmos.h
index d6bdb39481..8fde52b05a 100644
--- a/tools/editor/spatial_editor_gizmos.h
+++ b/tools/editor/spatial_editor_gizmos.h
@@ -57,7 +57,7 @@ class Camera;
class EditorSpatialGizmo : public SpatialEditorGizmo {
- OBJ_TYPE(EditorSpatialGizmo,SpatialGizmo);
+ GDCLASS(EditorSpatialGizmo,SpatialGizmo);
struct Instance{
@@ -129,7 +129,7 @@ public:
class LightSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(LightSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(LightSpatialGizmo,EditorSpatialGizmo);
Light* light;
@@ -148,7 +148,7 @@ public:
class ListenerSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(ListenerSpatialGizmo, EditorSpatialGizmo);
+ GDCLASS(ListenerSpatialGizmo, EditorSpatialGizmo);
Listener* listener;
@@ -161,7 +161,7 @@ public:
class CameraSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(CameraSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(CameraSpatialGizmo,EditorSpatialGizmo);
Camera* camera;
@@ -182,7 +182,7 @@ public:
class MeshInstanceSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(MeshInstanceSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(MeshInstanceSpatialGizmo,EditorSpatialGizmo);
MeshInstance* mesh;
@@ -195,7 +195,7 @@ public:
class Position3DSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(Position3DSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(Position3DSpatialGizmo,EditorSpatialGizmo);
Position3D* p3d;
@@ -208,7 +208,7 @@ public:
class SkeletonSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(SkeletonSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(SkeletonSpatialGizmo,EditorSpatialGizmo);
Skeleton* skel;
@@ -224,7 +224,7 @@ public:
class SpatialPlayerSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(SpatialPlayerSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(SpatialPlayerSpatialGizmo,EditorSpatialGizmo);
SpatialPlayer* splayer;
@@ -239,7 +239,7 @@ public:
class TestCubeSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(TestCubeSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(TestCubeSpatialGizmo,EditorSpatialGizmo);
TestCube* tc;
@@ -252,7 +252,7 @@ public:
class RoomSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(RoomSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(RoomSpatialGizmo,EditorSpatialGizmo);
struct _EdgeKey {
@@ -277,7 +277,7 @@ public:
class PortalSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(PortalSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(PortalSpatialGizmo,EditorSpatialGizmo);
Portal* portal;
@@ -291,7 +291,7 @@ public:
class VisibilityNotifierGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(VisibilityNotifierGizmo ,EditorSpatialGizmo);
+ GDCLASS(VisibilityNotifierGizmo ,EditorSpatialGizmo);
VisibilityNotifier* notifier;
@@ -311,7 +311,7 @@ public:
class ReflectionProbeGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(ReflectionProbeGizmo ,EditorSpatialGizmo);
+ GDCLASS(ReflectionProbeGizmo ,EditorSpatialGizmo);
ReflectionProbe* probe;
@@ -330,7 +330,7 @@ public:
class GIProbeGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(GIProbeGizmo ,EditorSpatialGizmo);
+ GDCLASS(GIProbeGizmo ,EditorSpatialGizmo);
GIProbe* probe;
@@ -350,7 +350,7 @@ public:
class CollisionShapeSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(CollisionShapeSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(CollisionShapeSpatialGizmo,EditorSpatialGizmo);
CollisionShape* cs;
@@ -367,7 +367,7 @@ public:
class CollisionPolygonSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(CollisionPolygonSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(CollisionPolygonSpatialGizmo,EditorSpatialGizmo);
CollisionPolygon* polygon;
@@ -382,7 +382,7 @@ public:
class RayCastSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(RayCastSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(RayCastSpatialGizmo,EditorSpatialGizmo);
RayCast* raycast;
@@ -397,7 +397,7 @@ public:
class VehicleWheelSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(VehicleWheelSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(VehicleWheelSpatialGizmo,EditorSpatialGizmo);
VehicleWheel* car_wheel;
@@ -411,7 +411,7 @@ public:
class NavigationMeshSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(NavigationMeshSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(NavigationMeshSpatialGizmo,EditorSpatialGizmo);
struct _EdgeKey {
@@ -436,7 +436,7 @@ public:
class PinJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(PinJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(PinJointSpatialGizmo,EditorSpatialGizmo);
PinJoint* p3d;
@@ -450,7 +450,7 @@ public:
class HingeJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(HingeJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(HingeJointSpatialGizmo,EditorSpatialGizmo);
HingeJoint* p3d;
@@ -463,7 +463,7 @@ public:
class SliderJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(SliderJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(SliderJointSpatialGizmo,EditorSpatialGizmo);
SliderJoint* p3d;
@@ -476,7 +476,7 @@ public:
class ConeTwistJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(ConeTwistJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(ConeTwistJointSpatialGizmo,EditorSpatialGizmo);
ConeTwistJoint* p3d;
@@ -490,7 +490,7 @@ public:
class Generic6DOFJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(Generic6DOFJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(Generic6DOFJointSpatialGizmo,EditorSpatialGizmo);
Generic6DOFJoint* p3d;