Customise user interface

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

 
Thread Tools Display Modes
  07 July 2015
Customise user interface

Hi

I have noticed that after Max has been installed for a while it takes forever to open the Customize User Interface window (where all the quads and keyboard short cuts are). The screen fades to white as it becomes unresponsive and i have to wait about 5 minutes for it to open!

has anyone seen this before or got a solution for this? I do a lot of scripting and imports into Max and im wondering if there is a file that max is just constantly adding stuff to so its got massive and as such takes forever to read?

Any help would be massively appreciated

Dave
__________________
Technically an artist
 
  07 July 2015
do you have Havok installed in you system?

ok. here is a thing. Havok, Physics, and Cloth as you know force creating their toolbars in max UI.
probably they use the same mechanism of doing it, and it's wrong(!). because of that every time you open max they make a new record in mnu (now it's mnux) file.
you can try to open currently used by your system menu file and check how many records of
"Cloth", "Havok Content Tools", "Help", and "Physics"...
the absolute record i've seen was ~220,000 items. you probably have a chance to break it

Last edited by denisT : 07 July 2015 at 01:34 PM.
 
  07 July 2015
to open the menu file in the script editor:
edit (menuMan.getMenuFile())
 
  07 July 2015
oh man that file is a mess!

i have references to my works script categories and menu items over 22000 times!

just deleting (cutting out to make a backup) the entire Usersave folder made the customize window open immediately so thanks for that! The new save file is 237Kb where the old one was 7Mb of xml, now wonder it was taking a lone time

I did a quick test and upon restart of Max it added another reference to it so this file is going to be cluttered with mess over time.
Why would it be adding my user scripts multiple times?

all im doing is a fileIn on boot of max so the users have the latest scripts, this cannot be why, or how would you ever update a script?
__________________
Technically an artist
 
  07 July 2015
Originally Posted by broomy: I did a quick test and upon restart of Max it added another reference to it so this file is going to be cluttered with mess over time.
Why would it be adding my user scripts multiple times?

all im doing is a fileIn on boot of max so the users have the latest scripts, this cannot be why, or how would you ever update a script?

does the system add anything related to your scripts every time you load them? i don't think so. the system adds cloth, havok, and physicx menu items data
 
  07 July 2015
Oh - yes. those clever little scripts and plugins which autocreate menu entries on max launch. Nvidia's PhysX startup scripts did that if you removed your Physx mainmenu entry - propably they still do:
They create a menu entry each launch over and over again. It only does'nt occure with MassFX ( which is PhysX essentially) because it's menu is'nt placed in the top level main menu and one usually does'nt rearrange the standard menue'S subelvels ...

And all Max Design users and now Max 2016 users ( because of the merge) beware :
Civil View's startup script looks for the "Civil view" menu entry on a specific position in the main menu. If it's not found there, it recreates it's menu structures over and over again leading to multiple "Civil View" entries in your mnux. Really great when you have a customized main menu with added menues at the end ...
The only way to fix is either editing it's startup script, removeing them from the startup folders or remove civil view alltogether
The relevant script parts would be so easy to fix, similar to the pseudo code below
Quote: if ( menuMan.findMenu "Civil View" == undefined ) then
(
-- sems like the first run
-- create menu structure like before, add created menu to the mainMenu
mainMenubar.addItem <newCivilViewMenu>( mainMenubar.numItems() - 1 )
)
else -- LEAVE MAINMENU STRUCTURE ALONE , DONT MESS WITH CUSTOMIZED USER INTERFACES


I reported the Civil view bug, maybe it would be good if more people do the same
Considering how long Civil View is already shipping with Max Design ( and now with 3ds Max ), it makes me wonder how many people have bloated menue files, just because of that one flaw..

Here's my menu structure at the point i found out about this Civil view flaw, over 100 Civil view entris ...
Attached Images
File Type: png 100_CivilViewMenues.png (11.8 KB, 106 views)
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio

Last edited by spacefrog : 07 July 2015 at 05:26 AM.
 
  04 April 2018
Originally Posted by denisT: do you have Havok installed in you system?

ok. here is a thing. Havok, Physics, and Cloth as you know force creating their toolbars in max UI.
probably they use the same mechanism of doing it, and it's wrong(!). because of that every time you open max they make a new record in mnu (now it's mnux) file.
you can try to open currently used by your system menu file and check how many records of
"Cloth", "Havok Content Tools", "Help", and "Physics"...
the absolute record i've seen was ~220,000 items. you probably have a chance to break it

Hey Denis,

Could you elaborate on the correct method of updating menus?
We have a script that creates a menu for our in house tools.
As they change constantly, either added or removed, we build the menu on startup and remove it on shutdown, yet the mnux file is still updated with the removed menu.
 
  04 April 2018
After much trial and error, here is a python function that will remove a menu and all it's sub menu's, resulting in a non-polluted .mnux file:


frompymxsimport runtime as mxRt
def remove_AllItemsFromMenu(inMenu, removeTopMenu=False):
   """
      Rercursively remove all items and sub items from the givem menu.
   """
   
   menuCount = inMenu.numItems()
   for menuIndex in reversed(xrange(1, menuCount + 1)):

      menu  = inMenu.getItem(menuIndex)
      subMenu = menu.getSubMenu()
      if subMenu:

         remove_AllItemsFromMenu(subMenu, removeTopMenu=True)

      inMenu.removeItem(menu)
   if removeTopMenu:

      mxRt.menuMan.unRegisterMenu(inMenu)

   return mxRt.menuMan.updateMenuBar()


usage:

# Requires a menu called "TestMenu" to exist:
menu =mxRt.menuMan.findMenu("TestMenu")
remove_AllItemsFromMenu(menu)


Hopefully this well help someone else fighting through the super low level menu api.
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:40 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.