Commit Graph

224 Commits

Author SHA1 Message Date
Rémi Verschelde 9d2e8f2f27
Variant: Rename Type::_RID to Type::RID
The underscore prefix was used to avoid the conflict between the `RID` class
name and the matching enum value in `Variant::Type`.

This can be fixed differently by prefixing uses of the `RID` class in `Variant`
with the scope resolution operator, as done already for `AABB`.
2020-11-09 16:29:04 +01:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Yuri Roubinsky d87e645bcf Fix custom property editor to correctly show Basis 2020-10-22 08:41:35 +03:00
Aaron Franke 56e2c6c704
Make all String float conversion methods be 64-bit 2020-07-27 18:38:53 -04:00
Stijn Hinlopen 526e060b73 Resize dialogs (FileDialog, EditorFileDialog, Reparent, SceneTreeDialog and resource depency dialogs). 2020-07-14 14:35:22 +02:00
Rémi Verschelde a8a2769bb6
Merge pull request #38713 from aaronfranke/string-64bit
Make all String integer conversion methods be 64-bit
2020-07-01 16:01:05 +02:00
Yuri Roubinsky f6ed465613 Fix custom property editor layout 2020-06-10 18:03:32 +03:00
Aaron Franke bb8aa107fd
Remove 32-bit String to_int method 2020-06-03 00:03:34 -04:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 94721f5ab8 Revert "Renamed plane's d to distance"
This reverts commit ec7b481170.

This was wrong, `d` is not a distance but the `d` constant in the
parametric equation `ax + by + cz = d` describing the plane.
2020-05-10 16:47:11 +02:00
Marcus Elg ec7b481170 Renamed plane's d to distance 2020-05-10 12:12:51 +02:00
Rémi Verschelde fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
Tomasz Chabora c1023157eb Remove Node.get_position_in_parent() 2020-04-06 01:19:20 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Juan Linietsky 8e6960a69e Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26 15:49:39 +01:00
Juan Linietsky 9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Juan Linietsky 4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +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
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 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 867d073b98 Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr. 2020-02-15 08:36:04 -03:00
Juan Linietsky cf8c679a23 ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits. 2020-02-12 14:24:54 -03: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 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
Anubhab Ghosh 4972ef801a Add clear menu entries for extending and replacing scripts 2019-10-23 01:57:17 +05:30
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
qarmin 6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
qarmin 4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02: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
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01: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 f3835282c4 Small capitalization fixes across the editor 2018-10-26 16:11:36 -03:00
Ignacio Etcheverry 57f46f7fcd Fix enum values in the editor and hide enum numeric values in the Inspector
- Hide numeric value of enum constants in the inspector (EditorPropertyEnum)
- EditorPropertyEnum, CustomPropertyEditor: Calculate values of enum constants correctly when only some of these constants have explicit values.
2018-10-15 23:48:54 +02:00
DualMatrix f483460e38 Removed obsoleted core/helper/value_evaluator.h and moved math_fieldwise to core/math/
Removed obsoleted core/helper/value_evaluator.h and moved math_fieldwise to core/math/
2018-09-23 14:58:15 +02:00
K. S. Ernest (iFire) Lee e8f993677d Update visual scripting to use new expression class #20885 2018-09-13 12:53:14 -07:00
Rémi Verschelde ed8b75a3e1 Drop obsolete PropertyEditor and SectionedPropertyEditor code
Replaced by EditorInspector.
2018-09-11 16:16:11 +02:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Will Nations 6d9cc032e7 Add custom icons to script classes. 2018-08-14 14:18:05 -05:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Chaosus 982c4d7d5c Few fixes for editor tab in editor settings 2018-07-20 13:22:22 +03:00
Chaosus cf38270ef7 Increase settings apply speed and added deferred color apply 2018-05-31 11:33:36 +03:00
Juan Linietsky 005b69cf6e -New inspector.
-Changed UI resizing code, gained huge amount of speed.
-Reorganized timer sync to clean up behavior (sorry forgot commit this before)

-
2018-05-15 17:14:31 -03:00
Rémi Verschelde 460e551ddf
Merge pull request #16418 from bojidar-bg/15961-gdscript-array-export
Allow exporting arrays of resources in GDScript
2018-05-03 21:19:15 +02:00
Hugo Locurcio 1c419531a0 Change ".." punctuation for "..." in editor strings (#16507) 2018-04-22 19:36:01 +02:00
Chaosus 56a6d90f36 Fix #18058 regression 2018-04-08 20:01:38 +03:00
Juan Linietsky 2f4f8de459
Merge pull request #16995 from mrcdk/custom_resources_inspector
The inspector will show the custom resources added via plugin
2018-04-08 11:49:34 -03:00
Bojidar Marinov 9f6c0c6eae
Duplicate Arrays and Dictionaries when instancing scene in editor
Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate

Fixes #13971
2018-03-13 17:18:08 +02:00
MrCdK 97e77688bb Now the inspector will show the custom resources added via plugin 2018-02-25 01:41:26 +01:00
Rémi Verschelde a2a216ac56
Merge pull request #15505 from YeldhamDev/type_icons
Re-enabled type icons
2018-02-14 16:58:22 +01:00
Bojidar Marinov d855fdb451
Allow exporting arrays of resources in GDScript
Fixes #15961
2018-02-05 16:41:13 +02:00
Andreas Haas 122837e73a
PropertyEditor: Add missing MAKE_PROPSELECT.
Fixes #15745
2018-01-15 19:43:32 +01:00
Michael Alexsander Silva Dias f7547a7f28 Re-enabled type icons. 2018-01-08 18:46:59 -02:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
volzhs 1876999b3a Fix get_edited_scene_root error at starting editor
Fix #15300
2018-01-05 03:55:43 +09:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Noshyaar e6b6683694
Merge pull request #14991 from djrm/pr_fixes
Show Options Dialog for NodePath and File in clicked button position.
2017-12-27 10:29:25 +07:00
volzhs cc1d56e3ff Fix popup menu size in Inspector dock 2017-12-25 19:31:53 +09:00
Daniel J. Ramirez 07fd5456c8 Show Options Dialog for NodePath and File in clicked button position.
Auto select newly created nodes.
2017-12-23 15:15:48 -06:00
Michael Alexsander Silva Dias e86454fb38 Fixes and modifications for some dialogs. 2017-12-21 15:26:46 -02:00
Ray Koopa 0d04f212a3 Clean up setting dialogues a bit. 2017-12-17 18:39:36 +01:00
Rémi Verschelde 3adae8599c
Merge pull request #14698 from carlosfvieira/6382-Properties_in_the_inspector_lacking_tooltips
Proposed change to close issue "#6382 - Properties in the inspector lacking tooltips"
2017-12-16 15:05:09 +01:00
Michael Alexsander Silva Dias e73486aed4 Made multiline property editor deselect text when opening. 2017-12-15 22:46:36 -02:00
carlosfvieira 30acd5f834 closes godotengine/godot#6382 - traverse classes docs so that all properties from inherited classes have tooltips accordingly 2017-12-16 00:24:39 +00:00
Poommetee Ketson 24df9f3707 Enhance undoredo action name, TTR, cleanup 2017-12-12 23:04:37 +07:00
Ray Koopa d0ebcb61c8 Highlight Editor Settings categories 2017-12-11 13:13:17 +01:00
Rémi Verschelde 2b41afb30e Fix wrong return value in some virtual method bindings 2017-12-10 15:34:08 +01:00
Rémi Verschelde 7d735da6aa
Merge pull request #13351 from poke1024/fix12451_2
Make click on arrow properly open and close property editor modals
2017-12-10 11:58:36 +01:00
Bernhard Liebl efc3ffb816 fix certain popup close clicks with popup buttons 2017-12-10 10:55:48 +01:00
Rémi Verschelde 028f959fb1 PropertyEditor: Filter out resource_local_to_scene
This lets the empty "Global" category disappear again.
Also silence a debug print.
2017-12-10 00:18:10 +01:00
Rémi Verschelde 626eebdec4 PropertyEditor: Fix display of property doc in tooltip 2017-12-09 22:54:12 +01:00
Ray Koopa cae50c7f1d Remove layer flyout label. 2017-12-09 17:42:24 +01:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Rémi Verschelde e3155071bc
Merge pull request #13958 from jjjuande/fix_revert_button
Fix the revert button issue with instanced nodes
2017-12-07 00:30:07 +01:00
Juan Linietsky 86fcc39fa9 Fix and rewrite folding logic, closes #14005, closes #13421 2017-12-06 19:07:17 -03:00
Juande 0a5cf37a75 Fix the revert button issue with instanced nodes
The method "check_reload_status" on the file "property_editor.cpp" didn't take into account if the field is a property of an instanced node just like the "update_tree" does. The code that checks this in "update_tree" has been extracted into the method "_is_instanced_node_with_original_property_different" to be also used in "check_reload_status".

Fixes #13415
2017-12-04 14:17:58 +01:00
Unknown 1d26c51856 Some untranslated UI strings 2017-12-02 16:59:45 +07:00
Dmitry Koteroff 45c5a865c2 Small fixes to #13233 2017-11-28 16:53:40 +03:00
Rémi Verschelde 03a2cf2f94
Merge pull request #13240 from Krakean/fix_interpretcomma_as_decimalpoint
Makes possible to interpret comma as decimal point in editor
2017-11-27 00:55:40 +01:00
Dmitry Koteroff a4109200aa Makes possible to interpret comma as decimal point in editor 2017-11-26 23:08:16 +03:00
Dmitry Koteroff aa20a84aa9 Implemented a collapse/expand all feature request for Inspector (issue #9427) via popup of "Object properties" button.
Editor Settings->Interface->Editor: added "Expand All Properties" option. Off by default.

Cosmetics fixes due to @Reduz notes.
2017-11-24 14:08:44 +03:00
Rémi Verschelde 6065b2d177
Merge pull request #11940 from GodotExplorer/debugger
Enhanced debugger for godot 3.0
2017-11-20 22:55:49 +01:00
Rémi Verschelde 7b5c447301
Merge pull request #12952 from bojidar-bg/12392-export-enums
Allow exporting enums from GDScript
2017-11-20 09:11:46 +01:00
Ferenc Arn d28763a4c1 Rename Rect3 to AABB.
Fixes #12973.
2017-11-17 11:01:41 -05:00
Bojidar Marinov e4a36d0eda
Allow exporting enums from GDScript
Use as `export(E) ...`
Closes #12392
2017-11-17 14:33:36 +02:00
geequlim c655fc7cd8 Better supported for remote object editing with the inspector with a simple dictionary editor implement 2017-11-17 09:20:33 +08:00
Daniel J. Ramirez 01512efbe6 Removed show type icons option 2017-11-09 19:45:21 -06:00
Jake Larson 5e641153a6 Fixed interface scaling issues with editor action button and value editor popovers 2017-10-27 19:22:52 -05:00
Rémi Verschelde ad85224ebc Merge pull request #12432 from larsonjj/fix/property_editor_action_buttons
Fix editor action button layout
2017-10-27 13:24:43 +02:00
Jake Larson 6c889a3ab5 Fix editor action button layout 2017-10-27 05:55:56 -05:00
Robin Arys ae11255710 Fix text margins in value editor pop-up. 2017-10-25 12:47:52 +02:00
Suchaaver Chahal 02c7566b50 keep display int if int range 2017-10-14 12:20:04 -07:00
Suchaaver Chahal e29931b22a change step to .01 for float 2017-10-09 22:34:29 -07:00
Andreas Haas dfb6602da0
VisualScript: Fix crash with get_node(). 2017-10-06 21:24:21 +02:00