Coder Social home page Coder Social logo

Comments (13)

Seneral avatar Seneral commented on June 1, 2024

Aishiteru on the Unity forums and me are working this out (along with the input system). It's working out pretty well and we're using this also as a test on how difficult it is to implement custom elements/controls...

from node_editor_framework.

rudinesurya avatar rudinesurya commented on June 1, 2024

I think the node group should be able to drag another node group that is fully contained within the bigger rect. I found a bug, the focusing does not work properly with the node groups [try creating the 2nd node group and make it bigger, with the 1st node group fully inside it. You are not able to click and drag the 1st]. I will try to fix that when i have time to look at the codes =)

123123

from node_editor_framework.

Seneral avatar Seneral commented on June 1, 2024

Oh, of course! :D
In the event handling fuunction start drag) that could look like this:

  1. Sort group by their size (low-high), handle following steps foreach group in that order:
  2. update pinned nodes and subgroups, avoid nodes that are already pinned by smaller groups (potential subgroups)
  3. check if the group is focused
    -> drag the group and it pinned nodes and subgroups (->recursive!)
    -> abort process, so only the smallest group that was focused (current) is dragged
    What do you think?
    Only theory so far, I'm unable to implement until friday evening. If you want, you can do this:)

from node_editor_framework.

rudinesurya avatar rudinesurya commented on June 1, 2024

i was thinking of a simpler way, does not need to be recursive at all. Just get all the nodes and node groups contained in the selected node group. The sorting seems like an excellent idea, but I wont have time to touch on this till next week.

from node_editor_framework.

Seneral avatar Seneral commented on June 1, 2024

You have to account for the nodes pinned on subgroups that are no directly inside the focused group, too. Because of that it's even simpler to make it recursive. You could of course make it linear, but it really is the best and most logical that way I think:) I now have some time to do this so I can post something soon!

from node_editor_framework.

Seneral avatar Seneral commented on June 1, 2024

Sorry for the long periode of silence from my side, I have been very busy:/
Anyway, it's better now, so in 5f1dc03 I implemented the idea posted above and the groups feature is in a pretty decent state now I think:)
Thanks @rudinesurya, if you don't have anything to add I'll merge sometime this week:)

from node_editor_framework.

rudinesurya avatar rudinesurya commented on June 1, 2024

hey. i have been quite busy, i think you should merge it first then it will be easier for me to pull a fresh copy and see what else i can add on.

from node_editor_framework.

Seneral avatar Seneral commented on June 1, 2024

Any updates @rudinesurya ? Or I'll just close it here and now, cause you can commit an update later on without a problem:)

from node_editor_framework.

rudinesurya avatar rudinesurya commented on June 1, 2024

hi, have you merged it yet ? sorry for the silence, too busy looking for job and being nationless makes it even harder =(

from node_editor_framework.

Seneral avatar Seneral commented on June 1, 2024

Oh, I'm very sorry to hear that (the nationless part, that is). Wish you best luck! :)

I did not merged it yet because it needs some manual work I have to resolve when I have time:)

from node_editor_framework.

Seneral avatar Seneral commented on June 1, 2024

For the record, this is the branch for the groups feature. Unless anyone has further suggestions I would merge it as soon as I have time.

from node_editor_framework.

Seneral avatar Seneral commented on June 1, 2024

This has been implemented in 1a2fee1, but there's always space for improvement. Especially as there is a small problem with snapping and groups right now, so I'll leave this issue open;)
Sorry it took me so long to merge!

from node_editor_framework.

Seneral avatar Seneral commented on June 1, 2024

Will close this off for now!

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.