Code Monkey home page Code Monkey logo

nodz's People

Contributors

coderbone avatar fabiencollet avatar glm-ypinczon avatar legoffloic avatar morganloomis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodz's Issues

Proposal: Settable Properties on Nodes

Hey I wanted to see if you feel this is within the scope of this project. The idea would be in addition to SlotItem base class we have something like PropertyItem, which based on the dataType when running createProperty, would be a UI widget for setting a value. So for example:
createProperty(node, name, dataType='bool')
would create a checkbox on the node. When the graph is saved or evaluated the state of that widget would be queried.

upgrade documentation/installation process

Hello,

this project seems quite interesting. However, I don't understand the installation process to get things running and what file should be launched
Could you give me a detailed explanation on how to install and launch the demo (or main?) please?

Thanks in advance for your answer.

Status of Nodz?

Hey there.
Opening a new discussion about the status of this project.
When speaking with other peoples around, we're all using this module but all having our own forks that we maintain and update, mostly because this trunk is not maintained anymore (last accepted PR was July 2018)
@LeGoffLoic : Are you still supporting this project ?
If not, would you accept to open admin rights to a couple of selected people to accept PRs ?
Sure we can fork it and accept PRs on that fork but the original project is far more followed than all forks available

scroll wheel zoom Qt5

hello, the mouse wheel crashes the app.
So, in nodz_main.py,
i changed 'event.delta() > 0' to 'event.angleDelta() > 0' ,

    # tjp 02nov  qt5 has angleDelta and pixel Delta if event.delta() > 0:
#  angleDelta always increased despite wheel dir
#  same for pixelDelta
if event.angleDelta() > 0:
        zoomFactor = inFactor
    else:
        zoomFactor = outFactor

I never gto scrollwheel zoom to work
but added KEY_PLUS and KEY_MINUS to do same

    if event.key() == QtCore.Qt.Key_Plus:
    zoomFactor = inFactor
        self.scale(zoomFactor, zoomFactor)
        self.currentState = 'DEFAULT'

    if event.key() == QtCore.Qt.Key_Minus:
    zoomFactor = outFactor
        self.scale(zoomFactor, zoomFactor)
        self.currentState = 'DEFAULT'

Also enabled the scroll bars to all paning hopriz & vert

    #self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
    #self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)

Then changed the transparency to allow nets to show through nodes
( circumventing coding to avoid other nodes )

// Custom colors > Add and remove as you want.
// Don't forget to edit the end of the dictionary if editing the
// following part.
// 03nov2021 was  "bg": [80, 80, 80, 255],
"node_preset_1": {
    "bg": [80, 80, 80, 127],
    "border": [50, 50, 50, 255],
    "border_sel": [170, 80, 80, 255],
    "text": [230, 230, 230, 255]
},
// 03nov2021 was "bg": [60, 60, 60, 255],
"attr_preset_1": {
    "bg": [60, 60, 60, 127],
    "text": [220, 220, 220, 255],
    "plug": [255, 155, 0, 255],
    "socket": [255, 155, 0, 255]
},

and added arrays of nodes

as in:

------------------mult2------------------------------

mult2 = []
mult2.append( nodz.createNode(name='mult2[0]', preset='node_preset_1', position=None) )
nodz.createAttribute(node=mult2[0], name='in0', index=-1, preset='attr_preset_1', plug=False, socket=True, dataType=float)
nodz.createAttribute(node=mult2[0], name='out', index=-1, preset='attr_preset_1', plug=True, socket=False, dataType=float)
nodz.createAttribute(node=mult2[0], name='in1', index=-1, preset='attr_preset_1', plug=False, socket=True, dataType=float)

------------------end mult2[0]------------------------------

------------------mult2[1]-----------------------------

mult2.append( nodz.createNode(name='mult2[1]', preset='node_preset_1', position=None) )
....

thanks for a nice tool!
I need to make a library of widgets
and drag/drop from a palette
and make visible names for the nets/signals/wires
and allow custome widths

My application is to visulaize the Hal component files of the LinuxCNC project.
thanks TomP 21:06 03nov2021 Thailand

Nodz-zoom-pan-arraysOfWidgets-2021-11-03_20-51-54

Sockets do not accept more than one plug

Hi,
currently sockets do not accept more than one plug. However, I would like to be able to connect several plugs to a socket (e.g. for routing MIDI messages). I found an if statement in the accepts method of the SocketItem class (line 1833) which returns False if more than one plug is connected. However, uncommenting the corresponding line does not seem to do the trick. Can you give me a hint which lines of code I have to change?

Best,
Hanno

missing signal_Dropped

I just cloned the repo and ran the demo. when I trid dragging somethign into the DAG I got
builtins.AttributeError: 'NodeScene' object has no attribute 'signal_Dropped'

And sure anough the NodeScene class does not have that signal, only a signal_NodeMoved

Setting the background color

How can I set the panel background color (i.e. the Qt Scene color)? I couldn't find any reference neither in default_config.json nor in nodz_main.py

allow creation of subclasses of NodeItem for better draw customization

I am currently subclassing Nodz to do some custom drawing and would like to use a subclass of NodeItem so that even more custom drawing can be done. To do this I propose splitting the line in createNode that actually instantiates a new NodeItem into it's own member function so that a subclass of Nodz can provide it's own implementation and return apropos subclass instances. Similar treatment would be applied Plug/Socket/Connection for full customization.

Any objections?

Interactively testing Nodz in PyCharm/IPython

This issue is just an FYI for anyone who want to try out Nodz from within PyCharm with IPython running a Qt event loop. (I was not able to add to the Wiki, so I am adding to the issue.)

I have loaded Nodz and Qt.py repos in Pycharm and setup dependency of Qt.py on Nodz. I them marked the repos as sources root, so that they are available in PYTHONPATH.

In order for the IPython gui event loop to work properly, I first had to import Qt module and then enable application event loop in IPython.

In[1]: import Qt
In[2]: Qt
Out[2]: <module 'Qt' from 'F:\src\GitHub\nodegraph\Qt.py\Qt.py'>
In[3]: %gui qt4

Then I opened nodz_demo.py in the PyCharm editor and selectively executed code. Then in the Python Console, I interacted with the diagram.

Some Pull requests should be accepted

Hi @LeGoffLoic ,
First of all, let me tell you that this library is really nice to use: it's both simple and powerful enough to start having a node UI on any application. And on a plus side, there is not many dependencies, which contributes to make it easy to use.

I think it could become a nice generic python node UI, but it needs to be maintained / upgraded in some way, otherwise everyone will just maintain it's own branch, and it'll make it hard for new comers to get what they need from all the existing branches.
And maintaining it means accepting, refusing, or at least commenting on the pull-requests to let know of were the dev is going, and how additions should be done.

As you can see, the few additions I needed for this UI to work great for my usage were pull-requested, so that everyone could benefit of them, which is the opensource way of thinking.

But doing clean pull-requests on branches that starts from your master branch (to ensure it doesn't bring changes from other branches as well and that the global graph remains clear) will become quite difficult if previous pull-requests are never accepted.
The fact is that most of my development were made outside of Maya (it's way faster to debug and check), so the bare minimum I need is the pullrequest#3 by @coderbone (#3).
My process to be able to work from the @coderbone branch but still doing clean pull-requests is:

  • temp dev branch from @coderbone develop branch
  • test and commit on this branch
  • dev branch from your master branch
  • cherry pick my commit from the tmp branch
  • pull-request the clean branch from you master branch

I did it for my dev until now, but it's a too time-consuming process for me to continue this way, and next pull-request might be from the develop branch directly.

Please just let us know if you wish to accept some pull request and drive this repo the way you want, or if you consider it's now everyone's job to start from this repo and go in any direction they want. it's all fine with me either, just need to know ;)

Once again, thanks for the nice work you did on this repo, will be quite useful ;)
Cheers,
Yann

Upgrade to Python 3

With Python 2 being retired next year, it could be nice to upgrade the code to Python 3.

It will mainly be changes on the print function and unicode.

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.