ShrinkwrapConstraint(Constraint)

base classes — bpy_struct, Constraint

class bpy.types.ShrinkwrapConstraint(Constraint)

Create constraint-based shrinkwrap relationship

cull_face

Stop vertices from projecting to a face on the target when facing towards/away (default 'OFF')

  • OFF Off – No culling.

  • FRONT Front – No projection when in front of the face.

  • BACK Back – No projection when behind the face.

Type:

Literal[‘OFF’, ‘FRONT’, ‘BACK’]

distance

Distance to Target (in [0, inf], default 0.0)

Type:

float

project_axis

Axis constrain to (default 'POS_X')

Type:

Literal[Object Axis Items]

project_axis_space

Space for the projection axis (default 'WORLD')

  • WORLD World Space – The constraint is applied relative to the world coordinate system.

  • CUSTOM Custom Space – The constraint is applied in local space of a custom object/bone/vertex group.

  • POSE Pose Space – The constraint is applied in Pose Space, the object transformation is ignored.

  • LOCAL_WITH_PARENT Local With Parent – The constraint is applied relative to the rest pose local coordinate system of the bone, thus including the parent-induced transformation.

  • LOCAL Local Space – The constraint is applied relative to the local coordinate system of the object.

Type:

Literal[‘WORLD’, ‘CUSTOM’, ‘POSE’, ‘LOCAL_WITH_PARENT’, ‘LOCAL’]

project_limit

Limit the distance used for projection (zero disables) (in [0, inf], default 0.0)

Type:

float

shrinkwrap_type

Select type of shrinkwrap algorithm for target position (default 'NEAREST_SURFACE')

  • NEAREST_SURFACE Nearest Surface Point – Shrink the location to the nearest target surface.

  • PROJECT Project – Shrink the location to the nearest target surface along a given axis.

  • NEAREST_VERTEX Nearest Vertex – Shrink the location to the nearest target vertex.

  • TARGET_PROJECT Target Normal Project – Shrink the location to the nearest target surface along the interpolated vertex normals of the target.

Type:

Literal[‘NEAREST_SURFACE’, ‘PROJECT’, ‘NEAREST_VERTEX’, ‘TARGET_PROJECT’]

target

Target Mesh object

Type:

Object

track_axis

Axis that is aligned to the normal (default 'TRACK_X')

Type:

Literal[‘TRACK_X’, ‘TRACK_Y’, ‘TRACK_Z’, ‘TRACK_NEGATIVE_X’, ‘TRACK_NEGATIVE_Y’, ‘TRACK_NEGATIVE_Z’]

use_invert_cull

When projecting in the opposite direction invert the face cull mode (default False)

Type:

bool

use_project_opposite

Project in both specified and opposite directions (default False)

Type:

bool

use_track_normal

Align the specified axis to the surface normal (default False)

Type:

bool

wrap_mode

Select how to constrain the object to the target surface (default 'ON_SURFACE')

Type:

Literal[Modifier Shrinkwrap Mode Items]

classmethod bl_rna_get_subclass(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (bpy.types.Struct | None) – The value to return when not found.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (type | None) – The value to return when not found.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions