Commit graph

133 commits

Author SHA1 Message Date
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
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Hendrik Brucker
70c234f3e3 Improve Graphedit connection lines 2022-05-30 17:33:01 +02: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
Yuri Rubinsky
c84d050980 Add node list param to GraphEdit::delete_nodes_request signal 2022-05-17 13:28:21 +03: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
megalobyte
8824b6c5e9 Update if == NOTIFICATION_* to switch statements to match coding style 2022-02-16 08:44:37 -05:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Rémi Verschelde
a66e55069e
Merge pull request #57796 from akien-mga/revert-sname-theme-setters 2022-02-08 11:13:24 +01: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
Rémi Verschelde
317cd0b19a
Refactor some object type checking code with cast_to
Less stringly typed logic, and less String allocations and comparisons.
2022-02-08 10:08:34 +01:00
jmb462
a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
Anilforextra
adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Haoyu Qiu
5ea4a8b421 Fix crash after renaming an animation node 2022-01-25 20:18:40 +08:00
kobewi
98692d68c3 Minor tweaks and fixes to panning 2022-01-23 13:49:53 +01:00
kobewi
74bfe88267 Add ViewPanner to 2D editor 2022-01-21 18:35:06 +01:00
Haoyu Qiu
19634bd1a1 Fix crash when undoing node creation of BlendTree editor 2022-01-17 14:35:09 +08:00
kobewi
fbb5580b3d Add ViewPanner to more editors 2022-01-14 13:09:39 +01:00