summaryrefslogtreecommitdiffstats
path: root/modules/visual_script/visual_script_editor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-107/+201
| | | | | 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-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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-141-200/+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.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-72/+200
| | | | Part of #33027.
* Rename InputFilter back to InputRémi Verschelde2020-04-281-14/+14
| | | | | | | | | | | | | | | | 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.
* Merge pull request #37542 from swarnimarun/patch_vs_02Rémi Verschelde2020-04-121-0/+5
|\ | | | | Update visualscript graph nodes on visual script variable edit
| * Update vsnodes on editing vs variablesSwarnim Arun2020-04-031-0/+5
| |
* | Merge pull request #37530 from swarnimarun/patch_vs_01Rémi Verschelde2020-04-101-0/+16
|\ \ | | | | | | VisualScript support for newly added Variant types
| * | VisualScript styling for new Variant TypesSwarnim Arun2020-04-031-0/+16
| |/
* / Remove Node.get_position_in_parent()Tomasz Chabora2020-04-061-1/+1
|/
* Replace NULL with nullptrlupoDharkael2020-04-021-11/+11
|
* Popups are now windows also (broken!)Juan Linietsky2020-03-261-83/+83
|
* Working multiple window support, including editorJuan Linietsky2020-03-261-6/+3
|
* Refactored input, goes all via windows now.Juan Linietsky2020-03-261-14/+14
| | | | 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-261-1/+1
| | | | Still a lot of work to do.
* Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky2020-03-261-1/+1
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-18/+18
| | | | | | | | | | 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 #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde2020-03-011-1/+1
|\ | | | | Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
| * Rename `scancode` to `keycode`.bruvzg2020-02-251-1/+1
| | | | | | | | | | 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 connect calls to use callable_mpRémi Verschelde2020-02-281-108/+54
| | | | | | | | | | | | | | | | | | 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.)
* | Fix resizer icon color in VisualScripts/Shaders when graph headers is onYuri Roubinsky2020-02-261-2/+10
| |
* | Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-12/+16
|/ | | | | | | | | | | | | | | | | | | | | - 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.
* Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde2020-02-231-1/+1
| | | | | | | | | | This attribute is now part of the standard we target so we no longer need compiler-specific hacks. Also enables -Wimplicit-fallthrough for Clang now that we can properly support it. It's already on by default for GCC's -Wextra. Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-55/+55
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-29/+29
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr.Juan Linietsky2020-02-151-2/+2
|
* Texture refactorJuan Linietsky2020-02-111-10/+10
| | | | | | | | -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
* Makes adding port in Visual Script nodes deferredHaoyu Qiu2020-01-141-2/+2
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Cleans up headers included in editor_node.hHaoyu Qiu2019-12-241-0/+1
|
* Makes more editor strings translatableHaoyu Qiu2019-12-211-2/+2
| | | | | | | | | | * "Add" button text in Groups Editor * "Receiver Method" in Connect Signal Dialog * "Play Mode" in Animation State Machine Editor * "Mesh Library" button text in Mesh Library editor plugin * Compose Array node button texts in Visual Script * Various button texts in TileSet Editor * Various Run Script errors
* Fixes size of create function dialogHaoyu Qiu2019-12-171-1/+1
|
* Makes more strings in editor translatableHaoyu Qiu2019-12-161-3/+3
| | | | | | * File type names in file dialogs * Layout option names * Visual shader editor UI
* Fixes wrong position when adding node in VS editorcodecustard2019-12-041-0/+1
| | | When adding a node in the visual script editor while zoomed in, the position of the newly added node would be wrong.
* Fix typos with codespellRémi Verschelde2019-11-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 1.16.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Merge pull request #32853 from OsamaElHariri/visual_script_setter_props_fixRémi Verschelde2019-11-071-1/+5
|\ | | | | Set the properties of a Set node after add_node
| * Set the properties of a Set node after add_nodeOsama El Hariri2019-10-281-1/+5
| |
* | Fix: typo atleast -> at leastOmicron2019-11-011-2/+2
| | | | | | Typo found in source string, reported by linux-man on weblate
* | i18n: Sync translation template with current sourceRémi Verschelde2019-10-291-2/+2
|/
* Remove redundant compiler directivesTimo Schwarzer2019-10-141-8/+0
| | | | Closes #32817
* Fix theme in visual script dialogs (at startup)Chaosus2019-09-301-0/+2
|
* Merge pull request #32402 from YeldhamDev/fix_vs_add_functionRémi Verschelde2019-09-291-47/+55
|\ | | | | Fix VS editor's "Create Function" dialog
| * Fix VS editor's "Create Function" dialogMichael Alexsander Silva Dias2019-09-281-47/+55
| |
* | Deconstruct node for VisualscriptSwarnim Arun2019-09-291-2/+5
|/ | | | Adds deconstruct nodes for the built-in types and adds default text to function rename_input_box for the visualscript.
* Merge pull request #32398 from YeldhamDev/cleanup_vs_editor_leftRémi Verschelde2019-09-281-25/+16
|\ | | | | Cleanup VS editor's left menu
| * Cleanup VS editor's left menuMichael Alexsander Silva Dias2019-09-271-25/+16
| |
* | Fix Edit function buttonSwarnim Arun2019-09-281-1/+1
|/
* Visualscript editor graph unification & refactoringSwarnim Arun2019-09-261-614/+1833
| | | | Removes the need to have separate graphs per function for the VisualScript Nodes, and refactoring UI and other improvements such as fuzzy search, right click search boxes and in-graph editable nodes
* Merge pull request #30852 from swarnimarun/vs_tools_scriptRémi Verschelde2019-09-221-0/+10
|\ | | | | Tool Mode for Visualscript