Commit Graph

1834 Commits

Author SHA1 Message Date
smix8 55923ade68 Add navigation layer bitmask helper functions
Adds helper functions to work with the navigation layer bitmask.
2022-06-19 13:47:19 +02:00
baihan da7eb96804 Fix physical bone is not animated in running project. 2022-06-19 09:46:34 +08:00
smix8 07740302f3 Add NavigationAgent desired path distance
Add NavigationAgent desired path distance
2022-06-18 19:11:49 +02:00
Hugo Locurcio 5b72ccc254
Fix Light3D `angular_distance` property hint being in radians
The unit is internally stored as degrees and is treated as such,
so it should be displayed as-is in the inspector.
2022-06-17 20:00:54 +02:00
Ellen Poe d384d84f45 Audio: Expose 2D/3D panning strength parameters 2022-06-17 13:08:48 +02:00
holgac a5c01dc25a Fixes #62096: LightmapGIData::_get_light_textures_data crash on empty image
The program crashes when trying to determine slice width/height if the
light texture is empty. This fix just returns an empty array, as if the
light texture does not exist.
2022-06-17 02:27:08 +02:00
bruvzg b5c96df277
Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the TextServer. 2022-06-16 16:49:37 +03:00
Rémi Verschelde 9ddf13e7ad
Merge pull request #60151 from Klowner/pathfollow3d-parallel-transport-improvement
PathFollow3D parallel transport frame reliability improvements
2022-06-15 23:54:00 +02:00
smix8 245da150e7 Streamline Navigation layer function names.
Streamline Navigation layer function names.
2022-06-15 00:18:48 +02:00
smix8 f10ff0efda Add NavigationAgent set_navigation_map() function
Add NavigationAgent set_navigation_map() and get_navigation_map() function.
2022-06-14 21:48:47 +02:00
Rémi Verschelde 111a3ca097
Merge pull request #59125 from KoBeWi/link_to_the_vector 2022-06-14 16:18:17 +02:00
Rémi Verschelde d845d690f2
Merge pull request #61861 from techiepriyansh/multi-image-atlases 2022-06-14 16:11:30 +02:00
kobewi 5553e27fe8 Add vector value linking
Co-authored-by: redlamp <244062+redlamp@users.noreply.github.com>
2022-06-14 14:58:44 +02:00
Priyansh Rathi d49c1cfc3e
save lightmap as multi-image atlas 2022-06-14 17:22:55 +05:30
Hugo Locurcio 0225c6d31a
Tweak Light3D property hints for greater flexibility
- Specular can now be set above 1.0.
- Blur can be set to 0 to disable shadow blurring entirely, which is useful
  on lights that have a non-zero size.
  - When shadow blurring is disabled, lights that have a non-zero size will
    not use PCSS-like soft shadows, speeding up shadow rendering
    considerably.
- Some property hints now allow more precise values.
2022-06-13 14:31:46 +02:00
FireForge 4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
Rémi Verschelde 5c3081dae2 SoftBody: Fix attachments property names after #61180
Fixes #61581.
2022-06-10 14:16:14 +02:00
smix8 cfdfd304f1 Add NavigationRegion costs for pathfinding
Add NavigationRegion costs for pathfinding.
2022-06-06 15:25:06 +02:00
Rémi Verschelde 93bbbf8947
Merge pull request #61625 from smix8/navigation_debugview_mesh_scripted_4.x 2022-06-02 18:24:30 +02:00
JFonS 8abace0f79
Merge pull request #60517 from Calinou/3d-editor-audiostreamplayer3d-add-gizmo 2022-06-02 12:11:06 +02:00
smix8 b6eff47bac Add NavigationMesh debug when navmesh is added later through scripts
Add NavigationMesh debug when navmesh is added later through scripts
2022-06-02 10:55:19 +02:00
smix8 56fe26b5e0 Fix NavigationAgent reparent issues
Fix NavigationAgent reparent issues
2022-06-01 06:45:12 +02:00
Hugo Locurcio 93933e4085
Add a gizmo to visualize AudioStreamPlayer3D's audible radius
The ring's color changes depending on the attenuation model chosen,
and whether Max Distance is capping the distance the sound can be
heard at.

Cold colors are used when the volume cap is a "soft" cap (the sound
can still be heard past the distance, but only faintly).

Warm colors are used when the volume cap is a "hard" cap (the sound
can't be heard past the distance at all).

White is used for linear fade performed when the attenuation model
is Disabled and Max Distance is greater than 0.

No ring is drawn when the attenuation model is Disabled and Max Distance
is equal to 0 (since the sound can be heard from anywhere).
2022-05-26 20:53:07 +02:00
Yuri Rubinsky 8f57d9519e Fix errors when materials attached to 3d object are not freed 2022-05-26 09:42:59 +03:00
Lyuma 1f02bc0e3e Only call _update_panning during _physics_process. 2022-05-25 14:14:22 -07:00
Hugo Locurcio e85459dcd1
Add Cone and Cylinder shapes to FogVolume
This complements the existing Ellipsoid and Box local fog shapes.

This can be used to represent a light cone coming from a SpotLight.
2022-05-25 12:35:53 +02:00
Rémi Verschelde d3268c51ad
Merge pull request #61311 from trollodel/fix_joint3d_warning_crash 2022-05-23 22:23:53 +02:00
bruvzg f9fbe92e8a
[Label3D, 4.x] Monitor default theme font changes, to prevent use of invalid materials. 2022-05-23 18:15:34 +03:00
trollodel 51b229bffa Fix Joint3D and Joint2D warning causing a crash 2022-05-23 12:21:13 +02:00
Rémi Verschelde a80793fcb8
Merge pull request #61235 from smix8/navigation_agent_avoidance_processing_4.x 2022-05-22 19:11:32 +02:00
Hugo Locurcio df9340d552
Tweak the GPUParticles3D Transform Align property hint for readability 2022-05-21 13:13:48 +02:00
smix8 7f3688603c Process NavigationAgent2D/3D avoidance on demand only
Changes NavigationAgent avoidance callback to a toggle that is disabled by default.
Also fixes a few missing descriptions / wrong warnings.
2022-05-20 23:47:10 +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
Aaron Franke 5dc3bfb80e
Use suffixes for units in nodes and resources 2022-05-19 14:34:27 -05:00
Rémi Verschelde ce069fbe99
Merge pull request #61128 from smix8/navigation_agent_process_mode_4.x 2022-05-19 15:24:34 +02:00
Aaron Record 900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
Haoyu Qiu fc3b845c07 Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
2022-05-19 14:08:47 +08:00
Rémi Verschelde 03f240ba93
Merge pull request #60599 from rburing/rest_on_recovery_param 2022-05-18 17:36:24 +02:00
Ricardo Buring f072aa69a9 Add motion parameter to toggle whether recovery is reported as a collision
This makes the intent explicit in each use case.
2022-05-18 16:40:29 +02:00
kobewi 6b981bf12b Defer group calls in Node3D 2022-05-18 16:10:03 +02:00
smix8 6b51ab66d8 Make Navigation Agents and Obstacles respect parent process mode
Temporarily removes agent from navigation map when parent node cannot process due to SceneTree pause and process_mode property. Normal process_mode does not work as other agents would still avoid the paused agents because they were still active on the navigation map and the rvo world. Also fixes potential crash when region_get_map or agent_get_map is called while no map is set.
2022-05-17 20:08:39 +02:00
Mark Riedesel 281cf5fb81 PathFollow3D parallel transport frame reliability improvements 2022-05-17 11:17:00 -04:00
Rémi Verschelde 7b571ab8f7
Merge pull request #60986 from fire-forge/capitalism 2022-05-16 13:49:14 +02:00
Rémi Verschelde f95b7412c7
Merge pull request #61057 from smix8/navigation_obstacle_transform_error_4.x 2022-05-16 13:47:28 +02:00
Rémi Verschelde 9ba0fac1ba
Merge pull request #61038 from smix8/navigation_obstacle_rid_config_warn_4.x 2022-05-16 13:47:20 +02:00
Rémi Verschelde 95da5436dc
Merge pull request #61032 from smix8/navigationmesh_bake_no_threads_4.x 2022-05-16 13:47:06 +02: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
smix8 49c603e127 Disable threaded NavigationMesh bake on unsupported OS
Automatically disables threaded NavigationMesh bake when OS does not support threads.
2022-05-16 00:55:15 +02:00
smix8 cc707412e9 Fix NavigationObstacle2D/3D get_global_transform() error
Fixes NavigationObstacle2D/3D reporting a 'get_global_transform: Condition "!is_inside_tree()" error when estimating the agent radius.

The collisionshapes that are lower in the SceneTree order than the obstacle node are not loaded in the SceneTree yet so the global_transform function fails.

Also adds warning message when this happens.
2022-05-15 20:29:23 +02:00
smix8 001d89223f Expose NavigationObstacle2D/3D get_rid() and add config warning
Exposes get_rid() function for scripting.
Adds configuration warning when obstacle is used with not intended static body parent.
2022-05-15 01:03:22 +02:00
Hugo Locurcio 515676a7f5
Remove unused `GPUParticlesCollisionHeightField3D.follow_camera_push_ratio` property
- Rename setter/getter methods for consistency.
- Remove section in the inspector as there is now only 1 property
  within the section.
- Add performance hints to property hints.
2022-05-13 04:19:28 +02:00
FireForge 88a8038387 Capitalize/fix some property enum hints 2022-05-12 15:03:16 -05:00
Rémi Verschelde edf61c077c
Merge pull request #60917 from akien-mga/ci-emscripten-3.1.10 2022-05-10 15:08:32 +02:00
Rémi Verschelde b6983eeccf
Merge pull request #51591 from Calinou/call-group-default-immediate
Make `{call,set,notify}_group()` immediate by default
2022-05-10 14:52:23 +02:00
Rémi Verschelde d8935b27a9 Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.
2022-05-10 13:03:13 +02:00
Hugo Locurcio aabbb40009
Make `{call,set,notify}_group()` immediate by default
This results in less surprising behavior out of the box.

Internal usages were modified to keep the existing behavior
identical there.
2022-05-05 16:59:37 +02:00
Haoyu Qiu 312ec612c7 Add autocompletion for AnimatedSprite.play() 2022-05-05 14:36:35 +08:00
Pawel Lampe 88d3f14697 Add ability to `bake_navigation_mesh` off thread.
This feature makes it possible to workaround problems such as:
 - long baking time due to heavy synchronization when parsing geometry
   from mesh instances
 - crash when freeing `NavigationMeshInstance` while baking
 - errors when actively baking node tree is being detached from the
   scene tree
2022-05-04 23:00:18 +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 931838b330
Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
Hugo Locurcio 180e5d3028
Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Rémi Verschelde c273ddc3ee Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
Rémi Verschelde 4e06ce7840
Merge pull request #60655 from smix8/navigation_region_rid_4.x
Add get_region_rid() to NavigationRegion2D and NavigationRegion3D
2022-05-01 14:17:40 +02:00
bruvzg 0a0e94d996
Expose Label3D and Sprite*3D material render priority properties. 2022-04-30 15:09:30 +03:00
smix8 05d06b8957 Add get_region_rid() NavigationRegion2D and NavigationRegion3D
Add get_region_rid() to NavigationRegion2D and NavigationRegion3D
2022-04-30 13:27:30 +02:00
Rémi Verschelde a817bd96c0
Merge pull request #59297 from fabriceci/fix-jitter-2D-slight-slope 2022-04-29 15:33:45 +02:00
Aaron Franke 1bf94dff3a
Rename Basis "elements" to "rows" 2022-04-29 08:02:56 -05:00
bruvzg be2ee9d277
[Label3D] Add offset property. 2022-04-28 21:23:15 +03:00
Rémi Verschelde 212989d467
Merge pull request #59438 from fabriceci/fix-move-and-collide-reported-collisions
Fix wrong collision reported on move_and_collide
2022-04-28 18:47:22 +02:00
Markus Sauermann a793960a10 Fix cppcheck const parameters
Convert method signature parameters to const where it is possible

# Conflicts:
#	drivers/gles3/rasterizer_canvas_gles3.cpp
#	drivers/gles3/rasterizer_canvas_gles3.h
#	editor/plugins/animation_state_machine_editor.cpp
#	editor/plugins/animation_state_machine_editor.h
2022-04-28 11:35:39 +02:00
Rémi Verschelde 1737494479
Merge pull request #60321 from rburing/pathfollow_offset_yes_a_number 2022-04-27 13:27:19 +02:00
Rémi Verschelde 2890ac7100
Merge pull request #60319 from TokageItLab/implement-global-rest 2022-04-27 11:06:42 +02:00
Rémi Verschelde 8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
Rémi Verschelde 02bb8e948f
Merge pull request #60261 from fire-forge/theme-prop-renames 2022-04-25 16:20:19 +02:00
FireForge 3073b85de9 Rename theme properties to include underscores
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
bruvzg be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
bruvzg de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
Silc 'Tokage' Renew 4d4ffa3a2c Implement global rest 2022-04-18 02:11:19 +09:00
Ricardo Buring eb9157df23 PathFollow2D and PathFollow3D: don't set offset to NaN 2022-04-17 17:26:05 +02:00
Rémi Verschelde d27f60f0e8
Merge pull request #60199 from akien-mga/color-clarify-srgb-linear-conversions 2022-04-13 13:41:21 +02:00
Rémi Verschelde 9b89c07075
Merge pull request #60034 from Calinou/camera-allow-lower-size 2022-04-13 12:48:08 +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
SaracenOne f8cc2e054d Ensure gizmos are added to newly created Node3D-derivatives and silence error for attempting to create gizmos twice 2022-04-13 04:39:01 +01:00
bruvzg 9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
Hugo Locurcio 2252663163
Allow `size` values as low as `0.001` in Camera3D's orthogonal/frustum mode
This allows for lower field of view (or higher zoom) in orthogonal
and frustum camera modes.

The property hint also allows setting the size with greater precision.
2022-04-08 18:49:45 +02:00
Rémi Verschelde f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Rémi Verschelde 26048c805b
Merge pull request #59331 from bartekd97/navigation-agent-layers 2022-04-01 13:35:51 +02:00
Rémi Verschelde 5149db8d85
Merge pull request #59644 from akien-mga/template-no-editor-dep 2022-03-28 23:35:51 +02:00
Rémi Verschelde 324215c485
Merge pull request #59525 from fire-forge/fix-group-names 2022-03-28 21:44:35 +02:00
Rémi Verschelde 45ec0e31c3 Remove last editor code dependencies in template build
SConstruct change also makes it possible to outright delete the `editor`
folder in a `tools=no` build, which we use in CI to ensure no invalid
cross-dependencies are added.
2022-03-28 21:13:01 +02:00
FireForge 88b09694e7 Fix inspector group name capitalization 2022-03-28 14:02:06 -05:00
Rémi Verschelde 7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
Rémi Verschelde 5371009d8e Object: Remove unused category boilerplate
We might want to re-add something like this if/when we find a good use case
for it and do the effort to categorize all objects in the API properly.

Until then, it's better to remove that boilerplate since it's not needed.

Closes #18711.
2022-03-26 15:46:01 +01:00
fabriceci e2812fcb0f When only a recovery occurs, don't report a collision on move_and_collide 2022-03-23 10:24:35 +01:00
fabriceci 528dfbf63e Fix 2D jitter on slight slope 2022-03-21 09:08:52 +01:00
BARTEK-PC\Bartek 4972f1b864 Expose navigable layers for NavigationAgent2D/3D 2022-03-20 15:04:56 +01:00
Rémi Verschelde acc9b5b390
Merge pull request #55399 from RPicster/particlesmaterial-sphere-emittershape
ParticleMaterial: Sphere emission shape emitting from the volume.
2022-03-18 08:21:59 +01:00
Hugo Locurcio c45d2c242b Replace DirectionalLight3D's `use_in_sky_only` with `sky_mode` enum
3 options are available:

- Light and Sky (default)
- Light Only (new)
- Sky Only (equivalent to `use_in_sky_only = true`)

Co-authored by: clayjohn <claynjohn@gmail.com>
2022-03-17 14:00:02 -07:00
reduz 8b547331be Create GDExtension clases for PhysicsServer3D
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support)
* Some changes on native struct binding for PhysicsServer

This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
2022-03-15 18:39:31 +01:00
Rémi Verschelde 51bbcbdec2
Merge pull request #45263 from KoBeWi/😕 2022-03-15 13:18:27 +01:00