Coder Social home page Coder Social logo

Comments (7)

Seneral avatar Seneral commented on June 12, 2024

Since the notion of state is not in the base framework, you'll have to elaborate on what exactly you mean.
State is only what an external system assigns to the node system. By default, there is only the Calculation system which evaluates the node gaph in an instant to assign a value to each node.
So without a clue what you do with your node graph, I can't help.

from node_editor_framework.

Softelectro avatar Softelectro commented on June 12, 2024

Thanks for the reply. I will try to elaborate more.
The system I am creating is mainly used for exporting all the nodes and their connections. So I will not be calculating any value.
Each node will have a forward and back connections just like the Dialog system. The forward will direct to the next node and back direct to the previous node. And the information that interests me are the connections so that later I will know if I click Next or Previous I will know which node's information I need to display.
Here is an example of a node I'm using for single choice questions:
CaptureGit
But for multiple choice questions, choosing option 1 will give one resulting node and choosing option 1 + option 2 will give another resulting node. This is where I'm struggling.

from node_editor_framework.

No3371 avatar No3371 commented on June 12, 2024

Just change the design, Instead of "1 node port = 1 option", make it like "1 node port = 1 option combination".
The options GUI should looks like mask layer dropdown.
圖片

from node_editor_framework.

Seneral avatar Seneral commented on June 12, 2024

Sounds like you have two easy options:
Allow each output to connect to multiple nodes and then adapt your interpretation algorithm to select the nodes.
If only one output A connects to a node, it's the result of choice A. If both A and B connect to it, it's the result of choice A+B, etc.
However that limits you in that A and B can not have the same individual nodes, for example A->X, B->X, A+B->Y

Or generate read-only combinatory ports (A+B, B+C, A+B+C) below your options (you can programmatically create and delete them as you edit your real options, you seem to have figured that out already).
Such a mask dropdown as @No3371 shows is unfortunately not that easy, unless you're willing to accept a lot of visual glitches. Standard Editor Dropdown controls really do not play well with built-in scaling, they will appear at random positions if you are not a 1x scale (unless they fixed that, doubt that though).
But instead of the dropdown you could also use three (or more) toggle buttons to select the combination for each port (though I'm not sure that scales well with the amount of options to combine).

from node_editor_framework.

No3371 avatar No3371 commented on June 12, 2024

Ah, now you mention it, menus did have the issue with scaling, It was too long ago I played with the framework so I missed that.

As for drop buttons I guess a edit toggle would be good enough, like it only draws all the toggles when you click on it, instead of drawing all toggles all the time.

from node_editor_framework.

Softelectro avatar Softelectro commented on June 12, 2024

Thanks for the help guys!
For the second solution, I thought about using the multipath node of the dialog system as a reference and made something like this:
CaptureGit
Options will be in the first node and the multipath node will create the read only fields for all the different combinations.
Do you think it's a good idea?

from node_editor_framework.

Seneral avatar Seneral commented on June 12, 2024

Since this is solely a choice of which interface fits your use case best, if it feels easy to use, then I guess it's alright.
But if you're going for another node you might want to consider a node which takes 3+ inputs and serves to combine only those. So if you want to override A+B->C, you add a node D and create connections from A->D and B->D and D->C.
Good luck!

from node_editor_framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.