Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Maya window custom startup?
  RSS 2.0 ATOM  

Maya window custom startup?
Rate this thread
 
62489
 
Permlink of this thread  
avatar
  • rifaulmen
  • Posted: 03 December 2011 02:22 PM
  • Total Posts: 27
  • Joined: 24 June 2009 08:28 PM

Sometimes I rely on custom tools to work for me,,,,

There is a way in maya
Window > Raise Application Windows,,,,,

How can I keep Main all windows ,,,shelf and MEL_PYTHON window ect,,,,,,,

Exemple;;;;open my scene directly loads all windows*** hypershad**** outline **** window MEL pynthon

like this picture



Attachment Attachment
Replies: 0
avatar
  • ldunham1
  • Posted: 04 December 2011 01:57 AM

have a look at userSetup.mel

if you don’t already have one, you can create your own with the mel commands to load the windows on maya startup.



Lee Dunham | Character TD
ldunham.blogspot.com

Replies: 1
/userdata/avatar/t7avv8mz6.jpg

can you help me tutorial or simple site explains UserSetup.mel and UserSetup.pyt

Author: rifaulmen

Replied: 04 December 2011 07:26 AM  
avatar
  • ldunham1
  • Posted: 04 December 2011 08:12 AM

of course.
If you create a userSetup.mel OR userSetup.py (.mel extention for mel script, .py for python) script file and place it in one of maya’s script directories (ie C:\Users\*****\Documents\maya\2011-x64\scripts\userSetup.mel). I will assume you decide with mel and example with mel.
When starting up, maya will check these folders and if it finds a userSetup file, will run the scripts in that file.
For example, if you wanted maya to print “Hello” when you started it up, you create a mel script saying

print "mel" ;

and save that script as userSetup.mel and place it in mayas script folder (you should only have ONE file called userSetup or maya could conflict and fail to load).
As for wanting it to load the hyperShade, outliner etc you do something similar.

ScriptEditor;
OutlinerWindow;
HypershadeWindow;
setChannelsLayersVisible(true);

Copy the above code to your maya script Editor, and save it as a mel as userSetup.mel
It should load your scriptEditor, Outliner, hyperShade and display the ChannelBox, however whether its torn off depends on its last state.

Hope that helps.



Lee Dunham | Character TD
ldunham.blogspot.com

Replies: 1
/userdata/avatar/t7avv8mz6.jpg

great,,,i test this tutorial,,,thank
how to add in list script editor UserSetup.mel
I use the option Menu>History> Script Editor >Echo All Commands in script Editor
How to print name menu,,,,,
Like this picture

Author: rifaulmen

Replied: 04 December 2011 09:50 AM  
avatar
  • rifaulmen
  • Posted: 04 December 2011 09:55 AM

great,,,i test this tutorial,,,thank
how to add in list script editor UserSetup.mel
Ex:buildObjectEdMenu MayaWindow|mainWindowMenu|menuItem245;
I use the option Menu>History> Script Editor >Echo All Commands in script Editor
How to print name menu,,,,,
Like this picture



Attachment Attachment
Replies: 0
avatar
  • ldunham1
  • Posted: 04 December 2011 08:41 PM

those are torn off panels, from menus.
Off hand im not sure how to get those up on startup as far as i know would be different and more complicated than just windows but will have a look



Lee Dunham | Character TD
ldunham.blogspot.com

Replies: 0
avatar
  • rifaulmen
  • Posted: 06 December 2011 11:39 AM

i find script like this
Revert Menu Item 1.2.0 for maya 2011
This script adds in a menu item that allows you to revert the scene file to the latest saved version.

http://www.creativecrash.com/maya/downloads/scripts-plugins/c/revert-menu-item



Replies: 0