summaryrefslogtreecommitdiff
path: root/editor/editor_properties.cpp
AgeCommit message (Collapse)Author
2022-09-02Rename `or_lesser` range property hint to `or_less`Hugo Locurcio
"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-08-31Merge pull request #63411 from Calinou/improve-null-object-dictionary-printRémi Verschelde
Improve null and object printing to avoid confusion with arrays
2022-08-31Improve null and object printing to avoid confusion with arraysHugo Locurcio
- 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-31Fix crash when toggling flag property valueHaoyu Qiu
2022-08-29Rename `CanvasItem.update()` to `queue_redraw()`Micky
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-29Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde
NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. 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-28Merge pull request #64885 from Mickeon/rename-tooltip-hintRémi Verschelde
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-27Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record
2022-08-27Rename `hint_tooltip` to `tooltip_text` & setgetMicky
`hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
2022-08-26Merge pull request #64367 from Mickeon/rename-var-to-strRémi Verschelde
Rename `str2var` to `str_to_var` and similar
2022-08-26Rename `str2var` to `str_to_var` and similarMicky
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[macOS export] Simplify code signing options, add support for rcodesign tool ↵bruvzg
for signing and notarization.
2022-08-24Merge pull request #64691 from TokageItLab/Quaternion-editorRémi Verschelde
2022-08-24Implement Quaternion EditorSilc Renew
2022-08-23Disable editing properties in foreign resourcesSaracenOne
from imported scenes or objects returning true from a function named '_is_read_only' and disable resaving imported resources.
2022-08-08Merge pull request #63173 from fire-forge/layers-gridRémi Verschelde
2022-08-07Merge pull request #62089 from Step-an/add_drag_and_drop_to_EditorPropertyPathRémi Verschelde
2022-08-06Merge pull request #63704 from fire-forge/no-codeRémi Verschelde
Fix EditorPropertyMultilineText expression mode
2022-08-01Improve easing inspector usabilityHugo Locurcio
- 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-07-31Merge pull request #63429 from RandomShaper/indicate_overriddenRémi Verschelde
2022-07-30Use a PackedStringArray for the "open in new inspector" editor settingHugo Locurcio
This is safer and provides a more convenient array editor for users.
2022-07-30Improve usability of non-default values in the property inspectorPedro J. Estébanez
- 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-29Merge pull request #43081 from KoBeWi/property_keeperRémi Verschelde
Keep property values when extending script
2022-07-29Keep property values when extending scriptTomasz Chabora
2022-07-29Remove Signal connect bindsJuan Linietsky
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-27Fix code font usage in EditorPropertyMultilineTextFireForge
- Only use code font while in expression mode - Use code font and syntax highlighter in big text box
2022-07-25Merge pull request #63219 from reduz/implement-vector4-projectionRémi Verschelde
2022-07-23Implement Vector4, Vector4i, Projectionreduz
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-23Merge pull request #63265 from reduz/stream-bpm-supportRémi Verschelde
Implement BPM support in AudioStream files.
2022-07-23Implement BPM supportreduz
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-22Merge pull request #62581 from Guh-Feng/Color-Picker-UpdateRémi Verschelde
2022-07-22Fix in editor drag and dropping a `Node` to generic `NodePath` propertykleonc
2022-07-21Color Pickers Respect SettingsGuh-Feng
Updated editor_node with function that sets up color pickers throughout Godot to respect editor's settings.
2022-07-17Use menu icon for layers grid buttonFireForge
2022-07-13Merge pull request #62827 from fire-forge/ok-cancelRémi Verschelde
Add `ok_button_text` to AcceptDialog and `cancel_button_text` to ConfirmationDialog
2022-07-09Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialogFireForge
2022-07-08Merge pull request #62075 from Vitika9/gsoc-colorpickerRémi Verschelde
2022-07-06ColorPicker RefactorVitika9
2022-07-04Fix drag'n drop type check for NodePathsNolkaloid
2022-06-30Add editor properties for Callable and SignalMinusKube
2022-06-28Merge pull request #62470 from vnen/gdscript-export-nodesRémi Verschelde
GDScript: Enable exporting nodes to the inspector
2022-06-27GDScript: Enable exporting nodes to the inspectorGeorge Marques
Also fix an small issue in the property editor for NodePath trying to use the meta property when not needed.
2022-06-27Add a const call mode to Object, Variant and Script.K. S. Ernest (iFire) Lee
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-27Merge pull request #62185 from reduz/export-node-pointer-pathRémi Verschelde
Add ability to export Node pointers as NodePaths
2022-06-25Add ability to export Node pointers as NodePathsreduz
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-24Rename export_range's noslider option to no_sliderMarcus Elg
2022-06-21Implement Running Godot as Movie Writerreduz
* 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-16Add drag and drop support to EditorPropertyPathcow-neaz
2022-06-14Add vector value linkingkobewi
Co-authored-by: redlamp <244062+redlamp@users.noreply.github.com>
2022-06-11Add suffixes to all nodes and resourcesFireForge