Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove VisualScript module for 4.0 #64822

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

akien-mga
Copy link
Member

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).


I left some references to VisualScript in the code outside modules/visual_script/ which are needed for users who would compile the C++ module in a custom build.

If VisualScript is ported to an extension and further maintained, one aim should be to remove the need for those hardcoded references so that the extension is fully modular.

$ rg -i visual_?script -g'!*.po' -g'!*.pot' --sort path
core/doc_data.h
157:            String category; // FIXME: Wrongly used by VisualScriptPropertySelector, should be removed.

core/object/object.h
98:     // When updating PropertyHint, also sync the hardcoded list in VisualScriptEditorVariableEdit

editor/editor_asset_installer.cpp
123:            extension_guess["vs"] = tree->get_theme_icon(SNAME("VisualScript"), SNAME("EditorIcons"));

editor/editor_node.cpp
2370:                   if (main_plugin->get_name() == "Script" && !current_obj->is_class("VisualScript") && current_res && !current_res->is_built_in() && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) {

editor/editor_themes.cpp
232:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#41ecad", "#25e3a0"); // VisualScript variant
233:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#6f91f0", "#6d8eeb"); // VisualScript bool
234:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#5abbef", "#4fb2e9"); // VisualScript int
235:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#35d4f4", "#27ccf0"); // VisualScript float
236:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#4593ec", "#4690e7"); // VisualScript String
237:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ac73f1", "#ad76ee"); // VisualScript Vector2
238:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#f1738f", "#ee758e"); // VisualScript Rect2
239:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#de66f0", "#dc6aed"); // VisualScript Vector3
240:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#b9ec41", "#96ce1a"); // VisualScript Transform2D
241:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#f74949", "#f77070"); // VisualScript Plane
242:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ec418e", "#ec69a3"); // VisualScript Quat
243:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ee5677", "#ee7991"); // VisualScript AABB
244:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#e1ec41", "#b2bb19"); // VisualScript Basis
245:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#f68f45", "#f49047"); // VisualScript Transform
246:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#417aec", "#6993ec"); // VisualScript NodePath
247:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#41ec80", "#2ce573"); // VisualScript RID
248:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#55f3e3", "#12d5c3"); // VisualScript Object
249:            ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#54ed9e", "#57e99f"); // VisualScript Dictionary

editor/plugins/script_editor_plugin.cpp
227:    // TODO: This signal is no use for VisualScript.
2273:                   !p_resource->is_class("VisualScript")) {
2372:   if (!p_resource->is_class("VisualScript")) {

editor/project_converter_3_to_4.cpp
125:    { "MATH_RAND", "MATH_RANDF_RANGE" }, // VisualScriptBuiltinFunc
126:    { "MATH_RANDOM", "MATH_RANDI_RANGE" }, // VisualScriptBuiltinFunc
127:    { "MATH_STEPIFY", "MATH_STEP_DECIMALS" }, // VisualScriptBuiltinFunc

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).
@akien-mga akien-mga requested review from a team as code owners August 24, 2022 10:12
@akien-mga akien-mga added this to the 4.0 milestone Aug 24, 2022
@akien-mga akien-mga merged commit a4a4402 into godotengine:master Aug 24, 2022
@akien-mga akien-mga deleted the sunset-visual-script branch August 24, 2022 13:42
This was referenced Aug 24, 2022
@akien-mga
Copy link
Member Author

akien-mga commented Aug 25, 2022

For the record, I did a quick test build to see the impact of this removal of binary size (Windows and Linux release export templates):

$ ls -l vs-*
vs-kept:
total 292808
-rwxr-xr-x. 1 akien akien 64783304 Aug 25 10:43 godot.linuxbsd.opt.64
-rwxr-xr-x. 1 akien akien 77190200 Aug 25 10:43 godot.linuxbsd.opt.64.unstripped
-rwxr-xr-x. 1 akien akien 63600128 Aug 25 10:43 godot.windows.opt.64.exe
-rwxr-xr-x. 1 akien akien 94249491 Aug 25 10:43 godot.windows.opt.64.unstripped.exe

vs-removed:
total 287520
-rwxr-xr-x. 1 akien akien 63624232 Aug 25 10:21 godot.linuxbsd.opt.64
-rwxr-xr-x. 1 akien akien 75694512 Aug 25 10:21 godot.linuxbsd.opt.64.unstripped
-rwxr-xr-x. 1 akien akien 62412800 Aug 25 10:21 godot.windows.opt.64.exe
-rwxr-xr-x. 1 akien akien 92677339 Aug 25 10:21 godot.windows.opt.64.unstripped.exe

So it removes around 1MB / 2% of the binary size.

(To be clear, reducing the binary size was not the reason for removing this feature. This is just additional metrics.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants