Community
Meshmixer
Welcome to Autodesk’s Meshmixer Forums. Share your knowledge, ask questions, and explore popular Meshmixer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I sort Object Manager objects?

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Anonymous
1881 Views, 8 Replies

How do I sort Object Manager objects?

I have a very large anatomical model project that includes original imported STLs, surface models derived from it, solids, molds, shells, etc., and I need to recreate some elements and make new ones based on old pieces from time to time.  After having 10+ objects, now well into the 30+ range, because there is no tree-based or similar representation of object heirarchy, management has become a problem.  I've implemented a numeric system so I can track which objects are derived from what objects, but after saving and reopening, the objects have gotten out of order and it's a serious pain to visually scan through the browser to find parts that weren't where they used to be.  

 

Is there any way to do an alpha/numeric sort on the names of objects?

 

Suggestions? Solutions?

 

If anyone else has this issue open as a feature to include (assuming I haven't just been missing it), please point me towards it so I can vote in favor of it!

 

Thanks!

Mark

8 REPLIES 8
Message 2 of 9
MagWeb
in reply to: Anonymous

No way to do this in MM's GUI.

 

Because of that, I did the SceneManager based on mmApi. It allows to sort and activate objects using a heirarchy. See the second message here



Gunter Weber
Triangle Artisan

Message 3 of 9
Anonymous
in reply to: MagWeb

Thanks very much - would that I was a Mac user.  Any chance you moved forward on the Windows implementation in the last year?

Message 4 of 9
MagWeb
in reply to: Anonymous

Sorry, this post is somehow misleading as it was transferred from the old Meshmixer forum (where I attached the macOS application). Instead I did attach the Python source script in this new thread. This should be cross platform. So you'd need to install latest Python2 and download mmApi.  Now load the script to the Python shell and run it... 

Here hfcandrew gave some hints how to install mmApi on WIN10.



Gunter Weber
Triangle Artisan

Message 5 of 9
Anonymous
in reply to: MagWeb

Thanks very much Gunter - just got back to it last night.  Earlier attempt tried to use Python 2.7.14...  

 

Running the script through IDLE starts up fine.

LMB_release works,

SHIFT_LMB_Up work to complete drag into/out of boxes

Rename_Item works.

 

Unfortunately, Shift_LMB_Drag, Move_Item and Hide_Node aren't cooperating, I'm not enough of a Python guru to work it out yet.  Maybe a Win/Mac issue?

 

Suggestions on the following

 

Hide_Node doesn't seem to do anything after ButtonRelease-2 - no  error messages, just no observable effect.

 

Shift-B1-Motion gives the following message (continuously while dragging)

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1547, in __call__
return self.func(*args)
File "C:\Users\mop\Documents\meshmixerpython\MMSceneManager_01.py", line 313, in Shift_LMB_Drag
t['cursor'] = "hand"
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1343, in __setitem__
self.configure({key: value})
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1336, in configure
return self._configure('configure', cnf, kw)
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1327, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
TclError: bad cursor spec "hand"

 

Bl-Motion gives the following message (also while moving)

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1547, in __call__
return self.func(*args)
File "C:\Users\mop\Documents\meshmixerpython\MMSceneManager_01.py", line 373, in Move_Item
t['cursor'] = "hand"
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1343, in __setitem__
self.configure({key: value})
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1336, in configure
return self._configure('configure', cnf, kw)
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1327, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
TclError: bad cursor spec "hand"

Message 6 of 9
hfcandrew
in reply to: Anonymous

I think just edit the code and change all instances of the word 'hand' to 'star'.

Message 7 of 9
MagWeb
in reply to: hfcandrew

Also:

Mouse button numbers are different on MAC and WIN.

On MAC "2" means the right mouse button while "2" means the middle mouse button on a WIN machine.

 

Either you use the middle button  or change the binding in line 615 to 

tree.bind("<ButtonRelease-3>",Hide_Node)


Gunter Weber
Triangle Artisan

Message 8 of 9
Anonymous
in reply to: hfcandrew

Perfect - thank you!

Message 9 of 9
Anonymous
in reply to: MagWeb

Perfect as well - thank you!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums