summaryrefslogtreecommitdiff
path: root/scene/gui/graph_edit.h
AgeCommit message (Collapse)Author
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-12-02Improve usage of StringNames in GraphEditkobewi
2022-09-19Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron
2022-09-14Add configuration warning to GraphEdit regarding future refactoringHendrik Brucker
2022-09-09Improve parameter naming and documentation in GraphEdit and GraphNodeYuri Sizov
Co-authored-by: Maganty Rushyendra <mrushyendra@yahoo.com.sg>
2022-09-05Add GraphNode 'selected' and 'deselected' signals, simplify GraphEditMaxim Kulkin
2022-08-25Add read-only mode to AnimationTreeEditor pluginsSaracenOne
2022-08-23Replace Array return types with TypedArray 2kobewi
2022-07-31 Add GraphEdit.is_node_hover_valid(...) methodJohannes Witt
This is a virtual method that can be used to add additional error condition checks while the connection is still being dragged. If true is returned, the connection is valid. If false is returned, the connection is invalid and thus not possible (ie. it will not snap). The virtual method is exposed with an underscore to scripts.
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-05-30Improve Graphedit connection linesHendrik Brucker
2022-05-30Improve and fix the GraphNode port hotzonesHendrik Brucker
Co-authored-by: Ansraer <jacky2611@gmail.com>
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-01-23Minor tweaks and fixes to panningkobewi
2022-01-21Add ViewPanner to 2D editorkobewi
2022-01-11Unify panning in sub-editors and make it configurablekobewi
2022-01-07Merge pull request #56321 from pycbouh/core-use-gdvirtual-everywhereRémi Verschelde
2022-01-06Add `GraphEdit` drag notificationsJohannes Witt
This commit adds two signals: * connection_drag_begun, which is emitted when a connection is started to be created by the user and * `connection_drag_ended`, which is emitted when no longer a connection is created. Additionally `force_connection_drag_end()` adds the possibility to end the connection dragging. If called from user code, no other connection request signals are invoked. This is useful to add `GraphNode`s via shortcuts while the user is dragging a connection to directly connect the newly added node.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-29Use GDVIRTUAL* macros when binding virtual methods in exposed classesYuri Sizov
2021-12-15Merge pull request #52015 from mechPenSketch/expose_hotzones2Rémi Verschelde
Expose connection hot zones in `GraphNode`
2021-12-12Expose connection hot zones in GraphNodemechPenSketch
2021-11-15Making nodes enclosed within comment move with the comment nodeUmang Kalra
2021-08-23Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-22Make GraphEdit connections consistent on zoomJummit
2021-08-21Refactor GraphEdit connectionsJummit
Remove duplicate bezier code and use Curve instead. Add an overridable method for retrieving the points of a connection line, which makes it posible to create custom connections lines.
2021-08-12Better port handling connection for `GraphEdit`Yuri Roubinsky
2021-08-11Automatic arrangement of nodes in VisualScript/VisualShaders editorsUmang Kalra
This PR and commit adds the functionality to arrange nodes in VisualScript/VisualShader editor. The layout generated by this feature is compact, with minimum crossings between connections & uniform horizontal & vertical gaps between the nodes. This work has been sponsored by GSoC '21. Full list of additions/changes: • Added arrange_nodes() method in GraphEdit module. • This method computes new positions for all the selected nodes by forming blocks and compressing them. The nodes are moved to these new positions. • Adding this method to GraphEdit makes it available for use in VisualScript/VisualShaders editors and its other subclasses. • Button with an icon has been added to call arrange_nodes() in GraphEdit. • This button is inherited by VisualScript/VisualShaders editors to invoke the method. • Undo/redo is functional with this method. • By using signals in arrange_nodes(), position changes are registered in undo/redo stack of the subclass that is using the method. • Metadata of the method has been updated in ClassDB • Method description has been added to class reference of GraphEdit
2021-06-25Remove clips_input() method and use clip_contentkobewi
2021-06-16Make zoom limits and step adjustable in GraphEditYuri Sizov
2021-06-10Move default values from definition to declaration in GraphEditMarcel Admiraal
2021-03-25Fix typo 'previus_selected'volzhs
2021-02-11Merge pull request #45870 from gongpha/graphedit-connection-updateRémi Verschelde
Update GraphEdit when GraphNode's slot is updated
2021-02-11Update GraphEdit when GraphNode's slot is updatedKongfa Waroros
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-18Added GraphEdit properties to control lines thickness and antialiasingYuri Roubinsky
2020-12-17FIx visual issues with GraphEdit minimapYuri Sizov
2020-11-30Add a minimap to the GraphEditYuri Sizov
2020-10-19Fix emit_signal timing for GraphEdit's begin/end node moveGabriel Van Eyck
2020-07-10Add override keywords.Marcel Admiraal
2020-07-04Prevents incorrect connection attempt on port clicking in GraphEditYuri Roubinsky
Prevents incorrect connection attempt on port clicking in GraphEdit
2020-06-19Remove ToolButton in favor of ButtonHugo Locurcio
ToolButton has no redeeming differences with Button; it's just a Button with the Flat property enabled by default. Removing it avoids some confusion when creating GUIs. Existing ToolButtons will be converted to Buttons, but the Flat property won't be enabled automatically. This closes https://github.com/godotengine/godot-proposals/issues/1081.
2020-05-16Remove get_local_mouse_position() hack in GraphEditsmartin015
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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-04-15Add "node_unselected" signal for GraphEditasheraryam