summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/animation/animation_player.cpp3
-rw-r--r--scene/audio/stream_player.cpp2
-rw-r--r--scene/main/node.cpp10
-rw-r--r--scene/main/node.h2
-rw-r--r--scene/scene_string_names.cpp1
-rw-r--r--scene/scene_string_names.h1
-rw-r--r--tools/editor/editor_node.cpp1
-rw-r--r--tools/editor/scene_tree_dock.cpp1
8 files changed, 20 insertions, 1 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 32958112e5..25f49a8a8b 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1012,6 +1012,8 @@ void AnimationPlayer::play(const StringName& p_name, float p_custom_blend, float
queued.clear();
_set_process(true); // always process when starting an animation
playing = true;
+
+ emit_signal(SceneStringNames::get_singleton()->animation_started, c.assigned);
if (is_inside_tree() && get_tree()->is_editor_hint())
return; // no next in this case
@@ -1347,6 +1349,7 @@ void AnimationPlayer::_bind_methods() {
ADD_SIGNAL( MethodInfo("finished") );
ADD_SIGNAL( MethodInfo("animation_changed", PropertyInfo(Variant::STRING,"old_name"), PropertyInfo(Variant::STRING,"new_name")) );
+ ADD_SIGNAL( MethodInfo("animation_started", PropertyInfo(Variant::STRING,"name")) );
BIND_CONSTANT( ANIMATION_PROCESS_FIXED );
BIND_CONSTANT( ANIMATION_PROCESS_IDLE );
diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp
index b6b1ee85f3..050e945c8f 100644
--- a/scene/audio/stream_player.cpp
+++ b/scene/audio/stream_player.cpp
@@ -388,7 +388,7 @@ void StreamPlayer::_bind_methods() {
ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") );
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") );
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/paused"), _SCS("set_paused"), _SCS("is_paused") );
- ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/loop_restart_time"), _SCS("set_loop_restart_time"), _SCS("get_loop_restart_time") );
+ ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/loop_restart_time"), _SCS("set_loop_restart_time"), _SCS("get_loop_restart_time") );
ADD_PROPERTY( PropertyInfo(Variant::INT, "stream/buffering_ms"), _SCS("set_buffering_msec"), _SCS("get_buffering_msec") );
ADD_SIGNAL(MethodInfo("finished"));
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index b90edb38b2..f4c41256db 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1374,6 +1374,16 @@ bool Node::is_editable_instance(Node *p_node) const {
return data.editable_instances.has(p);
}
+void Node::set_editable_instances(const HashMap<NodePath,int>& p_editable_instances) {
+
+ data.editable_instances=p_editable_instances;
+}
+
+HashMap<NodePath,int> Node::get_editable_instances() const {
+
+ return data.editable_instances;
+}
+
#if 0
diff --git a/scene/main/node.h b/scene/main/node.h
index 5c6147d644..560a2e588a 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -239,6 +239,8 @@ public:
void set_editable_instance(Node* p_node,bool p_editable);
bool is_editable_instance(Node* p_node) const;
+ void set_editable_instances(const HashMap<NodePath,int>& p_editable_instances);
+ HashMap<NodePath,int> get_editable_instances() const;
/* NOTIFICATIONS */
diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp
index f47b61001c..28834c732d 100644
--- a/scene/scene_string_names.cpp
+++ b/scene/scene_string_names.cpp
@@ -52,6 +52,7 @@ SceneStringNames::SceneStringNames() {
finished=StaticCString::create("finished");
animation_changed=StaticCString::create("animation_changed");
+ animation_started=StaticCString::create("animation_started");
mouse_enter=StaticCString::create("mouse_enter");
mouse_exit=StaticCString::create("mouse_exit");
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index fc45351c33..f85a858423 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -79,6 +79,7 @@ public:
StringName finished;
StringName animation_changed;
+ StringName animation_started;
StringName body_enter_shape;
StringName body_enter;
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index aa47e97622..316485f42a 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -2672,6 +2672,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
break;
}
+ _menu_option_confirm(RUN_STOP,true);
get_tree()->quit();
String exec = OS::get_singleton()->get_executable_path();
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index 6b2961ea72..c6115ba87a 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -1317,6 +1317,7 @@ void SceneTreeDock::_create() {
if (n==edited_scene) {
edited_scene=newnode;
editor->set_edited_scene(newnode);
+ newnode->set_editable_instances(n->get_editable_instances());
}
//small hack to make collisionshapes and other kind of nodes to work