PDA

View Full Version : cycling through channelbox/attributes/hide


chumps
07-16-2004, 06:44 AM
could someone point me to a script that will cycle through channelbox, attributese, and then hide attributes, in that order?

i have it set to toggle between channel box and attributes, but i don't know how to add the hide attributes as the third option. currently i have a 2nd key for hiding attributes and i'd like to free some valuable keyboard space :)

cheers.

paulwconnor
07-17-2004, 07:07 PM
Here you go: just written this for you: does the trick! ;)if (`isUIComponentVisible("Channel Box / Layer Editor")`) {



toggleUIComponentVisibility("Attribute Editor");

}

else if (`isUIComponentVisible("Attribute Editor")`) {

toggleUIComponentVisibility("Attribute Editor");

}

else toggleUIComponentVisibility("Channel Box / Layer Editor");

updateMainWindowComponentState();



... just paste that into the script editor, then drag it onto the shelf, and all you have to do is click the relevant button. :) Alternatively, make a new hotkey which calls this script...

chumps
07-18-2004, 12:48 AM
ahhh, a thousand thanks! i know it's annoying to have people beg for scripts and such but often i really don't have a choice :(.

works perfectly!

paulwconnor
07-18-2004, 12:47 PM
No, its a pleasure: solving these problems on CGTalk is very useful experience for me - I'm glad to help! :)

Cheers,
Paul.

www.cgtoolshop.co.uk (http://www.cgtoolshop.co.uk)

FatAssasin
09-03-2004, 05:24 PM
Hey, that pretty handy! Thanks from me too. :)

paulwconnor
09-06-2004, 12:36 AM
You're welcome!

stallion151
09-06-2004, 11:32 PM
whenever i try to edit the script to switch between channel and layer, it says channel box doesn't exist. What is the reason for that.


if (`isUIComponentVisible("Channel Box")`) {



toggleUIComponentVisibility("Layer Editor");

}

else if (`isUIComponentVisible("Layer Editor")`) {

toggleUIComponentVisibility("Layer Editor");

}

else toggleUIComponentVisibility("Channel Box");

updateMainWindowComponentState();
// Error: A component called "Channel Box" does not exist. //

paulwconnor
09-06-2004, 11:59 PM
Your problem is that the "Channel Box" and "Layer Editor" are both part of the same UIComponent: "Channel Box / Layer Editor".

Looking quickly, if you use either of the commands:


showChannelsLayers "Layer Editor";
showChannelsLayers "Channel Box";
showChannelsLayers "Channel Box / Layer Editor";



... when the Channel Box / Layer Editor is visible, the appropriate item will be displayed. You shouldn't have any problems adding those to the 'cycler'. (I'm a bit tired after a long day of programming, I'm afraid!)

stallion151
09-15-2004, 12:27 AM
still not sure...sorry.
do i replace with isUIComponentVisible with showChannelsLayers "Channel Box";

can't work how its done. not very script orientated myself. but can't live without them

CGTalk Moderation
01-18-2006, 05:00 PM
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.