diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-06 00:17:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-06 00:17:37 +0200 |
commit | 99aa97949fa808e9a0be71193fb68ec365496c03 (patch) | |
tree | 81eff81f436f512ba2147c72003038581b91c4f3 | |
parent | 94664b4e61be5b2e2c1098a743cca872a5d8d6d8 (diff) | |
parent | 60677c4e95d40117efcbac85f2adaac31dd4fda3 (diff) |
Merge pull request #63958 from hakro/fix-control-animation-keys
Remove rect_ prefix from control properties when keyframing
-rw-r--r-- | doc/classes/Camera3D.xml | 2 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | scene/gui/graph_node.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 5595abc02a..643351efc0 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -144,7 +144,7 @@ # This code block is part of a script that inherits from Node3D. # `control` is a reference to a node inheriting from Control. control.visible = not get_viewport().get_camera_3d().is_position_behind(global_transform.origin) - control.rect_position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) + control.position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) [/codeblock] </description> </method> diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 6f8d33532f..ac85eb5e1b 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -4237,13 +4237,13 @@ void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation, Control *ctrl = Object::cast_to<Control>(canvas_item); if (key_pos) { - te->insert_node_value_key(ctrl, "rect_position", ctrl->get_position(), p_on_existing); + te->insert_node_value_key(ctrl, "position", ctrl->get_position(), p_on_existing); } if (key_rot) { - te->insert_node_value_key(ctrl, "rect_rotation", ctrl->get_rotation(), p_on_existing); + te->insert_node_value_key(ctrl, "rotation", ctrl->get_rotation(), p_on_existing); } if (key_scale) { - te->insert_node_value_key(ctrl, "rect_size", ctrl->get_size(), p_on_existing); + te->insert_node_value_key(ctrl, "size", ctrl->get_size(), p_on_existing); } } } diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index c5054525a7..112b8c74af 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -450,7 +450,7 @@ void GraphNode::_validate_property(PropertyInfo &property) const { Control::_validate_property(property); GraphEdit *graph = Object::cast_to<GraphEdit>(get_parent()); if (graph) { - if (property.name == "rect_position") { + if (property.name == "position") { property.usage |= PROPERTY_USAGE_READ_ONLY; } } |