Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Subject: Cameras
Subject: scaleDown command
Subject: black out solved
Subject: Aircraft Tutorial
Subject: Mathematical XYZ ?
Subject: Re: Its done This vs That
Subject: Re: Its done first week
recommendations for screen video captures?
Subject: 3DExplorer "Oddity "
Subject: Re: New Director
Subject: ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
Subject: RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Subject: Re: Texturing
Big Break Contest Videos
Subject: New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Subject: Plasma?
Looking for Inspiration
Subject: Weird EMail Q
Subject: Re: It 's done first week ?
Subject: Cherry not cranberry
Subject: Re: New game
Camera Animation Problem
Subject: Particle plugins?
 
Subject: Re: general shelf gui question

Subject: Re: general shelf gui question

2003-12-17       - By Bryan Ewert

 Back
Reply:     1     2  

?from Tue, 16 Dec 2003 13:10:07 +0100

> Creating a shelf tab is simple, but how do I dynamically add buttons?

You can add a shelfButton at any time (as long as the UI exists), parented
to your shelfTab:

  // Do NOT create Shelf if running in batch mode, or
  // if Shelf UI is hidden!
  if ( !`about -batch` && isUIComponentVisible( "Shelf" ) )
  {
      if (`shelfLayout -exists "MyShelf"`==0)
      {
         addNewShelfTab "MyShelf";
      }

       shelfButton -c   "myShelfCommand"
                   -p   "MyShelf"
                   -i1  "myIcon.bmp"
                   -ann "My Command"
                   -l   "MyCommandButton";
  }
 
> How do I keep this from being stored in the userPrefs

As part of Maya's main shelf bar, you can't. In this case you will need to
remove the shelf from the UI and preferences by calling:

 deleteShelfTab MyShelf;

> I guess, I'm asking if there are ways to relatively easily build and
> destroy shelf tabs and their buttons without dealing with userPrefs and
> shelf*.mel files.

Check out myShelf.mel and Dirk's Connect Poly Shape toolbox for examples of
using "tear-off" shelves that are not associated with Maya's prefs:

 http://www.ewertb.com/maya/h2o/index.html

 http://www.lightstorm3d.com/

--
Bryan Ewert  ?maya@(protected) ?http://www.ewertb.com ?

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
List-help: <mailto:listar@(protected)?Subject=help>
List-archive: <http://www.highend3d.com/maya/devarchive/>