40 "Copy the location of a target (with an optional offset), so that they move together"},
45 "Copy the rotation of a target (with an optional offset), so that they rotate together"},
50 "Copy the scale factors of a target (with an optional offset), so that they are scaled by "
56 "Copy all the transformations of a target, so that they move together"},
61 "Restrict movements to within a certain distance of a target (at the time of constraint "
67 "Restrict movement along each axis within given ranges"},
72 "Restrict rotation along each axis within given ranges"},
77 "Restrict scaling along each axis with given ranges"},
82 "Compensate for scaling one axis by applying suitable scaling to the other two axes"},
87 "Use one transform property from target to control another (or same) property on owner"},
90 ICON_CON_TRANSFORM_CACHE,
92 "Look up the transformation matrix from an external file"},
99 "Restrict movements to lie along a curve by remapping location along curve's longest axis"},
104 "Point towards a target by performing the smallest rotation necessary"},
108 "Inverse Kinematics",
109 "Control a chain of bones by specifying the endpoint target (Bones only)"},
114 "Rotate around the specified ('locked') axis to point towards a target"},
119 "Align chain of bones along a curve (Bones only)"},
124 "Stretch along Y-Axis to point towards a target"},
129 "Legacy tracking constraint prone to twisting artifacts"},
136 "Use transform property of target to look up pose for owner from an Action"},
141 "Apply weight-blended transformation from multiple bones like the Armature modifier"},
146 "Make target the 'detachable' parent of owner"},
151 "Use position (and optionally rotation) of target to define a 'wall' or 'floor' that the "
152 "owner cannot cross"},
157 "Use to animate an object/bone following a path"},
162 "Change pivot point for transforms (buggy)"},
167 "Restrict movements to surface of target mesh"},
168 {0,
nullptr, 0,
nullptr,
nullptr},
176 "The transformation of the target is evaluated relative to the world "
177 "coordinate system"},
182 "The transformation of the target is evaluated relative to a custom object/bone/vertex "
189 "The transformation of the target is only evaluated in the Pose Space, "
190 "the target armature object transformation is ignored"},
195 "The transformation of the target bone is evaluated relative to its rest pose "
196 "local coordinate system, thus including the parent-induced transformation"},
201 "The transformation of the target is evaluated relative to its local "
202 "coordinate system"},
204 "LOCAL_OWNER_ORIENT",
206 "Local Space (Owner Orientation)",
207 "The transformation of the target bone is evaluated relative to its local coordinate "
208 "system, followed by a correction for the difference in target and owner rest pose "
209 "orientations. When applied as local transform to the owner produces the same global "
210 "motion as the target if the parents are still in rest pose."},
211 {0,
nullptr, 0,
nullptr,
nullptr},
219 "The constraint is applied relative to the world coordinate system"},
224 "The constraint is applied in local space of a custom object/bone/vertex group"},
230 "The constraint is applied in Pose Space, the object transformation is ignored"},
235 "The constraint is applied relative to the rest pose local coordinate system "
236 "of the bone, thus including the parent-induced transformation"},
241 "The constraint is applied relative to the local coordinate system of the object"},
242 {0,
nullptr, 0,
nullptr,
nullptr},
246 {
TRACK_X,
"TRACK_X", 0,
"X",
""},
247 {
TRACK_Y,
"TRACK_Y", 0,
"Y",
""},
248 {
TRACK_Z,
"TRACK_Z", 0,
"Z",
""},
249 {
TRACK_nX,
"TRACK_NEGATIVE_X", 0,
"-X",
""},
250 {
TRACK_nY,
"TRACK_NEGATIVE_Y", 0,
"-Y",
""},
251 {
TRACK_nZ,
"TRACK_NEGATIVE_Z", 0,
"-Z",
""},
252 {0,
nullptr, 0,
nullptr,
nullptr},
263 {0,
nullptr, 0,
nullptr,
nullptr},
273 "The constraint is applied relative to the world coordinate system"},
278 "The constraint is applied in local space of a custom object/bone/vertex group"},
283 "The constraint is applied relative to the local coordinate system of the object"},
284 {0,
nullptr, 0,
nullptr,
nullptr},
292 "The transformation of the target is evaluated relative to the world coordinate system"},
297 "The transformation of the target is evaluated relative to a custom object/bone/vertex "
303 "The transformation of the target is evaluated relative to its local coordinate system"},
304 {0,
nullptr, 0,
nullptr,
nullptr},
307# include <fmt/format.h>
329 return &RNA_ChildOfConstraint;
331 return &RNA_TrackToConstraint;
333 return &RNA_KinematicConstraint;
335 return &RNA_FollowPathConstraint;
337 return &RNA_CopyRotationConstraint;
339 return &RNA_CopyLocationConstraint;
341 return &RNA_CopyScaleConstraint;
343 return &RNA_MaintainVolumeConstraint;
345 return &RNA_ArmatureConstraint;
347 return &RNA_ActionConstraint;
349 return &RNA_LockedTrackConstraint;
351 return &RNA_StretchToConstraint;
353 return &RNA_FloorConstraint;
355 return &RNA_ClampToConstraint;
357 return &RNA_TransformConstraint;
359 return &RNA_LimitRotationConstraint;
361 return &RNA_LimitLocationConstraint;
363 return &RNA_LimitScaleConstraint;
365 return &RNA_LimitDistanceConstraint;
367 return &RNA_ShrinkwrapConstraint;
369 return &RNA_DampedTrackConstraint;
371 return &RNA_SplineIKConstraint;
373 return &RNA_CopyTransformsConstraint;
375 return &RNA_PivotConstraint;
377 return &RNA_FollowTrackConstraint;
379 return &RNA_CameraSolverConstraint;
381 return &RNA_ObjectSolverConstraint;
383 return &RNA_TransformCacheConstraint;
385 return &RNA_UnknownType;
389static void rna_ConstraintTargetBone_target_set(
PointerRNA *
ptr,
402static void rna_Constraint_name_set(
PointerRNA *
ptr,
const char *value)
405 char oldname[
sizeof(con->
name)];
428static std::optional<std::string> rna_Constraint_do_compute_path(
Object *ob,
bConstraint *con)
434 printf(
"%s: internal error, constraint '%s' not found in object '%s'\n",
441 char name_esc_pchan[
sizeof(pchan->
name) * 2];
442 char name_esc_const[
sizeof(con->
name) * 2];
445 return fmt::format(
"pose.bones[\"{}\"].constraints[\"{}\"]", name_esc_pchan, name_esc_const);
447 char name_esc_const[
sizeof(con->
name) * 2];
449 return fmt::format(
"constraints[\"{}\"]", name_esc_const);
452static std::optional<std::string> rna_Constraint_path(
const PointerRNA *
ptr)
457 return rna_Constraint_do_compute_path(ob, con);
468static std::optional<std::string> rna_ConstraintTarget_path(
const PointerRNA *
ptr)
475 if (con !=
nullptr) {
484 "{}.targets[{}]", rna_Constraint_do_compute_path(ob, con).value_or(
""), index);
486 printf(
"%s: internal error, constraint '%s' of object '%s' does not contain the target\n",
509 bmain, (
Object *)
ptr->owner_id, rna_constraint_from_target(
ptr));
515 bmain, (
Object *)
ptr->owner_id, rna_constraint_from_target(
ptr));
526 rna_Constraint_update(bmain, scene,
ptr);
530static void rna_Constraint_childof_inverse_matrix_update(
Main *bmain,
537 rna_Constraint_update(bmain, scene,
ptr);
540static void rna_Constraint_ik_type_set(
PointerRNA *
ptr,
int value)
545 if (ikdata->
type != value) {
554 ikdata->
type = value;
559static bool rna_Constraint_RotLike_use_offset_get(
PointerRNA *
ptr)
566static void rna_Constraint_RotLike_use_offset_set(
PointerRNA *
ptr,
bool value)
571 if (curval != value) {
589 return owner_space_object_items;
599 ListBase targets = {
nullptr,
nullptr};
616 return target_space_object_items;
631static void rna_ArmatureConstraint_target_remove(
647static void rna_ArmatureConstraint_target_clear(
ID *
id,
bConstraint *con,
Main *bmain)
656static void rna_ActionConstraint_mix_mode_set(
PointerRNA *
ptr,
int value)
661 acon->mix_mode = value;
673static void rna_ActionConstraint_minmax_range(
680 if (
ELEM(acon->type, 0, 1, 2)) {
696 ID &animated_id = *
ptr->owner_id;
705 BLI_assert_msg(ok,
"Un-assigning an Action from an Action Constraint should always work.");
715 "Could not assign action %s to Action Constraint %s",
755static void rna_ActionConstraint_action_slot_handle_set(
761 rna_generic_action_slot_handle_set(new_slot_handle,
773static void rna_ActionConstraint_action_slot_handle_override_diff(
782 rna_generic_action_slot_handle_override_diff(bmain, rnadiff_ctx, act_con_a->
act, act_con_b->
act);
793static void rna_ActionConstraint_action_slot_set(
PointerRNA *
ptr,
800 rna_generic_action_slot_set(value,
803 acon->action_slot_handle,
804 acon->last_slot_identifier,
808static void rna_iterator_ActionConstraint_action_suitable_slots_begin(
814 rna_iterator_generic_action_suitable_slots_begin(iter,
ptr, acon->act);
817static int rna_SplineIKConstraint_joint_bindings_get_length(
const PointerRNA *
ptr,
824 length[0] = ikData->numpoints;
833static void rna_SplineIKConstraint_joint_bindings_get(
PointerRNA *
ptr,
float *values)
838 memcpy(values, ikData->points, ikData->numpoints *
sizeof(
float));
841static void rna_SplineIKConstraint_joint_bindings_set(
PointerRNA *
ptr,
const float *values)
846 memcpy(ikData->points, values, ikData->numpoints *
sizeof(
float));
849static int rna_ShrinkwrapConstraint_face_cull_get(
PointerRNA *
ptr)
856static void rna_ShrinkwrapConstraint_face_cull_set(
PointerRNA *
ptr,
int value)
876static void rna_Constraint_followTrack_camera_set(
PointerRNA *
ptr,
891 data->camera =
nullptr;
895static void rna_Constraint_followTrack_depthObject_set(
PointerRNA *
ptr,
910 data->depth_ob =
nullptr;
927static void rna_Constraint_objectSolver_camera_set(
PointerRNA *
ptr,
942 data->camera =
nullptr;
953 "The object is constrained inside a virtual sphere around the target object, "
954 "with a radius defined by the limit distance"},
959 "The object is constrained outside a virtual sphere around the target object, "
960 "with a radius defined by the limit distance"},
962 "LIMITDIST_ONSURFACE",
965 "The object is constrained on the surface of a virtual sphere around the target object, "
966 "with a radius defined by the limit distance"},
967 {0,
nullptr, 0,
nullptr,
nullptr},
985 "Follow shape of B-Bone segments when calculating Head/Tail position");
1048 srna,
"Constraint Target Bone",
"Target bone for multi-target constraints");
1058 prop,
nullptr,
"rna_ConstraintTargetBone_target_set",
nullptr,
"rna_Armature_object_poll");
1085 srna,
"Child Of Constraint",
"Create constraint-based parent-child relationship");
1141 prop,
"Set Inverse Pending",
"Set to true to request recalculation of the inverse matrix");
1162 srna =
RNA_def_struct(brna,
"ArmatureConstraintTargets",
nullptr);
1165 srna,
"Armature Deform Constraint Targets",
"Collection of target bones and weights");
1171 parm =
RNA_def_pointer(func,
"target",
"ConstraintTargetBone",
"",
"New target bone");
1174 func =
RNA_def_function(srna,
"remove",
"rna_ArmatureConstraint_target_remove");
1177 parm =
RNA_def_pointer(func,
"target",
"ConstraintTargetBone",
"",
"Target to remove");
1181 func =
RNA_def_function(srna,
"clear",
"rna_ArmatureConstraint_target_clear");
1193 srna,
"Armature Constraint",
"Applies transformations done by the Armature modifier");
1208 prop,
"Preserve Volume",
"Deform rotation interpolation with quaternions");
1216 "Multiply weights by envelope for all bones, instead of acting like Vertex Group based "
1218 "The specified weights are still used, and only the listed bones are considered.");
1224 "Use Current Location",
1225 "Use the current bone location for envelopes and choosing B-Bone "
1226 "segments instead of rest position");
1238 {0,
"BONE", 0,
"Bone",
""},
1240 {0,
nullptr, 0,
nullptr,
nullptr},
1246 {0,
nullptr, 0,
nullptr,
nullptr},
1249 srna =
RNA_def_struct(brna,
"KinematicConstraint",
"Constraint");
1284 prop,
"Weight",
"For Tree-IK: Weight of position control for this target");
1290 prop,
"Orientation Weight",
"For Tree-IK: Weight of orientation control for this target");
1300 prop,
"Chain Length",
"How many bones are included in the IK effect - 0 uses all bones");
1312 prop,
"Axis Reference",
"Constraint axis Lock options relative to Bone or Target reference");
1371 prop,
"Limit Mode",
"Distances in relation to sphere of influence to allow");
1389 {
TRACK_X,
"UP_X", 0,
"X",
""},
1390 {
TRACK_Y,
"UP_Y", 0,
"Y",
""},
1391 {
TRACK_Z,
"UP_Z", 0,
"Z",
""},
1392 {0,
nullptr, 0,
nullptr,
nullptr},
1397 srna,
"Track To Constraint",
"Aim the constrained object toward the target");
1424 prop,
"Target Z",
"Target's Z axis, not World Z axis, will constrain the Up direction");
1435 srna =
RNA_def_struct(brna,
"CopyLocationConstraint",
"Constraint");
1491 {
ROTLIKE_MIX_REPLACE,
"REPLACE", 0,
"Replace",
"Replace the original rotation with copied"},
1492 {
ROTLIKE_MIX_ADD,
"ADD", 0,
"Add",
"Add euler component values together"},
1497 "Apply copied rotation before original, as if the constraint target is a parent"},
1502 "Apply copied rotation after original, as if the constraint target is a child"},
1507 "Combine rotations like the original Offset checkbox. Does not work well for "
1508 "multiple axis rotations."},
1509 {0,
nullptr, 0,
nullptr,
nullptr},
1512 srna =
RNA_def_struct(brna,
"CopyRotationConstraint",
"Constraint");
1561 prop,
"Mix Mode",
"Specify how the copied and existing rotations are combined");
1567 prop,
"rna_Constraint_RotLike_use_offset_get",
"rna_Constraint_RotLike_use_offset_set");
1569 prop,
"Offset",
"DEPRECATED: Add original rotation into copied rotation");
1580 srna =
RNA_def_struct(brna,
"CopyScaleConstraint",
"Constraint");
1616 "Redistribute the copied change in volume equally "
1617 "between the three axes of the owner");
1630 "Use addition instead of multiplication to combine scale (2.7 compatibility)");
1646 {0,
nullptr, 0,
nullptr,
nullptr},
1654 "Volume is strictly preserved, overriding the scaling of non-free axes"},
1659 "Volume is preserved when the object is scaled uniformly. "
1660 "Deviations from uniform scale on non-free axes are passed through."},
1665 "Volume is preserved when the object is scaled only on the free axis. "
1666 "Non-free axis scaling is passed through."},
1667 {0,
nullptr, 0,
nullptr,
nullptr},
1670 srna =
RNA_def_struct(brna,
"MaintainVolumeConstraint",
"Constraint");
1672 "Maintain Volume Constraint",
1673 "Maintain a constant volume along a single scaling axis");
1689 prop,
"Mode",
"The way the constraint treats original non-free axis scaling");
1711 "Replace the original transformation with copied"},
1716 "Before Original (Full)",
1717 "Apply copied transformation before original, using simple matrix multiplication as if "
1718 "the constraint target is a parent in Full Inherit Scale mode. "
1719 "Will create shear when combining rotation and non-uniform scale."},
1723 "Before Original (Aligned)",
1724 "Apply copied transformation before original, as if the constraint target is a parent in "
1725 "Aligned Inherit Scale mode. This effectively uses Full for location and Split Channels "
1726 "for rotation and scale."},
1730 "Before Original (Split Channels)",
1731 "Apply copied transformation before original, handling location, rotation and scale "
1732 "separately, similar to a sequence of three Copy constraints"},
1737 "After Original (Full)",
1738 "Apply copied transformation after original, using simple matrix multiplication as if "
1739 "the constraint target is a child in Full Inherit Scale mode. "
1740 "Will create shear when combining rotation and non-uniform scale."},
1744 "After Original (Aligned)",
1745 "Apply copied transformation after original, as if the constraint target is a child in "
1746 "Aligned Inherit Scale mode. This effectively uses Full for location and Split Channels "
1747 "for rotation and scale."},
1751 "After Original (Split Channels)",
1752 "Apply copied transformation after original, handling location, rotation and scale "
1753 "separately, similar to a sequence of three Copy constraints"},
1754 {0,
nullptr, 0,
nullptr,
nullptr},
1757 srna =
RNA_def_struct(brna,
"CopyTransformsConstraint",
"Constraint");
1759 srna,
"Copy Transforms Constraint",
"Copy all the transforms of the target");
1774 prop,
"Remove Target Shear",
"Remove shear from the target transformation before combining");
1781 prop,
"Mix Mode",
"Specify how the copied and existing transformations are combined");
1793 {
TRACK_X,
"FLOOR_X", 0,
"X",
""},
1794 {
TRACK_Y,
"FLOOR_Y", 0,
"Y",
""},
1795 {
TRACK_Z,
"FLOOR_Z", 0,
"Z",
""},
1796 {
TRACK_nX,
"FLOOR_NEGATIVE_X", 0,
"-X",
""},
1797 {
TRACK_nY,
"FLOOR_NEGATIVE_Y", 0,
"-Y",
""},
1798 {
TRACK_nZ,
"FLOOR_NEGATIVE_Z", 0,
"-Z",
""},
1799 {0,
nullptr, 0,
nullptr,
nullptr},
1804 srna,
"Floor Constraint",
"Use the target object for location limitation");
1816 prop,
"Floor Location",
"Location of target that object will not pass through");
1838 {20,
"LOCATION_X", 0,
"X Location",
""},
1839 {21,
"LOCATION_Y", 0,
"Y Location",
""},
1840 {22,
"LOCATION_Z", 0,
"Z Location",
""},
1841 {00,
"ROTATION_X", 0,
"X Rotation",
""},
1842 {01,
"ROTATION_Y", 0,
"Y Rotation",
""},
1843 {02,
"ROTATION_Z", 0,
"Z Rotation",
""},
1844 {10,
"SCALE_X", 0,
"X Scale",
""},
1845 {11,
"SCALE_Y", 0,
"Y Scale",
""},
1846 {12,
"SCALE_Z", 0,
"Z Scale",
""},
1847 {0,
nullptr, 0,
nullptr,
nullptr},
1855 "Replace the original transformation with the action channels"},
1860 "Before Original (Full)",
1861 "Apply the action channels before the original transformation, as if applied to an "
1862 "imaginary parent in Full Inherit Scale mode. Will create shear when combining rotation "
1863 "and non-uniform scale."},
1867 "Before Original (Aligned)",
1868 "Apply the action channels before the original transformation, as if applied to an "
1869 "imaginary parent in Aligned Inherit Scale mode. This effectively uses Full for location "
1870 "and Split Channels for rotation and scale."},
1874 "Before Original (Split Channels)",
1875 "Apply the action channels before the original transformation, handling location, rotation "
1876 "and scale separately"},
1881 "After Original (Full)",
1882 "Apply the action channels after the original transformation, as if applied to an "
1883 "imaginary child in Full Inherit Scale mode. Will create shear when combining rotation "
1884 "and non-uniform scale."},
1888 "After Original (Aligned)",
1889 "Apply the action channels after the original transformation, as if applied to an "
1890 "imaginary child in Aligned Inherit Scale mode. This effectively uses Full for location "
1891 "and Split Channels for rotation and scale."},
1895 "After Original (Split Channels)",
1896 "Apply the action channels after the original transformation, handling location, rotation "
1897 "and scale separately"},
1898 {0,
nullptr, 0,
nullptr,
nullptr},
1903 srna,
"Action Constraint",
"Map an action to the transform axes of a bone");
1918 "Specify how existing transformations and the action channels are combined");
1926 "Transform Channel",
1927 "Transformation channel from the target that is used to key the Action");
1933 prop,
nullptr,
"rna_ActionConstraint_action_set",
nullptr,
"rna_Action_id_poll");
1944 prop,
nullptr,
"rna_ActionConstraint_action_slot_handle_set",
nullptr);
1946 "Action Slot Handle",
1947 "A number that identifies which sub-set of the Action is considered "
1948 "to be for this Action Constraint");
1951 prop,
"rna_ActionConstraint_action_slot_handle_override_diff",
nullptr,
nullptr);
1958 "Last Action Slot Identifier",
1959 "The identifier of the most recently assigned action slot. The slot identifies which "
1960 "sub-set of the Action is considered to be for this constraint, and its identifier is used "
1961 "to find the right slot when assigning an Action.");
1970 "The slot identifies which sub-set of the Action is considered to be for this "
1971 "strip, and its name is used to find the right slot when assigning another Action");
1973 "rna_ActionConstraint_action_slot_get",
1974 "rna_ActionConstraint_action_slot_set",
1992 "rna_iterator_ActionConstraint_action_suitable_slots_begin",
1993 "rna_iterator_array_next",
1994 "rna_iterator_array_end",
1995 "rna_iterator_array_dereference_get",
2001 prop,
"Action Slots",
"The list of action slots suitable for this NLA strip");
2007 "Bones only: apply the object's transformation channels of the action "
2008 "to the constrained bone, instead of bone's channels");
2041 prop,
"Evaluation Time",
"Interpolates between Action Start and End frames");
2047 "Use Evaluation Time",
2048 "Interpolate between Action Start and End frames, with the Evaluation "
2049 "Time slider instead of the Target object/bone");
2061 {
TRACK_X,
"LOCK_X", 0,
"X",
""},
2062 {
TRACK_Y,
"LOCK_Y", 0,
"Y",
""},
2063 {
TRACK_Z,
"LOCK_Z", 0,
"Z",
""},
2064 {0,
nullptr, 0,
nullptr,
nullptr},
2067 srna =
RNA_def_struct(brna,
"LockedTrackConstraint",
"Constraint");
2070 "Locked Track Constraint",
2071 "Point toward the target along the track axis, while locking the other axis");
2103 {
TRACK_X,
"FORWARD_X", 0,
"X",
""},
2104 {
TRACK_Y,
"FORWARD_Y", 0,
"Y",
""},
2105 {
TRACK_Z,
"FORWARD_Z", 0,
"Z",
""},
2106 {
TRACK_nX,
"TRACK_NEGATIVE_X", 0,
"-X",
""},
2107 {
TRACK_nY,
"TRACK_NEGATIVE_Y", 0,
"-Y",
""},
2108 {
TRACK_nZ,
"TRACK_NEGATIVE_Z", 0,
"-Z",
""},
2109 {0,
nullptr, 0,
nullptr,
nullptr},
2113 {
TRACK_X,
"UP_X", 0,
"X",
""},
2114 {
TRACK_Y,
"UP_Y", 0,
"Y",
""},
2115 {
TRACK_Z,
"UP_Z", 0,
"Z",
""},
2116 {0,
nullptr, 0,
nullptr,
nullptr},
2119 srna =
RNA_def_struct(brna,
"FollowPathConstraint",
"Constraint");
2136 prop,
"Offset",
"Offset from the position corresponding to the time frame");
2144 prop,
"Offset Factor",
"Percentage value defining target position along length of curve");
2162 prop,
"Follow Curve",
"Object will follow the heading and banking of the curve");
2170 "Object will stay locked to a single point somewhere along the length of the curve "
2171 "regardless of time");
2189 {
VOLUME_X,
"VOLUME_X", 0,
"X",
""},
2190 {
VOLUME_Z,
"VOLUME_Z", 0,
"Z",
""},
2191 {
NO_VOLUME,
"NO_VOLUME", 0,
"None",
""},
2192 {0,
nullptr, 0,
nullptr,
nullptr},
2196 {
PLANE_X,
"PLANE_X", 0,
"XZ",
"Rotate around local X, then Z"},
2197 {
PLANE_Z,
"PLANE_Z", 0,
"ZX",
"Rotate around local Z, then X"},
2202 "Use the smallest single axis rotation, similar to Damped Track"},
2203 {0,
nullptr, 0,
nullptr,
nullptr},
2206 srna =
RNA_def_struct(brna,
"StretchToConstraint",
"Constraint");
2222 prop,
"Maintain Volume",
"Maintain the object's volume as it stretches");
2241 prop,
"Volume Variation",
"Factor between volume variation and stretching");
2247 prop,
"Use Volume Variation Minimum",
"Use lower limit for volume variation");
2253 prop,
"Use Volume Variation Maximum",
"Use upper limit for volume variation");
2269 prop,
"Volume Variation Smoothness",
"Strength of volume stretching clamping");
2285 {0,
nullptr, 0,
nullptr,
nullptr},
2291 "Clamp To Constraint",
2292 "Constrain an object's location to the nearest point along the target path");
2314 prop,
"Cyclic",
"Treat curve as cyclic curve (no clamping to curve bounding box)");
2329 {0,
nullptr, 0,
nullptr,
nullptr},
2335 {0,
nullptr, 0,
nullptr,
nullptr},
2345 "Apply new rotation before original, as if it was on a parent"},
2350 "Apply new rotation after original, as if it was on a child"},
2351 {0,
nullptr, 0,
nullptr,
nullptr},
2357 {0,
nullptr, 0,
nullptr,
nullptr},
2360 srna =
RNA_def_struct(brna,
"TransformConstraint",
"Constraint");
2362 srna,
"Transformation Constraint",
"Map transformations of the target to the object");
2380 prop,
"Map To",
"The transformation type to affect on the constrained object");
2387 prop,
"Map To X From",
"The source axis constrained object's X axis uses");
2394 prop,
"Map To Y From",
"The source axis constrained object's Y axis uses");
2401 prop,
"Map To Z From",
"The source axis constrained object's Z axis uses");
2498 prop,
"Location Mix Mode",
"Specify how to combine the new location with original");
2578 prop,
"Rotation Mix Mode",
"Specify how to combine the new rotation with original");
2658 prop,
"Scale Mix Mode",
"Specify how to combine the new scale with original");
2669 srna =
RNA_def_struct(brna,
"LimitLocationConstraint",
"Constraint");
2671 srna,
"Limit Location Constraint",
"Limit the location of the constrained object");
2746 prop,
"Affect Transform",
"Transform tools are affected by this constraint as well");
2757 srna =
RNA_def_struct(brna,
"LimitRotationConstraint",
"Constraint");
2759 srna,
"Limit Rotation Constraint",
"Limit the rotation of the constrained object");
2831 prop,
"Affect Transform",
"Transform tools are affected by this constraint as well");
2839 "Use the old semi-broken behavior that doesn't understand that rotations loop around");
2850 srna =
RNA_def_struct(brna,
"LimitScaleConstraint",
"Constraint");
2852 srna,
"Limit Size Constraint",
"Limit the scaling of the constrained object");
2927 prop,
"Affect Transform",
"Transform tools are affected by this constraint as well");
2938 srna =
RNA_def_struct(brna,
"LimitDistanceConstraint",
"Constraint");
2940 srna,
"Limit Distance Constraint",
"Limit the distance from target object");
2961 prop,
"Limit Mode",
"Distances in relation to sphere of influence to allow");
2967 prop,
"Affect Transform",
"Transforms are affected by this constraint as well");
2982 "Nearest Surface Point",
2983 "Shrink the location to the nearest target surface"},
2988 "Shrink the location to the nearest target surface along a given axis"},
2993 "Shrink the location to the nearest target vertex"},
2997 "Target Normal Project",
2998 "Shrink the location to the nearest target surface "
2999 "along the interpolated vertex normals of the target"},
3000 {0,
nullptr, 0,
nullptr,
nullptr},
3004 {0,
"OFF", 0,
"Off",
"No culling"},
3009 "No projection when in front of the face"},
3014 "No projection when behind the face"},
3015 {0,
nullptr, 0,
nullptr,
nullptr},
3018 srna =
RNA_def_struct(brna,
"ShrinkwrapConstraint",
"Constraint");
3020 srna,
"Shrinkwrap Constraint",
"Create constraint-based shrinkwrap relationship");
3037 prop,
"Shrinkwrap Type",
"Select type of shrinkwrap algorithm for target position");
3044 prop,
"Snap Mode",
"Select how to constrain the object to the target surface");
3071 prop,
"Project Distance",
"Limit the distance used for projection (zero disables)");
3077 prop,
"Project Opposite",
"Project in both specified and opposite directions");
3084 "rna_ShrinkwrapConstraint_face_cull_get",
3085 "rna_ShrinkwrapConstraint_face_cull_set",
3090 "Stop vertices from projecting to a face on the target when facing towards/away");
3096 prop,
"Invert Cull",
"When projecting in the opposite direction invert the face cull mode");
3102 prop,
"Align Axis To Normal",
"Align the specified axis to the surface normal");
3119 srna =
RNA_def_struct(brna,
"DampedTrackConstraint",
"Constraint");
3121 srna,
"Damped Track Constraint",
"Point toward target by taking the shortest rotation path");
3152 "Use the original scaling of the bones"},
3157 "Scale of the X and Z axes is the inverse of the Y-Scale"},
3161 "Volume Preservation",
3162 "Scale of the X and Z axes are adjusted to preserve the volume of the bones"},
3163 {0,
nullptr, 0,
nullptr,
nullptr},
3172 "Scale the bones to fit the entire length of the curve"},
3177 "Use the original Y scale of the bone"},
3178 {0,
nullptr, 0,
nullptr,
nullptr},
3214 "rna_SplineIKConstraint_joint_bindings_get",
3215 "rna_SplineIKConstraint_joint_bindings_set",
3220 "(EXPERIENCED USERS ONLY) The relative positions of the joints along the chain, "
3228 prop,
"Chain Offset",
"Offset the entire chain relative to the root joint");
3235 "Ignore the relative lengths of the bones when fitting to the curve");
3243 "Average radius of the endpoints is used to tweak the X and Z Scaling of the bones, "
3244 "on top of XZ Scale mode");
3254 "Method used for determining the scaling of the X and Z axes of the bones");
3263 "Method used for determining the scaling of the Y axis of the bones, "
3264 "on top of the shape and scaling of the curve itself");
3271 prop,
"Use Original Scale",
"Apply volume preservation over the original scaling");
3278 prop,
"Volume Variation",
"Factor between volume variation and stretching");
3284 prop,
"Use Volume Variation Minimum",
"Use lower limit for volume variation");
3290 prop,
"Use Volume Variation Maximum",
"Use upper limit for volume variation");
3306 prop,
"Volume Variation Smoothness",
"Strength of volume stretching clamping");
3318 {
PIVOTCON_AXIS_NONE,
"ALWAYS_ACTIVE", 0,
"Always",
"Use the pivot point in every rotation"},
3323 "Use the pivot point in the negative rotation range around the X-axis"},
3328 "Use the pivot point in the negative rotation range around the Y-axis"},
3333 "Use the pivot point in the negative rotation range around the Z-axis"},
3338 "Use the pivot point in the positive rotation range around the X-axis"},
3343 "Use the pivot point in the positive rotation range around the Y-axis"},
3348 "Use the pivot point in the positive rotation range around the Z-axis"},
3349 {0,
nullptr, 0,
nullptr,
nullptr},
3367 prop,
"Target",
"Target Object, defining the position of the pivot when defined");
3381 "Use Relative Offset",
3382 "Offset will be an absolute point in space instead of relative to the target");
3389 "Offset of pivot from target (when set), or from owner's location "
3390 "(when Fixed Position is off), or the absolute pivot point");
3398 prop,
"Enabled Rotation Range",
"Rotation range on which pivoting should occur");
3413 {0,
nullptr, 0,
nullptr,
nullptr},
3416 srna =
RNA_def_struct(brna,
"FollowTrackConstraint",
"Constraint");
3418 srna,
"Follow Track Constraint",
"Lock motion to the target motion track");
3454 prop,
"Object",
"Movie tracking object to follow (if empty, camera object is used)");
3461 prop,
"Camera",
"Camera to which motion is parented (if empty active scene camera is used)");
3466 "rna_Constraint_followTrack_camera_set",
3468 "rna_Constraint_cameraObject_poll");
3476 "Object used to define depth in camera space by projecting onto surface of this object");
3481 "rna_Constraint_followTrack_depthObject_set",
3483 "rna_Constraint_followTrack_depthObject_poll");
3506 srna =
RNA_def_struct(brna,
"CameraSolverConstraint",
"Constraint");
3508 srna,
"Camera Solver Constraint",
"Lock motion to the reconstructed camera movement");
3535 srna =
RNA_def_struct(brna,
"ObjectSolverConstraint",
"Constraint");
3537 srna,
"Object Solver Constraint",
"Lock motion to the reconstructed object movement");
3559 prop,
"Set Inverse Pending",
"Set to true to request recalculation of the inverse matrix");
3572 prop,
"Camera",
"Camera to which motion is parented (if empty active scene camera is used)");
3577 "rna_Constraint_objectSolver_camera_set",
3579 "rna_Constraint_cameraObject_poll");
3589 srna =
RNA_def_struct(brna,
"TransformCacheConstraint",
"Constraint");
3591 srna,
"Transform Cache Constraint",
"Look up transformation from an external file");
3608 "Path to the object in the Alembic archive used to lookup the transform matrix");
3624 srna,
"Constraint",
"Constraint modifying the transformation of objects and bones");
3647 "Override Constraint",
3648 "In a local override object, whether this constraint comes from the "
3649 "linked reference object, or is local to the override");
3717 prop,
"Influence",
"Amount of influence constraint will have on the final solution");
3727 "Amount of residual error in Blender space unit for constraints that work on position");
3735 "Amount of residual error in radians for constraints that work on orientation");
Functions and classes to work with Actions.
Blender kernel action and pose functionality.
void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
struct bConstraint * BKE_constraint_find_from_target(struct Object *ob, struct bConstraintTarget *tgt, struct bPoseChannel **r_pchan)
void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targets, bool no_copy)
int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets)
void BKE_constraint_unique_name(struct bConstraint *con, struct ListBase *list)
void id_lib_extern(ID *id)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_assert_msg(a, msg)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
char * STRNCPY(char(&dst)[N], const char *src)
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define STRNCPY_UTF8(dst, src)
#define UNUSED_VARS_NDEBUG(...)
#define BLT_I18NCONTEXT_CONSTRAINT
#define BLT_I18NCONTEXT_ID_MOVIECLIP
@ CONSTRAINT_OVERRIDE_LIBRARY_LOCAL
@ CONSTRAINT_IK_TARGETAXIS
@ CONSTRAINT_TAR_CUSTOM_SPACE
@ CONSTRAINT_TYPE_TRACKTO
@ CONSTRAINT_TYPE_CHILDOF
@ CONSTRAINT_TYPE_TRANSFORM
@ CONSTRAINT_TYPE_FOLLOWTRACK
@ CONSTRAINT_TYPE_OBJECTSOLVER
@ CONSTRAINT_TYPE_ARMATURE
@ CONSTRAINT_TYPE_LOCLIKE
@ CONSTRAINT_TYPE_SHRINKWRAP
@ CONSTRAINT_TYPE_ROTLIMIT
@ CONSTRAINT_TYPE_CAMERASOLVER
@ CONSTRAINT_TYPE_ROTLIKE
@ CONSTRAINT_TYPE_SPLINEIK
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_DISTLIMIT
@ CONSTRAINT_TYPE_TRANSLIKE
@ CONSTRAINT_TYPE_LOCLIMIT
@ CONSTRAINT_TYPE_CLAMPTO
@ CONSTRAINT_TYPE_LOCKTRACK
@ CONSTRAINT_TYPE_SIZELIMIT
@ CONSTRAINT_TYPE_FOLLOWPATH
@ CONSTRAINT_TYPE_STRETCHTO
@ CONSTRAINT_TYPE_SIZELIKE
@ CONSTRAINT_TYPE_SAMEVOL
@ CONSTRAINT_TYPE_DAMPTRACK
@ CONSTRAINT_TYPE_TRANSFORM_CACHE
@ CONSTRAINT_ARMATURE_QUATERNION
@ CONSTRAINT_ARMATURE_ENVELOPE
@ CONSTRAINT_ARMATURE_CUR_LOCATION
@ CAMERASOLVER_ACTIVECLIP
@ FOLLOWTRACK_USE_UNDISTORTION
@ FOLLOWTRACK_USE_3D_POSITION
@ ACTCON_BONE_USE_OBJECT_ACTION
@ LIMIT_ROT_LEGACY_BEHAVIOR
#define CON_SHRINKWRAP_PROJECT_CULL_MASK
@ TRANS_MIXSCALE_MULTIPLY
@ CONSTRAINT_SPLINEIK_YS_NONE
@ CONSTRAINT_SPLINEIK_YS_FIT_CURVE
@ CONSTRAINT_SPLINEIK_YS_ORIGINAL
@ CONSTRAINT_SPACE_CUSTOM
@ CONSTRAINT_SPACE_OWNLOCAL
@ CONSTRAINT_SPACE_PARLOCAL
@ ACTCON_MIX_BEFORE_SPLIT
@ CONSTRAINT_SPLINEIK_EVENSPLITS
@ CONSTRAINT_SPLINEIK_USE_BULGE_MAX
@ CONSTRAINT_SPLINEIK_USE_ORIGINAL_SCALE
@ CONSTRAINT_SPLINEIK_USE_BULGE_MIN
@ CONSTRAINT_SPLINEIK_NO_CURVERAD
@ CONSTRAINT_SPLINEIK_NO_ROOT
@ TRANSLIKE_MIX_AFTER_FULL
@ TRANSLIKE_MIX_BEFORE_SPLIT
@ TRANSLIKE_MIX_BEFORE_FULL
@ TRANSLIKE_MIX_AFTER_SPLIT
@ OBJECTSOLVER_SET_INVERSE
@ CON_SHRINKWRAP_PROJECT_INVERT_CULL
@ CON_SHRINKWRAP_PROJECT_OPPOSITE
@ CON_SHRINKWRAP_PROJECT_CULL_FRONTFACE
@ CON_SHRINKWRAP_PROJECT_CULL_BACKFACE
@ CON_SHRINKWRAP_TRACK_NORMAL
@ PIVOTCON_FLAG_OFFSET_ABS
@ TRANSLIKE_REMOVE_TARGET_SHEAR
@ STRETCHTOCON_USE_BULGE_MAX
@ STRETCHTOCON_USE_BULGE_MIN
@ CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC
@ CONSTRAINT_SPLINEIK_XZS_ORIGINAL
@ CONSTRAINT_SPLINEIK_XZS_NONE
@ CONSTRAINT_SPLINEIK_XZS_INVERSE
@ FOLLOWTRACK_FRAME_STRETCH
@ MOD_SHRINKWRAP_TARGET_PROJECT
@ MOD_SHRINKWRAP_NEAREST_VERTEX
@ MOD_SHRINKWRAP_NEAREST_SURFACE
#define RNA_MAX_ARRAY_DIMENSION
#define RNA_ENUM_ITEM_SEPR
#define RNA_TRANSLATION_PREC_DEFAULT
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
#define RNA_ENUM_ITEM_HEADING(name, description)
BMesh const char void * data
const Slot * slot(int64_t index) const
blender::Span< const Slot * > slots() const
bool is_suitable_for(const ID &animated_id) const
static constexpr slot_handle_t unassigned
float length(VecOp< float, D >) RET
void * MEM_callocN(size_t len, const char *str)
bool generic_assign_action(ID &animated_id, bAction *action_to_assign, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_identifier)
ActionSlotAssignmentResult generic_assign_action_slot(Slot *slot_to_assign, ID &animated_id, bAction *&action_ptr_ref, slot_handle_t &slot_handle_ref, char *slot_identifier)
decltype(::ActionSlot::handle) slot_handle_t
ActionSlotAssignmentResult
void constraint_dependency_tag_update(Main *bmain, Object *ob, bConstraint *con)
void constraint_tag_update(Main *bmain, Object *ob, bConstraint *con)
ListBase * constraint_list_from_constraint(Object *ob, bConstraint *con, bPoseChannel **r_pchan)
static void rna_def_constraint_rotate_like(BlenderRNA *brna)
static void rna_def_constraint_same_volume(BlenderRNA *brna)
static const EnumPropertyItem constraint_distance_items[]
static void rna_def_constraint_location_limit(BlenderRNA *brna)
static const EnumPropertyItem owner_space_pchan_items[]
static void rna_def_constraint_stretch_to(BlenderRNA *brna)
static void rna_def_constraint_follow_track(BlenderRNA *brna)
static void rna_def_constraint_size_limit(BlenderRNA *brna)
static void rna_def_constraint_object_solver(BlenderRNA *brna)
static void rna_def_constraint_track_to(BlenderRNA *brna)
static void rna_def_constraint_transform(BlenderRNA *brna)
static void rna_def_constraint_locate_like(BlenderRNA *brna)
static void rna_def_constraint_rotation_limit(BlenderRNA *brna)
static void rna_def_constraint_headtail_common(StructRNA *srna)
static void rna_def_constrainttarget(BlenderRNA *brna)
static void rna_def_constraint_distance_limit(BlenderRNA *brna)
static void rna_def_constraint_transform_like(BlenderRNA *brna)
static void rna_def_constraint_kinematic(BlenderRNA *brna)
static const EnumPropertyItem target_space_pchan_items[]
static void rna_def_constraint_shrinkwrap(BlenderRNA *brna)
static void rna_def_constraint_target_common(StructRNA *srna)
static void rna_def_constraint_follow_path(BlenderRNA *brna)
static void rna_def_constraint_action(BlenderRNA *brna)
static void rna_def_constraint_childof(BlenderRNA *brna)
static void rna_def_constraint_locked_track(BlenderRNA *brna)
static void rna_def_constraint_damped_track(BlenderRNA *brna)
static void rna_def_constraint_minmax(BlenderRNA *brna)
static void rna_def_constraint_size_like(BlenderRNA *brna)
static void rna_def_constraint_spline_ik(BlenderRNA *brna)
static void rna_def_constrainttarget_bone(BlenderRNA *brna)
static void rna_def_constraint_armature_deform_targets(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_constraint(BlenderRNA *brna)
static void rna_def_constraint_clamp_to(BlenderRNA *brna)
static const EnumPropertyItem euler_order_items[]
static void rna_def_constraint_pivot(BlenderRNA *brna)
static const EnumPropertyItem track_axis_items[]
static void rna_def_constraint_armature_deform(BlenderRNA *brna)
static void rna_def_constraint_camera_solver(BlenderRNA *brna)
const EnumPropertyItem rna_enum_constraint_type_items[]
static void rna_def_constraint_transform_cache(BlenderRNA *brna)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_define_lib_overridable(const bool make_overridable)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const char *propname)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
const int rna_matrix_dimsize_4x4[]
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_override_funcs(PropertyRNA *prop, const char *diff, const char *store, const char *apply)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
const EnumPropertyItem rna_enum_driver_target_rotation_mode_items[]
const EnumPropertyItem rna_enum_axis_xyz_items[]
const EnumPropertyItem rna_enum_modifier_shrinkwrap_mode_items[]
const EnumPropertyItem rna_enum_object_axis_items[]
int32_t action_slot_handle
char last_slot_identifier[66]
struct bConstraintTarget * next