| 53 | #include "scene/resources/packed_scene.h" |
| 54 | |
| 55 | static bool can_edit(Node *p_node, const String &p_group) { |
| 56 | Node *n = p_node; |
| 57 | bool can_edit = true; |
| 58 | while (n) { |
| 59 | Ref<SceneState> ss = (n == EditorNode::get_singleton()->get_edited_scene()) ? n->get_scene_inherited_state() : n->get_scene_instance_state(); |
| 60 | if (ss.is_valid()) { |
| 61 | int path = ss->find_node_by_path(n->get_path_to(p_node)); |
| 62 | if (path != -1) { |
| 63 | if (ss->is_node_in_group(path, p_group)) { |
| 64 | can_edit = false; |
| 65 | break; |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | n = n->get_owner(); |
| 70 | } |
| 71 | return can_edit; |
| 72 | } |
| 73 | |
| 74 | struct _GroupInfoComparator { |
| 75 | bool operator()(const Node::GroupInfo &p_a, const Node::GroupInfo &p_b) const { |
no test coverage detected