Commit graph

216 commits

Author SHA1 Message Date
jsjtxietian
15e66ccb9b Close shader in Shader Editor tab when deleting shader file in FileSystem panel 2023-10-16 18:50:56 +08:00
kobewi
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
kobewi
b883f32188 Check for unsaved changes when closing a scene 2023-07-18 14:27:56 +02:00
kobewi
000471ee56 Add unsaved status for script and shader editors 2023-07-18 14:18:36 +02:00
Yuri Sizov
8cfbc6bda2 Revert "Remember only permanent bottom tabs"
This reverts commit 5dde57e958.
2023-06-23 15:23:36 +02:00
Rémi Verschelde
9ab388c146
Merge pull request #78609 from KoBeWi/—GodotEngine
Unify window title format
2023-06-23 12:36:44 +02:00
kobewi
44bec97d5e Unify window title format 2023-06-23 12:21:56 +02:00
kobewi
5dde57e958 Remember only permanent bottom tabs 2023-06-23 10:53:39 +02:00
bitsawer
993e671dc0 Fix shader editor crash 2023-05-26 07:01:23 +03:00
Hendrik Brucker
dc46163b12 Improve editor state persistence 2023-05-11 04:17:03 +02:00
trollodel
b4d6b47c17 Add multi window code and shader editors 2023-05-10 09:14:21 +02:00
kobewi
aaf02ec04a Close built-in shaders when closing scene 2023-04-09 22:10:43 +02:00
Yuri Sizov
f08ffdc372
Merge pull request #74869 from fahadshihab/master
Added drag and drop support for shader include files in shader editor
2023-03-15 16:17:50 +01:00
Fahad Shihab
e5601b517e Added drag and drop support for shaderinclude
Dragging and dropping now works for shader include file.
2023-03-15 19:24:35 +05:30
Andreas Raddau
1566b402c1 Shader editor trims trailing whitespace if set in editor settings 2023-03-09 17:27:23 +01:00
Rémi Verschelde
bda87300e8
Merge pull request #71770 from KoBeWi/better_editing_or_something
Rework EditorPlugin editing logic
2023-01-22 11:07:39 +01:00
kobewi
4ae168eb04 Rework EditorPlugin editing logic 2023-01-22 00:20:45 +01:00
kobewi
615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
Rémi Verschelde
bcaf048f33
Merge pull request #71379 from KoBeWi/destruction_of_compatibility_function
Remove set_drag_forwarding_compat()
2023-01-18 17:40:13 +01:00
kobewi
b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
kobewi
59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
Juan Linietsky
e6a4debede Change set_drag_forwarding() to use callables.
* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).

Fixes #59899
2023-01-10 14:09:24 +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
trollodel
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
kobewi
15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
Kasper Sauramo
bedbb2e893 add explicit editor save tagging when saving 2022-10-04 11:49:32 +03:00
Rémi Verschelde
498844f687 Merge pull request #65276 from aaronfranke/shader
Separate TextShaderEditor and ShaderEditorPlugin into different files
2022-10-03 09:24:51 +02:00
Aaron Franke
252963166d
Separate TextShaderEditor and ShaderEditorPlugin into different files 2022-10-02 02:19:38 -05:00
Aaron Franke
38cb2f8afc
Rename ShaderEditor that edits text shaders to TextShaderEditor 2022-10-02 02:18:46 -05:00
Anutrix
119e1a2937 Fixed shader editor when no files are currently in shader list 2022-10-01 00:33:13 +05:30
VolTer
ded10214bf Rename Indent Left/Right to Indent/Dedent 2022-09-29 14:42:46 +02:00
Yuri Rubinsky
344aa610e3 Add defines to completion list in shaders 2022-09-26 16:04:19 +03:00
jeffres
b9d9528c45 Close shader under cursor when middle mouse clicking in editor list
Previously middle mouse clicking resulted in the currently selected
file to be closed, which is not the behavior commonly expected.
2022-09-18 13:25:13 +02:00
jeffres
1c98f03784 Fix selected shader file not being highlighted in shader editor list 2022-09-17 17:49:51 +02:00
Yuri Rubinsky
8191b3c110 Rename uniform to parameter across the engine 2022-09-01 11:42:57 +03:00
Aaron Franke
10a56981dc
Rename String plus_file to path_join 2022-08-29 19:38:13 -05: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
d764278f37 Add drag and drop support to shader list 2022-08-26 03:19:01 +02:00
kobewi
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Yuri Rubinsky
22df2c527b Implement coloring for disabled branches in the shader editor 2022-08-14 13:57:26 +03:00
Clay John
368446de55
Merge pull request #63582 from KoBeWi/power_shader
Improvements to shader editor
2022-08-11 12:45:33 -06:00
Yuri Sizov
9f55bd971e Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
kobewi
c3606cb5f3 Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02: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
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
kobewi
beabbad390 Improvements to shader editor 2022-07-28 18:28:38 +02:00
Yuri Rubinsky
be3fb7a216 Fix errors when using built-ins in shaderinc 2022-07-25 12:33:04 +03:00
Yuri Rubinsky
5705825d55 Fix clearing errors indication in the shader editor 2022-07-23 11:32:04 +03:00
Yuri Rubinsky
6d992abb54 Fix some errors after shader preprocessor PR 2022-07-23 09:38:59 +03:00