221 Commits

Author SHA1 Message Date
Rémi Verschelde
b51abfce34 Fix VisualScript editor crash when deleting selected nodes
Fixes #64662.
Regression from #61145.
2022-08-23 10:59:37 +02:00
Rémi Verschelde
f51f292cc9 Merge pull request #59328 from raulsntos/csharp-flag-enums-3.x 2022-08-05 19:37:29 +02:00
Rémi Verschelde
b85f058412 Fix typos with codespell
Using codespell 2.2-dev from current git.
2022-05-23 21:41:46 +02:00
Yuri Rubinsky
03f09fa75d Add node list param to GraphEdit::delete_nodes_request signal 2022-05-18 12:36:00 +03:00
Rémi Verschelde
0e95c24778 Merge pull request #54629 from Gallilus/Fixes-copy-paste-issue-in-the-visual-script-editor-3.x
Fixes copy-paste issue in the visual script editor
2022-04-15 21:19:09 +02:00
Nicholas Huelin
b71f5e0cbd Fix Visual Script's jump to function relative to zoom
When double-clicking on a function name the graph will now correctly jump to the function relative to the zoom ratio.

(cherry picked from commit d2a3675ec8)
2022-04-13 11:43:49 +02:00
Umang Kalra
5997700fa5 Fixes variable node not showing updated name in visualscript editor 2022-04-11 17:38:05 +05:30
Raul Santos
63a10e8365 Support explicit values in flag properties, add C# flags support
- Add support for explicit values in properties using `PROPERTY_HINT_FLAGS`
that works the same way it does for enums.
- Fix enums and flags in VisualScriptEditor (it wasn't considering the
explicit value).
- Use `PROPERTY_HINT_FLAGS` for C# enums with the FlagsAttribute instead
of `PROPERTY_HINT_ENUM`.
2022-03-19 19:22:54 +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
kobewi
5ab52d78c5 Fix custom built-in script names 2021-12-08 14:04:10 +01:00
kobewi
cdad3d2f57 Improve save handling for built-in scripts 2021-12-04 01:28:52 +01:00
David Cambré
c1ff202e32 Fixes the copy paste issue in the visual script editor.
Moves copy and paste in their own functions so copy_nodes_request and paste_nodes_request are able to work.
Applies paste offset to the last mouse clicked position.
2021-11-16 16:49:15 +01:00
Rémi Verschelde
7f9b36f4e7 clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Rémi Verschelde
d2c43497c7 Resource: Remove unused _use_builtin_script() virtual method
And another piece of dead code found while searching for "use_builtin".

(cherry picked from commit a1ab6f186b)
2021-08-12 16:45:48 +02:00
Yuri Roubinsky
535960fcab [3.x] Prevents some warnings from appearing in visual scripts 2021-08-03 11:27:45 +03:00
Haoyu Qiu
cb237c1b49 Make action names translatable 2021-07-31 22:19:47 +08:00
Gallilus
4a16b926cf Change "Add Preload Node" action to "Add Node(s)"
The action might also drop Custom Nodes

(cherry picked from commit 0bb9c1b0d9)
2021-07-26 13:36:07 +02:00
Rémi Verschelde
cf65b385c8 Merge pull request #50709 from DavidCambre/Improve-and-stramline-VisualScriptFuncNodes-Call-Set-Get
[3.x] Improve and streamline VisualScriptFuncNodes Call Set Get
2021-07-23 13:00:24 +02:00
David Cambré
4e792ac804 Improve and streamline VisualScriptFuncNodes Call Set Get
This PR improves and streamlines the workflow for VisualScriptFunctionNodes Call Set Get
Uniform design.
Drag in set-get from tree is now working.
port 'pass' not backported to 3.x to keep script backwards compatibility
2021-07-22 21:13:37 +02:00
David Cambré
8a33608e4b Allow dropping custom node scripts in VisualScript editor 2021-07-21 15:01:07 +02:00
kleonc
dd943be1dd VisualScriptEditor Fix in graph position calculation (do not skip zoom) 2021-06-29 15:32:16 +02:00
Rémi Verschelde
10eb2c702a VisualScript: Fix wrongly setting default value on property hint change
PR #45096 put the backported code in the wrong case, it should be for `type`
and not for `hint`.

Also synced `hint` enum values with `Object.PropertyHint`.

Fixes #48698.
2021-05-13 22:37:31 +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
994ab2f95c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
ad3b5f6971 Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
Kanabenki
6603578ab3 Snap VisualScript comment to grid when resizing
(cherry picked from commit 07fb7f9888126d189476ec9a6272447b7c9748ac)
2021-02-08 22:36:36 +01:00
Yuri Sizov
c0776f90f5 Fix minimap capturing events and improve its theme
Add an editor setting for minimap opacity in visual editors
2021-01-25 21:49:34 +03: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
Yuri Roubinsky
d1e3e8bc86 [3.2] Auto-assign default value for variable in visual script on type changing 2021-01-11 10:29:12 +03:00
Yuri Roubinsky
e5515a5cb1 Fix broken members panel in visual script editor
(cherry picked from commit d6bdd042bc255a7a8924e09d44b24532cf3babc1)
2020-12-29 16:02:01 +01:00
Rémi Verschelde
d6a8f59c06 Merge pull request #40461 from nekomatata/script-editor-init-optimization-3.2
[3.2] Optimized ScriptEditor initialization when many scripts are loaded
2020-10-01 13:58:01 +02:00
Francois Belair
3e50b8e0c5 Add a VScript func to sanitize variant values
Backported to 3.2
2020-09-18 11:28:58 -04:00
PouleyKetchoupp
d504c15295 Optimized ScriptEditor initialization when many scripts are loaded
This change avoids the editor to freeze for several seconds when a
project with lots of scripts is loaded in the editor.

It focuses on a few heavy operations previously executed on all
previously loaded scripts:
- Initialize script resource (script validation/parsing) only
on focus
- ScriptTextEditor: code editor and edit menu are added to the
scene only on focus
- Add to recent scripts only when opening new scripts
(load/save scene metadata)
2020-07-17 09:42:11 +02:00
Swarnim Arun
f82f8ec125 Fix crashing of VisualScript due to...
Attempting to move the function node to another function whose data connection is a dependency of the node the specific node being moved to a different function during changes to sequence connections.
By skipping, if the from_node is a function_node during the data connection dependencies scan.
Should fix #37991

(cherry picked from commit 5c48631509751191afc5a83e4c48075a90a38150)
2020-06-04 12:16:40 +02:00
Haoyu Qiu
ae45f7df23 Makes adding port in Visual Script nodes deferred 2020-01-14 21:03:09 +08: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
Haoyu Qiu
dabb079de6 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Haoyu Qiu
b97dc6a6e9 Makes more editor strings translatable
* "Add" button text in Groups Editor
* "Receiver Method" in Connect Signal Dialog
* "Play Mode" in Animation State Machine Editor
* "Mesh Library" button text in Mesh Library editor plugin
* Compose Array node button texts in Visual Script
* Various button texts in TileSet Editor
* Various Run Script errors
2019-12-21 20:58:17 +08:00
Haoyu Qiu
5d738c7dd7 Fixes size of create function dialog 2019-12-17 09:04:30 +08:00
Haoyu Qiu
d2fce601b8 Makes more strings in editor translatable
* File type names in file dialogs
* Layout option names
* Visual shader editor UI
2019-12-16 16:41:07 +08:00
codecustard
cce26ada16 Fixes wrong position when adding node in VS editor
When adding a node in the visual script editor while zoomed in, the position of the newly added node would be wrong.
2019-12-04 17:12:01 -08:00
Rémi Verschelde
930f051a8b Fix typos with codespell
Using codespell 1.16.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-11-22 08:35:03 +01:00
Rémi Verschelde
410850ac19 Merge pull request #32853 from OsamaElHariri/visual_script_setter_props_fix
Set the properties of a Set node after add_node
2019-11-07 13:13:33 +01:00
Omicron
26adf635c4 Fix: typo atleast -> at least
Typo found in source string, reported by linux-man on weblate
2019-11-01 16:10:21 +01:00
Rémi Verschelde
43d9afb3af i18n: Sync translation template with current source 2019-10-29 13:57:45 +01:00
Osama El Hariri
7b1bb68586 Set the properties of a Set node after add_node 2019-10-28 21:03:12 +02:00
Timo Schwarzer
c9f2101028 Remove redundant compiler directives
Closes #32817
2019-10-14 16:23:13 +02:00
Chaosus
b7abea99e7 Fix theme in visual script dialogs (at startup) 2019-09-30 10:51:05 +03:00