summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2020-07-24 14:07:57 -0400
committerAaron Franke <arnfranke@yahoo.com>2020-07-27 18:38:53 -0400
commit56e2c6c7043ca14159284b7b1f07e95d6fcf9a9e (patch)
treea332137aefabdfc21f7f5f317096a1895e9f1dc9 /editor/plugins
parent4e825539e590c6ce06e54fbb05571efce7fb181c (diff)
Make all String float conversion methods be 64-bit
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp24
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp2
3 files changed, 14 insertions, 14 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index af1d266832..6e4a39d3f0 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -744,7 +744,7 @@ void AnimationPlayerEditor::_dialog_action(String p_path) {
}
void AnimationPlayerEditor::_scale_changed(const String &p_scale) {
- player->set_speed_scale(p_scale.to_double());
+ player->set_speed_scale(p_scale.to_float());
}
void AnimationPlayerEditor::_update_animation() {
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 6f209c512e..b4b81cc7f0 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -4689,9 +4689,9 @@ void Node3DEditor::edit(Node3D *p_spatial) {
}
void Node3DEditor::_snap_changed() {
- snap_translate_value = snap_translate->get_text().to_double();
- snap_rotate_value = snap_rotate->get_text().to_double();
- snap_scale_value = snap_scale->get_text().to_double();
+ snap_translate_value = snap_translate->get_text().to_float();
+ snap_rotate_value = snap_rotate->get_text().to_float();
+ snap_scale_value = snap_scale->get_text().to_float();
}
void Node3DEditor::_snap_update() {
@@ -4708,9 +4708,9 @@ void Node3DEditor::_xform_dialog_action() {
Vector3 translate;
for (int i = 0; i < 3; i++) {
- translate[i] = xform_translate[i]->get_text().to_double();
- rotate[i] = Math::deg2rad(xform_rotate[i]->get_text().to_double());
- scale[i] = xform_scale[i]->get_text().to_double();
+ translate[i] = xform_translate[i]->get_text().to_float();
+ rotate[i] = Math::deg2rad(xform_rotate[i]->get_text().to_float());
+ scale[i] = xform_scale[i]->get_text().to_float();
}
t.basis.scale(scale);
@@ -6432,9 +6432,9 @@ Vector3 Node3DEditor::snap_point(Vector3 p_target, Vector3 p_start) const {
float Node3DEditor::get_translate_snap() const {
float snap_value;
if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
- snap_value = snap_translate->get_text().to_double() / 10.0;
+ snap_value = snap_translate->get_text().to_float() / 10.0;
} else {
- snap_value = snap_translate->get_text().to_double();
+ snap_value = snap_translate->get_text().to_float();
}
return snap_value;
@@ -6443,9 +6443,9 @@ float Node3DEditor::get_translate_snap() const {
float Node3DEditor::get_rotate_snap() const {
float snap_value;
if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
- snap_value = snap_rotate->get_text().to_double() / 3.0;
+ snap_value = snap_rotate->get_text().to_float() / 3.0;
} else {
- snap_value = snap_rotate->get_text().to_double();
+ snap_value = snap_rotate->get_text().to_float();
}
return snap_value;
@@ -6454,9 +6454,9 @@ float Node3DEditor::get_rotate_snap() const {
float Node3DEditor::get_scale_snap() const {
float snap_value;
if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
- snap_value = snap_scale->get_text().to_double() / 2.0;
+ snap_value = snap_scale->get_text().to_float() / 2.0;
} else {
- snap_value = snap_scale->get_text().to_double();
+ snap_value = snap_scale->get_text().to_float();
}
return snap_value;
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 516c14329c..1073da7d8c 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -458,7 +458,7 @@ void SpriteFramesEditor::_animation_select() {
}
if (frames->has_animation(edited_anim)) {
- double value = anim_speed->get_line_edit()->get_text().to_double();
+ double value = anim_speed->get_line_edit()->get_text().to_float();
if (!Math::is_equal_approx(value, frames->get_animation_speed(edited_anim))) {
_animation_fps_changed(value);
}