Commit Graph

6099 Commits

Author SHA1 Message Date
Rémi Verschelde e95af7ae9b
i18n: Sync translations with Weblate 2020-11-17 12:21:11 +01:00
Tomasz Chabora 2a98c5ff04
Allow folder checking in export preset file list
(cherry picked from commit 08a292fec3)
2020-11-17 12:07:02 +01:00
Hugo Locurcio c9a694a11d
Rename the "Delete" option in the FileSystem dock to "Move to Trash"
It actually moves files to the system trash instead of removing them
completely.

(cherry picked from commit e7ed287fda)
2020-11-17 12:01:59 +01:00
Hugo Locurcio 12681b497b
Improve messages related to overriding the default editor layout
This closes #33884.

(cherry picked from commit b324a929f6)
2020-11-17 12:01:59 +01:00
Nathan Franke 84c04a8ee3
Fix Android Export jarsigner error with *.import whitelist
(cherry picked from commit 20bca313c0)
2020-11-17 12:01:59 +01:00
Rémi Verschelde d81b8e4a86
SceneTree: Fix reparent crash with animation tracks renaming disabled
This check was there since the first commit in 2014, but a later feature added in 2018
with #17717 did not properly update the code while adding non animation-related code
in `perform_node_renames`.

Fixes #40532.

(cherry picked from commit d107fd4c9e)
2020-11-17 12:01:58 +01:00
Haoyu Qiu beddfb4437
Keep cursor relative position after multiline move
(cherry picked from commit 87fb2bde0c)
2020-11-17 12:01:58 +01:00
Rémi Verschelde 728200a10b
Merge pull request #43611 from Calinou/use-low-editor-scale-auto-3.2
Use 75% editor scale on small displays automatically (3.2)
2020-11-17 12:01:44 +01:00
Hugo Locurcio fc5e60f4cc
Use 75% editor scale on small displays automatically
This also makes borders always display in the editor theme,
even if the editor scale is below 100%. Otherwise, "focus" outlines
would vanish when using an editor scale below 100%,
which harms usability.
2020-11-17 11:17:41 +01:00
Hugo Locurcio 4b1de5be45
Add a dynamic infinite grid to the 3D editor
- The grid is now infinite, it follows the camera.
- The grid is now dynamic, if you zoom in and out, the grid subdivides,
  expands, and fades.
- You can now enable grid planes for the XY and YZ planes. Only the flat
  XZ plane is enabled by default. Each plane is independently dynamic
  of the others.
- The default grid size has been increased to 200, and the maximum
  has been increased to 2000. At 1000, the grid mostly looks edgeless.
- If you set the division level max and min to the same value then
  the grid does not expand or subdivide, but instead stays the same size
  and just follows the camera. Also, if these values are the same,
  the bias value does nothing.
- If you want to have Blender-like behavior, set max to 1, min to 0,
  and set the bias to a really low value. You may also wish to increase
  the grid size if you have a small bias.

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2020-11-17 10:16:53 +01:00
Hugo Locurcio f39c71e32d
Use Ctrl+Shift+C as the default FileSystem dock Copy Path shortcut
This closes #43396.

(cherry picked from commit 5b40f9fddc)
2020-11-11 15:30:57 +01:00
Tomasz Chabora dc05beca80
Register methods for drawing 3D editor overlays
(cherry picked from commit cbfbb4538b)
2020-11-11 15:30:57 +01:00
Michael Alexsander 5e6af913de
Fix "Move Points" button sometimes not showing up on UV mode in the Polygon2D editor
(cherry picked from commit 4b74019ca3)
2020-11-11 15:30:56 +01:00
Eric Tuvesson be72285c70
fix(editor): TileMap floodfill with same tile ID and different variation
Closes https://github.com/godotengine/godot/issues/40435

(cherry picked from commit cefca25796)
2020-11-11 15:30:55 +01:00
willnationsdev 8a02f221b4
Add script class categories to EditorInspector.
(cherry picked from commit 644de52ca9)
2020-11-11 15:12:00 +01:00
Hugo Locurcio ed3f0a3950
Improve the 3D editor selection box appearance
- Draw two boxes slightly offset from each other to give the illustion
  of a thicker outline.
- Decrease the offset compared to the 3D node's AABB to give a more
  accurate representation of its size.
- Make the box fully visible instead of only displaying the corners.
- Draw a x-ray version of the box that's more translucent, but visible
  through walls. This helps make the box more visible while still
  having a sense of depth.
- Use an orange color similar to the 2D editor.
2020-11-09 21:55:56 +01:00
Rémi Verschelde c43b2ab603
Merge pull request #42942 from Calinou/add-viewport-debanding-3.2
Add a debanding property to Viewport for GLES3
2020-10-30 11:47:57 +01:00
Rémi Verschelde 4325c54335
Merge pull request #43016 from mbrlabs/rotation-gizmo-32
[3.2] Improve rotation gizmo
2020-10-30 11:46:05 +01:00
Rémi Verschelde 284dae021a
i18n: Sync translations with Weblate 2020-10-28 15:09:17 +01:00
Haoyu Qiu 3f81cd5332
Fixes property revert for inherited child nodes
(cherry picked from commit 0dfe28d93d)
2020-10-28 14:05:42 +01:00
Haoyu Qiu a973bc9530
Fixes property revert after saving instanced scene
(cherry picked from commit a2c1593f25)
2020-10-28 14:05:41 +01:00
Hugo Locurcio 94cf0dced2
Improve undo log messages in the 2D editor for additional context
Undo/redo log messages will now specify the modified node's
name (or number of modified nodes if several were modified).
On top of that, the new position/rotation/scale/pivot offset
will also be mentioned in the message.

(cherry picked from commit 996740de43)
2020-10-28 14:05:41 +01:00
David Sichma b69f1f183e
fix toggle mask bit 0
(cherry picked from commit 6acd450328)
2020-10-28 14:05:41 +01:00
Pleto 203d6375fc
Enhancement for tileset sorting
(cherry picked from commit 0e392bd177)
2020-10-28 14:05:41 +01:00
Ev1lbl0w a2dcbfe0a8
Disable code to add patches menu
(cherry picked from commit 395cb57256)
2020-10-28 14:05:40 +01:00
Michael Alexsander 5c129c7a05
Minor improvements to the Polygon 2D UV editor
(cherry picked from commit c26b49fc17)
2020-10-28 14:05:39 +01:00
Rémi Verschelde 7c27e37997
Merge pull request #42705 from Calinou/tilemap-editor-fix-osx-tooltip
Fix rectangle paint tooltip for the tilemap editor on macOS
2020-10-27 14:43:50 +01:00
Marcus Brummer 69b99ba9cb Improve rotation gizmo
Hide the back sides of the rotation gizmo circles and add a white
outline for better visualization of the rotation "sphere".

This is a 3.2 backport of @JFons work on the master branch; all credit
goes to him.
2020-10-22 22:05:50 +02:00
Hugo Locurcio 2dbc329704
Add a debanding property to Viewport for GLES3
It can be enabled in the Project Settings
(`rendering/quality/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).

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

Since debanding requires a HDR viewport to work, it's only supported
in the GLES3 backend.
2020-10-20 19:07:15 +02:00
Hugo Locurcio af45c97652
Add fast approximate antialiasing (FXAA) to Viewport
This backports FXAA from the `master` branch.

Co-authored-by: Clay John <claynjohn@gmail.com>
2020-10-20 14:54:52 +02:00
Gabriel Van Eyck 5b9c16a324
Keep 'Editor Description' metadata when changing a Node's type
Also copy edit group/lock when replacing a Node3D

(cherry picked from commit a22275c8a2)
2020-10-19 16:10:01 +02:00
Fabio Alessandrelli 7a0710f91a
EditorNode now copies all drag and dropped files.
The editor used to only copy drag-dropped files in the File System pane
if the given file was a valid resource, or had a specific file format
(ttf, otf).
With this PR, all drag and dropped files are copied instead, no matter
their extension.

(cherry picked from commit 410b324740)
2020-10-19 16:10:00 +02:00
volzhs 623f7e0db4
Show android device name when connected only one device
(cherry picked from commit 778e982cff)
2020-10-19 16:09:59 +02:00
Marcel Admiraal 3e50d3b4c0
Ensure grid index is valid before trying to change value.
(cherry picked from commit f98acd5cfb)
2020-10-19 16:09:59 +02:00
Haoyu Qiu 0c1f88c769
Adds pan gesture to StateMachine editor
(cherry picked from commit e9bec0d76b)
2020-10-19 16:09:59 +02:00
Tomasz Chabora ed34eed62d
Update the setting when clicking Show hidden files
(cherry picked from commit 725c2bdf48)
2020-10-19 16:09:58 +02:00
David Sichma f601e15b92
aabb change updates bounding box
spatial editor will now update the bounding box if aabb or transform
changes

(cherry picked from commit 7701889048)
2020-10-19 16:09:57 +02:00
Michael Auderer 9f4dc87739
Reset TileMapEditor painting on application refocus
Treats application unfocus as a mouse release for
TOOL_PAINTING, by finishing the undo state and
resetting the tool. Also sets a flag to prevent extra
lines from being drawn when the application is refocused.

fixes #42398, fixes #24970

(cherry picked from commit 70a4cd1afe)
2020-10-19 16:09:55 +02:00
Marcus Brummer b426e58acd
Fixed renaming/moving of nodes with exported NodePaths
(cherry picked from commit fdec257e58)
2020-10-19 15:15:27 +02:00
lawnjelly c2290dbedd Unified GLES2 / GLES3 Batching
Batching is mostly separated into a common template which can be used with multiple backends (GLES2 and GLES3 here). Only necessary specifics are in the backend files.

Batching is extended to cover more primitives.
2020-10-16 10:34:47 +01:00
Fabio Alessandrelli 0452c2fced Improve Project Manager video driver selection.
Now suggests the current video driver instead of defaulting to GLES3.
2020-10-14 12:32:35 +02:00
Hugo Locurcio aaffd61903
Fix rectangle paint tooltip for the tilemap editor on macOS
This also fixes the Move Points tooltip for the 2D polygon editor.

This closes #42702.
2020-10-11 15:54:15 +02:00
Yuri Roubinsky a65252018c [3.2] Fix undo for moving multiple visual shader nodes 2020-10-06 08:54:58 +03:00
Aaron Franke b2897f1f7b
Check for global script class information before clearing it
(cherry picked from commit 1ca501d7d4)
2020-10-05 22:09:49 +02:00
K. S. Ernest (iFire) Lee 1f87bca8fb
Better non alphanumeric bone names.
1. _gen_unique_bone_name(Ref<GLTFState> state, const GLTFSkeletonIndex skel_i, const String &p_name) won't return an empty string.

2. String GLTFDocument::_sanitize_bone_name(const String &name) will keep Japanese characters. Like: "全ての親".

3. The sanitize function allows  the bone name to be not just alphanumeric. The only required conditions are the ones in add_bone.

> ERR_FAIL_COND(p_name == "" || p_name.find(":") != -1 || p_name.find("/") != -1);

(cherry picked from commit 7b76f8783f)
2020-10-05 20:46:01 +02:00
Rémi Verschelde 9529ce41eb
glTF: Fix parsing image data with `mimeType` undefined
The glTF 2.0 spec only makes `mimeType` mandatory for `bufferView` image data,
so the previous logic to handle URIs with base64-encoded images could fail if
`mimeType` is undefined.

The logic was documented and refactored to better handle the spec, notably:

- `uri` and `bufferView` are now mutually exclusive, and only the latter fails
  if `mimeType` is undefined.
- `uri` with a file path will now respect the `mimeType` if defined, and thus
  attempt loading the file with the specified format (even if its extension is
  not the one expected for this format). So we can support bad extensions (PNG
  data with `.jpg` extension) or custom ones (PNG data in `.img` file for
  example).
- `uri` with base64 encoded data will infer MIME type from `data:image/png` or
  `data:image/jpeg` if it was not documented in `mimeType` initially.
- `uri` with base64 encoded data, no `mimeType` and `application/octet-stream`
  or `application/gltf-buffer` will fall back to trying both PNG and JPEG
  loaders.

Fully fixes #33796 (and fixes up #42501).

(cherry picked from commit 2e99d0b26f)
2020-10-05 14:41:53 +02:00
Rémi Verschelde 177d16c01c
glTF: Fix parsing buffer data with application/gltf-buffer and image/* MIME types
See https://github.com/KhronosGroup/glTF/issues/944 for context on the
application/gltf-buffer MIME type.

The glTF 2.0 spec supports `image/jpeg` and `image/png` which can also be
base64-encoded in buffer URIs.

Fixes #33796.

(cherry picked from commit 34a50310ad)
2020-10-05 14:38:48 +02:00
Aaron Franke fcaf17824f
Don't write global script class information if there is none
(cherry picked from commit 3163611f0c)
2020-10-04 20:53:50 +02:00
Ryan Roden-Corrent d05a07235c
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)

(cherry picked from commit c6919a13da)
2020-10-04 20:51:19 +02:00
Haoyu Qiu 718f8e8344 Changes mention of Node3D back to Spatial 2020-10-01 23:55:10 +08:00