Commit graph

814 commits

Author SHA1 Message Date
Rémi Verschelde
09e1db2148
Merge pull request #68665 from TokageItLab/cut-unkeyed-gltf-anim
Add "Trimming" option to cut un-keyed timeline before first key in glTF animation
2022-11-29 16:51:56 +01:00
Silc Renew
db7473672f Add trimming option to cut un-keyed timeline before first key in gltf 2022-11-29 13:53:33 +09:00
Rémi Verschelde
794adbe996
Merge pull request #69178 from aaronfranke/mesh-shape
Use a more specific type for Mesh create_(convex|trimesh)_shape
2022-11-28 08:05:50 +01:00
Aaron Franke
93ab82536d
Use a more specific type for Mesh create_(convex|trimesh)_shape 2022-11-25 11:43:11 -06:00
Rémi Verschelde
5d20dccade
Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resources 2022-11-24 14:06:00 +01:00
Markus Sauermann
28af870750 Code simplifications found by cppcheck
They are based on:
- Boolean arithmetic simplifications
- setting variables that are not accessed
- constant variables
2022-11-21 08:43:36 +01:00
Silc Renew
ac1db40614 Improve BoneRenamer to avoid conflicting with original bone name 2022-11-16 16:36:33 +09:00
Markus Sauermann
3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
alex-pahdo
f5d256b118
Add more info to WAV import errors
Print mismatched header contents and file size, which can provide more clues to users when debugging.
2022-11-14 15:09:48 +01:00
Rémi Verschelde
19f21e2434
Merge pull request #68470 from bruvzg/img_fnt_imp
[Image Font Importer] Hide unused font size, add image and character margins.
2022-11-14 11:12:10 +01:00
Rémi Verschelde
5b3a03bf5c
Merge pull request #68448 from bruvzg/font_imp_tr
[Font] Add an import option to pre-render all glyphs required for the translation.
2022-11-14 11:12:01 +01:00
trollodel
ba9e619b51 Use forward-declarations in EditorPlugin where possible 2022-11-11 20:25:51 +01:00
bruvzg
35528b800c
[Font] Add an import option to pre-render all glyphs required for the translation. 2022-11-10 10:43:15 +02:00
bruvzg
a8189a6831
[Image Font Importer] Hide unused font size, add image and character margins. 2022-11-10 08:42:14 +02:00
Rémi Verschelde
f475c91081
Fix -Wunused-but-set-variable warnings from Emscripten 3.1.20 2022-11-04 11:36:13 +01:00
Rémi Verschelde
af957bf58e
Merge pull request #68223 from Calinou/editor-font-prerendering-fix-add-icon
Fix missing Add icon in the editor font prerendering dialog
2022-11-04 10:48:55 +01:00
Hugo Locurcio
94ca971114
Fix missing Add icon in the editor font prerendering dialog
This also tweaks button writing style to match the rest of the editor.
2022-11-03 19:18:43 +01:00
Hugo Locurcio
a19e389f4f
Hide Antialiasing import option on DynamicFonts with MSDF enabled
Antialiasing cannot be adjusted on fonts rendered with MSDF.
Internally, Godot always uses grayscale antialiasing for those fonts.

This also tweaks property hints for consistency, and renames
uses of "sub-pixel" to the more commonly used "subpixel".
2022-11-03 18:40:44 +01:00
Micky
ebf86c96e9 Rename Image's get_rect to get_region
Also renames its parameter to from "rect" to "region".
2022-11-01 23:35:48 +01:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde
93df2b0f6d
Merge pull request #67805 from TokageItLab/fix-postimport-anim-arg
Fix passed dictionary to `internal_process()` in importer plugin for animation
2022-10-31 10:49:47 +01:00
DeeJayLSP
0619bd44da ResourceImporterLayeredTexture: rename compress modes to match enum 2022-10-28 14:24:32 -03:00
Clay John
8a5e0b8caf
Merge pull request #67834 from Klowner/collada-closed-curves-16658
Handle closed splines in Collada importer
2022-10-27 09:48:21 -07:00
Mark Riedesel
8f7ab02bc6 Handle closed splines in Collada importer 2022-10-24 09:35:09 -05:00
Silc Renew
46a5b230fa Fix passed dict to internal_process() in importer plugin for animation 2022-10-24 00:23:37 +09:00
Aaron Franke
7f9a8c99c9
Clean up Basis from Euler code 2022-10-21 17:54:49 -05:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
kobewi
072f6feaba Make some Image methods static 2022-10-14 14:34:15 +02:00
Juan Velandia
8ad3f8f051 Add animation slices for individual animations
This improves the workflow for animations in a single timeline.
The users are no longer forced to slice one animation named "default".
Instead users can choose which animation(s) to break and how.

Changes:

- Remove slicing options from the animation player import menu
- Add such options to the animation import menu
- Rename clips to slices wherever was left
2022-10-10 18:39:49 -05:00
HolonProduction
e87c9fc48c Show svg import options in default settings.
Fixes: #63840

Importers can export options conditional based on the resource path.
If an empty path is passed (as by the editor settings) filtering should not be done.
2022-10-08 16:01:00 +02:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Rémi Verschelde
82b87d7a17 Remove unsupported NO_SAFE_CAST/-fno-rtti from Android build
Android was the last platform to still attempt to disable RTTI (for binary
size), but both the Android editor and now the ICU library used by templates
need RTTI.

There could still be the possibility to support this for non-ICU template
builds (i.e. without the TextServerAdvanced module), but since this isn't one
of the build configurations we test regularly it's pretty risky to keep this
option only for that specific use case. And our code is already littered with
`dynamic_cast`s which weren't guarded with `!defined(NO_SAFE_CAST)`.
2022-10-03 11:18:31 +02:00
Andy Maloney
49ff3d5489 Remove unused includes & move some includes to top of file 2022-09-23 19:06:31 -04:00
bruvzg
4351af30c8
[Font Inspector Plugin] Hide "Add Feature" button if supported feature list is empty. 2022-09-22 08:20:40 +03:00
bruvzg
ec8084d87f
HarfBuzz: Update to version 5.2.0, add new Unicode 15 blocks and scripts. 2022-09-17 23:19:11 +03:00
SaracenOne
13f5c62124 Fix LOD-generation on skinned meshes. 2022-09-14 02:46:10 +01:00
Yuri Sizov
817d4db21f Allow images to be imported "for editor use" and respect editor settings 2022-09-07 23:31:31 +03:00
Yuri Sizov
43f03e2ce6 Improve naming of theme properties throughout GUI code
Rename ItemList's bg -> panel
Rename ItemList's bg_focus -> focus
Rename ProgressBar's bg -> background
Rename ProgressBar's fg -> fill
Rename Tree's bg -> panel
Rename Tree's bg_focus -> focus
Rename ScrollContainer's bg -> panel
Rename FileDialog's *_icon_modulate -> *_icon_color
Rename FileDialog's files_disabled -> file_disabled_color
Rename CheckButton's on/off -> checked/unchecked
Rename check_v_adjust -> check_v_offset
2022-09-06 22:53:17 +03:00
Rémi Verschelde
a49ec435b2
Merge pull request #60115 from V-Sekai/scene_scale 2022-09-06 13:38:30 +02:00
Rémi Verschelde
7b5d1ea5b9 Fix various uninitialized member pointers
Using this command:
```
find -name "thirdparty" -prune -o -name "*.h" -exec sed -i {} -e '/return /! s/\t\([A-Za-z0-9_]* \*[A-Za-z0-9_]*\)\;/\t\1 = nullptr;/g' \;
```

And then reviewing the changes manually to discard the ones that don't
seem correct/safe/good (notably changes to `core` unions).
2022-09-06 11:20:27 +02:00
SaracenOne
befc4b79a4 Importer option to apply the root basis for meshes/skins/animations 2022-09-05 09:45:56 -07:00
Silc Renew
563dcbe7b8 Fix rest fixer for the model has skin which non inverse global rest 2022-09-04 00:04:11 +09:00
Rémi Verschelde
3a62c294c7 Merge pull request #65170 from KoBeWi/your_argument_is_TypedArray 2022-09-02 13:57:02 +02:00
Hendrik Brucker
ea0472fecf Refactor BitMap and add tests
Co-authored-by: Resul Çelik <resul_celik@hotmail.com>
2022-09-01 18:39:17 +02:00
kobewi
7adc8376ed Change Array arguments to TypedArray 2022-09-01 13:13:19 +02:00
clayjohn
385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
Rémi Verschelde
ae349d8227
Merge pull request #64377 from Mickeon/rename-canvas-redraw
Rename `CanvasItem.update()` to `queue_redraw()`
2022-08-30 14:47:41 +02:00
Rémi Verschelde
ebe4f8d3a4
Merge pull request #65039 from Mickeon/rename-treeitem-tooltip 2022-08-30 14:05:08 +02:00
Micky
97f8c9b97c Rename TreeItem's set_tooltip to set_tooltip_text
`set_tooltip` -> `set_tooltip_text`
`get_tooltip` -> `get_tooltip_text`

For consistency:
`get_button_tooltip` -> `get_button_tooltip_text`
And the `tooltip` parameter in `add_button` was renamed to `tooltip_text`
2022-08-30 11:16:23 +02:00
Aaron Franke
10a56981dc
Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
Micky
e31bb5ffeb Rename CanvasItem.update() to queue_redraw()
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.

Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.

Just a few comments have also been changed to say "redraw".

In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02:00
Rémi Verschelde
fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Rémi Verschelde
f7f8af232c
Merge pull request #64885 from Mickeon/rename-tooltip-hint
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-28 17:43:01 +02:00
Aaron Record
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Micky
ef5b9a06a9 Rename hint_tooltip to tooltip_text & setget
`hint_tooltip` -> `tooltip_text`
`set_tooltip` -> `set_tooltip_text`
`_get_tooltip` -> `get_tooltip_text`

Updates documentation, too.
2022-08-27 01:35:01 +02:00
Rémi Verschelde
f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Micky
59e11934d8 Rename str2var to str_to_var and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.

- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`

- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
fabriceci
f8cc88fab3 Restore RigidBody2/3D, SoftBody names in physics 2022-08-26 12:26:25 +02:00
Rémi Verschelde
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0 2022-08-26 11:59:07 +02:00
Yuri Sizov
672e9d6868 Make ImageLoader take bit field flags 2022-08-23 14:39:01 +03:00
Rémi Verschelde
09d73352fc
Merge pull request #64015 from TokageItLab/add-motion-scale-adjustment
Add motion scale base height adjustment to RestFixer
2022-08-23 08:53:29 +02:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
Silc Renew
255ebe1137 add motion scale adjustment 2022-08-23 05:55:33 +09:00
kobewi
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Rémi Verschelde
5a2dde51c0
Merge pull request #63662 from TokageItLab/fix-silhouetter-for-rotated-skel 2022-08-22 22:28:33 +02:00
Rémi Verschelde
5bc8702855
Merge pull request #64132 from TokageItLab/fix-optimizer 2022-08-22 20:39:06 +02:00
Aaron Franke
8893b2bdb4
Clean up mesh include code and comments 2022-08-20 13:24:40 -05:00
Silc Renew
582c760c96 Add apply node transforms option to rest fixer 2022-08-18 08:15:52 +09:00
Yuri Sizov
2e24b76535
Merge pull request #52212 from thenegativehunter2/master_texture_array_normal_added
Add an import option to force TextureArrays as normal maps for RGTC Compression(redo)
2022-08-16 16:23:35 +03:00
Silc Renew
f70dfec535 improve animation track optimizer algorithm 2022-08-09 09:18:45 +09:00
Rémi Verschelde
8f033f1d19
Merge pull request #60299 from Calinou/editor-vram-compress-pc-improve-warning 2022-08-06 23:43:06 +02:00
Yuri Sizov
9f55bd971e Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
kobewi
c3606cb5f3 Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02:00
Rémi Verschelde
1c820f19b1
Merge pull request #60957 from DeeJayLSP/sample_pcm 2022-07-28 19:51:08 +02:00
DeeJayLSP
4889659227 Rename AudioStreamSample to a more discoverable name 2022-07-28 13:53:36 -03:00
Rémi Verschelde
199ea349f5
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local 2022-07-28 10:03:07 +02:00
Silc Renew
9c3ae0e000 Fix SkeletonRenamer & Organizer for non bone animations (BlendShape) 2022-07-28 01:21:29 +09:00
Silc Renew
dde235ad82 add position track normalization & post process key value for retarget 2022-07-26 18:48:08 +09:00
Rindbee
3aa0a78f73 Fix repeatedly opening the Advanced Import Settings dialog for fonts getting an error 2022-07-26 10:28:44 +08: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
a5bc65bbad
Merge pull request #63265 from reduz/stream-bpm-support
Implement BPM support in AudioStream files.
2022-07-23 11:21:14 +02:00
reduz
d1ddee2258 Implement BPM support
Based on #62896, only implements the BPM support part.

* Implements BPM support in the AudioStreamOGG/MP3 importers.
* Can select BPM/Bar Size and total beats in a song file, as well as edit looping points.
* Looping is now BPM aware
* Added a special importer UI for configuring this.
* Added a special preview showing the audio waveform as well as the playback position in the resource picker.
* Renamed `AudioStream::instance` to `instantiate` for correctness.
2022-07-23 07:31:17 +02:00
luz paz
38aaaa3cf9 Fix various typos not caught by codespell
Revert upstream `core/input/gamecontrollerdb.txt`. Upstream fix: https://github.com/gabomdq/SDL_GameControllerDB/pull/600
2022-07-21 07:38:23 -04:00
FireForge
84431bd782 Use integer types in Image and ImageTexture methods
- Image.blit_rect()
- Image.blit_rect_mask()
- Image.blend_rect()
- Image.blend_rect_mask()
- Image.fill_rect()
- Image.get_used_rect()
- Image.get_rect()
- ImageTexture.set_size_override()
2022-07-18 19:43:32 -05:00
Silc Renew
f3af3aedfe add rest fixer to importer retarget 2022-07-16 19:53:11 +09:00
Fabian Keller
2bf9e6090c rename translate(d) to translate(d)_local in Transform 2D/3D 2022-07-16 11:47:54 +02: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
af19501cc7 Seperate filter and description in FileDialog.add_filter() 2022-07-09 10:51:45 -05: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
Rémi Verschelde
7fd036800c
Merge pull request #62622 from Rindbee/make-blend-import-preview-visible 2022-07-07 15:27:30 +02:00
Rémi Verschelde
1e553e34fb
Merge pull request #62108 from bruvzg/font_config_v3 2022-07-07 12:22:49 +02:00
Dave Palais
d9e4327e34 EditorScenePostImportPlugin: Return requested option value 2022-07-06 15:11:09 -05:00
bruvzg
344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
Rémi Verschelde
6f02454634
Merge pull request #59834 from trollodel/advanced_import_fix
Fix some bugs in the advanced scene import
2022-07-03 10:51:40 +02:00
Rémi Verschelde
f254500753
Merge pull request #61168 from DeeJayLSP/wav_ieee 2022-07-02 22:04:06 +02:00
Rindbee
d9709e151b Make import preview of blend files visible
Unlike other scene imports, the import of blend files requires options. Otherwise, the preview may not be visible.
2022-07-02 13:10:29 +08:00
Silc Renew
dc43cfc830 implement bone renamer in importer 2022-07-01 03:55:28 +09:00
reduz
e772b65d92 Remake resource thread safety and API
* Ensures thread safety when resources are destroyed.
* Simplified API by always forcing `ResourceCache::get_ref`, which needs less hacks and is fully thread safe.
* Removed RWLock for resources because its not possible to use for the new logic. Should not be a problem.

Supersedes #57533
2022-06-22 13:46:46 +02:00
Juan Linietsky
15837ec191
Revert "Disable VRAM compression by default for small textures in Detect 3D" 2022-06-20 15:30:19 +02:00