Commit graph

448 commits

Author SHA1 Message Date
Rémi Verschelde
311bdbc16c
doc: Sync classref with current source 2020-10-19 17:13:30 +02:00
Rémi Verschelde
4287af5148
doc: Make docs.godotengine.org links point to 3.2 branch 2020-10-19 16:10:01 +02:00
Tomasz Chabora
cd23be5da7
Bind missing constant in VisualScriptPropertyGet
(cherry picked from commit aadc8d54a4)
2020-10-19 16:09:59 +02:00
Jacob Edie
8467d28b16
added temp variable because *p_inputs[2] is the same as *p_outputs[0]
(cherry picked from commit d76457a7f3)
2020-10-19 16:09:58 +02:00
Rémi Verschelde
3961f50176
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
Rémi Verschelde
26512dda93
Merge pull request #42170 from Razoric480/fix-vscript-value-by-type-32
Add a VScript func to sanitize variant values (3.2)
2020-09-23 09:35:22 +02:00
Francois Belair
d35ced06a6 Add a VScript func to sanitize variant values
Backported to 3.2
2020-09-18 11:28:58 -04:00
Rémi Verschelde
c8859f0463
Fix typos with codespell
Using codespell 1.17.1.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
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
```
2020-09-18 14:09:51 +02:00
PouleyKetchoupp
e3765e97de 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
Rémi Verschelde
bf913d6917 DocData: Skip language-specific ClassDoc without methods/constants
Removes the useless `@C#`, `@NativeScript` and `@VisualScript` entries.

(cherry picked from commit ba0db95909)
2020-06-18 11:29:28 +02:00
Rémi Verschelde
7bf9787921 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
Swarnim Arun
83c15ff469 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 5c48631509)
2020-06-04 12:16:40 +02:00
Nico Mitchell
616d106247 Change round return type to float
(cherry picked from commits c2ffaf5b2b
and f7cc2b090c)
2020-04-16 12:57:21 +02:00
Rajat Goswami
19e71f94d8 Adding missing include guards to header files identified by LGTM.
This addresses the issue godotengine/godot#37143

(cherry picked from commit 2ecf928ae3)
2020-03-25 11:38:54 +01:00
Rafał Mikrut
d001ca320d Fix suspicious | and + operators
(cherry picked from commit d0621b954b)
2020-03-04 12:40:14 +01:00
Yuri Roubinsky
74f3fbf7ef Fix VisualScriptClassConstant to be updated properly
(cherry picked from commit 386d0fe988)
2020-02-14 16:12:09 +01:00
Yuri Roubinsky
61901bd7cc Fix GlobalConstant/BasicTypeConstant return type in visual scripts
(cherry picked from commit c19933eec4)
2020-02-14 16:11:54 +01:00
Rémi Verschelde
2d20fc39aa doc: Drop unused 'category' property from header
We already removed it from the online docs with #35132.

Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.

We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
2020-01-26 16:02:39 +01:00
Rémi Verschelde
ba177ccaec doc: Misc updates for AnimationNode* and others
- Add some missing descriptions.
- Add links to tutorials for ARVR and AnimationTree.
- Style fixes.
- Engine changes:
  * Make `AnimationNodeTransition.input_<number>` properties internal
    so that they don't appear in the docs. They still appear in the
    inspector based on the actual number of inputs requested.
  * Drop unimplemented `CPUParticles.flatness`. It's only used for 3D
    particles in `ParticlesMaterial`, and thus only relevant for
    `CPUParticles3D`.
2020-01-23 12:37:33 +01:00
Ignacio Etcheverry
a6105c8ea0 Fix ClassDB API portability with some android and editor classes
- `EditorNavigationMeshGenerator` was being registered as part of the Core API,
even after d3f48f88bb. 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: 4be87c6016).
2020-01-19 20:15:13 +01:00
Haoyu Qiu
ddde73cc62 Makes adding port in Visual Script nodes deferred 2020-01-14 21:03:09 +08:00
Rémi Verschelde
a7f49ac9a1 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
078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Haoyu Qiu
0693718164 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
9adeec789c Fixes size of create function dialog 2019-12-17 09:04:30 +08:00
Haoyu Qiu
7a9c337dfe 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
Rémi Verschelde
2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut
ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Rémi Verschelde
4eff13d768 doc: Markup fixes for enums and constants 2019-12-06 23:09:20 +01:00
codecustard
601d870ae9 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
ab3bccdb78 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
Hugo Locurcio
08b4671e03
Use the Unicode "multiply" sign for the "A x B" visual script node 2019-11-15 19:06:53 +01:00
Rémi Verschelde
c4ecec1d33
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
Rémi Verschelde
af4fd9de9c
Merge pull request #33238 from qarmin/other_fixes
Fix some crashes, overflows and using variables without  values
2019-11-01 22:12:47 +01:00
Rafał Mikrut
9ddb3265e1 Fix some crashes, overflows and using variables without values 2019-11-01 16:16:31 +01:00
Omicron
79a59a3587
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
b8daad9779 i18n: Sync translation template with current source 2019-10-29 13:57:45 +01:00
Osama El Hariri
858afd53d8 Set the properties of a Set node after add_node 2019-10-28 21:03:12 +02:00
Rémi Verschelde
a1033aea51
Merge pull request #32830 from timoschwarzer/remove-redundant-compiler-directives
Remove redundant compiler directives
2019-10-15 09:57:46 +02:00
Timo Schwarzer
c69ae35d4d
Remove redundant compiler directives
Closes #32817
2019-10-14 16:23:13 +02:00
qarmin
616ab4fac2 Small fixes to redundand code, copy paste bugs 2019-10-14 11:40:55 +02:00
Marcel Admiraal
a8836ba28d Remove dependency on the editor directory being in the build's include path.
- Add or remove the necessary subdirectorires to the includes to remove
dependency on the editor directory being in the build's include path.
- Ensure includes in modified files conform to style guideline.
- Remove editor from the build include path.
2019-10-10 08:57:00 +02:00
Aaron Franke
13779b70e0
Make VisualScript check inheritance for port info 2019-10-09 01:47:05 -04:00
Chaosus
a9d981d26c Fix theme in visual script dialogs (at startup) 2019-09-30 10:51:05 +03:00
Rémi Verschelde
cd63cc7df1
Merge pull request #32402 from YeldhamDev/fix_vs_add_function
Fix VS editor's "Create Function" dialog
2019-09-29 21:36:57 +02:00
Swarnim Arun
cf4d476d6e
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
Michael Alexsander Silva Dias
13e752190f Fix VS editor's "Create Function" dialog 2019-09-28 11:57:13 -03:00
Rémi Verschelde
e636563d5d
Merge pull request #32398 from YeldhamDev/cleanup_vs_editor_left
Cleanup VS editor's left menu
2019-09-28 07:35:46 +02:00
Michael Alexsander Silva Dias
c9328aa068 Cleanup VS editor's left menu 2019-09-27 21:20:43 -03:00
Swarnim Arun
4967e4a913
Fix Edit function button 2019-09-28 02:16:11 +05:30