Skip to content

Commit

Permalink
Merge pull request #52273 from aaronfranke/gltf-renames
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Sep 15, 2021
2 parents a3d1bc7 + 33df50a commit 13eff7d
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 128 deletions.
8 changes: 4 additions & 4 deletions modules/gltf/doc_classes/GLTFCamera.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<methods>
</methods>
<members>
<member name="fov_size" type="float" setter="set_fov_size" getter="get_fov_size" default="75.0">
<member name="depth_far" type="float" setter="set_depth_far" getter="get_depth_far" default="4000.0">
</member>
<member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
<member name="depth_near" type="float" setter="set_depth_near" getter="get_depth_near" default="0.05">
</member>
<member name="zfar" type="float" setter="set_zfar" getter="get_zfar" default="4000.0">
<member name="fov_size" type="float" setter="set_fov_size" getter="get_fov_size" default="75.0">
</member>
<member name="znear" type="float" setter="set_znear" getter="get_znear" default="0.05">
<member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
</member>
</members>
<constants>
Expand Down
4 changes: 2 additions & 2 deletions modules/gltf/doc_classes/GLTFLight.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
</member>
<member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="0.0">
</member>
<member name="light_type" type="String" setter="set_light_type" getter="get_light_type" default="&quot;&quot;">
</member>
<member name="outer_cone_angle" type="float" setter="set_outer_cone_angle" getter="get_outer_cone_angle" default="0.0">
</member>
<member name="range" type="float" setter="set_range" getter="get_range" default="0.0">
</member>
<member name="type" type="String" setter="set_type" getter="get_type" default="&quot;&quot;">
</member>
</members>
<constants>
</constants>
Expand Down
4 changes: 2 additions & 2 deletions modules/gltf/doc_classes/GLTFNode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
</member>
<member name="parent" type="int" setter="set_parent" getter="get_parent" default="-1">
</member>
<member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)">
</member>
<member name="rotation" type="Quaternion" setter="set_rotation" getter="get_rotation" default="Quaternion(0, 0, 0, 1)">
</member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
Expand All @@ -31,8 +33,6 @@
</member>
<member name="skin" type="int" setter="set_skin" getter="get_skin" default="-1">
</member>
<member name="translation" type="Vector3" setter="set_translation" getter="get_translation" default="Vector3(0, 0, 0)">
</member>
<member name="xform" type="Transform3D" setter="set_xform" getter="get_xform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
</member>
</members>
Expand Down
2 changes: 1 addition & 1 deletion modules/gltf/gltf_animation.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class GLTFAnimation : public Resource {
};

struct Track {
Channel<Vector3> translation_track;
Channel<Vector3> position_track;
Channel<Quaternion> rotation_track;
Channel<Vector3> scale_track;
Vector<Channel<float>> weight_tracks;
Expand Down
12 changes: 6 additions & 6 deletions modules/gltf/gltf_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ void GLTFCamera::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_perspective", "perspective"), &GLTFCamera::set_perspective);
ClassDB::bind_method(D_METHOD("get_fov_size"), &GLTFCamera::get_fov_size);
ClassDB::bind_method(D_METHOD("set_fov_size", "fov_size"), &GLTFCamera::set_fov_size);
ClassDB::bind_method(D_METHOD("get_zfar"), &GLTFCamera::get_zfar);
ClassDB::bind_method(D_METHOD("set_zfar", "zfar"), &GLTFCamera::set_zfar);
ClassDB::bind_method(D_METHOD("get_znear"), &GLTFCamera::get_znear);
ClassDB::bind_method(D_METHOD("set_znear", "znear"), &GLTFCamera::set_znear);
ClassDB::bind_method(D_METHOD("get_depth_far"), &GLTFCamera::get_depth_far);
ClassDB::bind_method(D_METHOD("set_depth_far", "zdepth_far"), &GLTFCamera::set_depth_far);
ClassDB::bind_method(D_METHOD("get_depth_near"), &GLTFCamera::get_depth_near);
ClassDB::bind_method(D_METHOD("set_depth_near", "zdepth_near"), &GLTFCamera::set_depth_near);

ADD_PROPERTY(PropertyInfo(Variant::BOOL, "perspective"), "set_perspective", "get_perspective"); // bool
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "fov_size"), "set_fov_size", "get_fov_size"); // float
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "zfar"), "set_zfar", "get_zfar"); // float
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "znear"), "set_znear", "get_znear"); // float
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth_far"), "set_depth_far", "get_depth_far"); // float
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "depth_near"), "set_depth_near", "get_depth_near"); // float
}
12 changes: 6 additions & 6 deletions modules/gltf/gltf_camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class GLTFCamera : public Resource {
private:
bool perspective = true;
float fov_size = 75.0;
float zfar = 4000.0;
float znear = 0.05;
float depth_far = 4000.0;
float depth_near = 0.05;

protected:
static void _bind_methods();
Expand All @@ -50,9 +50,9 @@ class GLTFCamera : public Resource {
void set_perspective(bool p_val) { perspective = p_val; }
float get_fov_size() const { return fov_size; }
void set_fov_size(float p_val) { fov_size = p_val; }
float get_zfar() const { return zfar; }
void set_zfar(float p_val) { zfar = p_val; }
float get_znear() const { return znear; }
void set_znear(float p_val) { znear = p_val; }
float get_depth_far() const { return depth_far; }
void set_depth_far(float p_val) { depth_far = p_val; }
float get_depth_near() const { return depth_near; }
void set_depth_near(float p_val) { depth_near = p_val; }
};
#endif // GLTF_CAMERA_H
Loading

0 comments on commit 13eff7d

Please sign in to comment.