Commit graph

213 commits

Author SHA1 Message Date
kobewi
b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Markus Sauermann
3238d11247 Fix closing project setting window with ESC while listening for input
This is done by disallowing ESC to be used for closing the window
while the filter-LineEdit is focused.
2022-12-21 12:48:59 +01:00
Mikael Hermansson
8c108177d7 Add feature tags to signify engine float precision 2022-12-07 16:13:17 +01:00
Gilles Roudière
fa4143cdeb Allow specifying a prefix to automatically detect library files for gdextension exports 2022-12-01 18:20:40 +01:00
kobewi
15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
Haoyu Qiu
ad04922ef9 Only show named layers in layer menu 2022-10-08 11:24:04 +08:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Eric M
598ee4266c Split action_map_editor file into one file per class it contained.
* ActionMapEditor
* EventListenerLineEdit
* InputEventConfigurationDialog
2022-10-06 18:29:20 +10:00
bruvzg
6f4d233062
Fix key mapping changes when moving from macOS to other platform
Removes separate `Command` key (use `Meta` instead).
Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-09-07 18:45:35 +02:00
Yuri Sizov
43f03e2ce6 Improve naming of theme properties throughout GUI code
Rename ItemList's bg -> panel
Rename ItemList's bg_focus -> focus
Rename ProgressBar's bg -> background
Rename ProgressBar's fg -> fill
Rename Tree's bg -> panel
Rename Tree's bg_focus -> focus
Rename ScrollContainer's bg -> panel
Rename FileDialog's *_icon_modulate -> *_icon_color
Rename FileDialog's files_disabled -> file_disabled_color
Rename CheckButton's on/off -> checked/unchecked
Rename check_v_adjust -> check_v_offset
2022-09-06 22:53:17 +03:00
Rémi Verschelde
fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Aaron Record
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
kobewi
ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
PucklaMotzer09
897d02e2a0 Change translation remaps if files are moved 2022-08-02 12:36:40 +02:00
Rémi Verschelde
a50d232015
Merge pull request #49045 from foxydevloper/hide-custom-settings-non-advanced 2022-07-31 23:53:58 +02:00
Yuri Sizov
9f55bd971e Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
fox
41cc9f9a43 Hide altering custom properties in basic mode
Hides the row for adding and removing custom properties from showing up
when advanced mode is disabled.
2022-07-31 10:38:44 -04:00
Hugo Locurcio
4b42379c8f
Rename RenderingServer global shader uniform methods to be more explicit
The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
2022-07-28 18:46:59 +02:00
Aaron Franke
e53ae13178
Split up editor export code into multiple files 2022-07-26 08:28:19 -05:00
FireForge
e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
reduz
5786516d4d Implement Running Godot as Movie Writer
* Allows running the game in "movie writer" mode.
* It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time).
* If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult.
* Implements a simple, default MJPEG writer.

This new features has two main use cases, which have high demand:
* Saving game videos in high quality and ensuring the frame rate is *completely* stable, always.
* Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this).

**Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly).

Usage:

$ godot --write-movie movie.avi [scene_file.tscn]

Missing:

* Options for configuring video writing via GLOBAL_DEF
* UI Menu for launching with this mode from the editor.
* Add to list of command line options.
* Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
2022-06-21 11:28:47 +02:00
Rémi Verschelde
532e253a7c
Merge pull request #61455 from fire-forge/tab
Add color contrast to TabContainer backgrounds in the editor
2022-05-31 12:52:03 +02:00
FireForge
7f7244f04a Use consistent casing in editor filter/search bars 2022-05-28 18:43:16 -05:00
FireForge
eb573da2b5 Use "odd" style for TabContainers on base BG color
- Use the "odd" style for TabContainers that are on a background with the same color as the default TabContainer background color to add contrast
2022-05-26 21:19:15 -05:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Aaron Record
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
reduz
8b7c7f5a75 Add a new HashMap implementation
Adds a new, cleaned up, HashMap implementation.

* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
  for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).

This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
kobewi
e7da3ce96e Disallow Callable, Signal and RID in export arrays 2022-05-05 19:22:48 +02:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
bruvzg
d1207a0504
[Input] Add extra shortcut_input input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
Michael Alexsander
deb1342036 Make TabBar/Container default their alignments to the left instead of center 2022-03-17 18:12:23 -03:00
Haoyu Qiu
7bdca99d51 Improve inspector filtering 2022-03-18 01:16:25 +08:00
Haoyu Qiu
851ed8886c Fix Autoload capitalization inconsistency 2022-03-09 15:03:03 +08:00
Michael Alexsander
917dac78e7 Replace some bits of code left to work with the new TabContainer 2022-03-04 19:16:33 -03:00
Michael Alexsander
a811ebf699 Make TabContainer use TabBar internally 2022-03-03 21:49:58 -03:00
Jakob Bouchard
6553f5c242
Convert _notification methods to switch - Chunk C 2022-02-16 13:03:05 -05:00
Rémi Verschelde
fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
jmb462
a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
Rémi Verschelde
f8f19b313d
Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
2022-02-03 22:21:24 +01:00
Rémi Verschelde
025e778020
Merge pull request #57175 from fire-forge/add-type-icons
Add type icons to Project Settings, Array, and Dictionary editors
2022-02-03 22:17:25 +01:00
Anilforextra
adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
fire540
d5d05386a6 Add type icons to Project Settings, Array, and Dictionary editors 2022-02-03 13:02:18 -06:00
Hendrik Brucker
2f1e7c28a4 Minor fixes/refactoring of project and editor setting dialogs 2022-02-01 00:19:01 +01:00
Yuri Roubinsky
02e6745271
Merge pull request #56832 from Chaosus/fix_theming 2022-01-16 16:02:22 +03:00
Yuri Roubinsky
5003d4351e Fix theming update in several editor classes 2022-01-16 14:49:03 +03:00
Hugo Locurcio
40be15920f
Remove support for PVRTC texture encoding and decoding
On the only platform where PVRTC is supported (iOS),
ETC2 generally supersedes PVRTC in every possible way. The increased
memory usage is not really a problem thanks to modern iOS' devices
processing power being higher than its Android counterparts.
2022-01-14 21:08:22 +01:00
Marcel Admiraal
5737e7dd2d Check if action name exists before adding it or renaming an action to it 2022-01-12 15:19:18 +00:00