Commit Graph

73 Commits

Author SHA1 Message Date
Hugo Locurcio b68dd2e189
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 b5495783b2
Merge pull request #53185 from KoBeWi/viewing_pan 2022-01-12 11:36:41 +01:00
kobewi ba7ed05792 Unify panning in sub-editors and make it configurable 2022-01-11 13:57:19 +01:00
Rémi Verschelde f20ae16e0b
Merge pull request #56323 from Gallilus/Update-default-port_grab_distance_vertical 2022-01-11 11:17:33 +01:00
Johannes Witt 4c5ceb1a97
Rename GraphEdit connection_drag_begun to connection_drag_started 2022-01-07 18:25:03 +01:00
Johannes Witt 0505b08a56
Add `GraphEdit` drag notifications
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-06 17:51:40 +01:00
David Cambré 38ad72af44 Update default port_grab_distance_vertical 2021-12-29 19:14:28 +01:00
Rémi Verschelde deb30a4108
Merge pull request #52015 from mechPenSketch/expose_hotzones2
Expose connection hot zones in `GraphNode`
2021-12-15 20:23:07 +01:00
mechPenSketch 0449b30bbc Expose connection hot zones in GraphNode 2021-12-12 15:20:40 +08:00
Yuri Sizov b3992f7e6e Make overridden properties link to parent definition
Co-authored-by: Josh DeGraw <joshmdegraw@gmail.com>
2021-12-03 17:47:22 +03:00
Yuri Sizov 397e56964d Sort and group theme properties in docs, improve formatting for theme and enums 2021-12-01 21:02:20 +03:00
kobewi 6f929395d9 Add [theme_item] tag to editor help 2021-11-18 15:32:23 +01:00
Yuri Sizov 07725b611b Add warnings to methods that give access to internal nodes 2021-10-10 22:57:58 +03:00
Aaron Franke d54f2ad7ca
Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05:00
reduz 5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_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-23 08:10:13 -03:00
Jummit e9ef6f9815 Refactor GraphEdit connections
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-21 22:15:26 +02:00
Yuri Roubinsky 61904d56ea Better port handling connection for `GraphEdit` 2021-08-12 09:09:24 +03:00
Umang Kalra 12fc3f1eef Automatic arrangement of nodes in VisualScript/VisualShaders editors
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-08-11 00:44:28 +05:30
Yuri Sizov bf2839ea3e Add theme item descriptions to the online documentation 2021-08-04 22:27:10 +03:00
Rémi Verschelde 7adf4cc9b5
doc: Use self-closing tags for `return` and `argument`
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
Michael Alexsander Silva Dias 0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
Yuri Sizov 0a82a669e3 Make zoom limits and step adjustable in GraphEdit 2021-06-16 16:39:18 +03:00
Paul Joannon 8455e901f3
class reference proofreading 2021-03-19 13:21:20 +01:00
Rémi Verschelde 215d18814e
doc: Sync classref with current source 2021-01-04 14:33:44 +01:00
Marcel Admiraal 7b293eddfb Rename unselect to deselect 2020-12-21 10:26:41 +00:00
Yuri Roubinsky 52e44ed3ef Added GraphEdit properties to control lines thickness and antialiasing 2020-12-18 16:41:45 +03:00
Yuri Sizov f5bcbd8325 FIx visual issues with GraphEdit minimap 2020-12-17 22:59:04 +03:00
Yuri Sizov 999ce610a2 Add a minimap to the GraphEdit 2020-11-30 16:48:52 +03:00
Yuri Roubinsky 4f4287243c Removed underscore from GraphEdit begin/end_node_move signals 2020-10-20 09:22:40 +03:00
Rémi Verschelde 41af228b76
Merge pull request #36960 from pycbouh/docs-improve-shortcuts
Improve shortcut formatting in docs
2020-04-29 09:40:52 +02:00
Rémi Verschelde b7b46093d8 doc: Sync classref with current source
Add missing enum bindings.
2020-04-20 11:48:00 +02:00
Yuri Sizov 1ea7295bd2 Improve shortcut formatting in docs 2020-04-10 18:42:11 +03:00
Tomasz Chabora e103f21a40 Add LOTS of missing docs 2020-03-13 16:35:03 +01:00
Rémi Verschelde fea37cfb52 doc: Sync classref with StringName/Callable changes 2020-02-22 14:59:09 +01:00
Rémi Verschelde 0e3d625737 doc: Sync classref with current source
Lots of internal API changes and some docstrings were lost in the conversion.
I manually salvaged many of them but for all the rendering-related ones, an
additional pass is needed.

Added missing enum bindings in BaseMaterial3D and VisualServer.
2020-02-12 12:37:13 +01:00
clayjohn 57e27683ba Update docs to version 4.0 2020-01-31 17:15:41 -08:00
Rémi Verschelde 2d20fc39aa doc: Drop unused 'category' property from header
We already removed it from the online docs with #35132.

Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.

We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
2020-01-26 16:02:39 +01:00
Rémi Verschelde 1b26205b25
Merge pull request #34901 from YeldhamDev/multiple_doc_completions
Complete docs for GraphEdit/Node and PopupMenu
2020-01-08 07:36:36 +01:00
Michael Alexsander 8b5992f665 Make possible to edit the GraphEdit's selection rect colors 2020-01-07 23:20:48 -03:00
Michael Alexsander b81843ee6c Complete docs for GraphEdit/Node and PopupMenu 2020-01-07 22:05:32 -03:00
Rémi Verschelde c64c46db1d doc: Sync classref with current source 2019-12-17 11:43:07 +01:00
Hannah Crawford 59937e1c54 Updated get_zoom_hbox() documentation. 2019-12-14 14:02:15 +00:00
Rémi Verschelde a7ac8ec876 doc: Fix parsing of self-closing XML tags
Follow-up to #31925, `<member />` tags just before `</members>` would cause
a parsing issue, and we'd never notice that we're no longer parsing members.

Also added space before closing `/>`.
2019-09-24 13:34:05 +02:00
Bojidar Marinov b397bcf4a1
Run doctool after overridden properties changes 2019-09-04 15:26:08 +03:00
Rémi Verschelde 834d07cfc1 doc: Sync classref with current source 2019-08-05 15:21:03 +02:00
Chaosus f704506807 Implement copy/paste in visual shaders 2019-07-31 12:43:29 +03:00
Rémi Verschelde c6cea6e9b3 doc: Add default values to all properties
Thanks to @bojidar-bg's impressive work in #29380.
2019-06-30 13:58:07 +02:00
Rémi Verschelde e222e31fe6 doc: Sync classref with current source 2019-06-29 12:24:18 +02:00
Hugo Locurcio f7f6115f76
Proofread and improve the whole class reference
- Document a few more properties and methods
- Add more information to many classes
- Fix lots of typos and gramar mistakes
- Use [code] tags for parameters consistently
- Use [b] and [i] tags consistently
- Put "Warning:" and "Note:" on their own line to be more visible,
  and make them always bold
- Tweak formatting in code examples to be more readable
- Use double quotes consistently
- Add more links to third-party technologies
2019-06-27 22:30:19 +02:00
Chaosus 0aec3c3113 Shows menu when dragging connection on empty space in visual shader graph 2019-06-27 10:48:18 +03:00