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.




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!


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;



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()
    if filter_state == 1:
if __name__=='__main__':

this should toggle Sel. Wireframe on or off. Horganovski code is more elegant though :slight_smile:


Guys, thank you SO much. I’ll give both script options a shot, and see if I can weed my way through.



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!


Glad it helps! I’d recommend learning Python over COFFEE though as COFFEE seems to be pretty much dead in terms of development, I don’t think there have been significant updates to it in years. The Python docs are kind of poor in my opinion (they need a lot more examples for one thing like the docs for other apps, ahem!) but worth persevering with as Python seems to give you better access to the workings of C4D.



Thanks Brian — there are so many places to learn Python online. Do you have a place you would recommend to start training, with a particular focus on getting up to speed with how to use it best in Cinema 4D?


Cineversity has some good tutorials on it, and there is a wiki there that has a lot of useful tidbits of code.

When you wrap your head around how the classes work, it gets easier.

I’d recommend just finding scripts(grab any of the ones on my website) and start picking apart the code(hopefully I commented them).