summaryrefslogtreecommitdiffstats
path: root/modules/visual_script/visual_script.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Improve stack overflow error message in GDScript and VisualScriptHugo Locurcio2022-06-151-2/+2
| | | | | Stack overflow errors are generally the result of infinite recursion within a script.
* i18n: Misc fixes translation stringsRémi Verschelde2022-06-081-2/+2
| | | | Adds some translator comments to solve some questions raised on Weblate.
* Add a new HashSet templatereduz2022-05-201-1/+1
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Use range iterators for RBSet in most casesAaron Record2022-05-191-59/+59
|
* Replace most uses of Map by HashMapreduz2022-05-161-37/+37
| | | | | | | | | | | | * 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!
* Add a new HashMap implementationreduz2022-05-121-93/+66
| | | | | | | | | | | | | | | | | 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<>
* Fix VisualScript export variableskobewi2022-05-061-0/+3
|
* Rename theme properties to include underscoresFireForge2022-04-231-1/+1
| | | | | | | | | | | | | | - check_vadjust -> check_v_adjust - close_h_ofs -> close_h_offset - close_v_ofs -> close_v_offset - commentfocus -> comment_focus - hseparation -> h_separation - ofs -> offset - selectedframe -> selected_frame - state_machine_selectedframe -> state_machine_selected_frame - table_hseparation -> table_h_separation - table_vseparation -> table_v_separation - vseparation -> v_separation
* Remove VARIANT_ARG* macrosreduz2022-03-091-3/+3
| | | | | | | | * 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.
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-2/+0
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* Refactor some object type checking code with `cast_to`Rémi Verschelde2022-02-081-3/+0
| | | | Less stringly typed logic, and less String allocations and comparisons.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Improve editor template workflowfabriceci2022-01-021-10/+5
| | | | Co-Authored-By: jmb462 <jmb462@gmail.com>
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-4/+4
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Rename `remove()` to `remove_at()` when removing by indexLightning_A2021-11-231-1/+1
|
* Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio2021-11-031-2/+2
| | | | | This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
* clang-format: Various fixes to comments alignment from `clang-format` 13Rémi Verschelde2021-10-281-16/+0
| | | | All reviewed manually and occasionally rewritten to avoid bad auto formatting.
* Implement toast notifications in the editorGilles Roudière2021-10-141-1/+1
|
* Use range iterators for `Map`Lightning_A2021-09-301-16/+16
|
* [Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli2021-09-071-6/+6
| | | | | | | | | | | Move multiplayer classes to "core/multiplayer" subdir. Move the RPCConfig and enums (TransferMode, RPCMode) to a separate file (multiplayer.h), and bind them to the global namespace. Move the RPC handling code to its own class (RPCManager). Renames "get_rpc_sender_id" to "get_remote_sender_id".
* Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz2021-08-231-20/+0
| | | | | | | | * `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
* Validates VisualScript.add_node input nodeHaoyu Qiu2021-08-021-0/+1
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-4/+4
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-65/+65
|
* Optimize StringName usagereduz2021-07-181-2/+2
| | | | | | | | | | | * Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
* [Net] Rename NetworkedMultiplayerPeer to MultiplayerPeer.Fabio Alessandrelli2021-07-121-1/+1
|
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-3/+3
|
* Added support for scripts reporting multiple errors to ScriptTextEditorEric M2021-06-191-1/+1
| | | | Scripts can now report multiple errors to the scripting editors in the engine. UI elements were added to support multiple errors.
* Fix default value binding in VisualScriptFunctionStateGeorge Marques2021-06-141-1/+1
|
* [Net] Refactor RPCs, remove RSETsFabio Alessandrelli2021-06-011-92/+6
| | | | | | | | | | In this PR: - Removed rset - rpc_config can now optionally configure transfer mode (reliable/unreliable/ordered) and channel (channels are not actually implemented yet.) - Refactor how the RPC id is computed to minimize the logic in Node and scripts that now only needs a single `get_rpc_methods` function.
* Highlight control flow keywords with a different colorHugo Locurcio2021-05-051-0/+4
| | | | This makes them easier to distinguish from other keywords.
* Replace remaining uses of `NULL` with `nullptr`Rémi Verschelde2021-04-291-1/+1
| | | | Follow-up to #38736 (these uses were likely added after this PR was merged).
* Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-2/+2
| | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* Style: Apply clang-tidy's `readability-braces-around-statements`Rémi Verschelde2021-04-051-3/+5
|
* Style: Apply clang-tidy's `modernize-use-nullptr`Rémi Verschelde2021-04-051-4/+4
|
* Fix VisualScriptFunctionState connect to null object crashjmb4622021-04-031-0/+1
|
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-2/+2
|
* Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-081-9/+0
|
* Merge pull request #44914 from swarnimarun/master-visualscript-refactorRémi Verschelde2021-01-041-1/+1
|\ | | | | Fix doc for the VisualScript class after #39649 PR
| * Fix doc for the VisualScript class.Swarnim Arun2021-01-051-1/+1
| |
* | Merge pull request #39649 from swarnimarun/master-visualscript-refactorRémi Verschelde2021-01-041-591/+484
|\| | | | | Visual Script Refactor
| * Refactoring Visual ScriptSwarnim Arun2021-01-011-591/+484
| | | | | | | | | | * for bloat from hacks for default function * for ease of development nodes becoming detached from functions
* | Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
|/ | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Rename empty() to is_empty()Marcel Admiraal2020-12-281-4/+4
|
* Remove connect *_compat methodsAaron Franke2020-12-051-1/+1
|
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-1/+0
|
* Refactored variant constructor logicreduz2020-11-091-2/+2
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* VisualScript: Fix -Wduplicate-branches warningRémi Verschelde2020-07-221-7/+1
| | | | When VSDEBUG is a no-op (default), those branches did the same (nothing).
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-53/+103
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html