Commit graph

2450 commits

Author SHA1 Message Date
Rémi Verschelde 24fdedfe94
Merge pull request #54050 from reduz/animation-compression 2021-10-25 14:27:58 +02:00
bruvzg ebbc25e89c Ignore empty Font resources as theme override.
Add range hint to font_size properties.
Remove excessive `base_size` Font property.
2021-10-25 14:05:37 +03:00
JFonS c571e4a7f4 Implement distance fade and transparency
The built-in ALPHA in spatial shaders comes pre-set with a per-instance
transparency value. Multiply by it if you want to keep it.

The transparency value of any given GeometryInstance3D is affected by:
   - Its new "transparency" property.
   - Its own visiblity range when the new "visibility_range_fade_mode"
     property is set to "Self".
   - Its parent visibility range when the parent's fade mode is
     set to "Dependencies".

The "Self" mode will fade-out the instance when reaching the visibility
range limits, while the "Dependencies" mode will fade-in its
dependencies.

Per-instance transparency is only implemented in the forward clustered
renderer, support for mobile should be added in the future.

Co-authored-by: reduz <reduzio@gmail.com>
2021-10-25 11:39:34 +02:00
Silc 'Tokage' Renew 653e2a550c Fixed animation insertion in SkeletonEditor 2021-10-23 16:50:00 +09:00
reduz a69541da4c Implement Animation Compression
Roughly based on https://github.com/godotengine/godot-proposals/issues/3375 (used format is slightly different).

* Implement bitwidth based animation compression (see animation.h for format).
* Can compress imported animations up to 10 times.
* Compression format opens the door to streaming.
* Works transparently (happens all inside animation.h)
2021-10-21 18:27:34 -03:00
Marcel Admiraal 87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
Gilles Roudière d1aef45072 Allow updating TileMap cells using surrounding terrains 2021-10-21 16:57:28 +02:00
Rémi Verschelde c942d567eb
Merge pull request #53926 from YeldhamDev/i_am_tabbar_now 2021-10-20 15:42:41 +02:00
Rémi Verschelde 36fd7f213d
Merge pull request #53983 from Duroxxigar/navmesh-agent-default 2021-10-20 11:08:11 +02:00
Murilo Gonçalves 94cba835eb Fix: typo in TextParagraph class and docs 2021-10-19 16:38:58 -03:00
Duroxxigar 1de99820b8 Change default navmesh agent radius to match nav agent node's default radius 2021-10-19 11:43:39 -04:00
Michael Alexsander 67acb7de6e Rename Tabs to TabBar 2021-10-19 11:37:31 -03:00
Gilles Roudière 1a95f893c4 Implement TileMap patterns palette 2021-10-19 11:57:37 +02:00
Rémi Verschelde 523e0d80a8
Merge pull request #53925 from Anutrix/fix-unused-imports
Remove unused imports default_theme SCsub
2021-10-18 07:56:36 +02:00
Rémi Verschelde b6ee9ed8c5
Merge pull request #53889 from Klowner/surfacetool-generate-lod-assert-crash
Add check to SurfaceTool.generate_lod(); ensure target index count >=…
2021-10-18 07:51:43 +02:00
Anutrix a4b736658e Remove unused imports in .py, SCsub and SConstruct files 2021-10-18 01:50:34 +05:30
Mark Riedesel 5d96124af6 Add check to SurfaceTool.generate_lod(); ensure target index count between 0 and source index count. Fixes #53876 2021-10-16 20:31:20 -04:00
Rémi Verschelde c2a616f3ec
Merge pull request #53821 from TwistedTwigleg/Godot_Master_SkeletonModificationIK_FixPoseChange
Fix for SkeletonModification3Ds to work with the new bone pose changes.
2021-10-16 23:54:37 +02:00
TwistedTwigleg 0cedc04769 Fix for SkeletonModification3Ds to work with the new bone pose changes, fixed global_pose_to_local_pose function 2021-10-16 16:34:31 -04:00
reduz ae1c016547 Implement Animation Blend Shape Tracks
* New track type BLEND_SHAPE
* Blend shapes are imported via this new track type
* Processing is more optimized (no longer relies on variants)
* Modified the Blend Shape API in MeshInstance3D to use indices rather than StringNames (more optimizes)
* Promo: Fixed a small bug in gizmo updating in Node3D that affected performance

Dedicated BlendShape tracks are required for both optimization and eventually implementing them in animation compression.
2021-10-16 08:36:05 -03:00
Rémi Verschelde b5ece7c363
Merge pull request #53764 from Chaosus/vs_curve_input_port_default 2021-10-15 19:31:05 +02: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
Rémi Verschelde 668ceda9cb
Merge pull request #53810 from groud/fix_crash
Fixes crash in TileSetAtlasSource::get_tiles_to_be_removed_on_change
2021-10-14 20:26:40 +02:00
Gilles Roudière 3948f9cc83 Fixes crash in TileSetAtlasSource::get_tiles_to_be_removed_on_change 2021-10-14 16:49:59 +02:00
Brian Semrau a62e240260 Fix the height fog effect 2021-10-14 04:08:39 -04:00
reduz 2dc823273e Remove REST transform influence in skeleton bones
* Animations and Skeletons are now pose-only.
* Rest transform is kept as reference (when it exists) and for IK
* Improves 3D model compatibility (non uniform transforms will properly work, as well as all animations coming from Autodesk products).
2021-10-13 14:51:29 -03:00
Yuri Roubinsky e270644b20 Add a default input parameter field to CurveTexture (in visual shaders) 2021-10-13 15:25:12 +03:00
Gilles Roudière b9151860f3 Prevent tiles outside atlas texture 2021-10-13 13:44:02 +02:00
Rémi Verschelde 3e86ca5586
Merge pull request #53689 from reduz/remove-animation-transform3d-track 2021-10-13 12:40:33 +02:00
Rémi Verschelde 74a87fe98b
Merge pull request #53683 from Chaosus/vs_previews 2021-10-13 10:03:44 +02:00
reduz ec19ed3723 Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.

This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:

* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.

*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 20:08:42 -03:00
Hendrik Brucker cd37af4e4c Add GradientTexture2D
Co-authored-by: Mariano Javier Suligoy <marianognu.easyrpg@gmail.com>
Co-authored-by: Andrii Doroshenko <xrayez@gmail.com>
2021-10-12 16:22:30 +02:00
M. Huri 033dc4dbef Replaced NULL with nullptr 2021-10-12 20:20:19 +07:00
Juan Linietsky 610de0974d
Revert "Implement reverse playback and ping-pong loop in AnimationPlayer and NodeAnimation" 2021-10-11 19:27:50 -03:00
Rémi Verschelde 9ed4f8367b
Merge pull request #48332 from TokageItLab/implement-ping-pong 2021-10-11 22:55:01 +02:00
Yuri Roubinsky c299c54023 Make port previews in visual shader visible in other shader modes 2021-10-11 22:19:08 +03:00
Gilles Roudière 89a6c6cd84 Fixes set_source_id not updating the next automatic source id 2021-10-11 14:58:42 +02:00
Joan Fons 8ab7ca4b32 Fix auto LOD generation for blendshapes. 2021-10-09 20:31:28 +02:00
Tokage 372ba76663 implement ping-pong loop in animation
Co-authored-by: Chaosus <chaosus89@gmail.com>
2021-10-09 18:08:43 +09:00
Rémi Verschelde 5ae569560d
Fix missing argument names in bindings
While at it, tweak some boolean setters to use `p_enabled` for the bool.

Also renames `draw_minimap()` to `set_draw_minimap()`.
2021-10-09 00:20:10 +02:00
Rémi Verschelde 3d05b94212
Merge pull request #53522 from groud/read_only_tile_layout 2021-10-07 22:51:46 +02:00
Rémi Verschelde a6c4de49e1
Merge pull request #53523 from Calinou/remove-occlusion-color 2021-10-07 22:26:10 +02:00
Rémi Verschelde 21b6aabb60
Merge pull request #53538 from Calinou/environment-ssr-fade-no-negative-values 2021-10-07 22:05:46 +02:00
Hugo Locurcio 01d1e9f576
Don't allow translucent colors in built-in sky material properties
The colors' alpha channel is ignored, so there's no point in
exposing it in the editor.
2021-10-07 18:12:16 +02:00
Hugo Locurcio 0269d8e871
Clamp Environment's SSR fade-in and fade-out to positive values
Negative values result in rendering glitches.
2021-10-07 17:59:55 +02:00
Hugo Locurcio 265bae824f
Remove unimplemented Environment.ambient_light_occlusion_color property
This property was intended to provide a way to have SSAO or VoxelGI
ambient occlusion with a color other than black. However, it was
dropped during the Vulkan renderer development due to the performance
overhead it caused when the feature wasn't used.
2021-10-07 17:47:52 +02:00
Gilles Roudière 9c1b1e9a7e Set TileSet layout and half-offset as read-only when using square shape 2021-10-07 15:29:48 +02:00
PouleyKetchoupp 2f6cf3b8a8 Fix editable children errors when packing scene tree at runtime
When packing a scene node which is not the root, errors where caused
by internal checks in is_editable_instance method.

This check can be safely made outside instead.
2021-10-05 14:49:50 -07:00
Rémi Verschelde 198b49d8b5
Merge pull request #53237 from metinc/fix-animated-sprite-precision-error-master 2021-10-05 16:26:36 +02:00
Yuri Sizov 0855e5f8f7 Correctly bind optional arguments when emitting Theme changes 2021-10-04 22:22:41 +03:00
Rémi Verschelde d1c77d6b62
Merge pull request #53378 from clayjohn/hide_render_priority
Hide render_priority except when using SpatialMaterials
2021-10-04 19:17:32 +02:00
clayjohn 8c949016ff Hide render_priority except when using SpatialMaterials 2021-10-04 08:48:58 -07:00
Rémi Verschelde 073db83569
Merge pull request #53396 from pycbouh/theme-improve-change-propagation
Make `Theme` report property list changes less often
2021-10-04 17:35:53 +02:00
Yuri Sizov 4e12f770cf Make Theme report property list changes less often 2021-10-04 17:27:00 +03:00
Rémi Verschelde b85dfd990e
GDScript completion: Handle quote style ad-hoc to remove editor dependency
`core` and `scene` shouldn't depend on `editor`, so they can't query this style
setting in `get_argument_options`. But we can handle it after the fact in
GDScript's completion code.

Also cleans up a couple extra unused invalid includes in `core`.
2021-10-04 16:16:05 +02:00
Rémi Verschelde 865b62b1cd
Merge pull request #53341 from pycbouh/gui-editor-scale-encapsulation 2021-10-04 16:12:52 +02:00
Yuri Sizov 4a42a66cd9 Add the base scale factor to the Theme resource 2021-10-04 15:25:07 +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
Yuri Sizov 8aa78bc050 Reorganize Theme resource code for better maintainability 2021-10-02 19:26:20 +03:00
bruvzg daa613333e [Text Server] Add support for user defined punctuation list, used for word breaking. 2021-10-01 16:45:16 +03:00
bruvzg 0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
Rémi Verschelde 6ed3e9c182
Merge pull request #53208 from timothyqiu/headless-crash 2021-10-01 11:29:19 +02:00
bruvzg 2e035272a8 [FontData] Fixes saving copy of the font source data, if it was created from built-in font. 2021-10-01 09:25:26 +03:00
Rémi Verschelde a28f44fa53
Merge pull request #53277 from YeldhamDev/tabs_renaming 2021-10-01 07:52:29 +02:00
PouleyKetchoupp d46ac42389 Fix angular velocity default value in TileSet
Value was uninitialized, which lead to undefined behavior.
2021-09-30 18:04:54 -07:00
Michael Alexsander 663e480f24 Rename some elements of Tabs 2021-09-30 20:18:23 -03:00
Lightning_A c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
Rémi Verschelde a201f30c7f
Merge pull request #53259 from boruok/fix-atlas-texture-get_data-crash 2021-09-30 18:31:15 +02:00
Hugo Locurcio 570cdc128f
Rename Node's filename property to scene_file_path for clarity 2021-09-30 16:50:25 +02:00
boruok 213612b44a Fix AtlasTexture get_data() crash 2021-09-30 22:30:05 +09:00
Metin Celik a238dc8bbe Add half frame to floor() 2021-09-29 20:32:37 +02:00
Gilles Roudière f2caab4691 Improve TileMap physics for moving platforms and conveyor belts like movements 2021-09-29 17:56:30 +02:00
Haoyu Qiu 82f7f2c46c Fix crash in headless mode 2021-09-29 17:24:53 +08:00
Rémi Verschelde ad635567b1
Merge pull request #53189 from AnilBK/use-class-specific-funcs 2021-09-29 07:40:52 +02:00
Rémi Verschelde 50c0cee44e
Merge pull request #53186 from groud/tiles_fixes 2021-09-29 07:05:19 +02:00
Anilforextra fc9767abb1 Use functions defined in the their classes. 2021-09-29 09:36:34 +05:45
Gilles Roudière 27b9b3ef3c Various tiles-related fixes 2021-09-28 19:25:49 +02:00
Rémi Verschelde 9556c3a30a
Merge pull request #53180 from boruok/4.0-fix-atlas-texture-return-null 2021-09-28 18:52:53 +02:00
boruok 2cc2adedaa 4.0 fix atlas texture return null 2021-09-28 23:54:47 +09:00
Duarte David 7d53755ca7 Fixes the normals of SphereMesh when the radius is different from 1 2021-09-28 00:09:39 +01:00
Brian Semrau 62f8b0eb91 QuadMesh remove format ARRAY_FORMAT_INDEX 2021-09-27 13:10:34 -04:00
Haoyu Qiu ab280de765 Validate before passing indices to meshoptimizer 2021-09-27 20:35:56 +08:00
Anilforextra 41e43e0959 Merge duplicate branch conditions to one.
Use SWAP template for swapping values.
2021-09-26 21:18:15 +05:45
Rémi Verschelde 32ab77ef8f
Merge pull request #52430 from AnilBK/vector2-replacements 2021-09-24 13:04:42 +02:00
Anilforextra cc51b045da Construct values only when necessary. 2021-09-23 22:26:07 +05:45
Gilles Roudière f9e6329496 Implement animated tiles 2021-09-23 17:24:37 +02:00
bruvzg 9a36d8f26f Fill variation coordinates dictionary with default values when FontData is set/added. 2021-09-22 11:10:40 +03:00
Paulb23 6c2fd03959 Added search colors to TextEdit and CodeEdit theme 2021-09-21 20:24:39 +01:00
Rémi Verschelde dc2b062609
Merge pull request #52775 from gyroninja/fix-instantiated-root-node-crash
Fail at instantiating a packed scene if the root node is instantiated
2021-09-21 14:23:54 +02:00
Rémi Verschelde 91960b7b81
Merge pull request #52466 from tcoxon/fix_43733_4.0
Prevent shaders from generating code before the constructor finishes.
2021-09-21 13:52:57 +02:00
Tom Coxon dbe757102c Prevent shaders from generating code before the constructor finishes.
Fixes #43733: "creating SpatialMaterial in a separate thread creates invalid
shaders (temporarily)."

The bug occurred because various setters called in materials' constructors add
materials to queues that are processed on the main thread. This means that
when the materials are created in another thread, they can be processed on the
main thread before the constructor has finished.

The fix adds a flag to affected materials that prevents them from being added
to the queue until their constructors have finished initialising all the
members.
2021-09-21 11:51:39 +01:00
Rémi Verschelde 9d43d49bfd
Merge pull request #52151 from CaptainProton42/fix-y-billboard-shear
Fix y billboard shear when rotating camera
2021-09-20 12:19:42 +02:00
bruvzg 1383b37f1a Add FontData cache index check, remove excessive loop. 2021-09-20 11:03:59 +03:00
gyroninja f400c9239e Fail at instantiating if the root node is instantiated 2021-09-18 17:38:36 -07:00
Camille Mohr-Daurat 3581b893ed
Merge pull request #52681 from nekomatata/rename-rigid-body
Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBody
2021-09-16 11:20:21 -07:00
PouleyKetchoupp 85819b199a Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBody 2021-09-16 09:55:20 -07:00
Camille Mohr-Daurat 1852afb6b0
Merge pull request #52679 from nekomatata/world-boundary-shape
Rename WorldMarginShape to WorldBoundaryShape
2021-09-15 16:02:40 -07:00
PouleyKetchoupp 2ca94e51e4 Clean convex hull decomposition code
Remove unnecessary conversion between triangle data and vertex data
whenever possible.
2021-09-14 17:14:06 -07:00
PouleyKetchoupp bb75aec8bc Rename WorldMarginShape to WorldBoundaryShape 2021-09-14 11:16:31 -07:00
Rémi Verschelde e13d8eda1b
Merge pull request #52266 from AndreaCatania/coll 2021-09-14 14:34:22 +02:00