Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Viewport children to lock, group, and insert keyframes #99994

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4366,10 +4366,6 @@ void CanvasItemEditor::_insert_animation_keys(bool p_location, bool p_rotation,
continue;
}

if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

if (Object::cast_to<Node2D>(ci)) {
Node2D *n2d = Object::cast_to<Node2D>(ci);

Expand Down Expand Up @@ -4580,9 +4576,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!ci || !ci->is_inside_tree()) {
continue;
}
if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

undo_redo->add_do_method(ci, "set_meta", "_edit_lock_", true);
undo_redo->add_undo_method(ci, "remove_meta", "_edit_lock_");
Expand All @@ -4602,9 +4595,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!ci || !ci->is_inside_tree()) {
continue;
}
if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

undo_redo->add_do_method(ci, "remove_meta", "_edit_lock_");
undo_redo->add_undo_method(ci, "set_meta", "_edit_lock_", true);
Expand All @@ -4624,9 +4614,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!ci || !ci->is_inside_tree()) {
continue;
}
if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

undo_redo->add_do_method(ci, "set_meta", "_edit_group_", true);
undo_redo->add_undo_method(ci, "remove_meta", "_edit_group_");
Expand All @@ -4646,9 +4633,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!ci || !ci->is_inside_tree()) {
continue;
}
if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

undo_redo->add_do_method(ci, "remove_meta", "_edit_group_");
undo_redo->add_undo_method(ci, "set_meta", "_edit_group_", true);
Expand Down Expand Up @@ -4687,10 +4671,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
continue;
}

if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

if (Object::cast_to<Node2D>(ci)) {
Node2D *n2d = Object::cast_to<Node2D>(ci);
PoseClipboard pc;
Expand Down Expand Up @@ -4733,10 +4713,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
continue;
}

if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

if (Object::cast_to<Node2D>(ci)) {
Node2D *n2d = Object::cast_to<Node2D>(ci);

Expand Down
16 changes: 0 additions & 16 deletions editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6771,10 +6771,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
continue;
}

if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

undo_redo->add_do_method(spatial, "set_meta", "_edit_lock_", true);
undo_redo->add_undo_method(spatial, "remove_meta", "_edit_lock_");
undo_redo->add_do_method(this, "emit_signal", "item_lock_status_changed");
Expand All @@ -6796,10 +6792,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
continue;
}

if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

undo_redo->add_do_method(spatial, "remove_meta", "_edit_lock_");
undo_redo->add_undo_method(spatial, "set_meta", "_edit_lock_", true);
undo_redo->add_do_method(this, "emit_signal", "item_lock_status_changed");
Expand All @@ -6821,10 +6813,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
continue;
}

if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

undo_redo->add_do_method(spatial, "set_meta", "_edit_group_", true);
undo_redo->add_undo_method(spatial, "remove_meta", "_edit_group_");
undo_redo->add_do_method(this, "emit_signal", "item_group_status_changed");
Expand All @@ -6845,10 +6833,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
continue;
}

if (spatial->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
continue;
}

undo_redo->add_do_method(spatial, "remove_meta", "_edit_group_");
undo_redo->add_undo_method(spatial, "set_meta", "_edit_group_", true);
undo_redo->add_do_method(this, "emit_signal", "item_group_status_changed");
Expand Down