custom node viewer

662 views
Skip to first unread message

fruit...@gmail.com

unread,
May 16, 2015, 5:16:41 PM5/16/15
to python_in...@googlegroups.com
Hello everyone,

I'd like to create own node editor using python or mel. The idea would be to have my own nodes (represented by square pictures, for instance, and acting like buttons. so that i can attach any cmd i want to them) that i could manipulate just like a node in a 2d space.

I was thinking it may be possible with treeView cmd, by cheating with some callback which could trace mouse movements, but i didn't find anything concrete yet...

Does anyone have an idea on how to achieve this or even if it's possible ? (also considering i can't use qt)

Thank you !

Justin Israel

unread,
May 16, 2015, 9:41:53 PM5/16/15
to python_in...@googlegroups.com

When you say a node editor that you "
could manipulate just like a node in a 2d space", are you meaning like a node graph?
If so, I don't think the Maya native ui provides you with that high level capability. You talked about a tree view, but that wouldn't have free 2d positioning. What does that treeView not have, that you require for your goal?
Are these Maya nodes you speak of, or "node" in the generic sense of a node graph? When you say they would run arbitrary commands when clicked on, can you give a workflow example? Maybe that would better help the group to offer suggestions.

The Maya native UI is very high level, and only does exactly what each limited api descriptions says, with no ability to extend them (as you would in Qt)


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/661273bb-f968-4a6f-8234-a2b774076132%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

fruity

unread,
May 17, 2015, 5:28:26 AM5/17/15
to python_in...@googlegroups.com
Hey Justin, thanks for your answer !

Yes, i mean "like a node graph" (i assume that what you call node graph is similar to the node editor or the hypergraph)

The maya nodes i speak of are generic, not maya DG nodes, but my owns (not created with the API though. Otherwise, the nodeEditor would have been enough =)

About the tree view, as far as i saw, it doesn't allow free moves, and this is what i'd like.

To sum up, the idea would be to have a visual representation of a process, for example an autorig. Each node representing an action, or a part, or whatever (like "arm", "head", "wheel", "mirror", etc). The best would be to have exactly the same thing than nuke, or even than the combination node Editor / attribute editor : you move your nodes, and if you double click, you tweak them in the attribute editor. 
I'm not talking yet about the connections between nodes, but the concept itself would be the same than the node editor, or than the Qt example "elastic nodes" (https://www.youtube.com/watch?v=I0n07iuowvY), without the 'elastic' feature : several elements known as "nodes" that the user can move into space and that have signals and slots allowing the user to tweak them.

Finally, is there any reliable information from Autodesk regarding a full compatibility of pyQt for maya (i mean : without the need for the user to install anything) ? If i don't want to use pyQt, it's because i don't want the user to install anything on his computer. I had a hard time installing pyQt on my mac for instance, and i finally figured it out using the pkg you did, justin =) Many thanks for that, btw ! But that's why i'd like to do it fully maya, unless maya 2016 comes native with pyQt for instance =)

Thanks for your help



Le dimanche 17 mai 2015 03:41:53 UTC+2, Justin Israel a écrit :

When you say a node editor that you "
could manipulate just like a node in a 2d space", are you meaning like a node graph?
If so, I don't think the Maya native ui provides you with that high level capability. You talked about a tree view, but that wouldn't have free 2d positioning. What does that treeView not have, that you require for your goal?
Are these Maya nodes you speak of, or "node" in the generic sense of a node graph? When you say they would run arbitrary commands when clicked on, can you give a workflow example? Maybe that would better help the group to offer suggestions.

The Maya native UI is very high level, and only does exactly what each limited api descriptions says, with no ability to extend them (as you would in Qt)


On Sun, 17 May 2015 9:16 AM  <fruit...@gmail.com> wrote:
Hello everyone,

I'd like to create own node editor using python or mel. The idea would be to have my own nodes (represented by square pictures, for instance, and acting like buttons. so that i can attach any cmd i want to them) that i could manipulate just like a node in a 2d space.

I was thinking it may be possible with treeView cmd, by cheating with some callback which could trace mouse movements, but i didn't find anything concrete yet...

Does anyone have an idea on how to achieve this or even if it's possible ? (also considering i can't use qt)

Thank you !

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Justin Israel

unread,
May 17, 2015, 5:41:19 AM5/17/15
to python_in...@googlegroups.com

You will need to dive into Qt for this stuff because the high level native Maya UI functionality won't give you that ability.

I take it you are a bit behind the times :-)
Maya has been shipping with PySide since 2013, which is why I stopped maintaining PyQt installers. You can search the history on this group for related topics.

People have even created node graphs, and open sourced the examples.

https://github.com/drumboy354/MayaNodeInterface


To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/45b7cc6d-ca05-4ad6-97ac-d8743554f934%40googlegroups.com.

fruity

unread,
May 17, 2015, 7:05:06 AM5/17/15
to python_in...@googlegroups.com
Awesome ! I didn't know that, thank you !

I'm already familiar with Qt for C++ so it shouldn't be too difficult to switch to pySide (from what i know, Qt is pretty much similar to PyQt, except for the syntax (same class names), and pyQt looks similar to pySide \o/

So this is exactly what i was looking for ! Problem solved then, thank you =)


To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Colas Fiszman

unread,
May 18, 2015, 5:18:31 AM5/18/15
to python_in...@googlegroups.com
Hi,
You can take a look at coral (https://code.google.com/p/coral-repo/) it's a open source node graph framework.
The project is abandoned but it's functional.
The core is written in C++ but all the gui is done with PyQt.
The code is not super clean but that will give you a good idea of how you can build a node graph interface in PyQt.
We have developed a tool of top of it at work that's used by fx and cfx to speed up the re-generation of output assets.
Greets,
Colas


To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/059b5898-abf1-4ef6-b280-fa0c8bd81707%40googlegroups.com.

Marcus Ottosson

unread,
May 18, 2015, 5:31:29 AM5/18/15
to python_in...@googlegroups.com

Speaking of node-graph references, also have a look at Depends.

It’s also abandoned, or never really started, but the code is small enough to grasp and covers the basics.



For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Chris Gardner

unread,
May 18, 2015, 6:07:49 AM5/18/15
to python_in...@googlegroups.com

i started forking depends (no relation, btw):
https://github.com/chris-gardner/derp

simplifying a bunch of stuff and making it more of a pure python execution graph. prettied up the node interface and added multiple i/o ports. depends was a good place to start.

cheers,
chrisg

fruity

unread,
May 18, 2015, 12:24:59 PM5/18/15
to python_in...@googlegroups.com
Great, thank you guys for your help !
Didn't have time (yet !) to check the two last links (right now, i'm on drumboy's version, the first link =), but that looks like a great pack of examples to start ! Thank you very much =)
Reply all
Reply to author
Forward
0 new messages