Commit graph

221 commits

Author SHA1 Message Date
Rémi Verschelde a3501c096f
Merge pull request #21897 from Calinou/3d-display-camera-coordinates
Display camera coordinates in the 3D viewport's information pane
2018-11-02 11:33:22 +01:00
Rémi Verschelde 48c6844b00
Merge pull request #23171 from capnm/fix-orthogonal-mode-freelook
Disable 'freelook' in the orthogonal mode.
2018-10-25 11:35:32 +02:00
Rémi Verschelde bf737ee8da
Merge pull request #23211 from YeldhamDev/spatial_editor_preview_adjustment
Readjust "Preview" button in Spatial editor
2018-10-25 10:58:50 +02:00
Martin Capitanio 808b46cfc2 Fix 'Align selection with view' in orthogonal mode
Fixes #23096
2018-10-22 17:05:16 +02:00
Michael Alexsander Silva Dias 36575fe628 Readjust "Preview" button in Spatial editor 2018-10-21 23:06:27 -03:00
Martin Capitanio 9548707298 Disable 'freelook' in the orthogonal mode.
Fixes #23095
Thanks @aaronfranke for hints.

Fixes #23078
2018-10-20 12:49:33 +02:00
Michael Alexsander Silva Dias 9d69c34990 Make "Perspective" button look like a actual clickable button 2018-10-18 22:36:59 -03:00
Rémi Verschelde 44d82b3a07
Merge pull request #22752 from aaronfranke/equals-redundant
Remove redundant "== true" and "== false" code
2018-10-07 10:58:45 +02:00
Hugo Locurcio 1a2f6cfcb5
Make the 3D viewport menu button easier to read
This closes #22809.
2018-10-06 23:00:33 +02:00
Aaron Franke 37386f112b Remove redundant "== true" code
If it can be compared to a boolean, it can be evaluated as one in-place.
2018-10-06 16:12:36 -04:00
Rémi Verschelde 106acb27f9
Merge pull request #22568 from dlasalle/#14959
Explicitly show viewport 0 in the SpatialEditorPlugin if the container is large enough.
2018-10-02 11:26:29 +02:00
Rémi Verschelde 876456754d
Merge pull request #21421 from YeldhamDev/mult_view_changes
Small improvements to the Spatial Editor's multiple viewport mode
2018-10-02 11:22:49 +02:00
Aaron Franke cd349efb0e Minor nit-picky tweaks in spatial_editor_plugin.cpp
* Orthogonal cameras don't have an FOV that's "near zero". Or zero, or any number of degrees. It's not a measurement of degrees, it's just a fixed width. This comment is more accurate. Also, "terrible" is a better word than "awful" here.

* While I'm editing this file, the "String ortho" variable name could be more intuitive, so I've changed it to "view_mode".

Minor nit-picky changes, I know, but I found it so I may as well improve it.
2018-10-01 02:01:06 -04:00
Dominique LaSalle df06087057 Explicitly show viewport 0 in the SpatialEditorPlugin if the container is large enough. 2018-09-30 10:09:31 -07:00
Rémi Verschelde 7b081a7fc8 Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form:

core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch]
core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch]

Those can be trivial cases where adding a default fallback is the solution,
or more complex issues/hidden bugs where missed values are actually meant
to be handled.
2018-09-27 18:34:30 +02:00
Rémi Verschelde e5bbcb8bcf Fix warnings for comparison between signed and unsigned integers [-Wsign-compare]
Also turn off -Wsign-compare warnings in the future, we do not consider them important.

Fixes the following GCC 5 warnings:
```
core/node_path.cpp:279:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:169:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:314:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/shader_gles2.cpp:985:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles3/rasterizer_storage_gles3.cpp:1075:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/pulseaudio/audio_driver_pulseaudio.cpp:343:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_plugin.cpp:525:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_properties_array_dict.cpp:747:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:2078:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:4096:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/sprite_editor_plugin.cpp💯20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:122:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:134:77: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:339:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/etc/image_etc.cpp:222:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:242:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:258:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:200:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:222:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:246:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1085:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1489:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1623:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:206:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:356:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:406:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:493:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/audio_stream_player_3d.cpp:420:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:565:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:571:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_rb_resampler.cpp:156:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```

The following warnings were not fixed, as they implied casting for no gain:
```
core/io/packet_peer.cpp:228:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/io/resource_format_binary.cpp:109:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/rasterizer_scene_gles2.cpp:144:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/unix/file_access_unix.cpp:249:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:889:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1020:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1154:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:2255:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/bit_mask.cpp:336:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:141:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:150:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:154:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:86:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:89:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```
2018-09-27 16:25:23 +02:00
Rémi Verschelde d8b30d42f5 Fix warnings for operator precedence disambiguation [-Wparentheses]
Fixes the following GCC 5 warnings:
```
core/io/resource_format_binary.cpp:1721:29: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
core/typedefs.h:108:24: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
editor/plugins/spatial_editor_plugin.cpp:2202:58: warning: suggest parentheses around comparison in operand of '!=' [-Wparentheses]
editor/plugins/spatial_editor_plugin.cpp:5002:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
main/input_default.cpp:346:59: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
main/input_default.cpp:348:60: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
main/input_default.cpp:579:57: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
modules/gridmap/grid_map_editor_plugin.cpp:613:14: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
modules/theora/video_stream_theora.cpp:335:34: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
modules/theora/video_stream_theora.cpp:336:35: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
modules/visual_script/visual_script_property_selector.cpp:215:38: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/rich_text_label.cpp:424:84: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/rich_text_label.cpp:512:80: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/scroll_container.cpp:173:36: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/scroll_container.cpp:173:86: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
scene/gui/tree.cpp:1419:98: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
```
2018-09-27 10:29:48 +02:00
Rémi Verschelde 76ca46d1f4
Merge pull request #22225 from groud/fix_draw_on_viewport
Fixes drawing of the 2D plugins on the 3D view
2018-09-20 21:45:16 +02:00
Rémi Verschelde f93a69cb6e
Merge pull request #22287 from Chaosus/fix_warning
Fix "This control can't grab focus." warning spam
2018-09-20 21:41:53 +02:00
Chaosus e4c8efd051 Fix "This control can't grab focus." warning spam 2018-09-20 15:29:38 +03:00
Ibrahn Sahir ce15cf8ebc fix branch on uninit in spatial_editor_plugin
Moved the initialisation of origin_enabled up a bit, to be inited before
it's accessed in _init_grid. A step towards cleaner valgrind output and
removes an opportunity for a random occurance of the origin/grid
z-fighting issue.

Also removed unused variable last_grid_snap to avoid later confusion.
2018-09-20 13:06:13 +01:00
groud 5172642c32 Fixes drawing of the 2D plugins on the 3D view 2018-09-18 20:00:07 +02:00
Michael Alexsander Silva Dias 75d5d81b8a Remove unnecessary "OK"s text settings 2018-09-15 21:40:50 -03:00
Chaosus 2fe0365661 Few unifications between canvas_item and spatial editors 2018-09-15 18:44:26 +03:00
willnationsdev 5436abefe4 Refactor editor icon retrieval 2018-09-14 09:27:56 -05:00
Hugo Locurcio 621a5457ed
Display camera coordinates in the 3D viewport's information pane 2018-09-11 00:04:09 +02:00
Rémi Verschelde 8804eb8c06
Merge pull request #21707 from JFonS/fix_instanced_selection
Fix selection of instanced scenes in 3D
2018-09-05 18:11:56 +02:00
Rémi Verschelde 5fe01d4cfc Move ParticlesMaterial code to its own resource file
It's shared by both 2D and 3D particles (+ CPU ones), so it makes sense
to have as a common resource. It also allowed to disable compilation of
Particles (3D) when using 'disable_3d'.

Also cleaned up includes in SpatialEditorGizmos and some other places,
as well as dropped dead code in material_editor_plugin.cpp.
2018-09-04 11:32:56 +02:00
JFonS 4a412943d4 Fix selection of instanced scenes in 3D 2018-09-02 22:31:03 +02:00
Hugo Locurcio af139af69e
Fix some editor shortcuts' default values not being set properly
This also changes the uppercase/lowercase/capitalize shortcuts
to Shift+F4, Shift+F5 and Shift+F6 respectively to avoid conflicts
with the new Find Next shortcut.

This closes #21612.
2018-09-01 16:20:47 +02:00
Rémi Verschelde b6c170165c
Merge pull request #21485 from JFonS/fix_selection
Saner selection code for instanced scenes in 3D,  should close #21447
2018-08-29 10:08:41 +02:00
Rémi Verschelde 7e79fb80db Fix z-fighting on origin grid lines in spatial editor
Fixes #21264.
2018-08-29 09:27:50 +02:00
JFonS b58bb95c86 Saner selection code for instanced scenes in 3D, should close #21447
Selecting instanced scenes still doesn't work properly because gizmos are not being added to instanced nodes.
I will probably work on fixing all the shenanigans around selection, but that will take some time.
This part of the code should work better for the moment.
2018-08-27 16:02:49 +02:00
Michael Alexsander Silva Dias 7d13f6ad30 Small improvements to the Spatial Editor's multiple viewport mode 2018-08-25 17:43:27 -03:00
JFonS 927f9f283f Remove material errors after opening new project, fixes #21073 2018-08-23 10:50:30 +02:00
Juan Linietsky c1bd768ca2
Merge pull request #18822 from QbieShay/master
Added spring arm node
2018-08-20 14:21:04 -03:00
QbieShay bb14ef5623 added spring arm node. 2018-08-18 14:34:42 +02:00
Hugo Locurcio 442029b1c0
Fix the 3D grid flickering when the origin is enabled 2018-08-17 23:22:03 +02:00
Guilherme Felipe ae788125a0 Disable camera interpolation when switching scene tabs
Fix #11764
2018-08-14 19:25:27 -03:00
Rémi Verschelde 0322081ec5
Merge pull request #20744 from Zylann/fix_viewport_lock_rotation
Initialize default lock rotation in constructor
2018-08-14 15:49:04 +02:00
Rémi Verschelde c8414007ad
Merge pull request #20835 from Calinou/use-standard-button-texts-2
Tweak some editor button texts
2018-08-14 15:45:34 +02:00
Rémi Verschelde 892667878a
Merge pull request #20848 from Calinou/improve-3d-manipulator-gizmo
Improve the 3D manipulator gizmo
2018-08-14 15:43:52 +02:00
Juan Linietsky 15530ce2c5 Fix gizmos submenu 2018-08-12 10:20:32 -03:00
JFonS ac51da2eb6 Improvements on the gizmo disabling menu and icon selection bugfix 2018-08-11 23:07:00 +02:00
Juan Linietsky fbb5ca4d97
Merge pull request #20584 from JFonS/gizmo_enabling
New gizmo structure and gizmo disabling menu
2018-08-09 16:27:59 -03:00
JFonS 59fd18ab1a New gizmo structure and new gizmo disabling menu 2018-08-09 20:58:39 +02:00
Hugo Locurcio dcca20027c
Improve the 3D manipulator gizmo
Its size now takes into account the editor scale and the viewport's
half resolution setting. It is now also more detailed.
2018-08-09 16:34:18 +02:00
Hugo Locurcio 147f7fbdcf
Tweak some editor button texts 2018-08-09 11:22:11 +02:00
Marc Gilleron 65215a7829 Initialize default lock rotation in constructor 2018-08-05 19:24:11 +01:00
Hugo Locurcio 1368bcfc53
Use a standard "OK" text for confirmation buttons in error dialogs
[ci skip]
2018-08-05 16:49:22 +02:00