Commit Graph

341 Commits

Author SHA1 Message Date
2961651444 Merge pull request #64691 from TokageItLab/Quaternion-editor 2022-08-24 18:36:54 +02:00
673c649adb Implement Quaternion Editor 2022-08-24 22:04:49 +09:00
dd814a0dca Disable editing properties in foreign resources
from imported scenes or objects returning
true from a function named '_is_read_only' and
disable resaving imported resources.
2022-08-23 23:16:13 +01:00
5d69dd1631 Merge pull request #63173 from fire-forge/layers-grid 2022-08-08 15:30:51 +02:00
f3a76f63c6 Merge pull request #62089 from Step-an/add_drag_and_drop_to_EditorPropertyPath 2022-08-07 16:00:46 +02:00
e1809f5667 Merge pull request #63704 from fire-forge/no-code
Fix EditorPropertyMultilineText expression mode
2022-08-06 00:32:22 +02:00
6059a9b624 Improve easing inspector usability
- Add `positive_only` property hint to disallow using negative presets.
  These values are clamped in several places in the editor already,
  so this avoids displaying presets that don't work.
- Move the Zero preset at the end of the positive list to match
  the custom property editor. It's also used less often than Linear,
  Ease In and Ease Out.
- Rename presets to be consistent between the easing property editor
  and custom property editor.
- Remove unused `inout` hint which was redundant since it was already
  the default.
2022-08-01 18:40:04 +02:00
6c5330154e Merge pull request #63429 from RandomShaper/indicate_overridden 2022-07-31 23:54:38 +02:00
4b478c2854 Use a PackedStringArray for the "open in new inspector" editor setting
This is safer and provides a more convenient array editor for users.
2022-07-30 21:00:22 +02:00
4a127cb5fe Improve usability of non-default values in the property inspector
- Provide a visual indication that a (sub)group contains non-default (revertable) values when it's collapsed.
- Add a new option to the inspector's tools menu for expanding only (sub)groups containing properties with non-default values.
2022-07-30 15:25:45 +02:00
74d92bf459 Merge pull request #43081 from KoBeWi/property_keeper
Keep property values when extending script
2022-07-29 19:29:52 +02:00
44cf3c22ac Keep property values when extending script 2022-07-29 16:57:50 +02:00
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
993b41198c Fix code font usage in EditorPropertyMultilineText
- Only use code font while in expression mode
- Use code font and syntax highlighter in big text box
2022-07-27 09:58:18 -05:00
3084a48ace Merge pull request #63219 from reduz/implement-vector4-projection 2022-07-25 11:13:27 +02:00
455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
a5bc65bbad Merge pull request #63265 from reduz/stream-bpm-support
Implement BPM support in AudioStream files.
2022-07-23 11:21:14 +02:00
d1ddee2258 Implement BPM support
Based on #62896, only implements the BPM support part.

* Implements BPM support in the AudioStreamOGG/MP3 importers.
* Can select BPM/Bar Size and total beats in a song file, as well as edit looping points.
* Looping is now BPM aware
* Added a special importer UI for configuring this.
* Added a special preview showing the audio waveform as well as the playback position in the resource picker.
* Renamed `AudioStream::instance` to `instantiate` for correctness.
2022-07-23 07:31:17 +02:00
e5df1e65f9 Merge pull request #62581 from Guh-Feng/Color-Picker-Update 2022-07-22 23:46:27 +02:00
07118d7094 Fix in editor drag and dropping a Node to generic NodePath property 2022-07-22 18:32:36 +02:00
1b8652e86a Color Pickers Respect Settings
Updated editor_node with function that sets up color pickers throughout Godot to respect editor's settings.
2022-07-21 18:11:09 -04:00
caa0cdaac6 Use menu icon for layers grid button 2022-07-17 00:42:23 -05:00
b942c1ffe3 Merge pull request #62827 from fire-forge/ok-cancel
Add `ok_button_text` to AcceptDialog and `cancel_button_text` to ConfirmationDialog
2022-07-13 14:10:38 +02:00
e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
7d3ff927de Merge pull request #62075 from Vitika9/gsoc-colorpicker 2022-07-08 09:06:47 +02:00
0011d93c81 ColorPicker Refactor 2022-07-06 22:11:43 +05:30
31745a8b15 Fix drag'n drop type check for NodePaths 2022-07-04 20:10:40 +02:00
d56185146d Add editor properties for Callable and Signal 2022-06-30 17:39:10 +02:00
4c14bf7482 Merge pull request #62470 from vnen/gdscript-export-nodes
GDScript: Enable exporting nodes to the inspector
2022-06-28 08:07:00 +02:00
9490146a16 GDScript: Enable exporting nodes to the inspector
Also fix an small issue in the property editor for NodePath trying to
use the meta property when not needed.
2022-06-27 18:42:52 -03:00
9ddebc0c22 Add a const call mode to Object, Variant and Script.
For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script).

This mode ensures only const functions can be called, making it safe to use from the editor.

Co-Authored-By: reduz <reduzio@gmail.com>
2022-06-27 13:33:06 -07:00
fbc3777467 Merge pull request #62185 from reduz/export-node-pointer-path
Add ability to export Node pointers as NodePaths
2022-06-27 11:14:36 +02:00
b7c41f9ba1 Add ability to export Node pointers as NodePaths
This PR implements:
* A new hint: PROPERTY_HINT_NODE_TYPE for variant type OBJECT, which can take specific node types as hint string.
* The editor will show it as a node path, but will set it as a pointer to a node from the current scene if you select a path.
* When scene is saved, the node path is saved, then restored as a pointer.

NOTE: This is a proof of concept and this approach will most likely not work. The reason if that, if the node referenced is deleted, then when trying to edit this the node will become invalid.

Potential workarounds: Since this uses the Variant API, it should obtain the pointer from the Variant object ID. Yet, this would either only really work in GDScript or it would need to be implemented with workarounds in every language.
Alternative ways to make this work: Nodes could export an additional property with a node path (like for which_node, it could be which_node_path).
Another alternative: Path editing could happen as a hidden metadata (ignoring the pointer).
2022-06-25 15:50:15 +02:00
6c1ac9f3be Rename export_range's noslider option to no_slider 2022-06-24 10:45:34 +02:00
5786516d4d Implement Running Godot as Movie Writer
* Allows running the game in "movie writer" mode.
* It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time).
* If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult.
* Implements a simple, default MJPEG writer.

This new features has two main use cases, which have high demand:
* Saving game videos in high quality and ensuring the frame rate is *completely* stable, always.
* Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this).

**Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly).

Usage:

$ godot --write-movie movie.avi [scene_file.tscn]

Missing:

* Options for configuring video writing via GLOBAL_DEF
* UI Menu for launching with this mode from the editor.
* Add to list of command line options.
* Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
2022-06-21 11:28:47 +02:00
3ed980a4b7 Add drag and drop support to EditorPropertyPath 2022-06-16 20:08:14 +03:00
5553e27fe8 Add vector value linking
Co-authored-by: redlamp <244062+redlamp@users.noreply.github.com>
2022-06-14 14:58:44 +02:00
4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
4922fee09e Merge pull request #59770 from fire-forge/rounded-corners 2022-06-10 10:53:09 +02:00
329818f20b Support explicit values in flag properties, add C# flags support
- Add support for explicit values in properties using `PROPERTY_HINT_FLAGS`
that works the same way it does for enums.
- Fix enums and flags in VisualScriptEditor (it wasn't considering the
explicit value).
- Use `PROPERTY_HINT_FLAGS` for C# enums with the FlagsAttribute instead
of `PROPERTY_HINT_ENUM`.
2022-06-03 05:19:01 +02:00
a1899111be Use Spatial shader as default for Mesh 2022-05-26 20:46:17 +02:00
9bc6f44c80 Add rounded corners to EditorProperty and EditorSpinSlider
- Adds rounded corners to the EditorProperty child background, EditorSpinSlider label background, and resource sub-inspector borders and background.
- Allows customizing EditorSpinSlider label background through a new Theme StyleBox property, label_bg.
- Makes margins consistent in resource sub-inspectors.
- Removes space between buttons in NodePath, Resource, and multiline string editors.
- Adds space between label background and content for vertical property editors.
2022-05-25 15:31:30 -05:00
5dc3bfb80e Use suffixes for units in nodes and resources 2022-05-19 14:34:27 -05:00
9a1054d942 Tweak minsize of editor ColorPickerButtons 2022-05-19 15:20:46 +02:00
180e5d3028 Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
fd490c95a5 Fix wrong condition checking for foreign resources 2022-04-30 00:12:22 +02:00
50495bcb08 Allow using other property hints without the range hint 2022-04-26 07:54:25 -05:00
df4de306a9 Merge pull request #60490 from aaronfranke/dap-typo 2022-04-25 16:51:09 +02:00
e246d08c52 Merge pull request #60500 from KoBeWi/scene_crasher 2022-04-25 16:50:17 +02:00
02bb8e948f Merge pull request #60261 from fire-forge/theme-prop-renames 2022-04-25 16:20:19 +02:00