Author Topic: MM Scene Manager App  (Read 319 times)

MagWeb

  • Administrator
  • Hero Member
  • *****
  • Posts: 1191
    • View Profile
MM Scene Manager App
« on: August 15, 2017, 07:51:01 PM »
Hi,

I needed some advanced features to control a scene with multiple objects.
Using MM API I made a standalone application to replace MM's ObjectBrowser. This is my very first application so expect some issues and ugly source code but I did my best and found it running fine on several macOS machines here (even machines where MM API never was installed).
ATM it is Mac only, sorry, but pure Python 2.7 seems not to support builds for a different OS so I will have to install Python and MM API on Windows to build from the same code over there (or maybe somebody else does?).

Usage:

No installation procedure. Simply unpack it to somewhere on your HDD.

AFTER you've loaded at least one object to MM's scene launch MMSceneManager.app. Its GUI will show up. This window will be topmost all the time. As it is a separate application you may drag it to anywhere (even to a second monitor). Dragging the lower corners you may resize it to a desired shape.

MMSceneManager talks and listens to MM's scene. Therefore at launch it shows all objects (Meshes and Pivots) existing in MM's current scene. If you add a new object to MM's scene it will be added to the SceneManager highlighted in red. As soon as you click this highlighted item it will loose this "new" flag.

At launch SceneManager does not know about the visibility settings in MM. All items are marked with an "O" (= visible). To synchronise visibility you may click on the "ShowAll" Button which will set all meshes in MM to visible.
Hiding via SceneManager is simple: RMB-click on the item to hide in MM's scene. The item will now show a "X" (= non visible).

You can rename an item via LMB Double click. Enter the new name in the pop up dialog.

Now the either sense of this app: It supports sorting in a hierarchical tree structure.
With LMB-drag you can move an item up and down onto existing and open levels. As MM does not know something about such levels at start you can move the item only up and down which is fine but not the kind of usage I wrote this app for.
With Shift+LMB-drag you can move item "A" (and if there already are "children" its children) onto another item "B" into a new depth of the scene-tree. Now "B" became the parent of "A". Again Shift+LMB dragging "B"  onto an item "C" will make C the parent of B which is parent of A....aso.... As you may bind several same level children to a parent  you can construct complex structures quickly.
As soon as you drop an item A onto another item B you will get a little triangle in front of the B entry. Clicking this triangle will open/close the next down level of children.
Back to LMB-dragging (without holding down Shift): With a parent B open you may drag the item to that level as well.

So if there's D being a child of C being a child of B being a child of A: LMB clicking of A will activate B, C and D in MM's scene as well. Clicking on B will also activate C and D - a quick way to activate and to set visibility (remember RMB click).

Now you may run into a situation where you want to activate a single object (which is a parent of children) only. For this I added the "Single" checkbox. This active will activate the clicked item only.

To organize objects without a direct parent there's the option to add "Boxes" to the tree ( "AddBox" button). A box is just a container object ( similar to a file's folder). It acts the same way (same commands) as an object item, but isn't sent to MM.

"Open All" button will expand all nodes in the tree to show the whole content.

Now when you did all that nice work to construct such a tree it might happen that you want to save this structure. MM can't do this. Therefore the "Save" button will save a .cvs table of the current tree. With the "Load" button you may call a previous saved layout. If the loaded scene in MM almost fits to the layout you'll have a nicer start next time you use SceneManager.

So far. Download below (source included in the .app bundle/Contents/Resources/MMSceneManager_01.py). Use it free but at your own risk, without any warranty.
Thanks to all the guys providing info about used modules (Tkinter and Python) all over the web!

Feedback welcome!

MagWeb
I'm just a user as you are. Being no Autodesk employee: I do not know where this road will lead to, nor do I claim to've all stuff got right.

RS

  • Meshmixer Product Manager
  • Administrator
  • Jr. Member
  • *****
  • Posts: 53
    • View Profile
Re: MM Scene Manager App
« Reply #1 on: August 15, 2017, 08:41:34 PM »
Thank you, MagWeb!

rowiac

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: MM Scene Manager App
« Reply #2 on: August 23, 2017, 12:55:03 AM »
MagWeb,

Nice job on what looks to be a very useful app.  I'll have to wait for the Windows version though.