78 Commits

Author SHA1 Message Date
kitsdream
706194e054 Fix the display of the tree diagram and optimize performance
Fix the display of the tree diagram and optimize performance.
2023-10-29 03:38:02 +08:00
kitsdream
ded87a25ff Fix the display of the tree diagram and optimize performance
Fix the display of the tree diagram and optimize performance.
2023-09-25 00:17:59 +08:00
K. S. Ernest (iFire) Lee
484ac8f9cc Make compile. 2023-09-09 07:27:44 -07:00
kitsdream
a604b8ab06 Optimize the code and fix the problem of the search box being stuck.
Optimize the code and fix the problem of the search box being stuck.
2023-09-01 10:11:25 -07:00
K. S. Ernest (iFire) Lee
9a4df15d3e 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.
2023-08-19 09:42:23 -07:00
K. S. Ernest (iFire) Lee
ed84d33890 Restore Godot engine builds. 2022-12-03 10:44:08 -08:00
Nathan Franke
625bd191e8 add .gitignore, fix build on master 2022-09-08 03:07:52 -05:00
kobewi
d0327d2631 Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
kobewi
85d3e5541a Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
Umang Kalra
337426420d Changed the title of change node type dialog 2022-08-20 22:53:07 +05:30
Yuri Sizov
c6aaa971cc Remove CustomPropertyEditor completely 2022-08-01 22:57:05 +03:00
Yuri Sizov
64a43160ef Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
Juan Linietsky
52f9fce008 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Rémi Verschelde
47504329bb Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
reduz
41973c79b3 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
bruvzg
d562c00c0f Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
FireForge
47a6888901 Rename Control PRESET_WIDE to PRESET_FULL_RECT 2022-07-18 20:08:11 -05:00
FireForge
c535af7ee7 Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
Hendrik Brucker
d99e73db21 Fix visual editor settings change propagation 2022-06-07 19:17:47 +02:00
Raul Santos
f5696eec5e Support explicit values in flag properties, add C# flags support
- Add support for explicit values in properties using `PROPERTY_HINT_FLAGS`
that works the same way it does for enums.
- Fix enums and flags in VisualScriptEditor (it wasn't considering the
explicit value).
- Use `PROPERTY_HINT_FLAGS` for C# enums with the FlagsAttribute instead
of `PROPERTY_HINT_ENUM`.
2022-06-03 05:19:01 +02:00
Hendrik Brucker
2f2e0a6874 Improve Graphedit connection lines 2022-05-30 17:33:01 +02:00
Rémi Verschelde
dd1988dd19 Merge pull request #47665 from trollodel/tree_more_buttons_signals 2022-05-24 10:50:55 +02:00
Rémi Verschelde
fb92cf6c58 Merge pull request #61017 from derammo/derammo_58121
display of large help text in visual script
2022-05-22 01:26:33 +02:00
derammo
2a4531af67 display of large help text in visual script
implemented vertical scroller for help text in popup
disabled broken positioning code
2022-05-21 18:38:40 -04:00
trollodel
99d251e5ab Add the button pressed to some signals in Tree 2022-05-21 17:16:52 +02:00
Aaron Record
da2b5ff235 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
Rémi Verschelde
6dfc6ed11f Merge pull request #60463 from Geometror/improve-vs-1 2022-05-16 13:50:42 +02:00
Rémi Verschelde
f2438cd29d Merge pull request #61010 from derammo/visual_script_selector_paths 2022-05-16 13:49:31 +02:00
reduz
09fc804cff Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
derammo
9caea16a53 fixed path calculations in visual script selector
incorrect usage of lstrip was mangling file names
2022-05-13 19:26:27 -04:00
reduz
d6625fbe18 Add a new HashMap implementation
Adds a new, cleaned up, HashMap implementation.

* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
  for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).

This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
kobewi
f8d511a327 Cleanup metadata usage 2022-05-06 00:27:10 +02:00
Hugo Locurcio
fb199547ff Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Rémi Verschelde
26d51fa0c3 Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
Hendrik Brucker
8e72d8332b Improve the VisualShader/VisualScript editor UI 2022-04-30 03:56:57 +02:00
David Cambré
ea620759ca Improve VisualScript search and instancing of nodes
Constructors are more accessible.
Basic type methods are now based on ClassDB and not registerd_node_names.
Selecting search_classes now automatically changes the scope.
2022-04-17 15:21:26 +02:00
Nicholas Huelin
d2a3675ec8 Fix Visual Script's jump to function relative to zoom
When double-clicking on a function name the graph will now correctly jump to the function relative to the zoom ratio.
2022-04-12 15:27:49 +02:00
Rémi Verschelde
b00aef8f29 Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Aaron Franke
d1feea8ccb Initialize bools in the headers in editor 2022-03-12 13:34:06 -06:00
reduz
00e3a9b7a1 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
Raul Santos
e9e0b643ef Sort variables in VisualScriptEditor
Sorts the script variables in alphabetical order to display them
in VisualScriptEditor.
2022-02-24 21:18:02 +01:00
megalobyte
f649a96f6a Don't process VisualScriptNodes 2022-02-19 14:33:27 -05:00
Rémi Verschelde
de2d041f6e Merge pull request #58187 from jakobbouchard/notification-switch-chunk-c
Convert _notification methods to switch - Chunk C
2022-02-16 20:58:55 +01:00
Jakob Bouchard
2768f4bb23 Convert _notification methods to switch - Chunk C 2022-02-16 13:03:05 -05:00
MisoMosiSpy
3183e25ca4 Added icons for missing types in visual script’s icon list. 2022-02-16 20:31:18 +05:30
Rémi Verschelde
92165cb7c1 Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
jmb462
285bc6bfa2 Fix renaming function dialog in VisualScript does not work correctly 2022-02-12 21:28:28 +01:00
Rémi Verschelde
2d58a2091e Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Rémi Verschelde
b7df73244f Merge pull request #57796 from akien-mga/revert-sname-theme-setters 2022-02-08 11:13:24 +01:00
Rémi Verschelde
7b93c2e6ab Re-add missing SNAME macros in get_theme_* calls
They were removed in the previous commit reverting the addition of `SNAME`
to `add_theme_*` and theme setter methods, which is not wanted.
2022-02-08 10:31:56 +01:00