# ClampToConstraint(Constraint)

base classes — `bpy_struct`, `Constraint`

class `bpy.types.``ClampToConstraint`(Constraint)

  Constrain an object’s location to the nearest point along the target path

  `main_axis`

    Main axis of movement

    Type: | enum in [‘CLAMPTO_AUTO’, ‘CLAMPTO_X’, ‘CLAMPTO_Y’, ‘CLAMPTO_Z’], default ‘CLAMPTO_AUTO’

  `target`

    Target Object (Curves only)

    Type: | `Object`

  `use_cyclic`

    Treat curve as cyclic curve (no clamping to curve bounding box)

    Type: | boolean, default False

Inherited Properties

`bpy_struct.id_data` `Constraint.name` `Constraint.type` `Constraint.owner_space` `Constraint.target_space` `Constraint.mute` `Constraint.show_expanded` | `Constraint.is_valid` `Constraint.active` `Constraint.is_proxy_local` `Constraint.influence` `Constraint.error_location` `Constraint.error_rotation`

Inherited Functions

`bpy_struct.as_pointer` `bpy_struct.driver_add` `bpy_struct.driver_remove` `bpy_struct.get` `bpy_struct.is_property_hidden` `bpy_struct.is_property_readonly` `bpy_struct.is_property_set` `bpy_struct.items` | `bpy_struct.keyframe_delete` `bpy_struct.keyframe_insert` `bpy_struct.keys` `bpy_struct.path_from_id` `bpy_struct.path_resolve` `bpy_struct.property_unset` `bpy_struct.type_recast` `bpy_struct.values`