Commit graph

667 commits

Author SHA1 Message Date
Rémi Verschelde 06a33e590f
Merge pull request #53819 from TokageItLab/re-implement-ping-pong
Reimplement ping-pong animation and reverse playback
2021-11-09 22:11:04 +01:00
Rémi Verschelde e3f3fc517a
Merge pull request #54653 from KoBeWi/built_in_scripts_deserved_that
Improve save handling for built-in scripts
2021-11-09 21:46:58 +01:00
kobewi 134e4d168b Improve save handling for built-in scripts 2021-11-07 23:51:12 +01:00
David Cambré d763ee8398 VisualScript-sync-and-improve-variable-and-property 2021-11-06 13:03:38 +01:00
kobewi e393c2a734 Add is_built_in() method to Resource 2021-11-04 12:45:58 +01:00
Hugo Locurcio c012fbc8b2
Rename PROPERTY_USAGE_NOEDITOR to PROPERTY_USAGE_NO_EDITOR
This is consistent with other constants that include `NO`,
such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-11-03 23:06:17 +01:00
David Cambré 8714e1e961 Fixes copy-paste issue in the visual script editor
Moves copy and paste in their own functions so copy_nodes_request and paste_nodes_request are able to work.
Applies paste offset to the last mouse clicked position.
2021-11-03 20:40:52 +01:00
Silc 'Tokage' Renew 953a7bce7e reimplement ping-pong 2021-11-03 13:39:33 +09:00
Rémi Verschelde 3a6be64c12
clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
Rémi Verschelde 3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Marcel Admiraal 87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
Gilles Roudière 0587e5e018 Implement toast notifications in the editor 2021-10-14 13:30:54 +02:00
Juan Linietsky 610de0974d
Revert "Implement reverse playback and ping-pong loop in AnimationPlayer and NodeAnimation" 2021-10-11 19:27:50 -03:00
Rémi Verschelde 9ed4f8367b
Merge pull request #48332 from TokageItLab/implement-ping-pong 2021-10-11 22:55:01 +02:00
Paulb23 3010bca41b Move add_syntax_highlighter bind to ScriptEditorBase 2021-10-11 18:13:31 +01:00
Tokage 372ba76663 implement ping-pong loop in animation
Co-authored-by: Chaosus <chaosus89@gmail.com>
2021-10-09 18:08:43 +09:00
Rémi Verschelde 862994a8ef
doc: Update links to latest documentation after content reorganization 2021-10-06 13:48:48 +02:00
kobewi 6397eaa27e Fix some leftover references to idle_frame 2021-10-04 20:57:31 +02:00
Lightning_A c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
Rémi Verschelde 61ce8b206e
Merge pull request #52877 from Calinou/add-print-verbose
Add `print_verbose()` built-in function to print in verbose mode only
2021-09-21 17:00:58 +02:00
Hugo Locurcio 650b1db4b8
Add print_verbose() built-in function to print in verbose mode only
This can be used as a shorthand for:

    if OS.is_stdout_verbose():
        print("...")

Unlike `print_debug()`, this works in release builds too and can
be toggled off in debug builds.
2021-09-21 15:59:49 +02:00
Aaron Franke d54f2ad7ca
Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05:00
Yuri Roubinsky dfae75d0c5 Fix incorrect call of _center_on_node in VisualScript editor 2021-09-18 10:58:28 +03:00
Rémi Verschelde 949c268a68
Merge pull request #52655 from Chaosus/toggle_scripts_panel 2021-09-17 13:54:54 +02:00
Max Hilbrunner 4dee269f01
Merge pull request #52656 from akien-mga/rename-vseditor-singleton
Rename VisualScriptEditor singleton to VisualScriptCustomNodes
2021-09-15 22:51:45 +02:00
Yuri Roubinsky 1dda47c280 Added status bar and toggle scripts panel button to EditorHelp/VScripts 2021-09-15 11:35:03 +03:00
Rémi Verschelde 7774ec1634
Merge pull request #52222 from Gallilus/Fix-VisualScriptPropertySet-value-property-hint 2021-09-14 12:49:11 +02:00
Rémi Verschelde f1dca7760c
Rename VisualScriptEditor singleton to VisualScriptCustomNodes
Follow-up to #51916, fixes inconsistency between singleton name and class
as documented in https://github.com/godotengine/godot/issues/52162#issuecomment-918979753.
2021-09-14 11:31:01 +02:00
David Cambré 080125660a Update VisualScriptCustomNode.xml 2021-09-13 21:28:08 +02:00
Fabio Alessandrelli bf9aae09ba [Net] Move multiplayer to core subdir, split RPCManager.
Move multiplayer classes to "core/multiplayer" subdir.

Move the RPCConfig and enums (TransferMode, RPCMode) to a separate
file (multiplayer.h), and bind them to the global namespace.

Move the RPC handling code to its own class (RPCManager).

Renames "get_rpc_sender_id" to "get_remote_sender_id".
2021-09-07 11:14:30 +02:00
Fabio Alessandrelli 58c30b2626
Merge pull request #51639 from Ev1lbl0w/gsoc21-dap
Implement more advanced features for DAP
2021-09-01 16:17:32 +02:00
Ev1lbl0w 292ed61c18 Implemented advanced features of DAP
Respect client "supportsVariableType" capability

Implement "breakpointLocations" request

Implement "restart" request

Implement "evaluate" request

Fix error messages not being shown, and improved wrong path message

Removed thread option and behavior

Implemented detailed inspection of complex variables

Fix "const"ness of functions

Added a configurable timeout for requests

Implement Godot custom data request/event

Implement syncing of breakpoints

Added support for debugging native platforms
2021-08-31 15:17:58 +01:00
kobewi 017c94222e Remove cartesian2polar and polar2cartesian 2021-08-31 01:41:41 +02:00
Fabio Alessandrelli 64b9f30b92 [Net] Rename RPC "puppet" to "auth" (authority). Drop "master".
This commit completely removes the RPC_MODE_MASTER ("master" keyword),
and renames the RPC_MODE_PUPPET to RPC_MODE_AUTHORITY ("auth" keyword).

This commit also renames the "Node.[get|set]_network_master" methods to
"Node.[get|set]_network_authority".

This commit also renames the RPC_MODE_REMOTE constant to RPC_MODE_ANY.

RPC_MODE_MASTER in Godot 3.x meant that a given RPC would be callable by
any puppet peer on the master, while RPC_MODE_PUPPET meant that it would
be callable by the master on any puppet.

Beside proving to be very confusing to the user (referring to where it
could be called instead of who can call it) the RPC_MODE_MASTER is quite
useless. It is almost the same as RPC_MODE_REMOTE (anyone can call) with
the exception that the network master cannot. While this could be useful
to check in some case, in such a function you would anyway need to check
in code who is the caller via get_rpc_sender_id(), so adding the check
there for those rare cases does not warrants a dedicated mode.
2021-08-30 00:54:38 +02:00
David Cambré 2fbea9dee6 Fix VisualScriptPropertySet value hint 2021-08-29 15:47:51 +02:00
Haoyu Qiu eba7265a1c Fix misspelled "overriden"
In recent GDVIRTUAL PR and SkeletonModification3DJiggle doc.
2021-08-26 01:44:01 +08:00
Max Hilbrunner c314203a70 Fix Visual Script editor 2021-08-24 19:33:40 +02: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
reduz 3682978aee Replace BIND_VMETHOD by new GDVIRTUAL syntax
* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.

Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.

Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-22 08:23:58 -03:00
Max Hilbrunner 2c98eede23 Fix VisualScriptEditor after namespaces 2021-08-20 13:11:29 +02:00
Max Hilbrunner 81f7d1890b Namespaces instead of underscore prefix for binds
Thanks to neikeq for the initial work.

Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
2021-08-17 16:10:09 +02:00
Anilforextra d73d8b8d78 Fix duplicate conditions. 2021-08-13 12:22:38 +05:45
Rémi Verschelde 6e9439198c
Resource: Remove unused _use_builtin_script() virtual method
And another piece of dead code found while searching for "use_builtin".
2021-08-12 12:16:17 +02:00
Aaron Franke fa3a32a2d6
Use Key enum instead of plain integers 2021-08-10 16:26:55 -05:00
K. S. Ernest (iFire) Lee 18bd0fee5a
Merge pull request #49343 from theoway/node_auto_arrangement_graph_edit
Node Auto Arrangement in GraphEdit/VisualScript/VisualShader
2021-08-10 15:42:04 -04: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
Aaron Franke 84f720966c
Use doubles for time in many other places 2021-08-09 14:05:42 -05:00
Haoyu Qiu 0ca38ffe76 Validates VisualScript.add_node input node 2021-08-02 23:36:13 +08:00
Haoyu Qiu 284c6c81eb Make action names translatable 2021-07-31 22:19:51 +08:00
Aaron Franke 2733b9abd8
Remove obsolete "dectime" method
Replaced by "move_toward"
2021-07-30 16:41:28 -05:00