http://usa.autodesk.com/maya/features/
I wonder if there is any Qt's Widget which support to do that? Or its a custom one?
Thanks
And this can be a pretty big project, depending on the feature set you have in mind.
You should look into QGraphicsScene and QGraphicsview as a starting point.
And then into the QGraphicsItems.
Resources:
A good starting point are the elasticNodes and diagramScene projects in the Qt4 examples.
Coral, very interesting project to look at.
Sascha
I think if you did not want a parent-child relationship and just a position constraint, then you may need to do that by reacting to the itemChange() of the source item:
http://doc.qt.digia.com/qt/qgraphicsitem.html#itemChange
I think if you did not want a parent-child relationship and just a position constraint, then you may need to do that by reacting to the itemChange() of the source item:
http://doc.qt.digia.com/qt/qgraphicsitem.html#itemChange
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To post to this group, send email to python_in...@googlegroups.com.
To unsubscribe from this group, send email to python_inside_m...@googlegroups.com.
And when you become more involved in qt development you'll start reusing own classes, it's not like you are rewriting everything all the time over and over again.
Reasons for python might be, that the're simply people who don't know c++, people who enjoy the rapid prototyping in python, the fact that you don't have to compile it for every platform.
At the end of the day it's up to you what tool/language to use. But even with switching to c++ you will not be able to skip the part of subclassing. Especially not on a project like a node editor.
Sascha
Pyside/pyqt is not limited. At Designer is not the language. It is a tool. This tool is more useful for c++
The things you would find missing from the python bindings are things that are not needed in python.
Auto desk doesn't support pyqt/pyside. They support at and users have to build python bindings. Python is supported because it is fast to prototype or build many tools that are fast enough. You also have access to a massive choice of python libraries. You can also move critical code to python c extensions and still continue using python overall
There is no benefit to writing your code in C++ unless it will provide a performance increase.
Well, if it possibles, i would love to do all those UI-setup: paint,event,drag-drop.... in the UI file, for convenient, also easy to manage, right? :)
The auto correction on my new phone switched "Qt" to "at"
Ya, I hope I wasn't being misleading. There are things that will require c++ to achieve proper performance.
What I mean is that simply writing in c++ won't equal a gain across the board.
As you put it, you can't just disregard it as an option entirely. It comes down to profiling the code in question.
Again, no. Its not a black and white statement like "whatever python can do, c++ can do it better". It is also not that python is for beginners and c++ is for large projects.
If you look around, you will see mixed examples. There are huge Python projects out there and there are tiny command line c++ tools.
For something that does heavy number crunching and looping, there are times when it must be done in c++ for the benefits of a compiled static language. Thus you will see Maya plugins that do Deformer nodes (etc) in the c++ api.
But even then, there are ways python developers can move critical code to c such as numpy. Math/matrix code is written in c and accessed as an extension in python to make the operations fast.
Not every "td written" tool needs to be c++, and not every small bit of code needs to be python.
And don't forget that cpython is written in c, which means many operations are backed by c calls. It depends on what you are doing.
Sorry to write so much. It just sounds like the conclusions being made are bit off.
The advantage to Python is that it's very easy to read, maintain, distribute, compile and share. It's performance is good enough for most things, and like Justin said, for most other things, you can always branch out to a C extension.
There's also the added advantage that you can more easily reuse the code for other projects and other applications like Nuke and Houdini.
You also have fewer concerns about Maya versions, what compiler is used etc..
Even if you do go the C++ route, the performance achieved is also directly proportional to your own coding abilities, whereas python takes care of a lot of things for you.
Each one has it's own place, but definitely don't disregard python because it seems 'inferior'