Commit graph

151 commits

Author SHA1 Message Date
Yuri Sizov
95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
Silc Lizard (Tokage) Renew
a51958a2a0 Remove Object pointer/solve types conflict in AnimationTrackCache
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-01-08 21:48:19 +09:00
Rémi Verschelde
0d18a945ca
Merge pull request #76654 from TokageItLab/improve-filter-util-anim-tree
Add useful functions to `FilterEdit` in `AnimationBlendTreeEditor`
2024-01-04 16:38:32 +01:00
Haoyu Qiu
920e53cacb Readd close button for nodes in AnimationNodeBlendTree editor 2023-10-23 11:11:51 +08:00
Saracen
65016c393f Automatic reconnection of nodes in blend tree. 2023-10-18 03:19:02 +01:00
Yuri Sizov
b07c664af9 Make GraphEdit toolbar more customizable
Also adds a semi-transparent background
to make the toolbar stand out in front of nodes.
2023-10-02 13:43:08 +02:00
Rémi Verschelde
bc118b36ac
Merge pull request #82370 from YuriSizov/graphs-request-rename-close-delete-please
Rename close requests to delete requests in `GraphEdit`
2023-10-02 13:16:28 +02:00
Silc Lizard (Tokage) Renew
afe25937e4 Add useful functions to FilterEdit in AnimationBlendTreeEditor 2023-09-30 03:01:16 +09:00
Silc Lizard (Tokage) Renew
1b95827d3e Implement AnimationManager the base class of AnimationPlayer/Tree 2023-09-29 08:23:57 +09:00
Yuri Sizov
378ab38b1f Rename close requests to delete requests in GraphEdit 2023-09-26 16:41:39 +02:00
Yuri Sizov
b351cffddf Fix theme access and improve UX in AnimationTree editor 2023-09-23 21:47:27 +02:00
A Thousand Ships
75ee58fd04 [Editor] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-15 20:15:39 +02:00
Haoyu Qiu
b8b0339549 Improve undo action names
* Avoid concating strings manually for better i18n and easy l10n
   * Use `vformat` when possible
   * Use separate strings if the changing part is only a few hardcoded strings
* Don't put a period at the end of the name
2023-09-12 18:53:50 +08:00
Hendrik Brucker
5afe78bd9c Clean up/refactor GraphNode and make it more flexible
Split GraphNode into GraphElement and GraphNode, add custom
titlebar, and adjust theming.
2023-09-07 17:29:06 +02:00
kobewi
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Hendrik Brucker
a38fd09669 Clean up/refactor GraphEdit 2023-07-24 18:37:23 +02:00
Hendrik Brucker
a29a680920 Extract StyleBoxFlat, StyleBoxTexture and StyleBoxLine in their own file 2023-07-17 13:25:00 +02:00
Silc Lizard (Tokage) Renew
c9c8205644 Implement NodeSub2 to AnimationTree & improve mathematical Nodes 2023-05-27 13:19:54 +09:00
Yuri Sizov
4154039832 Improve includes of EditorNode (and everything else)
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
2023-04-07 18:59:49 +02:00
Rémi Verschelde
1d61150f8f
Merge pull request #72509 from TokageItLab/seekcon
Consistent with NodeTimeSeek parameters OtherNodes
2023-02-02 16:27:19 +01:00
Silc Renew
2a39b5bcde Remove meaningless rename_parameter in AnimationTree 2023-02-01 23:14:36 +09:00
Silc Renew
6782edd5a4 Consistent with NodeTimeSeek parameters OtherNodes 2023-02-01 20:58:36 +09:00
Rémi Verschelde
d919d77367
Merge pull request #71418 from TokageItLab/restart-anim-tree
Allow AnimationStateMachine / AnimationNode to restart when transitioning to the same state
2023-01-19 21:52:35 +01:00
Silc Renew
e480262c53 Allow AnimationNodes to restart when transitioning to the same state 2023-01-19 03:10:59 +09:00
kobewi
b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
stmSi
88d4291938 Fix canceling add_node Popup doesn't disconnect previous node. 2023-01-10 14:35:09 +06:30
Yuri Sizov
82c00c21e6 Simplify some editor plugin logic and remove dead code 2023-01-05 21:04:54 +03: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
Silc Renew
b0eb3b6ebd Add null checks to AnimationTreeEditors and _clear_editors() 2022-12-13 03:06:51 +09:00
Eduard Zalyaev
ed53e96f43 AnimationNodeBlendTreeEditor: Fix popup locations when creating nodes with dragging
Fixes  #69413.
2022-12-05 21:03:38 +03:00
trollodel
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
kobewi
8a3d2f4e0c Cleanup remaining EditorUndoRedoManager usages 2022-11-24 18:56:22 +01:00
Silc Renew
d595b27467 Fix AnimationTree crash & rename get_tree() to get_animation_tree() 2022-11-21 00:28:10 +09:00
Rémi Verschelde
e22a1d8031
Merge pull request #68060 from dpalais/no-pointer-animationnode-blendtree-rename
Remove the usage of pointers in signal call, to fix #67941
2022-10-31 15:54:45 +01:00
Rémi Verschelde
6a9317c9fc
Merge pull request #42659 from kingoftheconnors/anim-tree-load-fail-alert
Add alert in anim trees if resource load fails
2022-10-31 13:18:10 +01:00
Dave Palais
3d0a9b2bec Remove the usage of pointers in signal call, to fix #67941
The signal was emitted right as the node was being disposed of. Since
the connection was deferred, the receiving method received an already
freed pointer. Instead, we listen to the text_changed signal and keep
record of the edited text which we then use to update node name when
the LineEdit goes out of focus.
2022-10-30 12:50:27 -05:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02: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
Rémi Verschelde
80802d2718 Merge pull request #65196 from TokageItLab/fix-redraw-anim-tree
Fix redraw timing in `AnimationBlendTreeEditor`
2022-09-15 20:11:36 +02:00
Silc Renew
cff95e54e0 Fix redraw timing in AnimationBlendTreeEditor 2022-09-14 21:05:21 +09:00
dzil123
f9bee90994 Ignore node rename if already exited blend tree 2022-09-11 02:33:59 -07:00
Micky
08c2aab169 Rename ProgressBar.percent_visible to show_percentage
`percent_visible` -> `show_percentage`
`set_percent_visible` -> `set_show_percentage`
`is_percent_visible` -> `is_percentage_shown`
2022-09-07 11:58:30 +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
Rémi Verschelde
d3db8bbebd
Merge pull request #62846 from AaronRecord/remove_redundant_theme_updates_in_enter_tree
Remove `NOTIFICATION_ENTER_TREE` when paired with `NOTIFICATION_THEME_CHANGED`
2022-08-27 21:56:14 +02:00
Aaron Record
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
SaracenOne
75f1357ced Add read-only mode to AnimationTreeEditor plugins 2022-08-25 16:29:36 +01:00
kobewi
ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
kingoftheconnors
5042e077c2 Change import animation error to "animation nodes" 2022-08-07 17:32:59 -04:00
Yuri Sizov
9f55bd971e Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00