summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/camera_3d.cpp18
-rw-r--r--scene/3d/camera_3d.h8
-rw-r--r--scene/3d/skeleton_3d.cpp10
-rw-r--r--scene/3d/skeleton_3d.h2
4 files changed, 20 insertions, 18 deletions
diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp
index 61d73ff1e2..18b7bcc789 100644
--- a/scene/3d/camera_3d.cpp
+++ b/scene/3d/camera_3d.cpp
@@ -238,8 +238,8 @@ void Camera3D::clear_current(bool p_enable_next) {
}
}
-void Camera3D::set_current(bool p_current) {
- if (p_current) {
+void Camera3D::set_current(bool p_enabled) {
+ if (p_enabled) {
make_current();
} else {
clear_current();
@@ -460,7 +460,7 @@ void Camera3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_frustum", "size", "offset", "z_near", "z_far"), &Camera3D::set_frustum);
ClassDB::bind_method(D_METHOD("make_current"), &Camera3D::make_current);
ClassDB::bind_method(D_METHOD("clear_current", "enable_next"), &Camera3D::clear_current, DEFVAL(true));
- ClassDB::bind_method(D_METHOD("set_current"), &Camera3D::set_current);
+ ClassDB::bind_method(D_METHOD("set_current", "enabled"), &Camera3D::set_current);
ClassDB::bind_method(D_METHOD("is_current"), &Camera3D::is_current);
ClassDB::bind_method(D_METHOD("get_camera_transform"), &Camera3D::get_camera_transform);
ClassDB::bind_method(D_METHOD("get_fov"), &Camera3D::get_fov);
@@ -468,13 +468,13 @@ void Camera3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_size"), &Camera3D::get_size);
ClassDB::bind_method(D_METHOD("get_far"), &Camera3D::get_far);
ClassDB::bind_method(D_METHOD("get_near"), &Camera3D::get_near);
- ClassDB::bind_method(D_METHOD("set_fov"), &Camera3D::set_fov);
- ClassDB::bind_method(D_METHOD("set_frustum_offset"), &Camera3D::set_frustum_offset);
- ClassDB::bind_method(D_METHOD("set_size"), &Camera3D::set_size);
- ClassDB::bind_method(D_METHOD("set_far"), &Camera3D::set_far);
- ClassDB::bind_method(D_METHOD("set_near"), &Camera3D::set_near);
+ ClassDB::bind_method(D_METHOD("set_fov", "fov"), &Camera3D::set_fov);
+ ClassDB::bind_method(D_METHOD("set_frustum_offset", "offset"), &Camera3D::set_frustum_offset);
+ ClassDB::bind_method(D_METHOD("set_size", "size"), &Camera3D::set_size);
+ ClassDB::bind_method(D_METHOD("set_far", "far"), &Camera3D::set_far);
+ ClassDB::bind_method(D_METHOD("set_near", "near"), &Camera3D::set_near);
ClassDB::bind_method(D_METHOD("get_projection"), &Camera3D::get_projection);
- ClassDB::bind_method(D_METHOD("set_projection"), &Camera3D::set_projection);
+ ClassDB::bind_method(D_METHOD("set_projection", "mode"), &Camera3D::set_projection);
ClassDB::bind_method(D_METHOD("set_h_offset", "ofs"), &Camera3D::set_h_offset);
ClassDB::bind_method(D_METHOD("get_h_offset"), &Camera3D::get_h_offset);
ClassDB::bind_method(D_METHOD("set_v_offset", "ofs"), &Camera3D::set_v_offset);
diff --git a/scene/3d/camera_3d.h b/scene/3d/camera_3d.h
index 6006a2ea3f..73126611d5 100644
--- a/scene/3d/camera_3d.h
+++ b/scene/3d/camera_3d.h
@@ -44,8 +44,10 @@ public:
PROJECTION_FRUSTUM
};
- enum KeepAspect { KEEP_WIDTH,
- KEEP_HEIGHT };
+ enum KeepAspect {
+ KEEP_WIDTH,
+ KEEP_HEIGHT
+ };
enum DopplerTracking {
DOPPLER_TRACKING_DISABLED,
@@ -112,7 +114,7 @@ public:
void make_current();
void clear_current(bool p_enable_next = true);
- void set_current(bool p_current);
+ void set_current(bool p_enabled);
bool is_current() const;
RID get_camera() const;
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp
index 0a19e1d07b..2b52f034b2 100644
--- a/scene/3d/skeleton_3d.cpp
+++ b/scene/3d/skeleton_3d.cpp
@@ -718,8 +718,8 @@ void Skeleton3D::localize_rests() {
}
}
-void Skeleton3D::set_animate_physical_bones(bool p_animate) {
- animate_physical_bones = p_animate;
+void Skeleton3D::set_animate_physical_bones(bool p_enabled) {
+ animate_physical_bones = p_enabled;
if (Engine::get_singleton()->is_editor_hint() == false) {
bool sim = false;
@@ -731,7 +731,7 @@ void Skeleton3D::set_animate_physical_bones(bool p_animate) {
}
}
}
- set_physics_process_internal(sim == false && p_animate);
+ set_physics_process_internal(sim == false && p_enabled);
}
}
@@ -1221,10 +1221,10 @@ void Skeleton3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("local_pose_to_global_pose", "bone_idx", "local_pose"), &Skeleton3D::local_pose_to_global_pose);
ClassDB::bind_method(D_METHOD("global_pose_z_forward_to_bone_forward", "bone_idx", "basis"), &Skeleton3D::global_pose_z_forward_to_bone_forward);
- ClassDB::bind_method(D_METHOD("set_show_rest_only"), &Skeleton3D::set_show_rest_only);
+ ClassDB::bind_method(D_METHOD("set_show_rest_only", "enabled"), &Skeleton3D::set_show_rest_only);
ClassDB::bind_method(D_METHOD("is_show_rest_only"), &Skeleton3D::is_show_rest_only);
- ClassDB::bind_method(D_METHOD("set_animate_physical_bones"), &Skeleton3D::set_animate_physical_bones);
+ ClassDB::bind_method(D_METHOD("set_animate_physical_bones", "enabled"), &Skeleton3D::set_animate_physical_bones);
ClassDB::bind_method(D_METHOD("get_animate_physical_bones"), &Skeleton3D::get_animate_physical_bones);
ClassDB::bind_method(D_METHOD("physical_bones_stop_simulation"), &Skeleton3D::physical_bones_stop_simulation);
diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h
index a50dc158f3..9aa4fc823f 100644
--- a/scene/3d/skeleton_3d.h
+++ b/scene/3d/skeleton_3d.h
@@ -250,7 +250,7 @@ public:
// Physical bone API
- void set_animate_physical_bones(bool p_animate);
+ void set_animate_physical_bones(bool p_enabled);
bool get_animate_physical_bones() const;
void bind_physical_bone_to_bone(int p_bone, PhysicalBone3D *p_physical_bone);