Skip to content

Commit 462682e

Browse files
committed
formatting
1 parent 370ec0a commit 462682e

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

editor/scene/scene_tree_editor.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,17 +316,13 @@ void SceneTreeEditor::_update_node_path(Node *p_node, bool p_recursive) {
316316
}
317317
}
318318

319-
void SceneTreeEditor::_update_exposed_nodes(Node *p_node,
320-
TreeItem *p_parent,
321-
bool p_force,
322-
TreeItem *&p_last_inserted) {
319+
void SceneTreeEditor::_update_exposed_nodes(Node *p_node, TreeItem *p_parent, bool p_force, TreeItem *&p_last_inserted) {
323320
int cc = p_node->get_child_count();
324321

325322
for (int i = 0; i < cc; i++) {
326323
Node *child = p_node->get_child(i);
327324

328-
if (child->has_meta(META_EXPOSED_IN_OWNER) ||
329-
child->has_meta(META_EXPOSED_IN_INSTANCE)) {
325+
if (child->has_meta(META_EXPOSED_IN_OWNER) || child->has_meta(META_EXPOSED_IN_INSTANCE)) {
330326
_update_node_subtree(child, p_parent, p_force);
331327

332328
if (auto CI = node_cache.get(child)) {

scene/resources/packed_scene.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
500500
} else if (n.owner == 0) {
501501
// Check whether a node's parent is no longer exposed. This only matters within the Editor.
502502
NODE_FROM_ID(nowner, n.owner);
503-
if (nowner != parent &&
504-
parent->get_owner() != ret_nodes[0] &&
505-
!parent->has_meta(META_EXPOSED_IN_INSTANCE) &&
506-
!parent->has_meta(META_EXPOSED_IN_OWNER)) {
503+
if (nowner != parent && parent->get_owner() != ret_nodes[0] && !parent->has_meta(META_EXPOSED_IN_INSTANCE) && !parent->has_meta(META_EXPOSED_IN_OWNER)) {
507504
bool in_editable_instance = false;
508505
if (parent->get_owner()) {
509506
NodePath rel_path = ret_nodes[0]->get_path_to(parent->get_owner());
@@ -517,10 +514,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
517514

518515
if (!in_editable_instance) {
519516
if (node_paths.size() > 0) {
520-
WARN_PRINT(vformat("Exposed parent path '%s' for node '%s' has vanished when instantiating: '%s'.",
521-
String(node_paths[n.parent & FLAG_MASK]),
522-
String(snames[n.name]),
523-
get_path()));
517+
WARN_PRINT(vformat("Exposed parent path '%s' for node '%s' has vanished when instantiating: '%s'.", String(node_paths[n.parent & FLAG_MASK]), String(snames[n.name]), get_path()));
524518
old_parent_path = String(node_paths[n.parent & FLAG_MASK])
525519
.trim_prefix("./")
526520
.replace_char('/', '@');

0 commit comments

Comments
 (0)