summaryrefslogtreecommitdiff
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 7beff4147d..0feee447a4 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1761,14 +1761,14 @@ EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) {
setting = false;
}
-///////////////////// QUAT /////////////////////////
+///////////////////// QUATERNION /////////////////////////
-void EditorPropertyQuat::_value_changed(double val, const String &p_name) {
+void EditorPropertyQuaternion::_value_changed(double val, const String &p_name) {
if (setting) {
return;
}
- Quat p;
+ Quaternion p;
p.x = spin[0]->get_value();
p.y = spin[1]->get_value();
p.z = spin[2]->get_value();
@@ -1776,8 +1776,8 @@ void EditorPropertyQuat::_value_changed(double val, const String &p_name) {
emit_changed(get_edited_property(), p, p_name);
}
-void EditorPropertyQuat::update_property() {
- Quat val = get_edited_object()->get(get_edited_property());
+void EditorPropertyQuaternion::update_property() {
+ Quaternion val = get_edited_object()->get(get_edited_property());
setting = true;
spin[0]->set_value(val.x);
spin[1]->set_value(val.y);
@@ -1786,7 +1786,7 @@ void EditorPropertyQuat::update_property() {
setting = false;
}
-void EditorPropertyQuat::_notification(int p_what) {
+void EditorPropertyQuaternion::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 3; i++) {
@@ -1797,10 +1797,10 @@ void EditorPropertyQuat::_notification(int p_what) {
}
}
-void EditorPropertyQuat::_bind_methods() {
+void EditorPropertyQuaternion::_bind_methods() {
}
-void EditorPropertyQuat::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
+void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
@@ -1811,7 +1811,7 @@ void EditorPropertyQuat::setup(double p_min, double p_max, double p_step, bool p
}
}
-EditorPropertyQuat::EditorPropertyQuat() {
+EditorPropertyQuaternion::EditorPropertyQuaternion() {
bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector_types_editing");
BoxContainer *bc;
@@ -1832,7 +1832,7 @@ EditorPropertyQuat::EditorPropertyQuat() {
spin[i]->set_label(desc[i]);
bc->add_child(spin[i]);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuat::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuaternion::_value_changed), varray(desc[i]));
if (horizontal) {
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
}
@@ -2078,12 +2078,12 @@ EditorPropertyBasis::EditorPropertyBasis() {
///////////////////// TRANSFORM /////////////////////////
-void EditorPropertyTransform::_value_changed(double val, const String &p_name) {
+void EditorPropertyTransform3D::_value_changed(double val, const String &p_name) {
if (setting) {
return;
}
- Transform p;
+ Transform3D p;
p.basis[0][0] = spin[0]->get_value();
p.basis[1][0] = spin[1]->get_value();
p.basis[2][0] = spin[2]->get_value();
@@ -2100,11 +2100,11 @@ void EditorPropertyTransform::_value_changed(double val, const String &p_name) {
emit_changed(get_edited_property(), p, p_name);
}
-void EditorPropertyTransform::update_property() {
+void EditorPropertyTransform3D::update_property() {
update_using_transform(get_edited_object()->get(get_edited_property()));
}
-void EditorPropertyTransform::update_using_transform(Transform p_transform) {
+void EditorPropertyTransform3D::update_using_transform(Transform3D p_transform) {
setting = true;
spin[0]->set_value(p_transform.basis[0][0]);
spin[1]->set_value(p_transform.basis[1][0]);
@@ -2121,7 +2121,7 @@ void EditorPropertyTransform::update_using_transform(Transform p_transform) {
setting = false;
}
-void EditorPropertyTransform::_notification(int p_what) {
+void EditorPropertyTransform3D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
Color base = get_theme_color("accent_color", "Editor");
for (int i = 0; i < 12; i++) {
@@ -2132,10 +2132,10 @@ void EditorPropertyTransform::_notification(int p_what) {
}
}
-void EditorPropertyTransform::_bind_methods() {
+void EditorPropertyTransform3D::_bind_methods() {
}
-void EditorPropertyTransform::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
+void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, bool p_no_slider) {
for (int i = 0; i < 12; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
@@ -2146,7 +2146,7 @@ void EditorPropertyTransform::setup(double p_min, double p_max, double p_step, b
}
}
-EditorPropertyTransform::EditorPropertyTransform() {
+EditorPropertyTransform3D::EditorPropertyTransform3D() {
GridContainer *g = memnew(GridContainer);
g->set_columns(3);
add_child(g);
@@ -2159,7 +2159,7 @@ EditorPropertyTransform::EditorPropertyTransform() {
g->add_child(spin[i]);
spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
add_focusable(spin[i]);
- spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform::_value_changed), varray(desc[i]));
+ spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform3D::_value_changed), varray(desc[i]));
}
set_bottom_editor(g);
setting = false;
@@ -2261,7 +2261,7 @@ void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {
base_node = get_edited_object()->call("get_root_path");
}
- if (!base_node && Object::cast_to<Reference>(get_edited_object())) {
+ if (!base_node && Object::cast_to<RefCounted>(get_edited_object())) {
Node *to_node = get_node(p_path);
ERR_FAIL_COND(!to_node);
path = get_tree()->get_edited_scene_root()->get_path_to(to_node);
@@ -3056,8 +3056,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(min, max, step, hide_slider);
add_property_editor(p_path, editor);
} break;
- case Variant::QUAT: {
- EditorPropertyQuat *editor = memnew(EditorPropertyQuat);
+ case Variant::QUATERNION: {
+ EditorPropertyQuaternion *editor = memnew(EditorPropertyQuaternion);
double min = -65535, max = 65535, step = default_float_step;
bool hide_slider = true;
@@ -3107,8 +3107,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(min, max, step, hide_slider);
add_property_editor(p_path, editor);
} break;
- case Variant::TRANSFORM: {
- EditorPropertyTransform *editor = memnew(EditorPropertyTransform);
+ case Variant::TRANSFORM3D: {
+ EditorPropertyTransform3D *editor = memnew(EditorPropertyTransform3D);
double min = -65535, max = 65535, step = default_float_step;
bool hide_slider = true;