SketchUp C API

- Main Page
- Related Pages
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Fields
SUComponentBehavior Struct Reference

Describes how the component behaves in a SketchUp model, e.g. how it glues to surfaces. More...

`#include <SketchUpAPI/model/component_definition.h>`

## Data Fields
enum SUSnapToBehavior | component_snap
bool | component_cuts_opening
bool | component_always_face_camera
bool | component_shadows_face_sun
size_t | component_no_scale_mask

## Detailed Description

Describes how the component behaves in a SketchUp model, e.g. how it glues to surfaces.

Note
  See SUSnapToBehavior for examples on how it is defined depending on whether the code is compiled as C or C++. (Related to a bug in the original implementation).

See Also
  SUSnapToBehavior
  SUComponentDefinitionGetBehavior
  SUComponentDefinitionSetBehavior

## Field Documentation

bool SUComponentBehavior::component_always_face_camera

Whether the component visually revolves around its Z axes to have its X-Z plane face the camera.

bool SUComponentBehavior::component_cuts_opening

Whether the component creates an opening when placed on a surface, e.g. a window frame component.

size_t SUComponentBehavior::component_no_scale_mask

Bitmask where set bits indicate which scale tool handles are hidden on a given component:

- Bit0: disable scale along X axis,
- Bit1: disable scale along Y axis,
- Bit2: disable scale along Z axis,
- Bit3: disable scale in X-Z plane,
- Bit4: disable scale in Y-Z plane,
- Bit5: disable scale in X-Y plane,
- Bit6: disable scale uniform (XYZ)

Prior to SketchUp 2018, API 6.0 this field existed but was never used.

bool SUComponentBehavior::component_shadows_face_sun

Whether the component always casts a shadow as if it were facing the direction of the sun.

enum SUSnapToBehavior SUComponentBehavior::component_snap

How the component should snap to the surface where it's placed.

The documentation for this struct was generated from the following file:

- SketchUpAPI/model/component_definition.h