Commit Graph

197 Commits

Author SHA1 Message Date
98b147b319 [Editor] Fix inspector keying signals argument count.
The second parameter of the signals `EditorInspector.property_keyed` and
`EditorProperty.property_keyed_with_value` can be NIL, causing the event
to fire with less arguments when using `emit_signal` that accepts
Variant arguments, so we use the pointer version instead.
2022-01-07 15:48:37 +01:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
1032c2c434 Merge pull request #55487 from YeldhamDev/scroll_bikeshedding 2022-01-03 14:10:41 +01:00
a124f1effe Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 01:03:58 -05:00
18663aa305 Stop asuming a default value of NIL means there's no default 2021-12-11 14:03:48 +01:00
49403cbfa0 Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
41a20171eb align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
841a9ef820 ScrollContainer's scrollbar visibility is now enum 2021-12-07 18:27:12 +01:00
75ac048e4b Merge pull request #55662 from KoBeWi/update_minimum_size_changed_to_update_minimum_size 2021-12-06 18:28:46 +01:00
81efebb3a1 Fix bad popups offset in editor with single window off
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com>
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2021-12-06 14:29:48 +01:00
ea7cc1dea9 Rename minimum_size_changed() method 2021-12-06 14:02:34 +01:00
da94b61d09 Fix EditorPlugin.remove_inspector_plugin() instance cleanup 2021-12-06 10:25:01 +08:00
ec4f4c6cda Rename all methods that return ScrollBar nodes to get_*_scroll_bar() 2021-11-30 13:46:36 -03:00
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
eabf8f5edf Added reset_size method to Control and Window classes 2021-11-22 16:55:21 +03:00
3c0fdcc8ac Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
57ae154e86 Merge pull request #53987 from groud/tile_data_inspector_plugin 2021-11-12 15:10:54 +01:00
2e4d18c929 Fix EditorInspectorPlugin virtual bindings and add parse_group callback 2021-11-10 17:56:59 +03:00
8d6f80d367 Add property value pinning 2021-11-08 17:42:30 +01:00
1806ec7c14 Unify determination of default property values 2021-11-07 15:27:47 +01:00
e393c2a734 Add is_built_in() method to Resource 2021-11-04 12:45:58 +01:00
cec004adf0 Implement polygons editors in the tiles selection mode 2021-10-26 12:38:36 +02:00
bf34253131 Use a yellow color for editable children properties instead of red
This matches the usual "Changes may be lost!" warning color.

- Remove a duplicate editor theme color setting declaration.
2021-10-05 19:15:44 +02:00
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
eca594d25e Merge pull request #52376 from rcorre/prop_path_copy_fix
Don't handle property_editor shortcuts on release.
2021-09-16 13:25:44 +02:00
a3d1bc757d Merge pull request #32068 from aaronfranke/transform-editor
Reformat Transform(2D) matrix display in the inspector
2021-09-15 13:06:25 +02:00
ed0a3b29dd Merge pull request #52636 from Jummit/highlight_categories
Highlight hovered inspector categories
2021-09-14 18:19:11 +02:00
de3bc8d294 Merge pull request #52259 from jmb462/fix-ctrl-V-wrong-behavior-in-inspector-textedit
Fix Ctrl+V wrong behavior in inspector textedit (Fix #52208)
2021-09-14 13:04:57 +02:00
38b312404b Highlight hovered inspector categories 2021-09-13 21:35:09 +02:00
37de1df2ab Fix undo/redo for properties set as PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED
Full inspector update was triggered only on property changed, but not on
undo/redo actions, which can cause inspector discrepancies when some
properties are supposed to be shown or hidden.

Now update all flag is passed into _edit_set() method which already has
logic to handle this case properly (it still triggers update_tree() down
the line).
2021-09-07 13:58:41 -07:00
4bd7700e89 Implement properties arrays in the Inspector. 2021-09-07 09:51:28 +02:00
facf8f1883 Apply set_read_only() to child classes of EditorProperty elements 2021-09-05 18:22:17 +09:00
b296ad23b4 Don't handle property_editor shortcuts on release.
Fixes #52336.

EditorProperty::unhandled_key_input was handling both press and release.
This means that if you press `ctrl+v` on an EditorProperty line input,
it will paste as expected on pressing `ctrl+v`, and accept the event so
EditorProperty will not see it. However, on release, LineEdit ignores
the event and EditorProperty still catches and handles it, using its own
paste implementation.
2021-09-03 08:33:02 -04:00
288f0b6555 Reformat Transform(2D) inspector menus
Move, rename, recolor, and fix the inspector for these in the inspector. Coloring is now done by a helper method in "editor_inspector.cpp".
2021-08-31 11:24:40 -05:00
91974057a5 Fix CTRL+V doesn't work properly in inspector textedit 2021-08-30 17:33:01 +02:00
1fbbe25cea Fix crash on scenes with tool scripts and mismatched node types 2021-08-27 14:32:28 +01:00
0205fffbf3 Copy/Paste property paths/values in inspector.
Resolves godotengine/godot-proposals#106.

Adds the following property menu options with default bindings:

- Copy Property (ctrl+c)
- Paste Property (ctrl+v)
- Copy Property Path (ctrl+shift+c)

If you hover over a property label in the inspector dock, you can copy
either the property value or the property path to the system clipboard
using the shortcuts above This is especially useful for the
`AnimationTree`, where code might reference properties like
"parameters/state/aim/move/blend_position".

One issue is that if you click a property, then click on the node you
currently have selected in the node tree, then press ctrl+shift+c, it
will still copy the selected property path rather than the node path. If
you click on a different node in the nodetree, however, ctrl+shift+c
will return to copying the nodepath.

The property value copy/paste was implemented by @KoBeWi at #39398 and
merged into this PR due to their similarity.
2021-08-23 18:15:05 -04:00
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
3682978aee Replace BIND_VMETHOD by new GDVIRTUAL syntax
* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.

Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.

Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-22 08:23:58 -03:00
645bc94bfc Fix capsule height/radius setters with linked properties
Capsule height and radius setters can modify each other, rather than
using clamping, to avoid cases where values are not set correctly when
loading a scene (depending on the order of properties).

Inspector undo/redo:
Added the possibility to link properties together in the editor, so
they can be undone together, for cases where a property can modify
another one.

Gizmo undo/redo:
Capsule handles pass both radius and height values so they can be undone
together.
2021-08-19 10:31:19 -07:00
33e0b4b60d Fix incorrect word block colors in the inspector tooltip 2021-08-13 16:15:05 +03:00
45af2af214 Fix theme property descriptions in the Inspector 2021-08-06 17:12:43 +03:00
24f2aaecc3 Fix up property reversion 2021-08-02 13:58:02 +02:00
db9e3f257f Rationalize property reversion 2021-07-30 22:36:55 +02:00
92299989bd Use Ref<T> references as iterators where relevant
And const when possible.
2021-07-26 19:27:11 +02:00
ff0b5f8fa1 Merge pull request #50809 from akien-mga/iterators-const-references 2021-07-25 12:52:58 +02:00
ac3322b0af Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
3564c16cb8 Fix various typos with codespell
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-25 11:21:51 +02:00
4e6efd1b07 Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
67d3195c60 Merge pull request #50648 from foxydevloper/remove-weird-prints
Remove leftover prints when using shader global variables
2021-07-20 17:23:39 +02:00