Commit Graph

826 Commits

Author SHA1 Message Date
Rémi Verschelde
387efc7900 Merge pull request #60261 from fire-forge/theme-prop-renames 2022-04-25 16:20:19 +02:00
FireForge
c0187cc0a1 Rename theme properties to include underscores
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
David Cambré
ea620759ca Improve VisualScript search and instancing of nodes
Constructors are more accessible.
Basic type methods are now based on ClassDB and not registerd_node_names.
Selecting search_classes now automatically changes the scope.
2022-04-17 15:21:26 +02:00
Nicholas Huelin
d2a3675ec8 Fix Visual Script's jump to function relative to zoom
When double-clicking on a function name the graph will now correctly jump to the function relative to the zoom ratio.
2022-04-12 15:27:49 +02:00
Rémi Verschelde
860d2f7d15 Merge pull request #59911 from bruvzg/cppcheck_fixes 2022-04-06 15:47:20 +02:00
bruvzg
4a042e3d08 Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
Rémi Verschelde
cb57575743 Merge pull request #59867 from akien-mga/refactor-zero-initialize-all-pointers 2022-04-04 21:24:27 +02:00
Rémi Verschelde
b00aef8f29 Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
reduz
bfa2d0d0d9 Add GDExtension support to Script
* Ability to create script languages from GDExtension
* Some additions to gdnative_extension.h to make this happen
* Moved the GDExtension binder to core

This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x.
Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
2022-03-27 16:13:00 +02:00
Aaron Franke
d1feea8ccb Initialize bools in the headers in editor 2022-03-12 13:34:06 -06:00
Rémi Verschelde
398c124b9a Merge pull request #59035 from timothyqiu/vs-rtr
Use `RTR()` for `VisualScriptNode` captions and texts
2022-03-11 19:26:11 +01:00
Haoyu Qiu
34614b544a Use RTR() for VisualScriptNode captions and texts 2022-03-11 23:36:16 +08:00
reduz
8c4feb0e52 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
reduz
00e3a9b7a1 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
Raul Santos
e9e0b643ef Sort variables in VisualScriptEditor
Sorts the script variables in alphabetical order to display them
in VisualScriptEditor.
2022-02-24 21:18:02 +01:00
megalobyte
f649a96f6a Don't process VisualScriptNodes 2022-02-19 14:33:27 -05:00
Rémi Verschelde
de2d041f6e Merge pull request #58187 from jakobbouchard/notification-switch-chunk-c
Convert _notification methods to switch - Chunk C
2022-02-16 20:58:55 +01:00
Jakob Bouchard
2768f4bb23 Convert _notification methods to switch - Chunk C 2022-02-16 13:03:05 -05:00
Rémi Verschelde
87b164e5a7 Merge pull request #58190 from MisoMosiSpy/vs_icons 2022-02-16 17:18:15 +01:00
MisoMosiSpy
3183e25ca4 Added icons for missing types in visual script’s icon list. 2022-02-16 20:31:18 +05:30
Rémi Verschelde
83def92d87 Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Haoyu Qiu
022c73fcb6 Fix VisualScript crash when using Set Index node 2022-02-16 15:27:41 +08:00
Rémi Verschelde
02425e4d48 Merge pull request #58136 from akien-mga/editor-includes-cleanup 2022-02-15 16:22:11 +01:00
Rémi Verschelde
92165cb7c1 Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
Hugo Locurcio
c60bf051e0 Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
Rémi Verschelde
bd3a47e3c3 Merge pull request #57954 from TokageItLab/refactor-cubic-interpolate
Implement `cubic_interpolate()` as MathFunc for refactoring
2022-02-13 10:34:13 +01:00
jmb462
285bc6bfa2 Fix renaming function dialog in VisualScript does not work correctly 2022-02-12 21:28:28 +01:00
Silc 'Tokage' Renew
1cc952bc43 Implement cubic_interpolate() as MathFunc for refactoring 2022-02-12 18:11:17 +09:00
Rémi Verschelde
a46cf2baf1 Merge pull request #57909 from akien-mga/codespell 2022-02-10 15:16:04 +01:00
Rémi Verschelde
2d58a2091e Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Rémi Verschelde
b7df73244f Merge pull request #57796 from akien-mga/revert-sname-theme-setters 2022-02-08 11:13:24 +01:00
Rémi Verschelde
7b93c2e6ab Re-add missing SNAME macros in get_theme_* calls
They were removed in the previous commit reverting the addition of `SNAME`
to `add_theme_*` and theme setter methods, which is not wanted.
2022-02-08 10:31:56 +01:00
Rémi Verschelde
e7f16d8a1e Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit 48a1cb7c96.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
Rémi Verschelde
fa316dc084 Refactor some object type checking code with cast_to
Less stringly typed logic, and less String allocations and comparisons.
2022-02-08 10:08:34 +01:00
jmb462
48a1cb7c96 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
bruvzg
96200e990d Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
Rémi Verschelde
6a776b9b29 Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
2022-02-03 22:21:24 +01:00
Anilforextra
7e95de1c59 String: Add contains(). 2022-02-04 01:28:02 +05:45
Rémi Verschelde
b68f34f3ed Merge pull request #57467 from webbuf/modules-initialize
Initialized Member Variables in /modules
2022-02-03 20:41:29 +01:00
zwebb
cc3a9884da initialized member variables in header 2022-02-03 11:14:42 -05:00
bruvzg
660970bd1f Add support for the escaped UTF-16 and UTF-32 Unicode characters in the scripts and expressions. 2022-01-30 20:16:04 +02:00
Nathan Franke
b5a6de95e4 simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
Yuri Sizov
a2cdc388a7 Update icons and color conversion rules to simplify the palette 2022-01-29 01:03:39 +03:00
Rémi Verschelde
bd0bbdcd7d Merge pull request #57080 from KoBeWi/ULTIMATER_PANNING 2022-01-23 16:03:35 +01:00
kobewi
f5cda30606 Minor tweaks and fixes to panning 2022-01-23 13:49:53 +01:00
Rémi Verschelde
466c7d20e1 Merge pull request #57000 from KoBeWi/UNLIMITED_PANNING 2022-01-23 00:47:52 +01:00
kobewi
f869309c77 Add ViewPanner to 2D editor 2022-01-21 18:35:06 +01:00
Rémi Verschelde
2f77495c2c Merge pull request #56252 from Gallilus/Update-visual-script-property-selector 2022-01-21 10:35:19 +01:00
Rémi Verschelde
fc862658e8 Merge pull request #55066 from trollodel/less_singletons_in_editornode 2022-01-20 22:29:17 +01:00
Rémi Verschelde
0eea7638c2 Merge pull request #52134 from RandomShaper/fix_naming 2022-01-20 22:01:37 +01:00