Commit graph

92 commits

Author SHA1 Message Date
Rémi Verschelde
fdda39a506 Signals: Don't pass default binds to EditorProperty property_changed
This was done by mistake in #36758, but it's not necessary and actual
causes a bug.

`property_changed` is only emitted via `emit_changed()`, which already
has default values for `p_field` and `p_changing`.

Also reverted to using `String` for now to be on the safe side, even if
it's inconsistent with `emit_changed()`. I had only changed it
partially in #36758 so it was inconsistent. It probably does make sense
to port `EditorInspector` and related property editors to use
`StringName` where relevant, but that's for a dedicated PR.

Fixes #36799.
2020-03-05 15:35:44 +01:00
Rémi Verschelde
48ed841dd0 Signals: Fix some regressions from #36426
- Fix `callable_mp` bindings to methods which used to have default
  arguments passed to `bind_method`. We now have to re-specify them
  manually when connecting.
- Re-add `GroupsEditor::update_tree` binding.
- Misc code quality changes along the way.
2020-03-03 11:44:06 +01:00
Rémi Verschelde
01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Michael Alexsander
28d3f85e64 Don't show a copy of the property's name in the inspector's tooltip if there's no description 2020-02-26 11:03:42 -03:00
Juan Linietsky
33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.

Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.

For Variant, the float datatype is always 64 bits, and exposed as `float`.

We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.

Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +01:00
Juan Linietsky
3c0059650d Added StringName as a variant type.
Also changed all relevant properties defined manually to StringName.
2020-02-21 14:25:29 +01:00
Juan Linietsky
69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Juan Linietsky
3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Juan Linietsky
3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Rémi Verschelde
1361fa71c4
Merge pull request #33047 from silvanocerza/settings-search
Improved search in settings dialogs
2020-01-31 11:45:37 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Haoyu Qiu
078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Silvano Cerza
84410f937e Improved search in settings dialogs
Settings search used to work only on properties, so if a searchbox text
was a substring of a category but not of a property the whole category
would be filtered out and no property would be shown.

Now the behaviour is changed so that when the searchbox text is a
substring of a category all its properties are shown too.

The previous behaviour is still present so that in case the searchbox
text is both a substring of a category and a property of another
category, all properties of the first category are shown and only the
property of the second category is shown.
2019-11-04 20:24:59 +01:00
Tomasz Chabora
6c0ef9f729 Auto-increment frame_coords when keying 2019-10-22 20:12:55 +02:00
Hugo Locurcio
8c79b4f5e9
Remove redundant camelcase_to_underscore() call in EditorInspector
Calling `String::capitalize()` already calls
`String::camelcase_to_underscore()` under the hood.
2019-10-10 22:57:46 +02:00
Rémi Verschelde
dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Hugo Locurcio
04f43116d6
Improve folding appearance in the editor inspector
The arrow is now displayed at the left to be consistent with
other places where folding is used. The arrow icons used are now
consistent with the rest of the editor. The `arrow_up` icon is
no longer used anywhere, so it was removed.

Additional spacing was also added for a better visual appearance.
2019-09-19 22:29:25 +02:00
merumelu
e2459479de Editor: remove TOOLS_ENABLED guards
For code  inside editor/ `#ifdef TOOLS_ENABLED`
is always true so those checks are redundant.
2019-08-30 19:02:46 +02:00
qarmin
e0b5b21863 Add some code changes/fixes proposed by Coverity and Clang Tidy 2019-08-07 12:54:30 +02:00
Rémi Verschelde
336846e547 Inspector: Fix PROPERTY_HINT_SPRITE_FRAME not behaving as RANGE
This was a regression in 3.1 and later from the new inspector, where
PROPERTY_HINT_SPRITE_FRAME was not fully re-implemented. It's meant to
be a normal PROPERTY_HINT_RANGE which also automatically increments its
value when keyed in the animation player.

To avoid code duplication, I made the frames properties use the actual
PROPERTY_HINT_RANGE and introduced a PROPERTY_USAGE_KEYING_INCREMENTS
usage flag instead.
2019-07-25 09:29:51 +02:00
Rémi Verschelde
9f5b77acc9
Revert "Expose "meta" to the Inspector" 2019-07-22 12:03:57 +02:00
Rémi Verschelde
2ca3e47d66
Merge pull request #22642 from YeldhamDev/inspector_metadata
Expose "meta" to the Inspector
2019-07-19 14:39:23 +02:00
Hugo Locurcio
ecda25b050
Add a margin to "checkable" property checkboxes in the editor inspector
This makes "checkable" property checkboxes look more consistent with
other checkboxes.
2019-06-05 22:18:46 +02:00
Aaron Franke
b659e1eb2b
Use approximate equallity methods in many places 2019-04-25 13:20:29 -04:00
Juan Linietsky
325f6c6581 Added inspector plugin documentation.
Fixed plugin bindings.
2019-04-23 16:39:09 -03:00
Juan Linietsky
f2c26098a9 Revert 8d3345a, I thought this was non functioning but it is.. 2019-04-23 16:00:54 -03:00
Juan Linietsky
2cf6d8d334 Made virtual function begin with _, for consistency.
This was not yet used, anyway as no API is bound for this.
2019-04-23 15:20:00 -03:00
James Buck
c230c6db98 Fix drawing of checkable editor properties
- Make text cutoff respect checkbox icon's width
  - Get checkbox icon from EditorIcons instead of CheckBox
2019-04-22 20:38:17 -05:00
James Buck
8b1b2f6a4c Fix editor tooltip formatting
Removed unnecessary word wrap which caused broken tags and general
ugliness. Fixes #24926
2019-04-20 11:51:50 -05:00
Hein-Pieter van Braam-Stewart
20b0046945 Object::script may not be a valid Ref<Script>
It appears that Object::script may be a valid ScriptInstance but not be
castable to Ref<Script>. There were only 5 places in the code that made
this assumption. This commit fixes that.
2019-04-20 02:13:28 +02:00
Juan Linietsky
a20235aeb0 Add ability to edit editor feature profiles
Allows enabling/disabling parts of the editor and storing/loading profiles for that.
2019-04-08 19:18:51 -03:00
Juan Linietsky
b376273f1b Force inspector to clean up on delete, fixes crash. 2019-03-07 12:39:53 -03:00
Juan Linietsky
4dd99701b0 Fix how settings change, closes #26692 2019-03-06 09:25:19 -03:00
Will Nations
27f9780cc6 Fix crash on exit when removing EditorInspectorPlugins 2019-03-06 00:14:42 +01:00
marxin
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Juan Linietsky
4a24ba6e77 -Fixes to undo redo to avoid crash, closes #24251
-Changed Animation to have a special signal when tracks are changed, to avoid unnecesary track cache rebuilds in AnimationPlayer
-Added missing emit_changed whe modifying keys to Animation
-Changed AnimationPlayer to use the new refcounted connections instead of the previous hacky way to keep references
-Changed AnimationEditor to update the current track when keys are edited
-Fixed bug where undo/redo did not work with AnimationKeyEdit (was not being updated)
-Made sure UndoRedo does not mind deleted objects in undo/redo history, this would corrupt the history or clear it without need.
2019-02-14 10:22:34 -03:00
Rémi Verschelde
563139e5f3 Fix EditorInspector property_changed argument mismatch
Bug introduced in #21701, missed in 541422a4a2.
2019-01-27 17:37:24 +01:00
Juan Linietsky
853f985b63 Make sub-inspectors not listen to node removals, since they never edit nodes. Fixes #23554 2019-01-25 15:14:56 -03:00
Juan Linietsky
c70c43c888 Make inspector gain focus on refresh only if it has it, fixes #24979, closes #25053 2019-01-22 12:29:26 -03:00
Juan Linietsky
541422a4a2 Clean up and fix issues after merging #21701 , closes #21104 2019-01-18 13:01:24 -03:00
Juan Linietsky
580bebda52
Merge pull request #21701 from AlexHolly/fix-multiselect-proptery-change
Fix multiselect change property
2019-01-18 12:37:50 -03:00
Juan Linietsky
f4ac678d58 Removed ancient code for set_edited that was doing nothing. 2019-01-14 12:44:16 -03:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Michael Alexsander Silva Dias
e425f2d498 Expose "meta" to the Inspector 2018-12-08 02:27:20 -02:00
Guilherme Felipe
2015c74104 Fix key icon overlapping revert icon 2018-11-30 14:00:04 -02:00
Juan Linietsky
0d69da8c0e Rewrite code for unfolding and make it automatic on scene load, which works better. 2018-11-25 10:47:33 -03:00
Alexander Holland
66d8ce0c05 Fix multiselect change property 2018-11-24 10:13:14 +01:00
Juan Linietsky
dc33d25fec Make sure inbetween lines in inspector can't be clicked, fixes #19014 2018-11-18 21:52:01 -03:00
DualMatrix
8286975d16 Made AnimationPlayer timeline only advance when keyframing frame variables
Fixes #23330
2018-11-08 21:46:34 +01:00