summaryrefslogtreecommitdiff
path: root/modules/visual_script/visual_script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/visual_script/visual_script.cpp')
-rw-r--r--modules/visual_script/visual_script.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 312abdf39b..aa09e7f005 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -907,6 +907,9 @@ void VisualScript::_update_placeholders() {
for (Map<StringName,Variable>::Element *E=variables.front();E;E=E->next()) {
+ if (!E->get()._export)
+ continue;
+
PropertyInfo p = E->get().info;
p.name=SCRIPT_VARIABLES_PREFIX+String(E->key());
pinfo.push_back(p);
@@ -940,6 +943,9 @@ ScriptInstance* VisualScript::instance_create(Object *p_this) {
for (Map<StringName,Variable>::Element *E=variables.front();E;E=E->next()) {
+ if (!E->get()._export)
+ continue;
+
PropertyInfo p = E->get().info;
p.name=SCRIPT_VARIABLES_PREFIX+String(E->key());
pinfo.push_back(p);
@@ -1110,6 +1116,20 @@ void VisualScript::get_script_property_list(List<PropertyInfo> *p_list) const {
}
}
+bool VisualScript::are_subnodes_edited() const {
+
+ for(const Map<StringName,Function>::Element *E=functions.front();E;E=E->next()) {
+
+ for (const Map<int,Function::NodeData>::Element *F=E->get().nodes.front();F;F=F->next()) {
+ if (F->get().node->is_edited()) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
void VisualScript::_set_data(const Dictionary& p_data) {