summaryrefslogtreecommitdiffstats
path: root/modules/visual_script/visual_script.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+41
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-205/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Add ability to bind typed arrays to script APIJuan Linietsky2020-04-211-0/+4
| | | | | | | Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells Note: Will do a mass replace on later PRs of whathever I can find, but probably need a tool to grep through doc. Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
* Update vsnodes on editing vs variablesSwarnim Arun2020-04-031-0/+20
|
* Replace NULL with nullptrlupoDharkael2020-04-021-19/+19
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-4/+4
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Merge pull request #36723 from AndreaCatania/fix-rsetRémi Verschelde2020-03-131-2/+2
|\ | | | | Fixed rset method for gdscript and visual script
| * Fixed rset method for gdscript and visual scriptAndrea Catania2020-03-021-2/+2
| |
* | Refactor ScriptDebugger.Fabio Alessandrelli2020-03-081-15/+15
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | EngineDebugger is the new interface to access the debugger. It tries to be as agnostic as possible on the data that various subsystems can expose. It allows 2 types of interactions: - Profilers: A subsystem can register a profiler, assigning it a unique name. That name can be used to activate the profiler or add data to it. The registered profiler can be composed of up to 3 functions: - Toggle: called when the profiler is activated/deactivated. - Add: called whenever data is added to the debugger (via `EngineDebugger::profiler_add_frame_data`) - Tick: called every frame (during idle), receives frame times. - Captures: (Only relevant in remote debugger for now) A subsystem can register a capture, assigning it a unique name. When receiving a message, the remote debugger will check if it starts with `[prefix]:` and call the associated capture with name `prefix`. Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new profiler system. Port SceneDebugger and RemoteDebugger to the new capture system. The LocalDebugger also uses the new profiler system for scripts profiling.
* Signals: Manually port most of remaining connect_compat usesRémi Verschelde2020-02-281-2/+2
| | | | | | | | It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
* Signals: Port connect calls to use callable_mpRémi Verschelde2020-02-281-5/+3
| | | | | | | | | Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-261-18/+8
| | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-42/+42
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-1/+1
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* ObjectID converted to a structure, fixes many bugs where used incorrectly as ↵Juan Linietsky2020-02-121-4/+4
| | | | 32 bits.
* Optmized data sent during RPC and RSet calls.Andrea Catania2020-02-121-16/+109
| | | | | | | | | | - Now is sent the method ID rather the full function name. - The passed IDs (Node and Method) are compressed so to use less possible space. - The variant (INT and BOOL) is now encoded and compressed so to use much less data. - Optimized RPCMode retrieval for GDScript functions. - Added checksum to assert the methods are the same across peers. This work has been kindly sponsored by IMVU.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Fix some crashes, overflows and using variables without valuesRafał Mikrut2019-11-011-0/+1
|
* Visualscript editor graph unification & refactoringSwarnim Arun2019-09-261-10/+59
| | | | Removes the need to have separate graphs per function for the VisualScript Nodes, and refactoring UI and other improvements such as fuzzy search, right click search boxes and in-graph editable nodes
* Merge pull request #30852 from swarnimarun/vs_tools_scriptRémi Verschelde2019-09-221-2/+13
|\ | | | | Tool Mode for Visualscript
| * Tool Mode for VisualscriptSwarnim Arun2019-09-211-2/+13
| | | | | | | | Add the ability to VisualScript to function in Tool mode aka the Editor itself similar to GDScript or Mono