PDA

View Full Version : Display Filter Settings - Non-Scriptable?


Horganovski
04-03-2008, 03:09 PM
Hey Folks,

I'm working on some animations using a rig that has both Null objects and Splines as controllers. When making viewport renders to check timing and to keep the display uncluttered, I have to go to the Display filter settings each time, switch off display for both Nulls and Splines and then hit Make Preview.

This is a little tedious when making lots of tests so I'm trying to make a script to do these things with one button. The problem is when I change Display Filter settings and look in the Script Log I see that every option (Null, Spline, Bone, etc) calls the same command - ie CallCommand(70000); // Display Filter which means that I can't control them separately (even the All and None options call this same command). When I do call this command with a script it seems to have no effect.

Is there any other way this can be done? It seems strange this function can't be controlled by scripts, or maybe there's some hidden command I don't know about?

Any ideas appreciated.

Cheers,
Brian

JDP
04-05-2008, 06:24 AM
This bit of code will do what you want.


var draw = doc->GetActiveBaseDraw();
if(!draw) return;
draw#BASEDRAW_DISPLAYFILTER_NULL = 0;
draw#BASEDRAW_DISPLAYFILTER_SPLINE = 0;

To turn them back on use 1 instead of 0 (boolean data type).
To toggle on and off use ! which means not.


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


Forgive me if I'm teaching you to suck eggs.

Horganovski
04-05-2008, 11:40 AM
That's perfect for what I want to do, many thanks, this will be a great little timesaver.


Cheers,
Brian

CGTalk Moderation
04-05-2008, 11:40 AM
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.