What's the fastest way to build an outliner-like QTree widget from the
scene?
Also, what python data type is best for storing a tree representation
anyhow?
--
CE
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
Maybe xml?
Best regards
Ricardo Viana
On Feb 4, 2012, at 4:20 PM, Christopher Evans chris.ev...@gmail.com wrote:
What's the fastest way to build an outliner-like QTree widget from the scene?
Also, what python data type is best for storing a tree representation anyhow?
--
CE
--
view
Take a look at QTreeWidget and possibly subclass QTreeItem per Maya object
type that you are interested in.
On Saturday, February 4, 2012, Ricardo Viana cgolhei...@gmail.com wrote:
Maybe xml?
Best regards
Ricardo Viana
On Feb 4, 2012, at 4:20 PM, Christopher Evans chris.ev...@gmail.com
Yeah, I meant is there any fast way in Python to do like a modified walk
function.
I am doing something like this: http://pastebin.com/SCvrKxF8
Is that the fastest way to recursively traverse the scene? I can make a
QTreeWidget, no prob. What's the best way to store a tree hierarchy like
this in
Hey Chris,
I would suggest nested dictionaries. for storage of the info, makes for
much faster retrieval of information. As far as faster scene traversing, I
am not sure of a faster way other than what oyu are doing. I would suggest
however to remove the print statements, your code will increase
Yeah that is just debug stuff :)
Thanks for the reply.
On Sat, Feb 4, 2012 at 7:44 PM, damon shelton damondshel...@gmail.comwrote:
Hey Chris,
I would suggest nested dictionaries. for storage of the info, makes for
much faster retrieval of information. As far as faster scene traversing, I
am
You could try using the API and MItDag. I'm not sure if it will be faster
or not, but worth a try.
Chad
On Sat, Feb 4, 2012 at 12:28 PM, Christopher Evans chris.ev...@gmail.comwrote:
Yeah that is just debug stuff :)
Thanks for the reply.
On Sat, Feb 4, 2012 at 7:44 PM, damon shelton
Short of testing, I'm pretty confident that using an API MIt* would increase
the speed just for the fact that its probably doing more in the C++ side.
On Feb 4, 2012, at 2:58 PM, Chad Vernon wrote:
You could try using the API and MItDag. I'm not sure if it will be faster or
not, but worth
Also, for the QTreeView, it might even be beneficial to make your model load
hierarchies on demand as opposed to an exhaustive walk of the whole tree. So
each time you expand a node, thats when you find the children. Unless of course
you actually run an 'expand all' type operation.
And I agree