Skip to main content

Bounding Box

Intro

The Bounding Box Utility can be used to extract the bounding box of a Shape or Shapes. It can be used to, among other things, to create dynamic backgrounds for Text.

UI

Input Shapes - Connect a Shape or Shapes to sample their bounding box.

Expand - Increase/ decrease the size [x,y] of the resulting bounding box.

Position - Outputs the position of the Input Shapes' centre.

Size - Outputs the [width, height] of the Input Shapes.

Sample at Frame - When checked, the Bounding Box will calculate at a specific moment in time. This can be used with animating Input Shapes to output the bounding box calculation at any point before, during or after their animation.

Sample Frame - When Sample at Frame is checked, set the frame on which to calculate the bounding box of the Input Shapes.

Create and Connect Rectangle (button) - Create a Rectangle and connect the Bounding Box to its Position and Size attributes. Note that this will create a Rectangle of zero width and height if no Input Shapes are connected.

Example
  1. Create a Basic Shape (rectangle).
  2. Create a Text Shape and a Bounding Box.
  3. Connect textShape.idboundingBox.inputShapes.
  4. Connect boundingBox.positionbasicShape.position.
  5. Connect boundingBox.sizebasicShape.size.

The text will have a rectangle behind it which will update when any changes are made to it.

Note - make sure the Rectangle is behind the Text in the Scene Window and that the Text and Rectangle are set to different colors.