diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-02 23:03:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-02 23:03:46 -0300 |
commit | 118eed485e8f928a5a0dab530ae93211afa10525 (patch) | |
tree | 83efb5cbcebb7046e5b64dfe1712475a7d3b7f14 /modules/gridmap | |
parent | ce26eb74bca48f16e9a34b4eb1c34e50dfc5daae (diff) |
ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class"
ClassDB has been exposed to GDScript.
OBJ_TYPE() macro is now GDCLASS()
Diffstat (limited to 'modules/gridmap')
-rw-r--r-- | modules/gridmap/grid_map.cpp | 80 | ||||
-rw-r--r-- | modules/gridmap/grid_map.h | 2 | ||||
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 20 | ||||
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.h | 4 | ||||
-rw-r--r-- | modules/gridmap/register_types.cpp | 2 |
5 files changed, 54 insertions, 54 deletions
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 |