Is there a way to quickly hide / show controls...?

Become a member of the CGSociety

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

 
Thread Tools Search this Thread Display Modes
  03 March 2014
Is there a way to quickly hide / show controls...?

Specifically, I'm looking to set up some kind of quick keys to show / hide all the various elements in the viewport. I realize that I can go up to the "filter" menu and either hit "ALL" or "NONE" - however, that doesn't really do it, because I normally like to have certain of those options off all the time, and when I toggle "ALL" then those items get turned on by default.

I guess, what I'm after, is something like "COMMAND + SHIFT + H" in AfterEffects.

Anyone?

Thanks!
 
  03 March 2014
I'm going to simplify my question. Forget all the items in the "filter" menu in the viewport. All I want / need to do is find a quick way to toggle on or off the "Sel: Wireframe" from the Display menu for the viewport. That would be great!
 
  03 March 2014
Script it!

For example I use this to toggle the display of splines and nulls (typically controllers in character rigs).

Here's the code (COFFEE). The '!' means 'not' in COFFEE so it toggles. You should be able to adapt this for what you need I guess.


var draw = doc->GetActiveBaseDraw();
if(!draw) return;


draw#BASEDRAW_DISPLAYFILTER_NULL = !draw#BASEDRAW_DISPLAYFILTER_NULL;
draw#BASEDRAW_DISPLAYFILTER_SPLINE = !draw#BASEDRAW_DISPLAYFILTER_SPLINE;
 
  03 March 2014
Hi, I agree with Horganovski, you can paste this in a new python script, save it and dock it in the layout (or assign an hotkey):

import c4d
from c4d import gui

def main():
    bd = doc.GetActiveBaseDraw()
    filter_state = bd[c4d.BASEDRAW_DATA_WIREFRAMESELECTION]
    if filter_state == 1:
        bd[c4d.BASEDRAW_DATA_WIREFRAMESELECTION] = 0
    else:
        bd[c4d.BASEDRAW_DATA_WIREFRAMESELECTION] = 1   
    c4d.EventAdd()
if __name__=='__main__':
    main()


this should toggle Sel. Wireframe on or off. Horganovski code is more elegant though
__________________
www.visualtricks.it - www.c4dzone.com
 
  03 March 2014
Guys, thank you SO much. I'll give both script options a shot, and see if I can weed my way through.

Cheers!
 
  03 March 2014
Wow I can't believe I've ignored COFFEE and Python for so long. 3 years into using C4D and I'm constantly surprised at how malleable it is. I had no idea you could drag just about any command or optionbox into the ScriptManager to mess around with it.

The homework never ends now I'm spending the weekend reading up about COFFEE.

Thanks Horganovski and Visualtricks!
__________________
-willRyan
 
reply 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 07:22 AM.


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