Commit graph

156 commits

Author SHA1 Message Date
kobewi
8386aa4601 Fix wrong signal in EditorPropertyColor 2021-01-14 14:55:08 +01:00
kobewi
3873a1331b
Emit changed signal from Color Picker when changed
(cherry picked from commit a00ac12ae9)
2021-01-13 16:17:09 +01:00
PouleyKetchoupp
dad3f27e9f
Update String property field only when text has changed
Avoids resetting the cursor position when the inspector updates while
editing a string property.

Fixes #42488

(cherry picked from commit c064378f95)
2021-01-13 16:17:07 +01:00
Rémi Verschelde
49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Pedro J. Estébanez
2997a3aa23 Fix cases of resources destroyed too early 2021-01-06 20:25:05 +01:00
kobewi
f78937a394
Don't emit changed signal on Color Picker close
(cherry picked from commit a22b2f86e7)
2021-01-05 21:33:33 +01:00
Rémi Verschelde
58a1ed63bd
Revert "Fixed EditorPropertyText change signal emission."
This reverts commit 9a3cd08122.

This caused a regression: #44854.
2021-01-05 21:33:32 +01:00
Pedro J. Estébanez
d84a303df4
Fix instantiation of resource as property value
(cherry picked from commit d2d29c42f2)
2020-12-29 16:02:03 +01:00
Andrea Catania
9a3cd08122
Fixed EditorPropertyText change signal emission.
(cherry picked from commit ed1f208ec4)
2020-12-29 16:01:59 +01:00
David Sichma
b69f1f183e
fix toggle mask bit 0
(cherry picked from commit 6acd450328)
2020-10-28 14:05:41 +01:00
Marcel Admiraal
3e50d3b4c0
Ensure grid index is valid before trying to change value.
(cherry picked from commit f98acd5cfb)
2020-10-19 16:09:59 +02:00
Hugo Locurcio
fbafd5c9e2
Improve the inspector easing editor
- Make it possible to drag a negative easing or an easing of 0 back to
  a positive value.
- Clamp the value between -1000000 and 1000000 to avoid issues
  related to infinity.
- Display more decimals for numbers closer to 0, less for large numbers.
- Display trailing zeroes in decimals to avoid flickering when dragging.

This closes #18712 and closes #22079.

(cherry picked from commit 028de11db8)
2020-09-29 13:57:57 +02:00
Antoine Félix
3211a51be8 Modify the scene only when color changed
Editor now changes a color in the inspector only when it is different
from the current one.

Solves fake unsaved changes in editor after using the ColorPicker.

Resolves: #40879
(cherry picked from commit f3626364fc)
2020-08-14 00:32:05 +02:00
Riley Lyman
157e810b2e Make Resource properties accept SE plugin scripts
(cherry picked from commit ab0fe13efb)
2020-07-03 15:34:30 +02:00
Hugo Locurcio
6e8b5aff66 Add visual feedback when hovering layer checkboxes in the Inspector
This also changes how checkboxes are selected, which makes it possible
to click in the small area between two checkboxes and
still toggle a value successfully (which is arguably less frustrating).

(cherry picked from commit bbc435624f)
2020-06-10 15:30:51 +02:00
Aaron Franke
5e1dad3b28
Use int64_t for EditorPropertyInteger and warn when out of double range 2020-01-15 23:39:49 -05: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
Rafał Mikrut
ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Rémi Verschelde
8e76c5701b
Merge pull request #32997 from Calinou/editor-color-picker-add-tooltip
Add a tooltip to Color properties in the editor inspector
2019-11-07 13:18:27 +01:00
Hugo Locurcio
66bfa92e84
Add a tooltip to Color properties in the editor inspector
This makes it possible to view a color's raw R/G/B/A values
without clicking the ColorPickerButton.
2019-10-22 23:22:20 +02:00
Anubhab Ghosh
4972ef801a Add clear menu entries for extending and replacing scripts 2019-10-23 01:57:17 +05:30
Michael Alexsander
a0866716ed Make the the resource menu button fallback to the Object icon instead of Node 2019-10-21 11:26:58 -03:00
Michael Alexsander
22b9510558 Make resource editor fallback to Object icon if none is found 2019-10-14 16:36:00 -03:00
David Sichma
f7d9f070e1 Increased step precision
Results in nicer numbers for float properties like 20.0 instead of
20.000001
2019-10-13 00:29:53 +02:00
Joe Morton
c017f3405e Set tooltip to an empty string when clearing
Format


Remove string conversion
2019-10-06 17:29:11 +01: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
21222fb478
Make editor inspector easing lines use the accent color when dragged
This makes their visual feedback more consistent with other controls.

This also makes easing lines slightly more subtle by decreasing
their opacity by 10%.
2019-09-06 16:11:26 +02:00
Bhupendra Aole
1de3ec911f Default ColorPicker color mode setting
There is a new setting for Default ColorPicker color mode in Editor Settings->Interface->Inspector. Initially this setting will be RGB. Editor ColorPicker will always start with mode defined in this settiing.
Fixes #30755 and #30754
2019-08-31 00:34:33 -04: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
Rémi Verschelde
73f1f9b44f
Merge pull request #31586 from SonerSound/issue_31533
Export path is the only path to be saved as a relative path
2019-08-23 08:34:03 +02:00
SonerSound
326f856006 Export path is the only path to be saved as a relative path
Also reverts 90b2415343
2019-08-22 22:20:15 +01:00
Hugo Locurcio
ca42541020
Tweak the size of the multiline text edit popup dialog
This caps its size on large displays. This in turn prevents lines from
becoming very long, which could hamper text readability.
2019-08-09 22:03:25 +02:00
Rémi Verschelde
d844e30614 Inspector: Make default float step configurable
Also allow lifting the decimal step formatting with a hint range step
of 0. A new `range_step_decimals()` is added for this to avoid breaking
compatibility on the general purpose `step_decimals()` (which still
returns 0 for an input step of 0).

Supersedes #25470.
Partial fix for #18251.
2019-07-23 17:31:38 +02:00
Rémi Verschelde
d15cf7b672
Merge pull request #30576 from qarmin/lgtm_coverage
Changed some code reported by LGTM and Coverity
2019-07-20 12:00:13 +02:00
qarmin
6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
Michael Alexsander Silva Dias
df9c890022 Make multiline text edit grab focus when popping up 2019-07-19 14:32:23 -03:00
SonerSound
90b2415343 Export path may now be written as a relative path
If the target directory does not exist, it will be recursively created.

Export paths are now saved as a relative to the projects base directory

Renamed relative_to function to final_path_from_relative which takes a relative path and outputs the final path from a string that represents a directory.
Added relative_path_from_final which takes in a final path and outputs a relative path if possible. If not possible it outputs the relative path that represents the current directory.
If the target directory does not exist when exporting the project, then it is recursively created.

Removed final_path_from_relative function

Changed DirAccess into DirAccessRef for automatic object destruction
2019-06-30 19:13:49 +01:00
Rémi Verschelde
f8df412512
Merge pull request #24156 from AnaDenisa/master
Add option to input value in EditorPropertyEasing. Fixes #8449
2019-06-29 15:34:24 +02:00
LikeLakers2
facafeb19a Fix an EditorPropertyResource bug where clicking on the flat buttons would not select the property in the inspector 2019-06-28 19:23:57 -04:00
AnaDenisa
13279a7da7 Add option to input value manually in EditorPropertyEasing
Double-clicking on the EditorPropertyEasing widget (e.g. for the Light
Attenuation parameter) shows an EditorSpinSlider to set the value manually.

Fixes #8449.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2019-06-28 12:25:19 +02:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
JohnJLight
38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Rémi Verschelde
cce2e4b07c
Merge pull request #22301 from YeldhamDev/button_popup_highlight
Enable toggle behaviour for buttons that trigger popups
2019-04-25 17:47:23 +02:00
Juan Linietsky
04847ef5f9 Added ability for multiple images to be imported as an atlas
This adds support for groups in the import system, which point to a single file.
Add property hint for saving files in file field
2019-04-19 15:56:34 -03:00
Rémi Verschelde
c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
Rémi Verschelde
b319168db2
Merge pull request #26122 from vixelz/allow-embedding-gdscript-defined-resources
Include global class resources in Resource property inspector
2019-04-06 13:11:00 +02:00
Rémi Verschelde
fc081ebe10
Merge pull request #26954 from willnationsdev/refresh
Add a getter for the EditorInspector
2019-04-05 16:41:02 +02:00
Anish
8ee31ace34 Prevents crash on loading unrecognized resources.
Editor crashes on trying to load resources with no loaders.
Simple check on the resource loader prevents using a null
resource loader.

Fixes: #27385
2019-03-25 02:32:21 +05:30