Commit Graph

103 Commits

Author SHA1 Message Date
32b43cfeb3 Implement Resource UIDs
* Most resource types now have unique identifiers.
* Applies to text, binary and imported resources.
* File formats reference both by text and UID (when available). UID always has priority.
* Resource UIDs are 64 bits for better compatibility with the engine.
* Can be represented and used textually, example `uuid://dapwmgsmnl28u`.
* A special binary cache file is used and exported, containing the mappings.

Example of how it looks:

```GDScript
[gd_scene load_steps=2 format=3 uid="uid://dw86wq31afig2"]

[ext_resource type="PackedScene" uid="uid://bt36ojelx8q6c" path="res://subscene.scn" id="1_t56hs"]
```

GDScript, shaders and other special resource files can't currently provide UIDs, but this should be doable with special keywords on the files.
This will be reserved for future PRs.
2021-07-24 09:16:52 -03:00
4ee0e6ddf5 Add type variations to Theme 2021-07-13 02:26:28 +03:00
7d4c20f9db Improve and clarify documentation for RandomNumberGenerator 2021-07-02 17:47:52 +02:00
75688772b3 Fix editor suffixes and degrees conversion
* Functions to convert to/from degrees are all gone. Conversion is done by the editor.
* Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees.
* Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m"
* In general, can add suffixes for EditorSpinSlider
Not covered by this PR, will have to be addressed by future ones:

* Ability to switch radians/degrees in the inspector for angle properties (if actually wanted).
* Animations previously made will most likely break, need to add a way to make old ones compatible.
* Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes.
* Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30 12:38:25 -03:00
b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03:00
2bafcd3422 Consolidate JSON, JSONParseResults and JSONParser into JSON
Renames JSON.parse_string() to parse()
Renames JSON.decode_data() to stringify()
2021-06-19 08:01:40 +01:00
f64fea1b23 Add Time singleton 2021-06-11 09:32:39 -04:00
8acd13a456 Rename Quat to Quaternion 2021-06-04 18:14:32 +01:00
0ac4051c00 Update documentation for Transform3D 2021-06-03 07:30:01 -04:00
97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
e196733e88 Re-bind posmod, use int64_t instead of int
Fixes #48420, fixes #48421.
The binding was missed when moving GDScript built-in to Global Scope it seems.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2021-05-04 13:25:08 +02:00
497c3f97b2 Call randomize() automatically 2021-04-22 21:13:43 +02:00
a5324787c8 Rename some more global enums (Key, Joy, MIDI) 2021-03-23 07:13:23 -04:00
10d7fccb54 Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
8455e901f3 class reference proofreading 2021-03-19 13:21:20 +01:00
4ca1e73ff9 doc: Sync classref with current source
And move GLTF docs to its module folder.
2021-03-18 16:37:43 +01:00
d359e159da Document the valid input range for acos() and atan() 2021-03-15 17:25:22 +01:00
ba1344408f Implement Navigation layers 2021-03-10 11:23:06 +01:00
469ac1e415 doc: Sync classref with current source 2021-03-10 10:54:21 +01:00
892060fa47 fix minor issue in smooth step function's documentation 2021-02-13 02:12:58 +05:30
3d479d086c Add support for new SDL gamecontroller keywords. 2021-02-07 16:09:32 +00:00
9c65927aeb More explicit wording for str() and print() functions 2021-01-05 20:00:26 +01:00
215d18814e doc: Sync classref with current source 2021-01-04 14:33:44 +01:00
b743a2ef3c Rename Math::stepify to snapped 2020-12-28 13:01:30 +00:00
4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
fa9332a0e7 Merge pull request #43414 from Xrayez/pi-type-string
Expose `PROPERTY_HINT_TYPE_STRING` to scripting
2020-12-20 21:18:11 +01:00
02f60812ed Rename TYPE_REAL to TYPE_FLOAT
To be consistent with the naming everywhere else.
2020-12-04 09:47:26 -03:00
7e2c0ffd1a [Complex Text Layouts] Add TextServer documentation. Update Font, CanvasItem, Theme and modified controls documentation. 2020-11-26 14:25:52 +02:00
20f2b71e21 Update joy button and stick names, enums and documentation 2020-11-19 15:28:31 +00:00
c6dcf3310d doc: Sync classref with Variant utility methods
Copied relevant documentation from the original `@GDScript` built-ins,
which will likely be removed in a future commit.

Various fixups to `variant_utility.cpp` while working on this.
2020-11-17 11:26:24 +01:00
0f249f5c0a Variant: Sync docs with new constructors, fixups after #43403
Change DocData comparators for MethodDoc and ArgumentDoc to get a better
ordering of constructors.
2020-11-09 23:39:53 +01:00
1e6b684d44 Expose PROPERTY_HINT_TYPE_STRING to scripting 2020-11-09 18:12:04 +02:00
359c95156a Clarify that KEY_BACK is unrelated to the Back button on Android
This closes #19325.
2020-08-28 17:10:08 +02:00
ea2eaf8c27 Added debugger plugin support
Changes:
* EngineDebugger is exposed to gdscript. Game side of communication can be implemented through it.
* EditorDebuggerPlugin is added which handles the editor side of communication.
2020-08-26 11:24:51 +05:30
0181c3dde1 Docs: Ignore OS specific values (constants, project settings, properties). 2020-07-15 12:24:59 +03:00
ba0db95909 DocData: Skip language-specific ClassDoc without methods/constants
Removes the useless `@C#`, `@NativeScript` and `@VisualScript` entries.
2020-06-17 15:09:07 +02:00
69d5de632e Split Geometry singleton into Geometry2D and Geometry3D
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-27 14:28:34 +03:00
2800c8f43d doc: Sync classref with current source 2020-05-15 18:25:09 +02:00
e7fee711b3 Update game controller enums. 2020-05-13 10:33:32 +01:00
bbdfc7353c doc: Sync classref with current source 2020-05-11 13:23:39 +02:00
f7ca1c805b doc: Sync classref with current source 2020-05-04 16:55:01 +02:00
aaf5a58b44 fix typo 2020-05-01 18:52:08 +03:00
41af228b76 Merge pull request #36960 from pycbouh/docs-improve-shortcuts
Improve shortcut formatting in docs
2020-04-29 09:40:52 +02:00
fdf58a5858 Rename InputFilter back to Input
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.
2020-04-28 15:19:49 +02:00
d567c15aed doc: Fix parsing typed arrays in makerst.py
`Type[]` typed arrays will link to `Type`, as it's likely the most
interesting information for the user.

And sync classref with current source.
2020-04-24 17:50:20 +02:00
ae09b55a19 Exposed RenderingDevice to script API
Also added an easier way to load native GLSL shaders.

Extras:

Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload.

Note:

The precommit hooks are broken because they don't seem to support enums from one class being used in another.
Feel free to fix this after merging this PR.
2020-04-20 21:21:58 -03:00
2cd952bd84 Fix handling of PROPERTY_USAGE_SUBGROUP in DocData and editor
Subgroups were added in #37678 but not properly handled everywhere
where PROPERTY_USAGE_GROUP is.
2020-04-20 17:13:06 +02:00
b7b46093d8 doc: Sync classref with current source
Add missing enum bindings.
2020-04-20 11:48:00 +02:00
1ea7295bd2 Improve shortcut formatting in docs 2020-04-10 18:42:11 +03:00
afc8c6391c Renaming all ARVR nodes to XR 2020-04-09 15:33:01 +10:00