Commit Graph

7284 Commits

Author SHA1 Message Date
db8e6bd83f Merge pull request #59885 from Jayman2000/autoload-inheritance-message 2022-04-04 23:56:20 +02:00
1cc7e7ec33 Improve autoload inheritance error message
Autoloaded scripts should always inherit from Node. When you run a
project that tries to autoload a script which doesn’t inherit from Node,
then Godot gives an error.

Before this change, the error said “Script does not inherit a Node”.
That error message is a little bit misleading. If a class inherits a
Node, then one of its superclasses has a Node. If a class inherits
_from_ Node, then one of its superclasses is Node. This change corrects
that mistake.

Fixes #59884.
2022-04-04 15:51:02 -04:00
b78aa4fe19 Style: Apply clang-tidy to current code, add readability-redundant-member-init 2022-04-04 21:49:51 +02:00
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
338b23d572 Merge pull request #59513 from BastiaanOlij/openxr_actionmap_editor 2022-04-04 14:26:28 +02:00
9b7b9de0e5 Add action map editor for OpenXR 2022-04-04 18:43:29 +10:00
3c5b9d1be3 Fix issues with multiple bind patterns in match statement 2022-04-04 15:47:08 +08:00
277825e956 Initialize pointer variables to fix random crash on startup.
`configure_blender_dialog` is lazily created if equal to null,
however nothing really sets it to null.
2022-04-03 23:21:29 +01:00
c630c2001d Merge pull request #59633 from EricEzaM/better-code-complete-update
Improve sorting of Code Completion options.
2022-04-03 12:34:00 +02:00
726614ff4b fix gridmap cursor showing the wrong mesh 2022-04-02 01:53:36 -07:00
4ab605d14d Improve sorting of Code Completion options.
Done by ordering options by their location in the code - e.g. local, parent class, global, etc.
2022-04-01 20:39:09 +10:00
4263f02f28 Merge pull request #59764 from reduz/blender-import-autodetect 2022-04-01 11:42:05 +02:00
e32215fbad Add Blender install autodetection and configuration.
This PR is a continuation to #54886

* Changed Blender path editor setting from binary to installation.
* Add a class to query whether the format is supported.
* This class allows to create proper editors to configure support.

**NOTE**: This PR only provides autodetection on Linux. Code needs to be added for Windows and MacOS to autodetect the Blender installation.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2022-04-01 11:01:12 +02:00
60dfe76e1f Fix group name in FastNoise and Gradient 2022-03-31 21:21:04 -05:00
340ad7d748 Merge pull request #59755 from V-Sekai/import-gltf-mat-placeholder 2022-04-01 01:12:16 +02:00
47d58b5a97 Merge pull request #59753 from V-Sekai/let-there-be-light 2022-03-31 22:21:23 +02:00
d8b3d14d82 Add support for Blend importing of material placeholders.
Couldn't get the 'NONE' option to work.
2022-03-31 10:11:06 -07:00
b675a6b9de Allow importing punctual lights from Blend. 2022-03-31 09:34:12 -07:00
947d7c8329 Fix some issues found by clang sanitizers. 2022-03-31 18:35:56 +03:00
4d9689e7f6 [Brotli] Use aligned reads when building with sanitizers. 2022-03-31 18:00:49 +03:00
a647fb3e62 Fix typos with codespell
Using codespell 2.2-dev from current git.

Fix a couple incorrect uses of gendered pronouns.
2022-03-31 14:07:29 +02:00
824927dc50 [ICU] Add library name suffix for API rename to avoid conflicts (GDExtension build). 2022-03-31 13:04:54 +03:00
5ba3b993d5 Merge pull request #59694 from vnen/gdscript-better-call-super 2022-03-30 17:58:11 +02:00
543c5658ba Merge pull request #58983 from Chaosus/gds_fix_builtin_methods_completion 2022-03-30 17:33:27 +02:00
be718285f7 GDScript: Fix issues with completion and super calls
- Make call errors use the call node instead of the calle, which will be
  empty on super calls.
- Don't allow `super()` to be used within lambdas.
2022-03-30 11:58:29 -03:00
0584387918 Fix autocompletion of static methods in built-in types in GDScript 2022-03-30 17:40:41 +03:00
0a6889d834 Add fbx2gltf support for importing .fbx files
Lets you drag or place .fbx files in the project folder and it will import the files.

An editor setting sets the location of the fbx2gltf binary.

Enables .fbx and .blend by default.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-03-30 15:22:46 +02:00
33d477498e Remove ad-hoc FBX importer
This importer was the fruit of a lot of amazing reverse engineering
work by RevoluPowered, based on the original Assimp importer that was
introduced by fire.

While promising and well tuned for a specific type of FBX scenes, it
was found to have many flaws to support the many FBX exporters and
legacy models that Godot users want to use. As we currently lack a
maintainer to improve it, those issues are left unresolved and FBX
import is still sub-par in the current Godot releases.

After some experimentation, we're instead adding a new importer that
relies on Facebook's `fbx2gltf` command line tool to convert FBX to
glTF, so that we can then use our well-maintained glTF importer.
See #59653 and https://github.com/facebookincubator/FBX2glTF for details.
2022-03-30 13:04:31 +02:00
45f74ceb85 Add PortableCompressedTexture
* Resource that allows saving textures embedded in scenes or standalone.
* Supports only formats that are portable: Lossy, Lossles or BasisUniversal

This is something I wanted to add for a long time. I made it now because @fire
requires it for importing GLTF2 files with embedded textures, but also this
will allow saving Godot scenes as standalone binary files that will run
in all platforms (because textures will load everywhere).

This is ideal when you want to distribute individual standalone assets online
in games that can be built from Godot scenes.
2022-03-30 10:39:41 +02:00
dab46db619 Merge pull request #59507 from bruvzg/openxr_move_proj_settings
Move OpenXR project settings to the main, to make them visible on unsupported platforms.
2022-03-29 23:48:16 +02:00
d2add64f91 Move OpenXR project settings to the main, to make them visible on unsupported platforms. 2022-03-29 23:25:33 +03:00
9484ee7a9e Add support for importing .blend files
Lets you drag or place .blend files in the project folder and it will import the files.

Checks for Blender 3.0's gltf2 `export_keep_originals` option.

Add basepath support to GLTFDocument append_from_file.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-03-29 21:54:41 +02:00
da346ed4ad Merge pull request #59583 from V-Sekai/svg-crash 2022-03-29 19:33:30 +02:00
683b61b094 Set threads to be one to avoid SVG crash. 2022-03-29 10:05:43 -07:00
3b4e94c8b5 Merge pull request #59660 from timothyqiu/fbx-reg 2022-03-29 10:41:19 +02:00
c17d9f05f8 Simplify FBX importer project settings registering 2022-03-29 15:00:43 +08:00
ea4d62dca3 [ICU] Add library name suffix for API rename to avoid conflicts. 2022-03-29 08:38:21 +03:00
5149db8d85 Merge pull request #59644 from akien-mga/template-no-editor-dep 2022-03-28 23:35:51 +02:00
8c12dfe099 Merge pull request #56718 from Geometror/noise-overhaul 2022-03-28 21:59:18 +02:00
45ec0e31c3 Remove last editor code dependencies in template build
SConstruct change also makes it possible to outright delete the `editor`
folder in a `tools=no` build, which we use in CI to ensure no invalid
cross-dependencies are added.
2022-03-28 21:13:01 +02:00
1ae8b2de38 Merge pull request #59636 from akien-mga/string-remove-ttr 2022-03-28 21:12:44 +02:00
0c7a15d777 Merge pull request #59641 from Sauermann/fix-encoder-compiler-warning 2022-03-28 20:43:34 +02:00
80d4f35215 Merge pull request #59626 from lufog/const_ref 2022-03-28 20:29:53 +02:00
7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
4799009a0f Merge pull request #59631 from akien-mga/websocket-no-tools-disable-editor-code
Modules: Don't build editor-specific classes in templates
2022-03-28 19:56:20 +02:00
759d04e28e basisu_uastc_enc.cpp was included twice in encoder_sources 2022-03-28 19:34:03 +02:00
5fe6984639 Modules: Don't build editor-specific classes in templates
They're moved to an `editor` subfolder so that we can easily handle them
separately.
2022-03-28 16:48:15 +02:00
c9b75431f3 Refactor GDScript/C# script templates logic to be editor-only
Not a full refactor as it still goes through ScriptLanguage so it's hacky,
but at least it can now compile without this.
2022-03-28 16:21:00 +02:00
143d13717b Merge pull request #59553 from reduz/script-extension-support 2022-03-28 13:35:21 +02:00
ed14ff5a08 Revert "Sort autocomplete/code completion options in a better way" 2022-03-28 13:31:32 +02:00