summaryrefslogtreecommitdiffstats
path: root/scene/3d/spatial.cpp
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2017-02-13 12:47:24 +0100
committerHein-Pieter van Braam <hp@tmm.cx>2017-02-13 12:50:02 +0100
commit411ee71b4d2dd4dfb3c137b057e0cfcdb55d6291 (patch)
treea3c28058efb7a80faed23bff683fe0931859ed52 /scene/3d/spatial.cpp
parentbf64df4427836a4e7a5060ee11d75eea6da79b14 (diff)
downloadredot-engine-411ee71b4d2dd4dfb3c137b057e0cfcdb55d6291.tar.gz
Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer This is a step towards fixing #56
Diffstat (limited to 'scene/3d/spatial.cpp')
-rw-r--r--scene/3d/spatial.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index cbbc21cd6a..58a6a24567 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -742,50 +742,50 @@ bool Spatial::is_local_transform_notification_enabled() const {
void Spatial::_bind_methods() {
- 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_in_degrees);
- ClassDB::bind_method(_MD("get_rotation_deg"), &Spatial::get_rotation_in_degrees);
- 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);
+ ClassDB::bind_method(D_METHOD("set_transform","local"), &Spatial::set_transform);
+ ClassDB::bind_method(D_METHOD("get_transform"), &Spatial::get_transform);
+ ClassDB::bind_method(D_METHOD("set_translation","translation"), &Spatial::set_translation);
+ ClassDB::bind_method(D_METHOD("get_translation"), &Spatial::get_translation);
+ ClassDB::bind_method(D_METHOD("set_rotation","rotation_rad"), &Spatial::set_rotation);
+ ClassDB::bind_method(D_METHOD("get_rotation"), &Spatial::get_rotation);
+ ClassDB::bind_method(D_METHOD("set_rotation_deg","rotation_deg"), &Spatial::set_rotation_in_degrees);
+ ClassDB::bind_method(D_METHOD("get_rotation_deg"), &Spatial::get_rotation_in_degrees);
+ ClassDB::bind_method(D_METHOD("set_scale","scale"), &Spatial::set_scale);
+ ClassDB::bind_method(D_METHOD("get_scale"), &Spatial::get_scale);
+ ClassDB::bind_method(D_METHOD("set_global_transform","global"), &Spatial::set_global_transform);
+ ClassDB::bind_method(D_METHOD("get_global_transform"), &Spatial::get_global_transform);
+ ClassDB::bind_method(D_METHOD("get_parent_spatial"), &Spatial::get_parent_spatial);
+ ClassDB::bind_method(D_METHOD("set_ignore_transform_notification","enabled"), &Spatial::set_ignore_transform_notification);
+ ClassDB::bind_method(D_METHOD("set_as_toplevel","enable"), &Spatial::set_as_toplevel);
+ ClassDB::bind_method(D_METHOD("is_set_as_toplevel"), &Spatial::is_set_as_toplevel);
+ ClassDB::bind_method(D_METHOD("get_world:World"), &Spatial::get_world);
// TODO: Obsolete those two methods (old name) properly (GH-4397)
- 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(D_METHOD("_set_rotation_deg","rotation_deg"), &Spatial::_set_rotation_deg);
+ ClassDB::bind_method(D_METHOD("_get_rotation_deg"), &Spatial::_get_rotation_deg);
#ifdef TOOLS_ENABLED
- 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);
+ ClassDB::bind_method(D_METHOD("_update_gizmo"), &Spatial::_update_gizmo);
+ ClassDB::bind_method(D_METHOD("_set_import_transform"), &Spatial::set_import_transform);
+ ClassDB::bind_method(D_METHOD("_get_import_transform"), &Spatial::get_import_transform);
ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"_import_transform",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),"_set_import_transform","_get_import_transform");
#endif
- 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);
+ ClassDB::bind_method(D_METHOD("update_gizmo"), &Spatial::update_gizmo);
+ ClassDB::bind_method(D_METHOD("set_gizmo","gizmo:SpatialGizmo"), &Spatial::set_gizmo);
+ ClassDB::bind_method(D_METHOD("get_gizmo:SpatialGizmo"), &Spatial::get_gizmo);
- ClassDB::bind_method(_MD("set_visible"), &Spatial::set_visible);
- ClassDB::bind_method(_MD("is_visible"), &Spatial::is_visible);
- ClassDB::bind_method(_MD("is_visible_in_tree"), &Spatial::is_visible_in_tree);
- ClassDB::bind_method(_MD("show"), &Spatial::show);
- ClassDB::bind_method(_MD("hide"), &Spatial::hide);
+ ClassDB::bind_method(D_METHOD("set_visible"), &Spatial::set_visible);
+ ClassDB::bind_method(D_METHOD("is_visible"), &Spatial::is_visible);
+ ClassDB::bind_method(D_METHOD("is_visible_in_tree"), &Spatial::is_visible_in_tree);
+ ClassDB::bind_method(D_METHOD("show"), &Spatial::show);
+ ClassDB::bind_method(D_METHOD("hide"), &Spatial::hide);
- 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);
+ ClassDB::bind_method(D_METHOD("set_notify_local_transform","enable"), &Spatial::set_notify_local_transform);
+ ClassDB::bind_method(D_METHOD("is_local_transform_notification_enabled"), &Spatial::is_local_transform_notification_enabled);
- ClassDB::bind_method(_MD("set_notify_transform","enable"), &Spatial::set_notify_transform);
- ClassDB::bind_method(_MD("is_transform_notification_enabled"), &Spatial::is_transform_notification_enabled);
+ ClassDB::bind_method(D_METHOD("set_notify_transform","enable"), &Spatial::set_notify_transform);
+ ClassDB::bind_method(D_METHOD("is_transform_notification_enabled"), &Spatial::is_transform_notification_enabled);
void rotate(const Vector3& p_normal,float p_radians);
void rotate_x(float p_radians);
@@ -796,18 +796,18 @@ void Spatial::_bind_methods() {
void global_rotate(const Vector3& p_normal,float p_radians);
void global_translate(const Vector3& p_offset);
- 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 );
+ ClassDB::bind_method( D_METHOD("rotate","normal","radians"),&Spatial::rotate );
+ ClassDB::bind_method( D_METHOD("global_rotate","normal","radians"),&Spatial::global_rotate );
+ ClassDB::bind_method( D_METHOD("rotate_x","radians"),&Spatial::rotate_x );
+ ClassDB::bind_method( D_METHOD("rotate_y","radians"),&Spatial::rotate_y );
+ ClassDB::bind_method( D_METHOD("rotate_z","radians"),&Spatial::rotate_z );
+ ClassDB::bind_method( D_METHOD("translate","offset"),&Spatial::translate );
+ ClassDB::bind_method( D_METHOD("global_translate","offset"),&Spatial::global_translate );
+ ClassDB::bind_method( D_METHOD("orthonormalize"),&Spatial::orthonormalize );
+ ClassDB::bind_method( D_METHOD("set_identity"),&Spatial::set_identity );
+
+ ClassDB::bind_method( D_METHOD("look_at","target","up"),&Spatial::look_at );
+ ClassDB::bind_method( D_METHOD("look_at_from_pos","pos","target","up"),&Spatial::look_at_from_pos );
BIND_CONSTANT( NOTIFICATION_TRANSFORM_CHANGED );
BIND_CONSTANT( NOTIFICATION_ENTER_WORLD );