Commit graph

188 commits

Author SHA1 Message Date
Jonathan Nicholl
6ff41a3fcd Fix Blender file path check to require a directory 2022-08-24 16:08:01 -04:00
kobewi
f7f4873ed0 Replace Array return types with TypedArray 3 2022-08-24 12:53:36 +02:00
Jonathan Nicholl
d24b65b363 Update messages for missing FBX2glTF, add similar messages for Blender 2022-08-22 20:30:33 -04:00
Rémi Verschelde
09b012a409
Merge pull request #64400 from aaronfranke/gltf-fix-camera 2022-08-22 22:23:08 +02:00
rafallus
da7a5653f4 Expose Basis set_orthogonal_index method as a GridMap function 2022-08-20 21:42:20 -05:00
Aaron Franke
be81b33e2b
GLTF: Fix orthographic cameras, internally store data in GLTF's format 2022-08-14 19:18:53 -05:00
Aaron Franke
3bbb50359d
Document GLTFLight and GLTFSpecGloss 2022-08-14 14:57:58 -05:00
Hakim
805ffdfbf6 Prevent AnimationPlayer from being added on GLTF import if the option is unchecked. Fixes #63954 2022-08-10 11:17:29 +02:00
Yuri Sizov
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
Aaron Franke
ce0080768c
Make "Godot source files" comment consistent in modules 2022-08-05 17:09:11 -05:00
Rémi Verschelde
602e967ba8
Merge pull request #55943 from jvanmourik/master
glTF animation parsing: Changed the 'loop' and 'cycle' animation name keywords to be case-insensitive
2022-07-31 17:28:43 +02:00
Rémi Verschelde
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Rémi Verschelde
3084a48ace
Merge pull request #63219 from reduz/implement-vector4-projection 2022-07-25 11:13:27 +02:00
Aaron Franke
7b8f9a0e8e
GLTF: Organize structures into a subfolder 2022-07-24 17:16:51 -05:00
Rémi Verschelde
a1f0ea5d19
Merge pull request #63409 from V-Sekai/gltf-export 2022-07-25 00:03:38 +02:00
K. S. Ernest (iFire) Lee
b2bd4cc792 Mend duplicate nodes in the gltf export. 2022-07-24 14:38:57 -07:00
Aaron Franke
00ec9321f6
GLTF: Move shared defines into a separate gltf_defines.h file
Also move GLTFDocument's template conversion functions into gltf_template_convert.h
2022-07-24 14:21:27 -05:00
Aaron Franke
6887b3f8ee
GLTF: Only list used extensions when they're actually used 2022-07-23 21:59:16 -05:00
reduz
455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
bruvzg
8823eae328
Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
Rémi Verschelde
b942c1ffe3
Merge pull request #62827 from fire-forge/ok-cancel
Add `ok_button_text` to AcceptDialog and `cancel_button_text` to ConfirmationDialog
2022-07-13 14:10:38 +02:00
FireForge
e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
kobewi
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
PZerua
aa7ab96e71 Fix light intensity and attenuation import from GLTF 2022-07-05 19:48:01 +02:00
Rémi Verschelde
e72f3abe2f glTF: Fix a couple typos in warnings on image parsing 2022-07-03 02:55:31 +02:00
Rémi Verschelde
9923851370 Fix typos with codespell
Using codespell 2.2-dev from current git.
2022-05-23 21:32:19 +02:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
K. S. Ernest (iFire) Lee
d600e0bc00 Improve gltf extension GLTFDocument api. 2022-05-20 06:58:48 -07:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Rémi Verschelde
84f64ddde9
Merge pull request #60723 from reduz/refactor-module-initialization 2022-05-04 19:08:43 +02:00
reduz
de0ca3b999 Refactor module initialization
* Changed to use the same stages as extensions.
* Makes the initialization more coherent, helping solve problems due to lack of stages.
* Makes it easier to port between module and extension.
* removed the DRIVER initialization level (no longer needed).
2022-05-04 17:34:51 +02:00
Aaron Franke
fa7a7795f0
Rename Basis get_axis to get_column, remove redundant methods 2022-05-03 09:37:47 -05:00
Rémi Verschelde
d22850234c
Merge pull request #59393 from techiepriyansh/move-gltf-export-under-scene-menu 2022-04-27 11:51:49 +02:00
K. S. Ernest (iFire) Lee
44b6ee001e Discard images from gltf import for the animation library.
This is an optimization.
2022-04-23 17:41:34 -07:00
Rémi Verschelde
970debed93
Merge pull request #60177 from reduz/animation-library-import
Import scenes as AnimationLibrary
2022-04-13 22:47:54 +02:00
reduz
66009318e0 Import scenes as AnimationLibrary
Added the ability to import scenes as AnimationLibrary

* Completes implementation of https://github.com/godotengine/godot-proposals/issues/4296
* Helps if you want to export animations to a separate file (say a GLTF) to avoid re-importing/exporting them every time the model changes.
* Helps if you simply want to have animations using a dummy model, which can be shared across multiple models.

Creates a secondary scene importer used only for animations.

**NOTE**: A new flag for scene importer: EditorSceneFormatImporter.IMPORT_DISCARD_MESHES_AND_MATERIALS has been added, to hint importers that they should skip meshes and animations (and hence make importing faster). It is not implemented in any importer yet, this should be done in a separate PR.
2022-04-13 15:06:56 +02:00
Rémi Verschelde
46ef52162e Color: Rename to_srgb/to_linear to include base color space
This helps reduce confusion around sRGB <> Linear conversions by making
both input and output color spaces explicit.
2022-04-13 11:45:52 +02:00
Priyansh Rathi
0ea7780e33
move gltf export under scene menu 2022-04-12 19:42:41 +05:30
Rémi Verschelde
4ab86c6731
Merge pull request #59980 from reduz/animation-libraries 2022-04-11 14:18:35 +02:00
reduz
6f401439f8 Implement Animation Libraries
* Instead of containing single animations, AnimationPlayer now contains libraries.
* Libraries, in turn, contain the animations.

This paves the way for implementing the possibility of importing scenes as animation libraries, finally allowing to import animations separate from the 3D models.

Missing (will be done on separate PRs):

* Make it possible to import scenes (dae/fbx/gltf) as animation libraries.
* Make it possible for AnimationTree to import animation libraries on its own, so it does not rely on AnimationPlayer for everything.
2022-04-11 12:51:54 +02:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
Rémi Verschelde
d4b54e35f9 Fix path handling in FBX and Blend importers
Fixes #59996.
2022-04-07 23:33:28 +02:00
Marc Gilleron
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
Rémi Verschelde
4263f02f28
Merge pull request #59764 from reduz/blender-import-autodetect 2022-04-01 11:42:05 +02:00
reduz
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
Rémi Verschelde
340ad7d748
Merge pull request #59755 from V-Sekai/import-gltf-mat-placeholder 2022-04-01 01:12:16 +02:00
K. S. Ernest (iFire) Lee
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
K. S. Ernest (iFire) Lee
b675a6b9de Allow importing punctual lights from Blend. 2022-03-31 09:34:12 -07:00
K. S. Ernest (iFire) Lee
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
K. S. Ernest (iFire) Lee
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