Commit graph

73 commits

Author SHA1 Message Date
reduz f2397809a8 Refactored Variant Operators.
-Using classes to call and a table
-For typed code (GDS or GDNative), can obtain functions to call prevalidated or ptr.
2020-11-06 12:45:50 -03:00
Aaron Franke a4f963f2c9
Move call to update the 3D grid into check for updating the view 2020-11-04 04:03:28 -05:00
David Sichma 5b1ddcbf40 Gizmo handles transparent again 2020-10-25 23:01:22 +01:00
Juan Linietsky 85ebf40b6c
Merge pull request #38097 from Calinou/add-viewport-debanding
Add a debanding property to Viewport
2020-10-19 14:15:44 -03:00
Rémi Verschelde ca2c0b8937
Merge pull request #42568 from DavidSichma/fix-aabb-update
Make AABB change trigger bounding box update
2020-10-10 10:55:52 +02:00
reduz 26f5bd245c Implement GPU Particle Collisions
-Sphere Attractor
-Box Attractor
-Vector Field
-Sphere Collider
-Box Collider
-Baked SDF Collider
-Heightmap Collider
2020-10-09 13:25:47 -03:00
David Sichma 7701889048 aabb change updates bounding box
spatial editor will now update the bounding box if aabb or transform
changes
2020-10-05 12:56:57 +02:00
Duroxxigar 4834e14493 Updated getters and setters names for toplevel 2020-10-02 19:09:01 -04:00
Rémi Verschelde c646768ba2
Merge pull request #40473 from rcorre/gizmo-doc
Fix return type on EditorNode3DGizmoPlugin::get_priority.
2020-10-01 14:28:38 +02:00
Rémi Verschelde b2e07dd308
Merge pull request #42094 from JFonS/rotation_gizmo_improvements
Improve rotation gizmo
2020-09-28 10:36:35 +02:00
JFonS 5cd9e04447 Improve rotation gizmo
Hide the back sides of the rotation gizmo circles and add a white
outline for better visualization of the rotation "sphere".
2020-09-15 17:12:53 +02:00
Hugo Locurcio 3e0226515e
Rename ShortCut to Shortcut which is more grammatically correct
See https://github.com/godotengine/godot/issues/16863#issuecomment-685236980.
2020-09-09 21:54:54 +02:00
bruvzg 80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
Hugo Locurcio 2c9d4ef961
Add an editor setting to invert 3D pan/orbit on the X axis
This also makes the invert Y axis option apply to 3D panning.

This closes #28082.
2020-08-15 13:18:57 +02:00
Hugo Locurcio 8891579068
Add a debanding property to Viewport
It can be enabled in the Project Settings
(`rendering/quality/screen_filters/use_debanding`). It's disabled
by default as it has a small performance impact and can make
PNG screenshots much larger (due to how dithering works).
It will also slightly brighten the scene's dark areas.

As a result, it should be enabled only when banding is noticeable enough.

This closes #17006.
2020-08-14 23:12:33 +02:00
Aaron Franke 56e2c6c704
Make all String float conversion methods be 64-bit 2020-07-27 18:38:53 -04:00
SkyJJ 280d4e2965 Fix TTR misuse 2020-07-24 15:15:23 +02:00
Andy Maloney 394a7826be [macOS] Fix Maya navigation with ALT + mouse scroll
Methods were being called with InputEventMouseMotion instead of InputEventPanGesture, and they were null.

Fixes godotengine/godot#16181 on the master branch
2020-07-23 10:38:31 -04:00
Ryan Roden-Corrent c6919a13da
Fix bound return type on get_priority.
Also adds a description explaining gizmo priority.

Inferred from:
e4363d001a/editor/plugins/spatial_editor_plugin.cpp (L5867-L5880)
e4363d001a/editor/plugins/spatial_editor_plugin.cpp (L6462-L6470)
2020-07-21 18:18:33 -04:00
Michael Alexsander 26381265b8 Prefer the highlight version of the "GuiTabIcon" icon for buttons, and make their width/height equal 2020-07-11 12:59:25 -03:00
Juan Linietsky 201d606b3d Addition of SDFGI for open world global illumination
Move GI to a deferred pass
2020-06-26 11:06:48 -03:00
Michael Alexsander f167a2b993 Fix regressions in the 3D lock buttons 2020-06-24 12:09:53 -03:00
Aaron Franke ed2bbdbbef
Avoid errors when the editor camera is inside the focused object
Prevent the gizmo distance from being zero by MAX-ing it with CMP_EPSILON
2020-06-22 04:53:29 -04:00
Vorblen 29e901c342 Fix "Fully Axis-Locked" Freelook Navigation Scheme
Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2020-06-20 10:05:43 +01:00
Hugo Locurcio 31b7f02a29
Remove ToolButton in favor of Button
ToolButton has no redeeming differences with Button;
it's just a Button with the Flat property enabled by default.
Removing it avoids some confusion when creating GUIs.

Existing ToolButtons will be converted to Buttons, but the Flat
property won't be enabled automatically.

This closes https://github.com/godotengine/godot-proposals/issues/1081.
2020-06-19 20:49:49 +02:00
Hugo Locurcio 4a542e0007
Restore previous mouse position when leaving the editor freelook mode
- Remove the crosshair as it no longer serves a purpose (the cursor will
  now appear where the user "expects" it to).

This closes https://github.com/godotengine/godot-proposals/issues/1076.
2020-06-17 20:02:46 +02:00
Hugo Locurcio eaae50fe4a Display freelook speed and zoom in units in the 3D editor viewport
Now that the 3D editor grid is infinite and adjusts its step automatically,
this helps people get a better sense of scale when moving around in the
3D viewport.

This also fixes the indicator bar drawing on hiDPI displays.
2020-06-16 10:46:01 +02:00
Rémi Verschelde ae21b5ddad
Merge pull request #39372 from aaronfranke/editor-cam-rot
Change the default editor camera rotation to position it in +X +Y +Z
2020-06-09 14:11:30 +02:00
Rémi Verschelde 67f56ff73a
Merge pull request #39365 from Calinou/editor-gizmos-visibility-tooltip
Add an editor tooltip to document gizmo visibility options
2020-06-08 08:24:55 +02:00
Marcus Brummer 41af859c68 Re-apply basis of newly added node (via drag-n-drop) in editor viewport 2020-06-07 22:09:41 +02:00
Aaron Franke 6c2df6792b
Change the default editor camera rotation to position it in +X +Y +Z 2020-06-07 13:36:04 -04:00
Hugo Locurcio 138a4eecb3
Add an editor tooltip to document gizmo visibility options
See discussion in
https://github.com/godotengine/godot-proposals/issues/716.
2020-06-07 18:31:17 +02:00
Rémi Verschelde 1620669f4e
Merge pull request #39051 from Xrayez/geometry-split
Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
2020-05-29 12:10:37 +02:00
Andrii Doroshenko (Xrayez) 69d5de632e Split Geometry singleton into Geometry2D and Geometry3D
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-27 14:28:34 +03:00
Aaron Franke 8879625879
Dynamic infinite 3D grid
Well, infinite for all intents and purposes.
2020-05-22 19:43:59 -04:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde dcd1151d77 Enforce use of bool literals instead of integers
Using clang-tidy's `modernize-use-bool-literals`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2020-05-14 13:45:01 +02:00
Juan Linietsky 1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
Rémi Verschelde 94721f5ab8 Revert "Renamed plane's d to distance"
This reverts commit ec7b481170.

This was wrong, `d` is not a distance but the `d` constant in the
parametric equation `ax + by + cz = d` describing the plane.
2020-05-10 16:47:11 +02:00
Rémi Verschelde 69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Marcus Elg ec7b481170 Renamed plane's d to distance 2020-05-10 12:12:51 +02:00
Rémi Verschelde b9f2e57d62
Merge pull request #38555 from ThakeeNathees/rotation-gizmo-visible-fix
rotation gizmo visible = false; when camera preview
2020-05-08 12:59:31 +02:00
Thakee Nathees 60d67f13da rotation gizmo visible = false; when camera preview 2020-05-08 06:44:24 +05:30
JFonS 051f02a3a0 Keep mouse inside 3D viewport rotation widget
Hide and keep the mouse in place when the user oribts the scene via the 3D
rotation widget.
2020-05-07 19:19:54 +02:00
Rémi Verschelde 878adb22b7
Merge pull request #37717 from qarmin/world_fix
Change non-existent World to World3D
2020-05-04 16:37:40 +02:00
Rémi Verschelde bd8d5e1b65
Merge pull request #38325 from Calinou/editor-no-focus-on-align-with-view
Don't focus the selection after using Align Transform With View
2020-04-30 10:03:29 +02:00
Kiri Jolly 87ba4daf4b Fixed false positives in the culling system.
This fixes numerous false positives coming out of the culling system.

AABB checks are now a full separating-axis check against the frustum, with the points of the frustum being compared to the planes of the box just as the points of the box were being compared to the planes of the frustum. This fixes large objects behind the camera not being culled correctly.

Some systems that used frustums that were (sometimes mistakenly?) unbounded on one or more side have been modified to be fully enclosed.
2020-04-29 19:33:42 -07:00