diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-08-24 12:05:37 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-08-24 12:08:17 +0200 |
commit | b1f392c25e214b331f87737d9e27aad30e95f201 (patch) | |
tree | 2a9b5071d74546fd23c28a3736f13e878f4c8bcc /modules/visual_script/visual_script_yield_nodes.h | |
parent | 0626ce50cfd35d1eb81c6c9627f8540be9636b4b (diff) |
Remove VisualScript module for 4.0
As announced in https://godotengine.org/article/godot-4-will-discontinue-visual-scripting,
Godot maintainers have agreed to discontinue the current implementation of
our VisualScript language.
The way it had been designed was not user-friendly enough and we did not
succeed in improving its usability to actually make it a good low-code
solution for users who need one.
So we prefer to remove it for Godot 4.0 and leave the door open for new,
innovative ideas around visual scripting, to be developed as plugins or
extensions now that Godot provides sufficient functionality for this
(notably via GDExtension and the godot-cpp C++ bindings).
The current module has been moved to a dedicated repository (with full Git
history extracted with `git filter-branch`):
https://github.com/godotengine/godot-visual-script
It can still be compiled as a C++ module (for now, but will likely require
work to be kept in sync with the engine repository), but our hope is that
contributors will port it to GDExtension (which is quite compatibile with
the existing C++ module code when using the godot-cpp C++ bindings).
Diffstat (limited to 'modules/visual_script/visual_script_yield_nodes.h')
-rw-r--r-- | modules/visual_script/visual_script_yield_nodes.h | 147 |
1 files changed, 0 insertions, 147 deletions
diff --git a/modules/visual_script/visual_script_yield_nodes.h b/modules/visual_script/visual_script_yield_nodes.h deleted file mode 100644 index 248f2b6e94..0000000000 --- a/modules/visual_script/visual_script_yield_nodes.h +++ /dev/null @@ -1,147 +0,0 @@ -/*************************************************************************/ -/* visual_script_yield_nodes.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#ifndef VISUAL_SCRIPT_YIELD_NODES_H -#define VISUAL_SCRIPT_YIELD_NODES_H - -#include "visual_script.h" - -class VisualScriptYield : public VisualScriptNode { - GDCLASS(VisualScriptYield, VisualScriptNode); - -public: - enum YieldMode { - YIELD_RETURN, - YIELD_FRAME, - YIELD_PHYSICS_FRAME, - YIELD_WAIT - - }; - -private: - YieldMode yield_mode; - double wait_time; - -protected: - void _validate_property(PropertyInfo &p_property) const; - - static void _bind_methods(); - -public: - virtual int get_output_sequence_port_count() const override; - virtual bool has_input_sequence_port() const override; - - virtual String get_output_sequence_port_text(int p_port) const override; - - virtual int get_input_value_port_count() const override; - virtual int get_output_value_port_count() const override; - - virtual PropertyInfo get_input_value_port_info(int p_idx) const override; - virtual PropertyInfo get_output_value_port_info(int p_idx) const override; - - virtual String get_caption() const override; - virtual String get_text() const override; - virtual String get_category() const override { return "functions"; } - - void set_yield_mode(YieldMode p_mode); - YieldMode get_yield_mode(); - - void set_wait_time(double p_time); - double get_wait_time(); - - virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override; - - VisualScriptYield(); -}; -VARIANT_ENUM_CAST(VisualScriptYield::YieldMode) - -class VisualScriptYieldSignal : public VisualScriptNode { - GDCLASS(VisualScriptYieldSignal, VisualScriptNode); - -public: - enum CallMode { - CALL_MODE_SELF, - CALL_MODE_NODE_PATH, - CALL_MODE_INSTANCE, - - }; - -private: - CallMode call_mode; - StringName base_type; - NodePath base_path; - StringName signal; - - Node *_get_base_node() const; - StringName _get_base_type() const; - -protected: - void _validate_property(PropertyInfo &p_property) const; - - static void _bind_methods(); - -public: - virtual int get_output_sequence_port_count() const override; - virtual bool has_input_sequence_port() const override; - - virtual String get_output_sequence_port_text(int p_port) const override; - - virtual int get_input_value_port_count() const override; - virtual int get_output_value_port_count() const override; - - virtual PropertyInfo get_input_value_port_info(int p_idx) const override; - virtual PropertyInfo get_output_value_port_info(int p_idx) const override; - - virtual String get_caption() const override; - virtual String get_text() const override; - virtual String get_category() const override { return "functions"; } - - void set_base_type(const StringName &p_type); - StringName get_base_type() const; - - void set_signal(const StringName &p_type); - StringName get_signal() const; - - void set_base_path(const NodePath &p_type); - NodePath get_base_path() const; - - void set_call_mode(CallMode p_mode); - CallMode get_call_mode() const; - - virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override; - - VisualScriptYieldSignal(); -}; - -VARIANT_ENUM_CAST(VisualScriptYieldSignal::CallMode); - -void register_visual_script_yield_nodes(); - -#endif // VISUAL_SCRIPT_YIELD_NODES_H |