From 22d83bc9f655d5ae7a1b49709c4c1b663725daf5 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 3 Oct 2016 16:33:42 -0300 Subject: Begining of GLES3 renderer: -Most 2D drawing is implemented -Missing shaders -Missing all 3D -Editor needs to be set on update always to be used, otherwise it does not refresh -Large parts of editor not working --- scene/main/node.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scene/main/node.cpp') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 1892240426..5d4e46f9ac 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -315,6 +315,12 @@ void Node::move_child(Node *p_child,int p_pos) { } + if (p_child->data.pos==p_pos) + return; //do nothing + + int motion_from = MIN(p_pos,p_child->data.pos); + int motion_to = MAX(p_pos,p_child->data.pos); + data.children.remove( p_child->data.pos ); data.children.insert( p_pos, p_child ); @@ -324,13 +330,13 @@ void Node::move_child(Node *p_child,int p_pos) { data.blocked++; //new pos first - for (int i=0;idata.pos=i; } // notification second move_child_notify(p_child); - for (int i=0;inotification( NOTIFICATION_MOVED_IN_PARENT ); } -- cgit v1.2.3 From 305956bf707342547baabb7d3f237ebda385f9f4 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Thu, 3 Nov 2016 00:19:32 +0100 Subject: Keep groups when replacing nodes --- scene/main/node.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scene/main/node.cpp') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 6e33dcb4c9..f4fb48682c 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2485,6 +2485,12 @@ void Node::replace_by(Node* p_node,bool p_keep_data) { rd.name=E->get().name; rd.value=get(rd.name); } + + List groups; + get_groups(&groups); + + for(List::Element *E=groups.front();E;E=E->next()) + p_node->add_to_group(E->get().name, E->get().persistent); } _replace_connections_target(p_node); -- cgit v1.2.3 From 184173a9b993c145a2782d9e2488b98221c749e1 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Thu, 17 Nov 2016 18:10:53 +0200 Subject: Guard agains duplicate calling of _ready when instanced in _enter_tree Fixes #6005 --- scene/main/node.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scene/main/node.cpp') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f4fb48682c..bff3c3a089 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -166,6 +166,7 @@ void Node::_notification(int p_notification) { void Node::_propagate_ready() { + data.ready_notified=true; data.blocked++; for (int i=0;idata.ready_notified) { // No parent (root) or parent ready + _propagate_ready(); //reverse_notification(NOTIFICATION_READY); + } tree_changed_b=data.tree; @@ -2999,6 +3002,7 @@ Node::Node() { data.fixed_process=false; data.idle_process=false; data.inside_tree=false; + data.ready_notified=false; data.owner=NULL; data.OW=NULL; -- cgit v1.2.3 From b6eab006dbd21d25a664486809109fffa9533124 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Thu, 17 Nov 2016 18:46:45 +0200 Subject: Do not emit NOTIFICATION_READY more than once (breaking change) Currently, there is no notification with the old behaviour, so probably breaks all cpp code relying on that notification as well. --- scene/main/node.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scene/main/node.cpp') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index bff3c3a089..78a5cb7302 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -166,14 +166,16 @@ void Node::_notification(int p_notification) { void Node::_propagate_ready() { - data.ready_notified=true; data.blocked++; for (int i=0;i_propagate_ready(); } data.blocked--; - notification(NOTIFICATION_READY); + if(!data.ready_notified) { + data.ready_notified=true; + notification(NOTIFICATION_READY); + } } @@ -2663,9 +2665,7 @@ void Node::_set_tree(SceneTree *p_tree) { _propagate_enter_tree(); - if (!data.parent || data.parent->data.ready_notified) { // No parent (root) or parent ready - _propagate_ready(); //reverse_notification(NOTIFICATION_READY); - } + _propagate_ready(); //reverse_notification(NOTIFICATION_READY); tree_changed_b=data.tree; -- cgit v1.2.3 From 440c37fbd93eb26dd7da6c498ed39ca5f3fe7f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 30 Nov 2016 00:07:29 +0100 Subject: Revert "Do not emit NOTIFICATION_READY more than once (breaking change)" This reverts commit b6eab006dbd21d25a664486809109fffa9533124. This commit broke compatibility in an undesired way, as outlined in https://github.com/godotengine/godot/issues/3290#issuecomment-263388003 --- scene/main/node.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scene/main/node.cpp') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 78a5cb7302..bff3c3a089 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -166,16 +166,14 @@ void Node::_notification(int p_notification) { void Node::_propagate_ready() { + data.ready_notified=true; data.blocked++; for (int i=0;i_propagate_ready(); } data.blocked--; - if(!data.ready_notified) { - data.ready_notified=true; - notification(NOTIFICATION_READY); - } + notification(NOTIFICATION_READY); } @@ -2665,7 +2663,9 @@ void Node::_set_tree(SceneTree *p_tree) { _propagate_enter_tree(); - _propagate_ready(); //reverse_notification(NOTIFICATION_READY); + if (!data.parent || data.parent->data.ready_notified) { // No parent (root) or parent ready + _propagate_ready(); //reverse_notification(NOTIFICATION_READY); + } tree_changed_b=data.tree; -- cgit v1.2.3 From c7bc44d5ad9aae4902280012f7654e2318cd910e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 1 Jan 2017 22:01:57 +0100 Subject: Welcome in 2017, dear changelog reader! That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games! --- scene/main/node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/main/node.cpp') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index bff3c3a089..9c97ca4424 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ -- cgit v1.2.3