summaryrefslogtreecommitdiffstats
path: root/modules/visual_script/visual_script_nodes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-10/+10
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-28/+26
|
* Merge pull request #48972 from ↵Rémi Verschelde2021-07-211-0/+32
|\ | | | | | | DavidCambre/Expose_VisualScriptCustomNode_TypeHints_m
| * expose type hints for VisualScriptCustomNodeDavid Cambré2021-07-211-0/+32
| | | | | | | | Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com>
* | Use the standard C `INFINITY` and `NAN` constants directlyHugo Locurcio2021-07-211-2/+2
| | | | | | | | | | | | | | The `Math_INF` and `Math_NAN` defines were just aliases for those constants, so we might as well use them directly. Some portions of the code were already using `INFINITY` directly.
* | Merge pull request #50566 from reduz/optimize-stringname-usageRémi Verschelde2021-07-191-1/+1
|\ \ | | | | | | Optimize StringName usage
| * | Optimize StringName usagereduz2021-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | Prevents some warnings from appearing in visual scriptsYuri Roubinsky2021-07-181-1/+4
|/ /
* | Use PROPERTY_USAGE_NONE instead of 0 for no property usageAaron Franke2021-07-011-2/+2
| | | | | | | | Also use const more often.
* | Fixes Visual script nodes operator mismatch issue #49943Dipal M Zambare2021-06-291-36/+68
| |
* | Fix logic operators mislabeled #49412Martin2021-06-231-33/+63
| |
* | Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-30/+30
| |
* | Rename Quat to QuaternionMarcel Admiraal2021-06-041-1/+1
| |
* | Rename Variant TRANSFORM to TRANSFORM3DAaron Franke2021-06-031-1/+1
|/ | | Also _transform to _transform3d
* Improve resource load cachereduz2021-02-111-0/+15
| | | | | | -Added a new method in Resource: reset_state , used for reloading the same resource from disk -Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type) -Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
* Removed _change_notifyreduz2021-02-101-23/+23
| | | | | | -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 🎆
* Refactored variant constructor logicreduz2020-11-091-3/+3
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-7/+7
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Refactored Variant Operators.reduz2020-11-061-3/+0
| | | | | -Using classes to call and a table -For typed code (GDS or GDNative), can obtain functions to call prevalidated or ptr.
* added temp variable because *p_inputs[2] is the same as *p_outputs[0]Jacob Edie2020-10-061-1/+3
|
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-26/+26
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-70/+134
| | | | | 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/+67
| | | | | | | | | | | | | | | | | | | | | | | 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-422/+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.
* Rename InputFilter back to InputRémi Verschelde2020-04-281-5/+5
| | | | | | | | | | | | | | | | It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
* Deconstruct VSNodes for new Variant typesSwarnim Arun2020-04-021-0/+3
|
* Replace NULL with nullptrlupoDharkael2020-04-021-4/+4
|
* Refactored input, goes all via windows now.Juan Linietsky2020-03-261-5/+5
| | | | Also renamed Input to InputFilter because all it does is filter events.
* Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky2020-03-261-1/+1
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-1/+1
| | | | | | | | | | 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`.
* Signals: Port connect calls to use callable_mpRémi Verschelde2020-02-281-3/+1
| | | | | | | | | 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.)
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-49/+49
| | | | objects and made them default.
* Fix VisualScriptClassConstant to be updated properlyYuri Roubinsky2020-02-101-2/+21
|
* Fix GlobalConstant/BasicTypeConstant return type in visual scriptsYuri Roubinsky2020-01-301-4/+24
|
* Fix ClassDB API portability with some android and editor classesIgnacio Etcheverry2020-01-191-5/+11
| | | | | | | | | | | | | | | | | | - `EditorNavigationMeshGenerator` was being registered as part of the Core API, even after d3f48f88bb84d22b7805ce971ac86cf1953a29fd. We must make sure to set Editor as the current ClassDB API type before creating an instance. - The `VisualScriptEngineSingleton.constant` property has a property hint string that's different between tools and non-tools builds. This commit makes the hint string to no longer be set in `_bind_methods`, and to instead set it in `_validate_property`. This way it's ignored when calculating the API hash. - `JavaClassWrapper` is now registered in ClassDB on all platforms, using a dummy implementation on platforms other than Android. This fixes API portability between Android and other platforms. - Updated `--class-db-json` command to ignore non-virtual methods that start with an underscore (see: 4be87c6016a5893cbde897924e540df4c988cee5).
* 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.
* Removed unused variables, add some constants numbersRafał Mikrut2019-12-101-1/+1
|
* Use the Unicode "multiply" sign for the "A x B" visual script nodeHugo Locurcio2019-11-151-1/+1
|
* Deconstruct node for VisualscriptSwarnim Arun2019-09-291-1/+18
| | | | Adds deconstruct nodes for the built-in types and adds default text to function rename_input_box for the visualscript.
* doc: Sync classref with current sourceRémi Verschelde2019-09-271-9/+9
| | | | And various fixes to bindings, hyperlinks and an uninitialized variable.
* Visualscript editor graph unification & refactoringSwarnim Arun2019-09-261-0/+436
| | | | 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
* Plugin support for visual shadersYuri Roubinski2019-08-141-1/+1
|
* Changed some code showed in LGTM and Coverageqarmin2019-07-201-2/+1
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make visualscript search better.K. S. Ernest (iFire) Lee2018-10-111-7/+7
| | | | | | | | | * There were spaces unequally inside the function definitions. * camelcase_to_underscore() should also work for numbers inside of the camel case. * Removed the builtin concept * Capitalize descriptions from methods too. * Match the visual script functions by removing the empty arguments "( )" * Add some test cases
* Remove redundant "== false" codeAaron Franke2018-10-061-2/+2
| | | | | | Some of this code has been re-organized. f
* Clearly deprecate sync too in favor of remotesync.Fabio Alessandrelli2018-09-151-1/+1
| | | | | NOTE: This changes the RPC_MODE_* enum values. Games should be re-exported. GDNative rebuilt.
* Rename slave keyword to puppetFabio Alessandrelli2018-09-151-1/+1
| | | | | The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.