Commit graph

79 commits

Author SHA1 Message Date
Rémi Verschelde
f8574da2c2
Merge pull request #31338 from Calinou/reorganize-menus
Reorganize various menus for consistency and conciseness
2019-08-13 16:52:42 +02:00
Hugo Locurcio
9e1c23a353
Reorganize various menus for consistency and conciseness
- Clean up the recent scripts dialog to match the recent scenes dialog
- Add "..." at the end of shortcuts that cause a modal dialog to appear

This closes #31148.
2019-08-13 11:52:10 +02:00
Xenoamor
69438149f5
Fix GridMap list text not expanding when palette is resized
This is to close #31304
2019-08-12 21:14:20 +01:00
qarmin
01cc7a996b Use reference to constant in functions 2019-07-10 11:54:12 +02:00
qarmin
9a77d748c0 Fixes minor issues found by static analyzer 2019-07-07 23:08:51 +02:00
hbina085
9f0c6a6009 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended. 2019-06-29 16:08:48 -04:00
Gwyneth Lowe
f1bd1c268e Fix GridMap transform problems 2019-06-25 06:06:07 -05:00
Zach Young
7b1e112f1d Fixed navigation schemes Modo/Maya when used with grid map tile placement 2019-06-19 14:03:08 +02:00
Lisapple
77278f6bac Release GridMap floor field focus when mouse exited 2019-05-08 17:42:08 +02:00
Daniel Rakos
07e2a86fc4 GridMap editor fixes and improvements
This change fixes a few outstanding issues and greatly improves the usability
of the GridMap editor through the following changes:

- Copied mesh now gets displayed during pasting (also renamed the related
  identifiers accordingly)
- Duplication/paste indicator now gets rotated around the correct pivot point
  (duplication worked properly before, but the indicator was shown misplaced
  when rotated)
- Selected mesh library item cursor is no longer shown during selection and
  duplication/pasting
- Back rotate X/Y/Z is now working during duplication/pasting
- Added true cut operation thanks to now having a proper clipboard (clear
  operation got remapped to the DEL key)
- Got rid of some weird workarounds in the duplication code
- Fill and clear operations now correctly make the selection marker inactive
  as this was broken partly due to the workarounds mentioned above
  (duplication continues to keep the selection marker active to allow
  subsequent duplications)
- Clear current selection on RMB, but treat selection as an action so previous
  selection can be restored on undo
- Separated selection and paste indicator data as it's prone to error and
  confusion and it's anyway needed now that selection is treated as an action
- Added support for cancelling paste, selection, and even unselect the
  currently selected mesh library item with the ESC key (previously there
  wasn't a way to unselect)
- Changed the key binding of fill/clear/duplicate operations to use Ctrl as a
  modifier
- Changed erase to use RMB instead of Shift+RMB (free look is available
  through Shift+F anyway, so no need to occupy RMB for it during gridmap
  editing)
- Removed unused area, external connector, and configure menu items (there's
  also the non-functional clip mode menu items, but I'm not sure whether there
  are any plans with that, I suppose it's meant to be an editor aid)
- Renamed INPUT_COPY to INPUT_PICK to better reflect its purpose
- Added support for using Shift+Q and Shift+E to select multiple floors/planes
  without actually changing the current floor/plane as it happens when using
  e.g. the mouse wheel

Fixes #25373 and #15883
2019-04-30 14:35:18 +02:00
Bojidar Marinov
a9ac4c012c
Add search box and size slider to GridMap (similar to TileMap's)
Closes #21536
2019-02-26 16:17:59 +02:00
Michael Alexsander Silva Dias
3ef8238c1c Make translatable some undo/redo operations in the editor 2019-02-21 16:41:01 -03:00
marxin
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Juan Linietsky
8306d60e85 Get rid of gridmap error due to not yet valid cursor instance, fixes #17546 2018-11-16 09:10:44 -03: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
JFonS
9ffc30699f Fix selection box staying when editing a GridMap 2018-09-20 11:50:38 +02:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Michael Alexsander Silva Dias
6fa1b5eca7 Add option to move Tile/GridMap editors to another side 2018-08-22 19:18:23 -03:00
Michael Alexsander Silva Dias
5c6be1aea5 Rename instances of the word "theme" to "mesh_library" in GridMap and MeshLibrary editors 2018-08-22 16:52:38 -03:00
Max Hilbrunner
72e05f3f99
Merge pull request #16944 from rainerdeyke/master
Added 'fill selection' command to grid map editor
2018-07-03 18:32:39 +02: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
Pedro J. Estébanez
a6dc160d5c Use radio-button-like menu entries where applicable 2018-03-27 19:19:45 +02:00
Rémi Verschelde
ab03574e4a
Merge pull request #17079 from Noshyaar/leak2
GridMapEditorPlgn: fix a leak
2018-03-13 13:44:48 +01:00
Poommetee Ketson
89323f94bb GridMap: fix next/prev plane text, fix meta not found 2018-03-02 12:49:09 +07:00
poke1024
b90810ce8e Fix grid mesh tile panning bug (issue 16524)
Fix basic function and interference of touch pad pan with mesh tile delete (shift + right click on touch pad) in grid map editor (fix 16524)
2018-02-28 18:58:20 +01:00
Poommetee Ketson
5cf331588a GridMapEditorPlgn: fix a leak 2018-02-27 21:26:39 +07:00
Rainer Deyke
0f04a522c2 Add 'fill selection' command to grid map editor
This commit adds a 'fill selection' command (shortcut: shift+f) to the
grid map editor, making it easier to block out large parts of grid maps.
The new command is equivalent to the existing 'clear selection' command
except that it fills the selection with the currently selected block
instead of the empty grid cell.
2018-02-23 09:31:40 +01:00
Anish
7c356a9c05 Gridmap editor now lists plane instead of floor when not horizontal.
Instead of gridmap editor calling grid as floor irrespective of the
orientation, it now calls the grid plane if it's vertical and floor
if horizontal.

Resolves: #14611
2018-02-17 15:38:50 +05:30
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
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
Bernhard Liebl
80ad8afc85 Native pan and zoom for macOS 2017-11-21 09:11:39 +01:00
Ferenc Arn
d28763a4c1 Rename Rect3 to AABB.
Fixes #12973.
2017-11-17 11:01:41 -05:00
Daniel J. Ramirez
1b7f99d9e5 Several improvements to GridMap.
Fixed crash when undoing.
More ergonomic shortcuts.
Fixed freelook navigation.
2017-11-09 16:18:48 -06:00
Juan Linietsky
8f30c52a37 Removed ontop property, added a material rendering priority system. Fixes #9935, closes #10135 2017-09-01 13:01:08 -03:00
Juan Linietsky
37da8155a4 -Largely rewrote gridmap to simplify it
-Got editor working again
-Added a current-floor marker on selection
2017-08-27 16:02:00 -03:00
Rémi Verschelde
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Hein-Pieter van Braam
9a1d9a41eb Add several missing Null checks in _notification
This fixes #6118
2017-08-26 22:50:15 +02:00
Juan Linietsky
1894157c9f -Massive clean up to gizmos
-Make sure handles are always visible (on top)
-Fixed instanced scene selection (should work properly now)
-Added interpolated camera
-Customizable gizmo colors in editor settings
2017-08-26 00:47:28 -03:00
Rémi Verschelde
d9e94fa0c3 Fix i18n bug in GridMap string
Regression from 6134d87 causing build issue on clang.
2017-08-25 20:55:33 +02:00
Andreas Haas
6134d8741d Editor: Add some more translatable strings. 2017-08-25 18:49:45 +02:00
Hein-Pieter van Braam
cacced7e50 Convert Object::cast_to() to the static version
Currently we rely on some undefined behavior when Object->cast_to() gets
called with a Null pointer. This used to work fine with GCC < 6 but
newer versions of GCC remove all codepaths in which the this pointer is
Null. However, the non-static cast_to() was supposed to be null safe.

This patch makes cast_to() Null safe and removes the now redundant Null
checks where they existed.

It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-24 23:08:24 +02:00
Gilles Roudiere
06256cd778 Some control fixes and removed useless lines 2017-08-19 19:10:00 +02:00
Gilles Roudiere
0d35d4d53b Replace GUI anchor type by a float between 0 and 1 2017-08-13 21:20:13 +02:00
alexholly
935f730170 renamed all Rect3.pos to Rect3.position 2017-06-09 15:54:02 +02:00
Andreas Haas
9bc5348961
InputEvent: Renamed "pos" property to "position"
Make the naming consistent with other classes.
2017-06-03 11:26:39 +02:00
Juan Linietsky
5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
toger5
304a1f5b5a Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
2017-05-07 14:23:56 +02:00
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Juan Linietsky
74808ac4d9 New particle system, mostly working, some small features missing. 2017-04-06 23:49:27 -03:00