Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphEdit & GraphNode Enhance Proposal #593

Open
nonunknown opened this issue Mar 17, 2020 · 5 comments
Open

GraphEdit & GraphNode Enhance Proposal #593

nonunknown opened this issue Mar 17, 2020 · 5 comments

Comments

@nonunknown
Copy link

nonunknown commented Mar 17, 2020

Describe the project you are working on:
A Plugin to create state machine through GE(GraphEdit) and GN(GraphNode)

Describe the problem or limitation you are having in your project:

  • Refer to: GraphEdit Bug
  • Need to set a limit of connections between GNs
  • Customize the connection line

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

  • Fix bugs mentioned above
  • Connections Limit
  • Customize connection line
  • Place the connection line anywhere in GN

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

Connections Limit

Actually the user can have multiple connections between nodes:
Screenshot from 2020-03-17 08-55-58
To overcome this, the GN should have a max_connections property:
maxconn

Customize CL (Connection Line)

The Lines (Represented by connections between nodes) could be customized to enable the user to set "Icons" or draw something at the (Most-Left,Middle,Most-Right) part of the line, represented by 3 sprites:

Actually:
Screenshot from 2020-03-17 09-04-04

Customizable CL Example :
custom1

Place the connection line anywhere in GN

Nowadays cross-connections are not so beauty:
Screenshot from 2020-03-17 09-12-32

Simple solution? Connection Types (the use can now choose between NodeBased or StateBased (not cool suggestive names LOL). NodeBased its like the image shown above, and StateBased would be like the image below:

CL

If this enhancement will not be used often, can it be worked around with a few lines of script?:
No. Cuz requires some refactoring into core GN and GE Classes.

Is there a reason why this should be core and not an add-on in the asset library?:
Maybe some topics could be done with plugins, but others are essential.

@YuriSizov
Copy link
Contributor

  1. Connection limit can be implemented in a more flexible way already using the connection_request event.
  2. More styling options are always welcome.
  3. I don't think that dots should be moved. There is a particular flow to the GraphEdit, where every node is connected from the left and outputs on the right. It's clear and straightforward. I agree on the loops being ugly, though. That should be fixed in some way. There is also Greatly improving readability of Visual Scripting in Godot 3.2 #506 proposal, touching on dots.

@TheDuriel
Copy link

Being able to move dots would be highly valuable for tool development. Not every system can be represented going exclusively left to right.

@Jummit
Copy link

Jummit commented Mar 17, 2020

… the user can have multiple connections between nodes.
To overcome this, the GN should have a max_connections property.

Why though? Are multiple connections bad in any way? You can also do this in code:

func connection_request(from: String, from_slot: int, to: String, to_slot: int)
  var existing_connections = 1
  for connection in get_connection_list():
    if connection.from == from:
      existing_connections += 1
  if existing_connections + 1 > MAX_CONNECTIONS:
    return
  # normal connection code

I also don't really see the use for customizing the connections, apart from using them to highlight the current executing line while debugging.

@TheDuriel
Copy link

Why though? Are multiple connections bad in any way?

It becomes visually impossible to identify order of operation, which may or may not be important. And sometimes branching is flat out not desired.

That said, connection limits are easily implemented on the user side during a connection request.

@nonunknown
Copy link
Author

… the user can have multiple connections between nodes.
To overcome this, the GN should have a max_connections property.

Why though? Are multiple connections bad in any way? You can also do this in code:

func connection_request(from: String, from_slot: int, to: String, to_slot: int)
  var existing_connections = 1
  for connection in get_connection_list():
    if connection.from == from:
      existing_connections += 1
  if existing_connections + 1 > MAX_CONNECTIONS:
    return
  # normal connection code

I also don't really see the use for customizing the connections, apart from using them to highlight the current executing line while debugging.

Line styling would be very useful, I didnt tought for debugging but something like, in my case to show from->to state and current state :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants