SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Types | 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>

Public Types

enum  SUSnapToBehavior {
  SUSnapToBehavior_None, SUSnapToBehavior_Any, SUSnapToBehavior_Horizontal, SUSnapToBehavior_Vertical,
 Describes how the component instance can be placed when a user adds it to a model. For example a window component instance should snap to a vertical plane.

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.

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: