summaryrefslogtreecommitdiffstats
path: root/modules/visual_script
Commit message (Collapse)AuthorAgeFilesLines
* Make all String float conversion methods be 64-bitAaron Franke2020-07-271-1/+1
|
* Make unsaved scripts in the script editor more user-friendlyAndrii Doroshenko (Xrayez)2020-07-261-1/+8
| | | | | | | | | | | | | | | Unsaved scripts were previously displayed with blank tabs, which are mostly a result of deleted or improperly moved scripts. This patch makes sure that those kind of scripts are displayed as "[unsaved]" now, and ensures that scripts are removed from the list while deleting scripts from the filesystem dock preventing the unsaved tabs to appear in the first place (a user is already prompted with "no undo" warning while deleting any file). A user is always prompted to save those "[unsaved]" scripts if they attempt to close them without saving in any case except as described above.
* Merge pull request #33760 from nekomatata/script-editor-init-optimizationRémi Verschelde2020-07-262-0/+6
|\ | | | | Optimized ScriptEditor initialization when many scripts are loaded
| * Optimized ScriptEditor initialization when many scripts are loadedPouleyKetchoupp2020-07-172-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change avoids the editor to freeze for several seconds when a project with lots of scripts is loaded in the editor. It focuses on a few heavy operations previously executed on all previously loaded scripts: - Initialize script resource (script validation/parsing) only on focus - ScriptTextEditor: code editor and edit menu are added to the scene only on focus - Add to recent scripts only when opening new scripts (load/save scene metadata)
* | VisualScript: Fix -Wduplicate-branches warningRémi Verschelde2020-07-221-7/+1
|/ | | | When VSDEBUG is a no-op (default), those branches did the same (nothing).
* Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighterPaulb232020-07-112-4/+4
| | | | | | | | - Extacted all syntax highlighting code from text edit - Removed enable syntax highlighting from text edit - Added line_edited_from signal to text_edit - Renamed get/set_syntax_highlighting to get/set_syntax_highlighter - Added EditorSyntaxHighligher
* Expose Syntax highlighter for editor pluginsPaulb232020-07-111-0/+2
|
* Convert syntax highlighters into a resourcePaulb232020-07-112-4/+4
|
* Add override keywords.Marcel Admiraal2020-07-108-541/+537
|
* DocData: Skip language-specific ClassDoc without methods/constantsRémi Verschelde2020-06-172-16/+0
| | | | Removes the useless `@C#`, `@NativeScript` and `@VisualScript` entries.
* Merge pull request #39041 from swarnimarun/patch-1Rémi Verschelde2020-06-041-0/+6
|\ | | | | Fix crashing of VisualScript due to function change
| * Fix crashing of VisualScript due to...Swarnim Arun2020-05-251-0/+6
| | | | | | | | | | Attempting to move the function node to another function whose data connection is a dependency of the node the specific node being moved to a different function during changes to sequence connections. By skipping, if the from_node is a function_node during the data connection dependencies scan. Should fix #37991
* | Use translated docs in PropertySelectorRémi Verschelde2020-05-281-5/+5
|/ | | | | | And do the dedent and stripping for both translated and non-translated strings for consistency, and so that we don't need to do it at the call site.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-1412-477/+869
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-148-0/+153
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-1418-1493/+0
| | | | | | | | | | | | | | 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.
* Enforce use of bool literals instead of integersRémi Verschelde2020-05-141-3/+3
| | | | | Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-103-124/+356
| | | | Part of #33027.
* Rename InputFilter back to InputRémi Verschelde2020-04-283-20/+20
| | | | | | | | | | | | | | | | 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.
* Add ability to bind typed arrays to script APIJuan Linietsky2020-04-212-0/+6
| | | | | | | Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells Note: Will do a mass replace on later PRs of whathever I can find, but probably need a tool to grep through doc. Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
* Change MATH_POSMOD return type back to INTNico Mitchell2020-04-141-1/+3
|
* Change round return type to floatNico Mitchell2020-04-131-1/+1
|
* Merge pull request #37542 from swarnimarun/patch_vs_02Rémi Verschelde2020-04-122-0/+25
|\ | | | | Update visualscript graph nodes on visual script variable edit
| * Update vsnodes on editing vs variablesSwarnim Arun2020-04-032-0/+25
| |
* | Merge pull request #37530 from swarnimarun/patch_vs_01Rémi Verschelde2020-04-102-0/+19
|\ \ | | | | | | VisualScript support for newly added Variant types
| * | VisualScript styling for new Variant TypesSwarnim Arun2020-04-031-0/+16
| | |
| * | Deconstruct VSNodes for new Variant typesSwarnim Arun2020-04-021-0/+3
| |/
* / Remove Node.get_position_in_parent()Tomasz Chabora2020-04-061-1/+1
|/
* Replace NULL with nullptrlupoDharkael2020-04-0211-123/+123
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-302-2/+5
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Popups are now windows also (broken!)Juan Linietsky2020-03-263-116/+116
|
* Working multiple window support, including editorJuan Linietsky2020-03-264-48/+42
|
* Refactored input, goes all via windows now.Juan Linietsky2020-03-262-19/+19
| | | | Also renamed Input to InputFilter because all it does is filter events.
* Added a Window node, and made it the scene root.Juan Linietsky2020-03-262-2/+2
| | | | Still a lot of work to do.
* Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky2020-03-262-2/+2
|
* Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-0/+5
| | | | This addresses the issue godotengine/godot#37143
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-175-28/+28
| | | | | | | | | | 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`.
* Merge pull request #36723 from AndreaCatania/fix-rsetRémi Verschelde2020-03-131-2/+2
|\ | | | | Fixed rset method for gdscript and visual script
| * Fixed rset method for gdscript and visual scriptAndrea Catania2020-03-021-2/+2
| |
* | Fix various typosluz.paz2020-03-111-1/+1
| | | | | | Found via `codespell`
* | Merge pull request #36751 from Faless/debugger/threads_and_profilersRémi Verschelde2020-03-092-21/+23
|\ \ | | | | | | ScriptDebugger refactor, threading, profilers.
| * | Refactor ScriptDebugger.Fabio Alessandrelli2020-03-082-21/+23
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EngineDebugger is the new interface to access the debugger. It tries to be as agnostic as possible on the data that various subsystems can expose. It allows 2 types of interactions: - Profilers: A subsystem can register a profiler, assigning it a unique name. That name can be used to activate the profiler or add data to it. The registered profiler can be composed of up to 3 functions: - Toggle: called when the profiler is activated/deactivated. - Add: called whenever data is added to the debugger (via `EngineDebugger::profiler_add_frame_data`) - Tick: called every frame (during idle), receives frame times. - Captures: (Only relevant in remote debugger for now) A subsystem can register a capture, assigning it a unique name. When receiving a message, the remote debugger will check if it starts with `[prefix]:` and call the associated capture with name `prefix`. Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new profiler system. Port SceneDebugger and RemoteDebugger to the new capture system. The LocalDebugger also uses the new profiler system for scripts profiling.
* / Fix missing module editor iconsAndrii Doroshenko (Xrayez)2020-03-081-0/+0
|/ | | | | | | Module icons need to be renamed to PascalCase as well for them to be registered in 4.0. See godotengine/godot#36513.
* Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde2020-03-012-2/+2
|\ | | | | Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
| * Rename `scancode` to `keycode`.bruvzg2020-02-252-2/+2
| | | | | | | | | | Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
* | Signals: Port more uses of connect_compatRémi Verschelde2020-02-282-7/+9
| | | | | | | | | | | | | | | | | | Those were problematic as they call a method of their parent class, but callable_mp does not allow that unless it's public. To solve it, we declare a local class that calls the parent class' method, which now needs to be protected to be accessible in the derived class.
* | Signals: Manually port most of remaining connect_compat usesRémi Verschelde2020-02-281-2/+2
| | | | | | | | | | | | | | | | It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
* | Signals: Port connect calls to use callable_mpRémi Verschelde2020-02-284-126/+63
| | | | | | | | | | | | | | | | | | 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.)
* | Merge pull request #36556 from RandomShaper/rework_mutexRémi Verschelde2020-02-282-19/+9
|\ \ | | | | | | Reimplement `Mutex` with C++'s `<mutex>` (plus more)
| * | Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-262-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.