1
BL_ArmatureConstraint(PyObjectPlus)
2
===================================
6
base class --- :class:`PyObjectPlus`
8
.. class:: BL_ArmatureConstraint(PyObjectPlus)
10
Proxy to Armature Constraint. Allows to change constraint on the fly.
11
Obtained through :class:`BL_ArmatureObject`.constraints.
15
Not all armature constraints are supported in the GE.
20
Type of constraint, (read-only).
22
Use one of :ref:`these constants<armatureconstraint-constants-type>`.
24
:type: integer, one of CONSTRAINT_TYPE_* constants
28
Name of constraint constructed as <bone_name>:<constraint_name>. constraints list.
32
This name is also the key subscript on :class:`BL_ArmatureObject`.
34
.. attribute:: enforce
36
fraction of constraint effect that is enforced. Between 0 and 1.
40
.. attribute:: headtail
42
Position of target between head and tail of the target bone: 0=head, 1=tail.
48
Only used if the target is a bone (i.e target object is an armature.
50
.. attribute:: lin_error
52
runtime linear error (in Blender units) on constraint at the current frame.
54
This is a runtime value updated on each frame by the IK solver. Only available on IK constraint and iTaSC solver.
58
.. attribute:: rot_error
60
Runtime rotation error (in radiant) on constraint at the current frame.
64
This is a runtime value updated on each frame by the IK solver. Only available on IK constraint and iTaSC solver.
66
It is only set if the constraint has a rotation part, for example, a CopyPose+Rotation IK constraint.
70
Primary target object for the constraint. The position of this object in the GE will be used as target for the constraint.
72
:type: :class:`KX_GameObject`.
74
.. attribute:: subtarget
76
Secondary target object for the constraint. The position of this object in the GE will be used as secondary target for the constraint.
78
:type: :class:`KX_GameObject`.
80
Currently this is only used for pole target on IK constraint.
84
True if the constraint is active.
90
An inactive constraint does not update lin_error and rot_error.
92
.. attribute:: ik_weight
94
Weight of the IK constraint between 0 and 1.
96
Only defined for IK constraint.
100
.. attribute:: ik_type
102
Type of IK constraint, (read-only).
104
Use one of :ref:`these constants<armatureconstraint-constants-ik-type>`.
108
.. attribute:: ik_flag
110
Combination of IK constraint option flags, read-only.
112
Use one of :ref:`these constants<armatureconstraint-constants-ik-flag>`.
116
.. attribute:: ik_dist
118
Distance the constraint is trying to maintain with target, only used when ik_type=CONSTRAINT_IK_DISTANCE.
122
.. attribute:: ik_mode
124
Use one of :ref:`these constants<armatureconstraint-constants-ik-mode>`.
126
Additional mode for IK constraint. Currently only used for Distance constraint: