mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Remove rect_ prefix from control properties when keyframing
This commit is contained in:
parent
f5a89bf460
commit
60677c4e95
@ -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>
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user