mirror of
https://github.com/godotengine/godot-visual-script.git
synced 2026-01-03 10:09:19 +03:00
Codebase Enhancements and Performance Improvements
We've made several updates to improve our codebase and application performance. - Clang format was applied for better readability and consistency, aiding other developers in understanding and contributing to the code. - We resolved issues that were causing visual script compilation failure. The visual script now compiles successfully, ensuring application functionality. - Broken sections within the codebase were fixed, improving overall stability. - Built-in functions from the visual script were removed to simplify the code and enhance readability. - Generic search performance was improved to provide faster results, enhancing user experience. - Missing flow nodes were added to the Visual Script, ensuring all necessary components are present for correct functioning. In an effort to streamline the codebase: - `VisualScriptComment` class and related code were removed, reducing complexity and improving maintainability. - Error messages were optimized for quicker feedback when errors occur. - Licenses were updated to reflect recent changes, ensuring legal compliance and project transparency. - The `get_global_name()` override in `visual_script.h` was fixed, and `TYPE_BUILTIN_FUNC` in `visual_script_expression.h` was removed, improving code functionality. - Search logic was refactored to avoid double searching, enhancing performance. - Documentation was updated to reflect recent changes, providing accurate information to users and developers. - Property selection logic in `VisualScriptPropertySelector` was refactored for easier understanding and modification. - Code was refactored to avoid variable shadowing, improving readability and reducing potential errors. - `.clang-format` and `.clang-tidy` configuration files were added to ensure consistent code styling. To make the code more robust and easier to understand: - Variable names were corrected for clarity, and error handling in `visual_script_expression.cpp` was improved. - Function and variable names were refactored for better readability and maintainability. - Member editing logic in `VisualScriptEditor` was simplified. - Name variables were updated to be unique, avoiding potential conflicts and errors. - The `VisualScriptSubCall` class was refactored for simplicity and ease of understanding. For macOS workflow: - It was updated to use the latest version and correct path for installing Vulkan SDK, enabling the application to leverage the latest features and improvements from the Vulkan SDK. - Mac Vulkan SDK was installed to support Vulkan-based functionalities. Lastly, we made necessary changes to pass CI/CD tests, ensuring the code quality and stability of the application.
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
/*************************************************************************/
|
||||
/* visual_script_flow_control.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. */
|
||||
/*************************************************************************/
|
||||
/**************************************************************************/
|
||||
/* visual_script_flow_control.h */
|
||||
/**************************************************************************/
|
||||
/* This file is part of: */
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/**************************************************************************/
|
||||
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
||||
/* */
|
||||
/* 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_FLOW_CONTROL_H
|
||||
#define VISUAL_SCRIPT_FLOW_CONTROL_H
|
||||
@@ -64,7 +64,8 @@ public:
|
||||
void set_enable_return_value(bool p_enable);
|
||||
bool is_return_value_enabled() const;
|
||||
|
||||
virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override;
|
||||
virtual VisualScriptNodeInstance *
|
||||
instantiate(VisualScriptInstance *p_instance) override;
|
||||
|
||||
VisualScriptReturn();
|
||||
};
|
||||
@@ -91,7 +92,8 @@ public:
|
||||
virtual String get_text() const override;
|
||||
virtual String get_category() const override { return "flow_control"; }
|
||||
|
||||
virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override;
|
||||
virtual VisualScriptNodeInstance *
|
||||
instantiate(VisualScriptInstance *p_instance) override;
|
||||
|
||||
VisualScriptCondition();
|
||||
};
|
||||
@@ -118,7 +120,8 @@ public:
|
||||
virtual String get_text() const override;
|
||||
virtual String get_category() const override { return "flow_control"; }
|
||||
|
||||
virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override;
|
||||
virtual VisualScriptNodeInstance *
|
||||
instantiate(VisualScriptInstance *p_instance) override;
|
||||
|
||||
VisualScriptWhile();
|
||||
};
|
||||
@@ -145,7 +148,8 @@ public:
|
||||
virtual String get_text() const override;
|
||||
virtual String get_category() const override { return "flow_control"; }
|
||||
|
||||
virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override;
|
||||
virtual VisualScriptNodeInstance *
|
||||
instantiate(VisualScriptInstance *p_instance) override;
|
||||
|
||||
VisualScriptIterator();
|
||||
};
|
||||
@@ -177,7 +181,8 @@ public:
|
||||
void set_steps(int p_steps);
|
||||
int get_steps() const;
|
||||
|
||||
virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override;
|
||||
virtual VisualScriptNodeInstance *
|
||||
instantiate(VisualScriptInstance *p_instance) override;
|
||||
|
||||
VisualScriptSequence();
|
||||
};
|
||||
@@ -208,7 +213,9 @@ public:
|
||||
virtual bool has_input_sequence_port() const override;
|
||||
|
||||
virtual String get_output_sequence_port_text(int p_port) const override;
|
||||
virtual bool has_mixed_input_and_sequence_ports() const override { return true; }
|
||||
virtual bool has_mixed_input_and_sequence_ports() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual int get_input_value_port_count() const override;
|
||||
virtual int get_output_value_port_count() const override;
|
||||
@@ -220,7 +227,8 @@ public:
|
||||
virtual String get_text() const override;
|
||||
virtual String get_category() const override { return "flow_control"; }
|
||||
|
||||
virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override;
|
||||
virtual VisualScriptNodeInstance *
|
||||
instantiate(VisualScriptInstance *p_instance) override;
|
||||
|
||||
VisualScriptSwitch();
|
||||
};
|
||||
@@ -256,9 +264,11 @@ public:
|
||||
void set_base_script(const String &p_path);
|
||||
String get_base_script() const;
|
||||
|
||||
virtual TypeGuess guess_output_type(TypeGuess *p_inputs, int p_output) const override;
|
||||
virtual TypeGuess guess_output_type(TypeGuess *p_inputs,
|
||||
int p_output) const override;
|
||||
|
||||
virtual VisualScriptNodeInstance *instantiate(VisualScriptInstance *p_instance) override;
|
||||
virtual VisualScriptNodeInstance *
|
||||
instantiate(VisualScriptInstance *p_instance) override;
|
||||
|
||||
VisualScriptTypeCast();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user