maya2009 and shelf weirdness

40 views
Skip to first unread message

dwarren

unread,
Nov 26, 2009, 5:40:47 PM11/26/09
to maya_he3d
Hi all,

I'm running into a strange bit of business with shelves in maya2009.

In maya6.5 and maya7, we've been running a melscript at load up that
sets up some shelves based on whatever project the user is a member
of. Since we want the user to have the latest shelves, we delete the
specific ones we want from the maya session, delete the local copies
of the shelf mel files, clear out the associated optionVars
(shelfName, shelfLoad and shelfFile), and then copy the shelves from
the server and load them up.

No issues.

However, in maya2009, when we do the same thing, we're left with these
"non-shelves" -- they don't show up in the UI, but you can see them
listed in the ShelfEditor (each with the name '0' -- as in 'zero').
You can't affect them in any way using the ShelfEditor. There's one
for each shelf that was deleted and then reconstituted. The new
versions of shelves from the server are there too -- so if we
reconstituted 'BOBO' shelf, it will be present.

Additionally, sometimes the buttons that should appear in a shelf are
found in the shelf to the left of it, and the original shelf is empty.
Sometimes a shelf has twice as many buttons in it than it should have,
the original buttons are repeated in it a second time.

It seems as though the internal shelf indexing in maya2009 gets broken
somehow -- which would explain buttons shifting 'n' such.

Problem is, I have no idea how to deal with it -- everything I've
tried has ended up not solving the problem.

Anyone have similar problems? If so, how did you solve them?

I'd also love to hear alternate methods of getting custom shelves to
users if you've got 'em.

Thanks ,

-DW

dwarren

unread,
Nov 26, 2009, 5:51:13 PM11/26/09
to maya_he3d
> However, in maya2009, when we do the same thing, we're left with these
> "non-shelves" -- they don't show up in the UI, but you can see them
> listed in the ShelfEditor (each with the name '0' -- as in 'zero').
> You can't affect them in any way using the ShelfEditor. There's one
> for each shelf that was deleted and then reconstituted. The new
> versions of shelves from the server are there too -- so if we
> reconstituted 'BOBO' shelf, it will be present.

Actually, I just double-checked, and these '0' shelves are there in
Maya7 as well, but they don't cause the shelf-button jumping to other
shelves or doubling-up there like they are in maya2009. They still
cause certain functions of the ShelfEditor (move up, delete, etc.) to
malfunction in the same way though.

Argh! ;)

mikael persson

unread,
Nov 27, 2009, 4:37:37 AM11/27/09
to maya...@googlegroups.com
Not a solution really. But as far as I can remember there has always been an issue when you rearrange shelves.
When I encounter the problem of buttons ending up in the wrong shelf and others being empty I just start by opening my leftmost shelf and work my way to the far right.
Once I've opened all my shelves maya starts to remember where things actually are.

I don't know if this fixes your problems? But it always sort things out on my end atleast.

Mikael

2009/11/26 dwarren <deana...@gmail.com>

dwarren

unread,
Nov 30, 2009, 10:35:54 AM11/30/09
to maya_he3d
After some investigation I figured out that there's an internal
optionVar called 'numShelves', which in our case was getting out of
sync with the number of shelves that we actually had, because we were
deleting optionVars related to shelves via mel but not reducing the
number in 'numShelves' to match. When they're out of sync (in our
case two too many), it appears that Maya tries to create shelves based
on the 'numShelves' number, and if there are none that match the index
it's at when looping to the numShelves number, you get weirdness.

I've since added code that clears out the 'numShelves' optionVar, and
resets it -- and the 'shelfName', 'shelfLoad', and 'shelfFile' shelf
optionVars -- to be in sync with the shelves we actually want, and
their number. Since doing this, the '0' shelves have gone away, and
the ShelfEditor works correctly again.

Perused the shelfEditorDialog.mel, shelfLabel.mel, and shelf.mel
scripts to figure out what was going on under the hood with Maya
shelves.

Cheers,

-DW
Reply all
Reply to author
Forward
0 new messages