Commit Graph

390 Commits

Author SHA1 Message Date
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
Rémi Verschelde 0f2937ead1
Merge pull request #71229 from reduz/fix-recursive-resource-inclusion-check
Fix recursive resource inclusion check
2023-01-15 13:03:20 +01:00
kobewi 59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
Rémi Verschelde 4c2dea108e
Merge pull request #70540 from vaartis/multiline-arrays-dictionaries
Implement export_multiline support for Array[String] and Dictionary
2023-01-13 18:01:55 +01:00
Juan Linietsky 9a966b95ec Fix recursive resource inclusion check
I forgot a line of code.

Fixes #71194.
2023-01-11 18:28:52 +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
Juan Linietsky 0e0a6bb39b
Removed unused property hints and `Object::get_translatable_strings()`
* Remove unused `EditorPropertyMember` and related hints, previouly used by
  VisualScript. Such logic should be implemented in the VS module itself.
* As the above broke compatibility with the VS module, clean up the other
  hacks that were still in core in support of VisualScript.
* `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's
  `get_translatable_strings()`, which is a legacy function not used anywhere.
  So both are removed.
* Reordered some usage flags after the above removal to minimize the diff.
* General clean up.

Fixes #30203.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-09 16:56:01 +01:00
Rémi Verschelde e7905f4f48
Merge pull request #71045 from reduz/use-bitfield-in-core-types
Use BitField<> in core type masks
2023-01-09 08:33:26 +01:00
Juan Linietsky 2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
Juan Linietsky bfc4470599 Prevent recursion in inspector resource assignment.
Fixes #43177
2023-01-06 15:05:33 +01:00
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 724f2422d7 Revert "Merge pull request #70696 from Rindbee/propagate-keying-state"
This reverts commit c774b4ce17, reversing
changes made to ccc609d824.
2023-01-04 20:03:28 +09:00
Rindbee ef2c3398e6 Propagate the keying state in the inspector
Toggling the keying state does not significantly change the structure
of the inspector. So it's ok to propagate the keying state and then
use `queue_redraw()` to update the keying icon.
2022-12-31 20:29:09 +08:00
Ekaterina Vaartis 60692b4e45 Implement export_multiline support for Array[String] and Dictionary
For arrays, specifically check if it's a string array and pass the
type on to the editor. For dictionaries, save the hint on the type and
use it later to draw the multiline editor, except for when adding a
string key, because that doesn't make much sense. All string values
however will be drawn as multiline.
2022-12-25 01:46:57 +03:00
Silc Renew 060fb2d093 Add inspector plugin for key time edit & Change find key argument 2022-12-22 10:03:06 +09:00
trollodel c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
ocean (they/them) 9187f5c849 Fixes inability to assign script after clearing 2022-11-21 19:43:46 -05:00
Aaron Franke f6714858bf
Rename TextureButton set_*_texture methods to set_texture_* 2022-11-19 17:33:40 -06:00
Rémi Verschelde f475c91081
Fix -Wunused-but-set-variable warnings from Emscripten 3.1.20 2022-11-04 11:36:13 +01:00
Aaron Franke 9e952c8386
Allow getting Quaternion rotation in different Euler orders 2022-11-02 19:20:10 -05:00
Rémi Verschelde eefba5bc33
Merge pull request #65062 from KoBeWi/RedoUndo
Unify usage of undo_redo in editor
2022-11-02 18:54:05 +01:00
kobewi 15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
Aaron Franke 83634119d4
Replace Quaternion Euler constructor with `from_euler` method 2022-11-01 09:28:12 -05:00
Rémi Verschelde 5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde f4f98c4ecb
Merge pull request #67055 from GuilhermeGSousa/custom-node-export
Added custom node export
2022-10-31 11:11:07 +01:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
Guilherme Sousa 5d06843fcf Added custom node export 2022-10-14 17:31:00 +02:00
kobewi c75338fce6 Preserve caret when updating EditorPropertyText 2022-10-14 15:37:28 +02:00
kobewi fd84f68217 Add empty state to enum properties 2022-10-13 13:05:54 +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
Rémi Verschelde 9cd62741bb Merge pull request #66839 from aaronfranke/editor-prop-hide-slider
Fix `hide_slider` vs `no_slider` inconsistency in editor property code
2022-10-05 08:47:06 +02:00
Aaron Franke 2cea42cc7f
Rename Projection `matrix` to `columns` 2022-10-04 12:34:19 -05:00
Aaron Franke 094e8db97c
Fix hide_slider vs no_slider inconsistency in editor property code 2022-10-03 13:40:31 -05:00
Rémi Verschelde 78a9a3de69 Merge pull request #62903 from Rindbee/fix-property-link-not-work-in-MultiNodeEdit
Set the changed field to empty (meaning all) if the link button is pressed
2022-09-15 20:12:12 +02:00
Hugo Locurcio f7292dbeb3
Rename `or_lesser` range property hint to `or_less`
"less" should be used for quantity, rather than "lesser".

Existing scripts that use `or_lesser` in `_get_property_list()`
will need to be updated to account for this change.
2022-09-02 19:08:20 +02:00
Rémi Verschelde 10aec9057c
Merge pull request #63411 from Calinou/improve-null-object-dictionary-print
Improve null and object printing to avoid confusion with arrays
2022-08-31 17:37:08 +02:00
Hugo Locurcio 291d3aaabe
Improve null and object printing to avoid confusion with arrays
- Use different syntax for object printing to avoid confusion with arrays.
- Print null as `<null>` to avoid confusion with a string `"null"`.
- Display `<empty>` in editor resource pickers to avoid confusion
  with array-based properties.
2022-08-31 15:31:49 +02:00
Haoyu Qiu 97f547a63a Fix crash when toggling flag property value 2022-08-31 15:50:23 +08:00
Micky e31bb5ffeb Rename `CanvasItem.update()` to `queue_redraw()`
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.

Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.

Just a few comments have also been changed to say "redraw".

In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02: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 f7f8af232c
Merge pull request #64885 from Mickeon/rename-tooltip-hint
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-28 17:43:01 +02:00
Aaron Record 4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Micky ef5b9a06a9 Rename `hint_tooltip` to `tooltip_text` & setget
`hint_tooltip` -> `tooltip_text`
`set_tooltip` -> `set_tooltip_text`
`_get_tooltip` -> `get_tooltip_text`

Updates documentation, too.
2022-08-27 01:35:01 +02:00
Rémi Verschelde f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Micky 59e11934d8 Rename `str2var` to `str_to_var` and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.

- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`

- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
bruvzg d91cb1d5d5
[macOS export] Simplify code signing options, add support for rcodesign tool for signing and notarization. 2022-08-26 14:23:31 +03:00
Rémi Verschelde 2961651444
Merge pull request #64691 from TokageItLab/Quaternion-editor 2022-08-24 18:36:54 +02:00
Silc Renew 673c649adb Implement Quaternion Editor 2022-08-24 22:04:49 +09:00