Isolate select script -problem

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2012
Isolate select script -problem


string $panel = `getPanel -withFocus`;
int $panelStatus = `modelEditor -q -viewSelected $panel`;
if ( $panelStatus == 0 ) {
enableIsolateSelect $panel 1;
isolateSelect -state 1 $panel;
isoSelectAutoAddNewObjs $panel 1;
} else {
enableIsolateSelect $panel 0;
isolateSelect -state 0 $panel;
}

...is my isolate select -script. I did not write it so I don't know if there's a better way of constructing it, but it is working as intended except for one thing:

I have another script - a fullscreen script - that toggles setMainMenubarVisible on/off, and everytime it's set to 1, the isolate script does not work. Why?
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
  10 October 2012
without seeing your script, its hard to say... maybe the panel changes? maybe the panel loses focus?
 
  10 October 2012
Fullscreen script:
toggleUIComponentVisibility "Tool Box";
toggleUIComponentVisibility "Attribute Editor";
toggleUIComponentVisibility "Channel Box";
toggleUIComponentVisibility "Layer Editor";
toggleUIComponentVisibility "Help Line";
toggleUIComponentVisibility "Command Line";
setUIComponentVisibility "Range Slider" 0;
setUIComponentVisibility "Time Slider" 0;
setUIComponentVisibility "Status Line" 0;

channelsLayersPrefChange false;

if (`optionVar -q allowMenusInPanels`) {toggleMenuBarsInAllPanels 0;} else {toggleMenuBarsInAllPanels 1;}
if (`optionVar -q mainWindowMenubarVis`) {setMainMenubarVisible 0;} else {setMainMenubarVisible 1;}
if (`optionVar -q collapseIconBarsInPanels`) {toggleModelEditorBarsInAllPanels 0;} else {toggleModelEditorBarsInAllPanels 1;}
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
  10 October 2012
I've localized the problem to the following:
if (`optionVar -q mainWindowMenubarVis`)
{
	setMainMenubarVisible 0;
} else {
	setMainMenubarVisible 1;
}

It turns off the visibility for the main menu bar - which I want hidden in fullscreen mode.
But a side effect (or bug) is that it also makes Maya believe there is no active view.
My isolate select script is dependant on an active view, and when none is there it simply stops working.
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
  10 October 2012
Maya has a built-in hotkey for hiding all off the UI....maybe that will work in combination with your isolate select script?



check out "toggleMainWindowComponents"
 
  10 October 2012
Yes I already know of that command and I have a perfectly good reason for not using it and that reason is that it hides everything, really everything... and that's not what I want.
I have the tool settings window on another screen and I want it to be there even in fullscreen mode. toggleMainWindowComponents however hides it, and upon running the toggle again moves the tool settings window to it's original position (where it's not torn off!!).

So yea that's why I made this fullscreen script - to get better control...
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
  10 October 2012
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed 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 11:44 PM.


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