Commit graph

40 commits

Author SHA1 Message Date
K. S. Ernest (iFire) Lee 04d43947bf
Add ufbx for FBX importing
This update introduces a new import method for FBX files using ufbx. If the fbx2gltf import fails, it will use the most recently cached scene from the ufbx import. The process is sped up by introducing threads to load the ufbx portion.

Key changes include:

- Support for importing geometry helper nodes in FBX files.
- Addition of cameras and lights with updated names.
- Removal of the fbx importer manager.
- Introduction of ModelDocument3D and updates to its methods.
- Changes to FBX import options and visibility.
- Updating the documentation and handling some errors.
- Store the original non-unique node, mesh and animation names in FBX and glTF.

Co-Authored-By: bqqbarbhg <bqqbarbhg@gmail.com>
2024-02-23 22:33:04 +01:00
mxaddict ad106a283b Update blender_path behavior to require exact path to executable instead of trying to guess it 2024-01-27 00:41:53 +08:00
Aaron Franke d36a34edb7
Misc changes to the GLTF module before audio PR 2024-01-11 20:33:51 -06:00
Aaron Franke 52f1b86ebc
Fix referring to ResourceImporterScene static importers via instances 2023-12-11 20:01:39 -06:00
Rémi Verschelde 5444afae63
Merge pull request #76572 from acazuc/ktx_format_support
Add support for KTX image format so that we can use Basis Universal for GLTF
2023-08-19 13:00:35 +02:00
acazuc a00cf02241 Add support for KTX & KTX2 image format
Add support glTF KHR_texture_basisu extension
2023-08-19 10:27:29 +02:00
KurtBliss 300ecfab89 Fixed editor filesystem/import properties not being caught by the doctool
Defined glft editor properties in editor_settings
Added documentation descriptions and entries
2023-08-14 06:06:28 -04:00
Haoyu Qiu b35a847109 Make blend file importer warnings translatable 2023-07-23 11:19:21 +08:00
Aaron Franke a222bdf83f
GLTF: Rename GLTFCollider class to GLTFPhysicsShape 2023-06-16 15:18:24 -05:00
Rémi Verschelde 25b2f1780a
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
Aaron Franke 7da93a0bc0
Add support for extending GLTF with more texture formats & support WebP 2023-05-22 16:30:20 -05:00
Aaron Franke 639b8e7dc7
Implement physics support in the GLTF module 2023-03-09 20:02:05 -06:00
Rémi Verschelde d81e6ee024
FBX: Disable importer when canceling FBX2glTF setup
Pretty hacky solution but it's better than an infinite loop.

All this import setup needs to be redone, it's very difficult to properly
bail out from an invalid import without triggering reimport loops.

Also fix underline not visible at default editor scale in LinkButton.

Fixes #73319.
2023-03-03 13:53:03 +01:00
Rémi Verschelde d29036bcda
Merge pull request #69319 from RedMser/blender-import-rpc
Batch import Blend files using XML RPC
2023-02-01 08:21:16 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
reduz e93d991329
Add a dialog for customizing FBX import
* If FBX files are found, a dialog will pop up asking to configure FBX2glTF.
* Dialog can also be accessed by going Editor -> Configure FBX Import.
* The dialog also shows a link to click to download the converter, which
  should contain instructions.
2022-12-18 01:08:54 +01:00
RedMser ba388d09b4 Batch import Blend files using XML RPC
This improves performance when importing many Blender files, as it
avoids waiting for Blender to startup every time.
Old logic is still available by setting the RPC port setting to 0.
2022-12-15 18:27:02 +01:00
Aaron Franke 1bbbee384d
GLTF: Clean up lots of includes 2022-11-29 23:11:08 -06:00
Aaron Franke 73c673a614
Change the way GLTFDocumentExtension classes are registered
Also move GLTFDocumentExtension into the extensions folder
2022-11-09 20:58:48 -06:00
The Tophat Demon c1a600545c GLTF imports & exports material texture filters 2022-10-03 16:20:08 -04:00
Rémi Verschelde 1513d76cb9 Fix some errors affecting the Web editor
- Don't warn about minimized/maximized modes not being available.
- Blender and FBX export both depend on running thirdparty applications,
  which can't be done (easily at least) for Web and Android editors.
- Editor theme complained about not being able to retrieve texture data
  for an icon. It was only used once so instead of flipping at runtime,
  let's just add a flipped icon.

Part of #65702.
2022-09-12 16:29:45 +02:00
Jonathan Nicholl 6ff41a3fcd Fix Blender file path check to require a directory 2022-08-24 16:08:01 -04:00
Jonathan Nicholl d24b65b363 Update messages for missing FBX2glTF, add similar messages for Blender 2022-08-22 20:30:33 -04:00
Aaron Franke 7b8f9a0e8e
GLTF: Organize structures into a subfolder 2022-07-24 17:16:51 -05: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
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
bruvzg 9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03: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
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
Rémi Verschelde 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
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
reduz b3bf90b3ce Add scene Post-Import Plugin support.
* New plugin system to control the whole import workflow
* Can add options and run code at every import step (general, per node, mesh, animation, material etc.)

This constitutes a first version of these plugins. The ability to interact with the import preview dialog will likely be added later on.
2021-10-15 09:12:04 -03:00
K. S. Ernest (iFire) Lee 1463fc889b GLTF for game templates.
Convert GLTF Document to use ImporterMeshInstance3D.

Add a GLTFDocument extension list and an extension for converting the importer mesh instance 3d to mesh instance 3d.

Use GLTF module when the editor tools are disabled.

Modified the render server to be less restrictive on matching blend arrays and have more logging.

Misc bugs with multimesh.

Always index the meshes.
2021-10-03 12:37:52 -07:00
K. S. Ernest (iFire) Lee 523b2d9199 Remove packed scene gltf
We determined through discussion that composing the packed scene from a node tree was a better design because it removed duplication of code.
2021-09-10 08:39:17 -07:00
reduz 5ad4f26659 Implement the ability to disable classes
* This PR adds the ability to disable classes when building.
* For now it's only possible to do this via command like:
  `scons disable_classes=RayCast2D,Area3D`
* Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-13 09:25:14 -03:00
Lightning_A e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
NutmegStudio fba23f5475 make EditorSceneImporterGLTF and GLTFMesh APIType::API_EDITOR 2021-01-08 12:01:53 +07:00
Rémi Verschelde b5334d14f7
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 🎆
2021-01-01 20:19:21 +01:00
K. S. Ernest (iFire) Lee 4b4efd2674 Add exporting glTF2.
* Support KHR_texture_transform.
* Support exporting glTF2
* Support exporting instanced scenes
* Extract into a gltf state and gltf document
* Add a tools menu for exporting gltf2
2020-12-22 16:56:28 -08:00