Commit graph

15 commits

Author SHA1 Message Date
Lera Elvoé
51652ef277 add port usage type to Port (#69)
first part of addressing #59

every `Port` now has a `usage_type` field that indicates whether it can be used for triggers (eg. sending and receiving events), value requests, or both. `Deck` has an additional method to validate if a potential connection is legal, which checks for the following in order:

1. the source and target nodes are not the same node;
2. the port usage is valid (trigger to trigger, value to value, both to any);
3. the port types are compatible
4. the connection doesn't already exist

all node ports by default use the "both" usage, since that will be the most common use case (especially in cases where an input port can accept either a trigger and a value request but the output can only send one type), but it can be specified as an optional argument in `add_[input|output]_port()`

usage types are represented in the renderer by different port icons:

![image](/attachments/28d3cfe9-c62c-4dd4-937d-64dbe87cb205)

there is a reference implementation in the Compare Values and Twitch Chat Received nodes, since those were used as examples in #59. other nodes will be added as a separate PR later if this is merged, since behavior will vary greatly per node.

Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/69
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2024-02-21 04:08:36 +00:00
Lera Elvoé
34220c4ad1
add colors to ports depending on data type 2024-02-13 14:17:05 +03:00
Lera Elvoé
cb4a83a2f8 fix nodes resizing on port update (#55)
Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/55
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2024-01-22 08:06:23 +00:00
Lera Elvoé
f84f5b3a32 save node sizes as node metadata (#21)
fixes #16

Reviewed-on: https://codeberg.org/Eroax/StreamGraph/pulls/21
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2023-12-18 19:36:37 +00:00
Lera Elvoé
4ed03eddb0 Add String Split, Get Array Index, and Compare Values nodes (#20)
Reviewed-on: https://codeberg.org/Eroax/StreamGraph/pulls/20
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2023-12-16 11:23:17 +00:00
Lera Elvoé
b55a462945 Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18)
After months of work and over a hundred commits on this repo alone (not to mention the old, half-working repos on GitHub), StreamGraph is finally ready to be shown to the public, even if in an incomplete state.

This PR is a culmination of numerous design discussions, re-writes, and hours spent by both @Eroax and myself.

Reviewed-on: https://codeberg.org/Eroax/StreamGraph/pulls/18
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2023-12-15 21:44:25 +00:00
Eroax
0716c2f4da Adds Expression Node (#9)
Adds both the Codeblock Descriptor along with the needed update to Port.set_value to allow Callbacks.  + Adds the Expression node which utilizes the Codeblock descriptor.

Co-authored-by: Eroax <eroaxe.business@gmail.com>
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Reviewed-on: https://codeberg.org/Eroax/Re-DotDeck/pulls/9
2023-11-27 09:21:43 +00:00
Lera Elvoé
c4e35043df types system simplification (#8)
no longer using classes for every type. the type system has been greatly simplified, with the added bonus that it hooks directly into GraphEdit's slot type system. connections will still fail if the type conversion fails, which may be used by other renderers.

the type conversion map is straightforward to understand, and easy to extend should the need arise (hopefully it shouldn't).

Reviewed-on: https://codeberg.org/Eroax/Re-DotDeck/pulls/8
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2023-11-26 22:07:15 +00:00
Lera Elvoé
a427535ff5
format 2023-11-25 14:01:17 +03:00
Eroax
2264890113 Ero's Doc Sprint 1 (#5)
Co-authored-by: Eroax <eroaxe.business@gmail.com>
Reviewed-on: https://codeberg.org/Eroax/Re-DotDeck/pulls/5
Co-authored-by: Eroax <eroax@noreply.codeberg.org>
Co-committed-by: Eroax <eroax@noreply.codeberg.org>
2023-11-25 10:40:43 +00:00
Lera Elvoé
fa5e9997ef merge groups (#2)
here we go

Reviewed-on: https://codeberg.org/Eroax/Re-DotDeck/pulls/2
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2023-11-22 04:26:11 +00:00
Lera Elvoé
2f92233ca0
saving and loading port values 2023-07-21 11:26:43 +03:00
Lera Elvoé
074edb1e1f
serialize to json/dictionary, instance by type 2023-06-24 06:39:50 +03:00
Lera Elvoé
a5acd3a1c3
fix connections but 2 2023-06-12 18:59:30 +03:00
Lera Elvoé
318efb9c34
graphedit renderer beginnings 2023-06-12 18:32:36 +03:00