diff options
Diffstat (limited to 'scene/3d')
80 files changed, 812 insertions, 812 deletions
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 { |