summaryrefslogtreecommitdiffstats
path: root/modules/visual_script/visual_script_func_nodes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove VisualScript module for 4.0Rémi Verschelde2022-08-241-2444/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 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).
* Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-97/+97
|
* Remove unintentional PROPERTY_USAGE_INTERNALRedMser2022-08-181-3/+3
| | | | | The flag only matters for property definition, but was also used in _validate_property a lot.
* Remake resource thread safety and APIreduz2022-06-221-6/+6
| | | | | | | | * Ensures thread safety when resources are destroyed. * Simplified API by always forcing `ResourceCache::get_ref`, which needs less hacks and is fully thread safe. * Removed RWLock for resources because its not possible to use for the new logic. Should not be a problem. Supersedes #57533
* Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-13/+13
| | | | | | | | | | | 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.
* Fix some issues found by cppcheck.bruvzg2022-04-061-7/+7
|
* Use `RTR()` for VisualScriptNode captions and textsHaoyu Qiu2022-03-111-24/+25
|
* Remove VARIANT_ARG* macrosreduz2022-03-091-11/+11
| | | | | | | | * 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.
* simplify formatting scripts, add a clang-tidy script, and run clang-tidyNathan Franke2022-01-291-1/+1
|
* i18n: Make VisualScript node caption & text translatableHaoyu Qiu2022-01-111-15/+25
|
* Merge pull request #56352 from ↵Rémi Verschelde2022-01-051-0/+8
|\ | | | | | | Gallilus/Include-base-signals-to-VisualScriptEmitSignal
| * Include base signals to VisualScriptEmitSignalDavid Cambré2021-12-301-0/+8
| |
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-13/+13
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio2021-11-031-6/+6
| | | | | This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
* Fix VisualScriptPropertySet value hintDavid Cambré2021-08-291-1/+1
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-12/+12
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-28/+28
|
* Revert unnecessary changes to VisualScriptEmitSignalDavid Cambré2021-07-231-11/+1
| | | | Revert unnecessary changes to VisualScriptEmitSignal, commit 2032b56005b2f6add6b105a00f04c05f9b292eec
* Merge pull request #49749 from ↵Rémi Verschelde2021-07-211-48/+98
|\ | | | | | | | | DavidCambre/VisualScriptFunction_Call_Set_Get_Improvement-2 VisualScriptFunctionNodes Improvements
| * Improve and streamline VisualScriptFuncNodes Call Set GetDavid Cambré2021-07-211-48/+98
| | | | | | | | | | | | | | This PR improves and streamlines the workflow for VisualScriptFunctionNodes Call Set Get Uniform design. Drag in set-get from tree is now working. Removes redundant method_select popup.
* | Use PROPERTY_USAGE_NONE instead of 0 for no property usageAaron Franke2021-07-011-14/+14
|/ | | | Also use const more often.
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-8/+8
|
* [Net] Refactor RPCs, remove RSETsFabio Alessandrelli2021-06-011-7/+9
| | | | | | | | | | 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.
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-3/+3
|
* Removed _change_notifyreduz2021-02-101-24/+24
| | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* 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 🎆
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-1/+0
|
* Refactor variant built-in methods yet again.reduz2020-11-111-16/+18
| | | | | | * Using C-style function pointers now, InternalMethod is gone. * This ensures much better performance in typed code. * Renamed builtin_funcs to utility_funcs, to avoid naming confusion
* Refactored variant constructor logicreduz2020-11-091-6/+9
|
* 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
* Refactored variant setters/gettersreduz2020-11-071-9/+9
| | | | | | -Discern between named, indexed and keyed -Get direct access to functions for typed GDScript and GDNative bindings -Small changes to some classes in order to work with the new setget binder
* Bind missing constant in VisualScriptPropertyGetTomasz Chabora2020-10-121-0/+1
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-76/+142
| | | | | 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/+15
| | | | | | | | | | | | | | | | | | | | | | | 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-215/+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.
* Replace NULL with nullptrlupoDharkael2020-04-021-28/+28
|
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-25/+25
| | | | objects and made them default.
* 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.
* Make VisualScript check inheritance for port infoAaron Franke2019-10-091-2/+2
|
* Visualscript editor graph unification & refactoringSwarnim Arun2019-09-261-9/+4
| | | | 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
* Visualscript: Add types for base type get and set.K. S. Ernest (iFIre) Lee2019-07-191-9/+23
|
* Fixes minor issues found by static analyzerqarmin2019-07-071-7/+0
|
* Some code changed with Clang-Tidyqarmin2019-06-261-5/+2
|
* Style: Apply new changes from clang-format 8.0Rémi Verschelde2019-04-091-1/+2
| | | | | | It seems to stay compatible with formatting done by clang-format 6.0 and 7.0, so contributors can keep using those versions for now (they will not undo those changes).
* calculate inputs count from arg types instead of namesMarcin Zawiejski2019-03-041-3/+2
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-3/+3
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-1/+0
|
* Improve VisualScript UXK. S. Ernest (iFire) Lee2018-07-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prototype faster function call ux. * Work on general search ux. * Able to create nodes from search. * Show class for variables but not methods. * Get actions search working. * Descriptions now show for both methods and properties. * Enable zooming on mouse wheel up and down. * Make the drag trigger on right mouse button. * Search now shows for action visual script nodes. * Able to search visual node names. * Search works better. * Change zooming scale to hide artifacts better. * Remove zoom changes * Select from base should check properties too like the other functions. * Seq_connect flag is needed to set sequence lines correctly. * Remove comment * Code cleanup with function names and arguments. * Use brief description for search descriptions. * Clean and fix bug with input nodes connecting with sequence lines. * Add a warning and fix some edge conditions with sequence into data lines and vice versa. * Don't search functions when pulling from a sequence node. * Don't show actions when pulling from a data line. * Set set and get properties. * Convert visual script operators to the correct type * Create a function preset finds only functions. * Singletons can now find functions. * Add shift-a for generic search. * Add brief descriptions for Visual Script nodes. * Search boxes can now filter names. * Add bigger hit zones to node connect. * For the drop zones, make all the rect2 areas the same size. * Function names in visual script node should be lower case so that search works better. * Use the convention of capitalize() for set, set, visual script nodes and methods. * Make search more general. Ignore "_" and make case-insensitive. Also made the search window smaller and remove extra info from search * Make type_cast use the connecting node's type and remove use of found variable. * Fix case where you call an instance's call function where it becomes an invalid call. * Make get_visual_node_names use a set of filters, move action creations and fix bug with sequence node connections. * Make the window bigger. * Make connect_data and connect_seq more robust. * Add icons to search items. * Add vs constructors in shift-a menu. * Operators, builtins and constructors show type name. Fix several problems with port connections. * In shift-a mode search everything. * Code cleanup * Work on autocompleting the type. * Use type guess in action creation. * Check if type hint string exists in object variables when generating the visual script search. * Add the hint to SceneTree. * Add original type detection. * Make type casting great again. This puts the type casted base type as the data output type string hint. * Pass the type in a VisualScriptFunctionCall too. * Set the base type correctly in VisualScriptFunctionGet and VisualScriptFunctionSet using hint string. * Make sure the instance is passed in VisualScriptPropertySet. * Restore search on the node's type. * Remove dependencies from graph_edit. * Remove dependencies from property_selector and name the class visual_script_property_selector. * Extract hot zones into a function. * Move hot_zones constants into default theme. * Bigger capture zones. * Clean messy port_grab_distance variables. * Remove RMB functionality. * Remove memory leak on showing visual script descriptions. * Read the port_grab_distance constants on enter tree and theme changed.