Re: [Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-05 Thread Judah Baron
I would not store much of the scene data in nested dictionaries, though depending on your needs this may make sense. I would store as little as possible, only what you need, use the maya scene as your data model. All you need to keep track of is whether or not you have build a ui element for a part

Re: [Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-04 Thread Justin Israel
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

Re: [Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-04 Thread Justin Israel
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

Re: [Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-04 Thread Chad Vernon
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 wrote: > Yeah that is just debug stuff :) > > Thanks for the reply. > > > On Sat, Feb 4, 2012 at 7:44 PM, damon shelton wrote: > >> Hey Chri

Re: [Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-04 Thread Christopher Evans
Yeah that is just debug stuff :) Thanks for the reply. On Sat, Feb 4, 2012 at 7:44 PM, damon shelton wrote: > 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 faste

Re: [Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-04 Thread damon shelton
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 in

Re: [Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-04 Thread Christopher Evans
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

Re: [Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-04 Thread Judah Baron
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 wrote: > Maybe xml? > > Best regards > Ricardo Viana > On Feb 4, 2012, at 4:20 PM, Christopher Evans wrote: > > What's the fastest way to build

Re: [Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-04 Thread Ricardo Viana
Maybe xml? Best regards Ricardo Viana On Feb 4, 2012, at 4:20 PM, Christopher Evans 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 archives: http

[Maya-Python] Fastest way to build a QTreeWidget from Scene

2012-02-04 Thread Christopher Evans
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: http://groups.google.com/gro