110 Commits

Author SHA1 Message Date
Rémi Verschelde
a25e0c4be8 i18n: Misc fixes translation strings
Adds some translator comments to solve some questions raised on Weblate.
2022-06-08 12:56:42 +02:00
Haoyu Qiu
7558e47f1a Use RTR() for VisualScriptNode captions and texts
(cherry picked from commit 34614b544a)
2022-03-12 15:10:28 +01:00
Haoyu Qiu
5b6d2d353c Fix VisualScript crash when using Set Index node
(cherry picked from commit 022c73fcb6)
2022-02-17 09:54:36 +01:00
Rémi Verschelde
7669335a71 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Haoyu Qiu
13e207c793 i18n: Make VisualScript node caption & text translatable 2022-01-11 21:16:33 +08:00
LATRio
2118079c8c Add type validations when setting basic type 2022-01-08 11:30:55 +09:00
Yuri Roubinsky
535960fcab [3.x] Prevents some warnings from appearing in visual scripts 2021-08-03 11:27:45 +03:00
Rémi Verschelde
767ffaefc3 Expose visual script custom node type hints 2021-07-21 19:33:10 +02:00
Rémi Verschelde
72cacd5961 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde
8cc8a132ac Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde
4d501e587c Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde
ad3b5f6971 Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
Rémi Verschelde
ab9abab463 Update copyright statements to 2021
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 🎆

(cherry picked from commit b5334d14f7a471f94bcbd64d5bae2ad853d0b7f1)
2021-01-13 16:17:06 +01:00
Jacob Edie
355474916c added temp variable because *p_inputs[2] is the same as *p_outputs[0]
(cherry picked from commit d76457a7f39cade4f0bccfc8c68eb1b1c5a59c44)
2020-10-19 16:09:58 +02:00
Yuri Roubinsky
06bd6e8c49 Fix VisualScriptClassConstant to be updated properly
(cherry picked from commit 386d0fe9887e7cb272aeb05bfe6930bec4114140)
2020-02-14 16:12:09 +01:00
Yuri Roubinsky
9f6f0e15fa Fix GlobalConstant/BasicTypeConstant return type in visual scripts
(cherry picked from commit c19933eec4a3c2d21a07be823c95f87a2141ca60)
2020-02-14 16:11:54 +01:00
Ignacio Etcheverry
bdf2a26d45 Fix ClassDB API portability with some android and editor classes
- `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).
2020-01-19 20:15:13 +01:00
Rémi Verschelde
be5dd6ce1f Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Rafał Mikrut
42a7ed894a Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Hugo Locurcio
6938d98f36 Use the Unicode "multiply" sign for the "A x B" visual script node 2019-11-15 19:06:53 +01:00
Swarnim Arun
7fadef06b0 Deconstruct node for Visualscript
Adds deconstruct nodes for the built-in types and adds default text to function rename_input_box for the visualscript.
2019-09-29 23:00:08 +05:30
Rémi Verschelde
577e45081c doc: Sync classref with current source
And various fixes to bindings, hyperlinks and an uninitialized variable.
2019-09-27 22:16:42 +02:00
Swarnim Arun
3d8b00c657 Visualscript editor graph unification & refactoring
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
2019-09-26 01:53:58 +05:30
Yuri Roubinski
e8712f2f33 Plugin support for visual shaders 2019-08-14 15:52:27 +03:00
qarmin
2738b0b1e2 Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
Rémi Verschelde
c3208308e0 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
K. S. Ernest (iFire) Lee
fd74665be4 Make visualscript search better.
* 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
2018-10-11 14:22:40 -07:00
Aaron Franke
9106346892 Remove redundant "== false" code
Some of this code has been re-organized.
f
2018-10-06 16:20:41 -04:00
Fabio Alessandrelli
17ab749c9d Clearly deprecate sync too in favor of remotesync.
NOTE: This changes the RPC_MODE_* enum values.
Games should be re-exported. GDNative rebuilt.
2018-09-15 00:06:03 +02:00
Fabio Alessandrelli
f9676f5bd9 Rename slave keyword to puppet
The slave keyword will still be available as deprecated in 3.1 but will
be dropped from future releases.
2018-09-15 00:06:03 +02:00
Rémi Verschelde
d69f42bdca Make core/ includes absolute, remove subfolders from include path
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.
2018-09-12 09:52:22 +02:00
Bernhard Liebl
3da50b34dd Allow some non-integer built-in constants in gdscript 2018-07-31 17:56:48 +02:00
K. S. Ernest (iFire) Lee
9f2f90f1a6 Carry property hint and hint string through to Visualscript virtual functions. 2018-07-27 13:12:34 -07:00
Hein-Pieter van Braam
32c3ca2f9b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
K. S. Ernest (iFire) Lee
47124b1a29 Improve VisualScript UX
* 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.
2018-07-24 13:59:28 -07:00
Fabio Alessandrelli
c5201bf556 Refactor RPCMode enum and checks 2018-05-29 20:26:41 +02:00
Max Hilbrunner
6ab5b2700b Revert "RPCMode refactor, more sync modes" 2018-05-29 11:47:52 +02:00
Max Hilbrunner
08c1e2541f Merge pull request #19021 from Faless/rpc_sync_fix
RPCMode refactor, more sync modes
2018-05-29 09:44:03 +02:00
Fabio Alessandrelli
677ad7597e Refactor RPCMode enum and checks 2018-05-26 10:43:43 +02:00
Pieter-Jan Briers
8422bffe51 More stuff! 2018-05-01 00:39:28 +02:00
Pieter-Jan Briers
9f439ddb9d Move things into the title bars of Visual Script nodes.
This is an attempt to make VS slightly nicer to use.

WiP.
2018-04-30 01:28:31 +02:00
luz.paz
02b68d1187 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Bojidar Marinov
39a46b9ece Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
Rémi Verschelde
30788bc72e Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
61831d2992 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Indah Sylvia
6549de3d1d Fixed typo: substract to subtract 2017-12-05 11:34:46 +07:00
Marcin Zawiejski
45769f6fe3 Fix constant node value edit 2017-11-25 22:28:59 +01:00
Leon Krause
0f4d7ec704 Move singleton management from ProjectSettings to Engine 2017-11-14 15:15:13 +01:00
Goutte
4cf6b16693 Add support for the TAU constant. Fixes #12094. 2017-11-12 13:32:35 +01:00
Cédric Fuchs
56ffb9150f Gave a tooltip to the "In" logic node 2017-10-14 22:13:19 +02:00