# PythonConstraint(Constraint)

base classes — `bpy_struct`, `Constraint`

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

  Use Python script for constraint evaluation

  `has_script_error`

    The linked Python script has thrown an error

    Type: | boolean, default False, (readonly)

  `target_count`

    Usually only 1-3 are needed

    Type: | int in [-inf, inf], default 0

  `targets`

    Target Objects

    Type: | `bpy_prop_collection` of `ConstraintTarget`, (readonly)

  `text`

    The text object that contains the Python script

    Type: | `Text`

  `use_targets`

    Use the targets indicated in the constraint panel

    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`