Commit graph

582 commits

Author SHA1 Message Date
danilo2205
dc639d334a Up vector implementation and OrientedPathFollow. 2018-05-20 19:51:56 -03:00
tagcup
1bba6eeeb9 Removed incorrect Basis::set_scale().
Also added a missing constructor in Basis, and fixed usage of inverse and affine inverse in Transform.
2018-05-17 19:39:04 -04:00
Juan Linietsky
4b5227ff77 -Ability to open resources in the same window
-Plenty of fixes and improvements to new inspector
-Fixes that were needed to make inspector work better
2018-05-17 18:03:05 -03:00
Juan Linietsky
dfd1331690 Allow editing of some unbound properties when hinted (or no range hinted) 2018-05-16 09:13:41 -03:00
Juan Linietsky
005b69cf6e -New inspector.
-Changed UI resizing code, gained huge amount of speed.
-Reorganized timer sync to clean up behavior (sorry forgot commit this before)

-
2018-05-15 17:14:31 -03:00
Michael Alexsander Silva Dias
7f72d6476b Fixed some warnings found with Cppcheck. 2018-05-14 02:14:56 -03:00
Hein-Pieter van Braam
3cfb9df325
Revert "Use fake audio playing property in editor" 2018-05-13 21:37:08 +02:00
Hein-Pieter van Braam
24dbe5e310
Merge pull request #17367 from ShyRed/audio_playing_
Use fake audio playing property in editor
2018-05-13 21:35:44 +02:00
AndreaCatania
5f66734d2d Implemented physics material
Hidden a function

Fixed travis static check
2018-05-11 03:23:09 +02:00
Andrea Catania
5a0119f9e2 Improved API to active / deactive ragdoll 2018-05-10 21:05:00 +02:00
Marcelo Fernandez
e64bbcc429 Fix some enums missing its bind 2018-05-08 21:14:31 -03:00
Webster Sheets
4b545e3105 Fix AtlasTexture usage in Sprite3D.
Changes as requested in b484d5c.
2018-05-08 11:22:56 -04:00
Rémi Verschelde
de9683b605
Merge pull request #17559 from simedis/joint_motors
Implemented interface for bullet linear motors
2018-05-08 10:23:41 +02:00
Juan Linietsky
6d46f73ec3
Merge pull request #11973 from AndreaCatania/ragdoll
Ragdoll - Physical bone node
2018-05-07 16:12:27 -03:00
AndreaCatania
9e57a07fb6 Implemented ragdoll
Implementing ragdoll

Implementing ragdoll

Implementing ragdoll

Implementing ragdoll

Implementing ragdoll

a

Implemented implicit hierarchy.

Improved

Added some physics properties

Added bone offset to preserve COM, partially fixed scaling

work in progress

WIP

wip

Implemented Joint Gizmos

Implemented pin joint joint

Implemented all joints
2018-05-07 21:03:16 +02:00
Juan Linietsky
b484d5c2d8
Revert "Fix Sprite3D's incorrect behavior when using AtlasTextures." 2018-05-07 15:44:27 -03:00
Rémi Verschelde
430e45c84a
Merge pull request #16359 from Noshyaar/convert
Particles: fix corrupted scene when saved after convert
2018-05-03 21:24:03 +02:00
Rémi Verschelde
76cc12d916
Merge pull request #18572 from bzztbomb/fix/project_local_ray_normal_virtual
Fix for ARVRCamera::project_local_ray_normal not getting called.
2018-05-03 21:06:59 +02:00
Brian Richardson
680a5cbb0b Camera::project_local_ray_normal needs to be virtual so that ARVRCamera::project_local_ray_normal gets called. 2018-05-03 11:32:37 -07:00
Rémi Verschelde
b774156729
Merge pull request #18514 from neikeq/api-hash-fixes
API hash fixes
2018-05-03 14:36:32 +02:00
Rémi Verschelde
4cce6f3417
Merge pull request #18321 from Crazy-P/Fixes-logically-dead-code
Fixes logically dead code (Coverity)
2018-05-01 08:35:10 +02:00
Ignacio Etcheverry
7034d48032 Fix binding some core API methods only in tools builds 2018-04-29 19:49:26 +02:00
Juan Linietsky
8d199a9b2c CSG Support for Godot!
-Missing Icons
-Missing freezing option (for baking light and faster load)
-Missing a way to export from Godot (GLTF2?)
-Probably buggy (may freeze editor, can be worked around easily, but let me know if this happens so it's easier to catch bugs)
Happy testing!
2018-04-27 21:55:10 -03:00
Crazy-P
e6deba8d19 Fixes logically dead code (Coverity)
Fixes reported logically dead codes by Coverity

* image.cpp: Doesn't really need any modification. But to remove the bug
report then we have to move the MAX call away from the for loop
statement.

* rasterizer_gles3.cpp: Removes unnecessary elif condition since it is
checked earlier in the function

* collada.cpp: If stamement never reached due to macro ERR_CONTINUE does
the same.

* navigation_mesh.cpp: Variables should always be null - however, also
checked for the very same condition in their function call. Leaving this
for review (whether the function call is necessary or not)

* path_editor_plugin.cpp: If cancel is true, then it should restore the
edited value to the original provided.
http://docs.godotengine.org/en/3.0/classes/class_editorspatialgizmo.html#class-editorspatialgizmo-commit-handle

* spatial_editor_gizmos.cpp: the very condition of i >= 3 is
predetermined in the if case right before it. Thus case 1 is always '1'
and case 2 is always '-1'

* grid_map_editor.cpp: Same as above in spatial_editor_gizmos.cpp

* voxel_light_baker.cpp: Same as above in spatial_editor_gizmos.cpp

* visual_server.cpp: Same as above in spatial_editor_gizmos.cpp

* visual_script_expression.cpp: char '-' is already true in the switch
case mechanism. Thus it can never reach to default case.

* particles.cpp: Case 'PARAM_MAX' is unreachable due to index checking
right before the switch execution.

* shader_language.cpp: Invalid index is handled in switch default case.
`type < TYPE_FLOAT && type > TYPE_VEC4` -> `(type < TYPE_FLOAT || type > TYPE_VEC4`)
Fixes the "always false problem" in TODO comment.
2018-04-21 22:35:23 +08:00
tagcup
a5e0bb447c Avoid converting Quat to Euler angles when not necessary.
Also ensure that get_scale doesn't arbitrarlity change the signs of scales, ensuring that the combination of get_rotation and get_scale gives the correct basis.

Added various missing functions and constructors.

Should close #17968.
2018-04-14 15:53:25 -04:00
Rémi Verschelde
fbc61374ca Use internal physics processing for Nodes' internal logic 2018-04-11 09:28:14 +02:00
Alexander Alekseev
6a5ed3a42b Fix RigidBody's configuration warning for Z axis 2018-04-09 09:28:31 +03:00
Juan Linietsky
217a95868a
Merge pull request #16707 from Web-eWorks/atlasfixes
Fix Sprite3D's incorrect behavior when using AtlasTextures.
2018-04-08 17:11:16 -03:00
Juan Linietsky
fdfbff3cef
Merge pull request #17642 from brendor/master
Particles 2D and 3D - fix hue variation not working
2018-04-07 16:55:10 -03:00
Bastiaan Olij
a36e5951ff Improve side impulse calculation 2018-03-30 09:30:38 +11:00
Rémi Verschelde
f720d86b0b
Merge pull request #17555 from poke1024/add-worldenv-warning
Warn about WorldEnvironment being ignored
2018-03-23 11:27:03 +01:00
brendor
7061c28df7
Particles 2D and 3D - fix hue variation not working by transposing the hue matrix
The hue variation matrix is hardcoded as transposed and thus the multiplication always yielded the original color value.
I wanted to keep the matrix and get the same result by switching the operands (getting a result as if the matrix was transposed).
2018-03-20 01:28:41 +01:00
Jakub Grzesik
f78c7353ea a way to ensure that camera is disabled 2018-03-17 10:57:04 +01:00
ShyRed
bc1522e268 Use fake audio playing property in editor
It appears that some time ago users were supposed to be able to include the playback of sound effects in their animations by placing keys on the "playing" property. Back then the key frame editor took the value of the checkbox in the property_editor.

Somewhere / Sometime this behaviour changed and the key frame editor is now reading the actual value from the object instead of relying on the property editor.

This commit introduces a fake active field that is returned when reading the playing property in the editor. While the actual active flag is changed when playback is finished the fake one will stay the same thus allowing the user to take their time with setting the key in the animation editor.
2018-03-16 15:26:23 +01:00
Geoffrey
09c887f38e Implemented interface for bullet joint motors 2018-03-16 13:37:15 +01:00
Bernhard Liebl
29d305599d Warn about WorldEnvironment being ignored 2018-03-16 11:21:57 +01:00
Poommetee Ketson
6b22ec5f6c InterpolatedCamera: use internal_process 2018-03-16 05:15:26 +07:00
Hein-Pieter van Braam
555eebf3f4 Don't crash when trying to add an invalid navmesh
It is possible to try to add an invalid object as a navmesh through
GDScript which results in an engine crash. This creates a debug message
that should help the user figure out what's wrong.
2018-03-02 09:37:32 +01:00
JFonS
99d740c46e Fix visibility of gizmos on scene load 2018-02-24 12:05:43 +01:00
Poommetee Ketson
38865345d9 Particles: fix corrupted scene when saved after convert (2nd try) 2018-02-24 15:58:17 +07:00
luz.paz
612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Rémi Verschelde
497a4e9e25
Merge pull request #16757 from AndreaCatania/kinpush
Improved kinematic body, Now can move rigid body
2018-02-20 15:41:10 +01:00
Andrea Catania
6ed392f47a Improved kinematic body 2D and 3D, Now can move rigid body 2018-02-20 12:43:47 +01:00
Chris Bradfield
a5688ccd90 Improve CollisionObject/CollisionObject2D warning message 2018-02-19 21:48:31 +01:00
Rémi Verschelde
a41c45c335
Merge pull request #16060 from sdfgeoff/apply_torque
Exposed apply_torque_impulse to gdscript
2018-02-19 21:38:33 +01:00
Poommetee Ketson
d2e3607fa0 Fix timer second not zero padded when < 10
Also RTR "Time Left:"
2018-02-19 21:53:39 +07:00
Artem Varaksa
d35e486228 Clean up some bad words from code comments 2018-02-17 16:00:39 +03:00
sdfgeoff
cdd8334585 Exposed apply_torque_impulse to gdscript and added documentation for added apply_torque_impulse method 2018-02-15 16:42:24 +01:00
Webster Sheets
973be3711a Fix Sprite3D's incorrect behavior when using AtlasTextures. 2018-02-15 10:33:58 -05:00
Andrea Catania
a42765dada Added physics API in order to enable/disable collisions between rigidbody attached to a joint with bullet physics bullet
Fixes #16424
2018-02-05 18:54:07 +01:00
Paolo Perkovic
08d4bfacaf Fix inconsistencies and typos in argument names 2018-02-01 16:47:20 +01:00
Rémi Verschelde
ff287d8341
Merge pull request #15254 from mrcdk/pitch_scale
Added pitch scale property to AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D
2018-02-01 14:26:27 +01:00
Rémi Verschelde
37cb029fcc
Merge pull request #15938 from poke1024/fix15904
Fix crash on deleted rigidbodies without contact monitor (issue 15904)
2018-01-22 00:02:14 +01:00
Rémi Verschelde
e1f34249eb Fix typo in CollisionObject warning 2018-01-21 21:32:00 +01:00
Bernhard Liebl
e9237d83c7 Fix crash on deleted rigidbodies without contact monitor (issue 15904) 2018-01-21 12:46:13 +01:00
Rémi Verschelde
9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
Juan Linietsky
cc8dfcc9c0 Before I forget, add warnings on areas without children (should not break anything).
Seen too many users misunderstanding the edit rect is the shape.
2018-01-18 14:31:07 -03:00
Unknown
5876457410 modify default param names in couple of signals
'name' default param should not be used since there is problem with name shadowing
2018-01-12 15:45:29 +01:00
Rémi Verschelde
bab9759645
Merge pull request #15606 from RandomShaper/fix-inherited-coll-shapes
Update collision shapes data on tree entered
2018-01-12 13:48:17 +01:00
Rémi Verschelde
2dbd3475a5
Merge pull request #15620 from AndreaCatania/p4
Reset collider on ray node
2018-01-12 12:49:16 +01:00
AndreaCatania
207af6c4f9 Reset collider on ray node 2018-01-12 12:31:02 +01:00
Juan Linietsky
a26e6c8215 Renamed tree_exited to tree_exiting. tree_exited is now used for actual out of tree notification.
Updated doc accordingly.
2018-01-12 08:29:24 -03:00
Bojidar Marinov
9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
Pedro J. Estébanez
aefedb73fc Update collision shapes data on tree entered
This is needed because the final startup values for shapes may change between parenting and entering the scene tree. For instance, if the collision shape belongs to a inherited scene.

Fixes #13835.
2018-01-11 21:08:58 +01:00
Juan Linietsky
9a62829759
Merge pull request #15531 from AndreaCatania/p2
Fixed crash on duplicate GIProbe baking
2018-01-11 16:44:18 -03:00
Juan Linietsky
5398363572 solved particle memory leak, fixes #15591 2018-01-11 16:04:12 -03:00
AndreaCatania
5ac441131e Fixed crash on duplicate GIProbe baking 2018-01-11 19:50:33 +01:00
Ruslan Mustakov
0d83e20236 Fix registered light_data property type name 2018-01-11 19:53:54 +07:00
Juan Linietsky
c791c1d48e
Merge pull request #14907 from scayze/rigid_vehicle
Added RigidBody functionality to VehicleBody
2018-01-08 11:50:49 -03:00
Scayze
4a201ade76 Added RigidBody functionality to VehicleBody 2018-01-07 00:18:42 +01:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Juan Linietsky
cd63407aa4 Avoid crashes in skeleton 2018-01-03 17:27:31 -03:00
Juan Linietsky
14772d2213
Merge pull request #15083 from tagcup/spatial_rot_fix
Restore the behavior of Spatial rotations recently changed in c1153f5.
2018-01-02 15:02:19 -03:00
MrCdK
5bc010e8ee Added pitch scale property to AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D 2018-01-01 22:23:16 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Juan Linietsky
c595aff4a3 avoid error on setting skeleton from transform changed 2017-12-29 12:36:44 -03:00
Juan Linietsky
2de70698ae Missing transform notification for Skeleton. 2017-12-29 11:55:34 -03:00
Juan Linietsky
448b58ba4c Use a different approach to update skeletons when transform changes 2017-12-29 11:34:36 -03:00
Juan Linietsky
a54e3f72ce Update the skeleton on transform 2017-12-29 10:54:24 -03:00
Juan Linietsky
f11a138505 Added more hacks to GLTF2 importer to support crap exporter (MakeHuman in this case), fixes #13393 2017-12-28 16:07:45 -03:00
tagcup
e9896b17a9 Restore the behavior of Spatial rotations recently changed in c1153f5.
That change was borne out of a confusion regarding the meaning of "local" in #14569.

Affine transformations in Spatial simply correspond to affine operations of its Transform. Such operations take place in a coordinate system that is defined by the parent Spatial. When there is no parent, they correspond to operations in the global coordinate system.
This coordinate system, which is relative to the parent, has been referred to as the local coordinate system in the docs so far, but this sloppy language has apparently confused some users, making them think that the local coordinate system refers to the one whose axes are "painted" on the Spatial node itself.

To avoid such conceptual conflations and misunderstandings in the future, the parent-relative local system is now referred to as "parent-local", and the object-relative local system is called "object-local" in the docs.

This commit adds the functionality "requested" in #14569, not by changing how rotate/scale/translate works, but by adding new rotate_object_local, scale_object_local and translate_object_local functions. Also, for completeness, there is now global_scale.

This commit also updates another part of the docs regarding the rotation property of Spatial, which also leads to confusion among some users.
2017-12-27 16:40:49 -05:00
Noshyaar
5c636875e4
Merge pull request #14971 from mrcdk/particles_emitting
Set particles emitting to false when particles finish emitting with one-shot enabled
2017-12-27 10:45:36 +07:00
Juan Linietsky
c1153f5041 Change the rotate function of Spatial to be local, makes more sense. Closes #14569 2017-12-26 12:45:56 -03:00
Juan Linietsky
02e883713a
Merge pull request #14977 from volzhs/fix-crash-group
Fix crash & error at saving scene
2017-12-26 11:43:02 -03:00
volzhs
ff68b80df7 Fix error if scene has Camera at saving scene 2017-12-25 02:43:37 +09:00
Juan Linietsky
021f3c924b -Removed OpenMP support, replaced by a custom class.
-Disabled Opus, implementation is wrong.
2017-12-24 09:32:12 -03:00
MrCdK
1f609b7a82 Set particles emitting to false when particles finish emitting with one-shot enabled 2017-12-23 05:23:41 +01:00
Rémi Verschelde
7d9b7f9c47
Merge pull request #14897 from BastiaanOlij/arvr_tweaks
Few small tweaks for ARVR
2017-12-23 00:59:09 +01:00
Daniel J. Ramirez
1696db8f00 Fixes 3d camera keep aspect. 2017-12-22 14:24:38 -06:00
Juan Linietsky
7d0cabe9d3 Change skeleton processing to work on global coordinates, should help fix many import problems from Blender, GLTF2, etc. 2017-12-21 17:36:39 -03:00
Bastiaan Olij
6fd51b6a1b Reserved controller ids 1 and 2 for left and right hand controllers and added new center on hmd option 2017-12-22 01:21:23 +11:00
Juan Linietsky
1fa9aac3e4 -Make capture dependent on a cell size, not subdivision.
-Fixed a bug recently introduced when releasing mouse events and calling popups
2017-12-21 11:05:55 -03:00
Hein-Pieter van Braam
0db5123548 Prevent false sharing in lightbaker RNG state
The previous commit corrected the RNG behavior for the lightbaker but
also made it significantly slower on high core count systems. Due to the
vector of states being physically close together in RAM we force a cache
synchronization across all cores whenever we call for the next random
number to be generated.

This will create a temporary local copy of the RNG state before entering
the loop and then saving it back to the global state when done. This
will preserve the per-thread RNG state (and random number quality) while
significantly improving performance.

On my 16 thread box it saves 3 minutes baking the Sponza scene, bringing
performance back in line to before the various RNG fixes were
introduced, being slightly faster than the first implementation.
2017-12-20 14:37:00 +01:00
Hein-Pieter van Braam
ccbb5923ac Fix lightmapper rng
In our previous attempts to fix the lightmapper we may have
inadvertently introduced the same issue we were trying to fix. It
appears that rand() will on some platforms introduce a mutex making it
slower and on others may have a per-thread state that would need to be
initialized with srand() on each thread. This slows down the lightbaking
further.

This sets up a separate rng state for each OpenMP thread by calling
rand() only in the single-threaded part of the code. We then keep a
vector of states.

I believe this solves our problems.
2017-12-20 12:09:09 +01:00
Hein-Pieter van Braam
7a10d3ab78 Correct license headers in main.cpp and voxel_light_baker.cpp
Sorry for the churn
2017-12-20 01:04:30 +01:00
Hein-Pieter van Braam
9fa5a588f0 Fix lightbaker clang-format issue and add license headers 2017-12-20 01:02:03 +01:00
Hein-Pieter van Braam
ff04c07912 Lightbaker: include stdlib.h to fix CI builds 2017-12-20 00:29:27 +01:00
Juan Linietsky
808a3b9c71 Fix randomness in voxel light baker, closes #14841 2017-12-19 19:51:40 -03:00
Juan Linietsky
06dd10b390 Fix raytrace lightmap bake bias 2017-12-19 17:09:05 -03:00
Juan Linietsky
5544b89750 properly plot normal when baking 2017-12-19 15:04:52 -03:00