inrange - Check if a Frame is Within a Certain Range

Written by Frank Rueter on .

Checking whether a certain frame or number is within a given range is often needed, and often resulting expressions are unnecessarily complex. Here is a simple solution:

This will get you the script's current frame:

1
frame

 

 this will return true if the current frame is between 1 and 10 (inclusive):
1
inrange( frame, 1, 10 )

 

The latter is handy in nodes' disable knob to switch them on and off depending on a frame range:
Node is disabled at frame 3:
inrange1

and enabled after frame 10:
inrange2 

 

You have no rights to post comments

We have 2921 guests and 129 members online