Commit graph

93 commits

Author SHA1 Message Date
Aaron Franke
9dd71c6414
ResourceImporterScene: Replace animation bool with an import type string enum 2024-08-27 14:58:18 -07:00
Rémi Verschelde
ce1ba7328f
Merge pull request #94934 from Hilderin/fix-no-validation-blender-path-on-import
Fix no validation on Blender path on import
2024-08-19 16:05:26 +02:00
ywmaa
c460f1de24
Add Option for Export Geometry Nodes Instances in blend importer 2024-08-19 12:23:21 +02:00
Hilderin
2dc9cf50c5 Fix no validation on Blender path on importation 2024-07-30 17:30:11 -04:00
raging-loon
344ff6fe83
Fix browse_dialog in Blender scene importer to accept files
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-07-29 11:38:24 +02:00
Rémi Verschelde
2380ed5e1b
Merge pull request #94058 from Hilderin/fix-scene-project-importation-settings
Fix missing options in Project Import Defaults
2024-07-17 11:42:59 +02:00
Hilderin
169e732518 Fix missing options in Project Import Defaults 2024-07-09 09:33:39 -04:00
Rémi Verschelde
3b891f5a8a
Merge pull request #94004 from Hilderin/fix-blender-export-quotation-mark
Fix .blend files with quotation marks in filename fail to import
2024-07-08 11:48:23 +02:00
Hilderin
d244d6f4fe Fix .blend files with quotation marks in filename fail to import 2024-07-07 18:12:45 -04:00
demolke
7864abbeec Update vertex color import to handle Blender 4.2 upwards
Blender commit 0f0a8df8a9 which is landing in 4.2 deprecated `vertex_colors` GLTF property, use `export_vertex_color` instead.
2024-07-06 14:22:09 +02:00
A Thousand Ships
fbb879debd
[Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
A Thousand Ships
ca18a06ecb
[Scene] Add SceneStringNames::confirmed 2024-06-19 09:40:54 +02:00
A Thousand Ships
d519715d94
[Scene] Add SceneStringNames::font(_size/_color) 2024-06-18 17:24:27 +02:00
Jummit
c182adcd48 Blend import: Ability to import only the active collection 2024-05-31 18:37:14 +02:00
K. S. Ernest (iFire) Lee
24f56008ac Add bake_fps for FBXDocument, GLTFDocument and both import-export. 2024-05-23 09:09:36 -07:00
Lyuma
ef486db569 Support Import As Skeleton Bones on glTF and AnimationLibrary import 2024-05-21 03:19:35 -07:00
A Thousand Ships
ee79386f7b
[Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
A Thousand Ships
b4c6cc7d82
[Core] Add case-insensitive String::containsn 2024-05-08 12:48:01 +02:00
Aaron Franke
1bcbbe96c4
Organize existing code for editor plugins 2024-04-27 11:59:58 -07:00
aaronp64
e63d0983d0 Fix errors/crashes related to skipped imports
- Added check for "animation/fps" key before attempting to use it in EditorSceneFormatImporterBlend::import_scene, to give error instead of crashing

- Don't show "Advanced..." button if last import used "Keep File" or "Skip File"

- Don't try to call ResourceLoader::load on kept/skipped file when changing importer, which would give an error

Fixes #90324
2024-04-25 10:33:59 -04:00
Aaron Franke
a9416da6ea
GLTF export: Propagate property_list_changed from extensions 2024-04-04 14:06:09 -07:00
Lyuma
b0ce274a52 Apply "Remove Immutable Tracks" after post-import.
Reimplements "Remove Immutable" by comparing to the skeleton rest.
It is necessary to delay removing animation tracks until after the correct rest pose is calculated in rest-fixer.
Preserves the original implementation in the GLTFDocument / FBXDocument API for compatibility.
2024-03-30 23:45:22 -07:00
Adam Scott
44d3ce2c11
Add browse folder and browse file icons 2024-03-12 09:57:59 -04:00
398utubzyt
4c69e8c026 Fix compilation errors when DISABLE_DEPRECATED is defined 2024-02-28 05:09:29 -08:00
Lyuma
652ef966f9 Add new scene import option to import as Skeleton
Adds a bool import option `nodes/import_as_skeleton_bones`.
This is supported in all FBX or GLTF document based formats.
It is especially useful for retargeting and importing animations.
2024-02-26 03:06:07 -08:00
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
Rémi Verschelde
13bf4fd19a
Merge pull request #85519 from mxaddict/blender-rpc-server
Added proper timeout for blender rpc connection
2024-01-29 13:16:22 +01:00
mxaddict
857586b7ae Added proper timeout for blender rpc connection 2024-01-27 03:44:27 +08: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
Yuri Sizov
95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
Rémi Verschelde
78fadf45ca
Merge pull request #85335 from zinefer/bugfix-blend-importer-on-windows-network-share
Replace `//` with `\\` before sending path to Blender
2024-01-09 15:30:50 +01:00
Aaron Franke
9753a35c76
Move 3D scene import classes to their own folder 2024-01-04 11:02:49 -06:00
Aaron Franke
8acef03cb5
Add export settings to the export dialog for GLTF 2023-12-30 19:57:39 -06:00
zinefer
72d18d50a4 Bugfix: Replace // with \\ before sending path to Blender
On Windows, Blender treats //fileshare/assets/model.blend as a relative
path which will not be found. Instead, replace the first two chars with
`\\` which when escaped becomes `\\\\`.
2023-12-07 15:23:11 -07:00
Pedro J. Estébanez
fe4850c0d0 Use mingw-std-threads in MinGW builds 2023-11-18 11:56:05 +01:00
Aaron Franke
6d8f029df4
Use the Blender file name instead of the generated GLTF file name 2023-11-09 12:11:39 -06:00
Aaron Franke
58076b9ccb
Implement glTF compat version system for files from older Godot versions 2023-11-03 12:07:25 -05:00
Haoyu Qiu
2413952a4c Fix "as" capitalization in editor strings 2023-10-23 16:10:05 +08:00
Rémi Verschelde
3cf17679ca
Merge pull request #81194 from rcorre/blend-import-76338
Update blender export flags for 3.6.
2023-10-02 13:16:11 +02:00
Ryan Roden-Corrent
7e64c6c399
Update blender export flags for 3.6.
Fixes #76338.

Blender 3.6 imports fail with:

```
TypeError: Converting py args to operator properties: : keyword "export_nla_strips" unrecognized
```

The `export_nla_strips` flag was removed and replaced with `export_animation_mode`.
In 3.6.0-3.6.21, this option does not exist at all and causes the failure above.
In 3.6.22, this option was re-added, but does nothing.
See 96a73cb664.

We now need to check the blender version to determine what flags to use.
This adds an additional shell command before every import.
We might consider caching the version, but we'd have to invalidate the cache if the blender version or path changes.

As an aside, the "group animations" setting in Godot does the opposite of what I'd expect.
When `group_tracks=true`, each animation is exported individually.
When `group_tracks=false`, all animations are exported as a single track.
This seems backwards, but I've kept the 3.6 behavior consistent with 3.5.

From https://docs.blender.org/api/3.6/bpy.ops.export_scene.html:

> ACTIONS Actions – Export actions (actives and on NLA tracks) as separate animations.
> ACTIVE_ACTIONS Active actions merged – All the currently assigned actions become one glTF animation.

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-09-30 11:32:21 -04:00
kobewi
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02: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
Hakim
1fb1dd3248 Refresh the filesystem tab when exporting a new GLTF file 2023-06-10 23:04:20 +02:00
Ninni Pipping
71ee65dc57 Enable shadow warnings and fix raised errors 2023-05-11 16:00:59 +02:00
Yuri Sizov
8a74d8438f Extract editor run toolbar into its own component
- Simplify and update its logic.
- Simplify EditorScript.
- Improve EditorNode and other relevant includes.
- Fix scene-based path in the movie writer when
reloading a scene.
2023-04-19 17:12:28 +02:00
Yuri Sizov
4154039832 Improve includes of EditorNode (and everything else)
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
2023-04-07 18:59:49 +02:00
juliuse98
7a0d12182e
Fix blend-file import when using custom color management in blender
When using custom color management in blender the --version command will
output additional information infront of the "normal" output and this
prevented the import.

Fixes #74439.
2023-03-06 22:36:03 +01:00
Lyuma
1c090d37b4 fbx: Set base_dir correctly in append_from_scene 2023-02-20 16:32:27 -08:00
Silc Renew
4970c27ff5 Fix gltf import generate_scene() option 2023-02-15 17:43:34 +09:00