Comments (11)
Hi @GTN0707,
In the NodeGraph
class there's a set_acyclic() function you can set to True
.
https://chantonic.com/NodeGraphQt/api/graphs/NodeGraph.html#NodeGraphQt.NodeGraph.set_acyclic
See also
https://chantonic.com/NodeGraphQt/api/nodes/BaseNode.html#NodeGraphQt.BaseNode.add_accept_port_type
https://chantonic.com/NodeGraphQt/api/port.html#NodeGraphQt.Port.add_accept_port_type
Cheers,
Johnny
from nodegraphqt.
Thank you @jchanvfx! Your work is amazing!
from nodegraphqt.
Thank you for your massive patience responding to me @jchanvfx! I really appreciate it.
I will look into those and see if I can figure out anything. Thanks again and have a wonderful day!
from nodegraphqt.
just want to drop in to report that I think I did it! yay! It was a pretty convoluted snow ball of changes... like you pointed out, apply_live_connection and pipeItem class. also everything related to PortTypeEnum logic under graph, viewer, serialize, deserialize, undo, redo, connected_ports, redraw_connected_pipes...
I don't have a programming background but diving into your library definitely motivated me to learn python! Thank you so much!
from nodegraphqt.
Awesome bro keep on keeping on 👍
from nodegraphqt.
Awesome Thanks 😀
from nodegraphqt.
I do have a follow up question:
What if all I want to constrain is the port type but want to leave port name and node type unconstrained?
{
'port_name': 'foo'
'port_type': PortTypeEnum.IN.value
'node_type': 'io.github.jchanvfx.NodeClass'
}
from nodegraphqt.
You don't have to specify a port constrain type just leave the NodeGraph with acyclic set to True
from nodegraphqt.
I assume you meant acyclic set to False right? So that we can have a cyclic graph?
If so yes I have done that. But I'm still not able to do same type port connections. E.g. IN to IN, OUT to OUT. I have cases where I have something like, IN01 connected to IN02 of the same node (shorting). or IN01 of node A connected to IN02 of node B. etc. and still have regular IN-OUT connections as well.
I haven't been able to trace down which part of code is preventing IN-IN, OUT-OUT connections.
from nodegraphqt.
hmm... ok I think you might have to make some tweaks to the NodeViewer.apply_live_connection
https://github.com/jchanvfx/NodeGraphQt/blob/main/NodeGraphQt/widgets/viewer.py#L992
but I'm not sure if it's possible to have the same port type connections as you have to rework the PipeItem
class too. 😢
https://github.com/jchanvfx/NodeGraphQt/blob/main/NodeGraphQt/qgraphics/pipe.py#L24
from nodegraphqt.
just want to drop in to report that I think I did it! yay! It was a pretty convoluted snow ball of changes... like you pointed out, apply_live_connection and pipeItem class. also everything related to PortTypeEnum logic under graph, viewer, serialize, deserialize, undo, redo, connected_ports, redraw_connected_pipes... I don't have a programming background but diving into your library definitely motivated me to learn python! Thank you so much!
Hi, any chance you publish your code ?
from nodegraphqt.
Related Issues (20)
- update to PySide6 HOT 1
- Layout direction bug when duplicating nodes HOT 1
- Node width too large for custom widgets
- passing data from one node to anothre HOT 5
- Request to Add Capabilities for Edge Trunking
- Moving lable to the left ? HOT 1
- Menubar Shortcuts in Windows OS HOT 2
- is it possible to generate subgraphs in nodes? HOT 4
- Pipe Hover/Selection events
- If a widget has been hidden using hide_widget, it will reappear after the view is zoom-out and zoom-in HOT 1
- How to retrieve the nodes in sub-graph if the sub-graph(group node) is collapsed ? HOT 3
- Bug with vertical GroupNode HOT 1
- Multibe drobdown/combo menus text below other dropdowns HOT 3
- Node moves the original position after editing name
- Undo/Redo for Node Movement is not working HOT 1
- Missmatched types on Darg/Drop between the viewer and the Node Trees widget
- Custom Widget Position on Node
- Occupying the whole node area with a custom widget HOT 2
- Supports Python 3.12 and PySide6? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodegraphqt.