summaryrefslogtreecommitdiff
path: root/modules/visual_script/visual_script_expression.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-12 11:58:19 +0100
committerGitHub <noreply@github.com>2021-02-12 11:58:19 +0100
commit49122588391b5159fada6d33f136d169b5a01ae5 (patch)
treeb675cbc225b2246fede39ba050dd5f9ef5d9046a /modules/visual_script/visual_script_expression.cpp
parent44e291a250c913e2308da5fcbdc1f48becdc8a1e (diff)
parentf8d03b98e7eeeb726af4f653f1fde8b063cbad14 (diff)
Merge pull request #45903 from reduz/improve-resoucre-load-cache
Improve resource load cache
Diffstat (limited to 'modules/visual_script/visual_script_expression.cpp')
-rw-r--r--modules/visual_script/visual_script_expression.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index 5fc2ccf6e3..f673cbb06d 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -1506,6 +1506,19 @@ VisualScriptNodeInstance *VisualScriptExpression::instance(VisualScriptInstance
return instance;
}
+void VisualScriptExpression::reset_state() {
+ if (nodes) {
+ memdelete(nodes);
+ nodes = nullptr;
+ root = nullptr;
+ }
+
+ error_str = String();
+ error_set = false;
+ str_ofs = 0;
+ inputs.clear();
+}
+
VisualScriptExpression::VisualScriptExpression() {
}