32#ifdef WITH_ANIM_BAKLAVA
49 "Copy the location of a target (with an optional offset), so that they move together"},
54 "Copy the rotation of a target (with an optional offset), so that they rotate together"},
59 "Copy the scale factors of a target (with an optional offset), so that they are scaled by "
65 "Copy all the transformations of a target, so that they move together"},
70 "Restrict movements to within a certain distance of a target (at the time of constraint "
76 "Restrict movement along each axis within given ranges"},
81 "Restrict rotation along each axis within given ranges"},
86 "Restrict scaling along each axis with given ranges"},
91 "Compensate for scaling one axis by applying suitable scaling to the other two axes"},
96 "Use one transform property from target to control another (or same) property on owner"},
99 ICON_CON_TRANSFORM_CACHE,
101 "Look up the transformation matrix from an external file"},
108 "Restrict movements to lie along a curve by remapping location along curve's longest axis"},
113 "Point towards a target by performing the smallest rotation necessary"},
117 "Inverse Kinematics",
118 "Control a chain of bones by specifying the endpoint target (Bones only)"},
123 "Rotate around the specified ('locked') axis to point towards a target"},
128 "Align chain of bones along a curve (Bones only)"},
133 "Stretch along Y-Axis to point towards a target"},
138 "Legacy tracking constraint prone to twisting artifacts"},
145 "Use transform property of target to look up pose for owner from an Action"},
150 "Apply weight-blended transformation from multiple bones like the Armature modifier"},
155 "Make target the 'detachable' parent of owner"},
160 "Use position (and optionally rotation) of target to define a 'wall' or 'floor' that the "
161 "owner cannot cross"},
166 "Use to animate an object/bone following a path"},
171 "Change pivot point for transforms (buggy)"},
173 {CONSTRAINT_TYPE_RIGIDBODYJOINT,
175 ICON_CONSTRAINT_DATA,
177 "Use to define a Rigid Body Constraint (for Game Engine use only)"},
180 ICON_CONSTRAINT_DATA,
182 "Custom constraint(s) written in Python (Not yet implemented)"},
188 "Restrict movements to surface of target mesh"},
189 {0,
nullptr, 0,
nullptr,
nullptr},
197 "The transformation of the target is evaluated relative to the world "
198 "coordinate system"},
203 "The transformation of the target is evaluated relative to a custom object/bone/vertex "
210 "The transformation of the target is only evaluated in the Pose Space, "
211 "the target armature object transformation is ignored"},
216 "The transformation of the target bone is evaluated relative to its rest pose "
217 "local coordinate system, thus including the parent-induced transformation"},
222 "The transformation of the target is evaluated relative to its local "
223 "coordinate system"},
225 "LOCAL_OWNER_ORIENT",
227 "Local Space (Owner Orientation)",
228 "The transformation of the target bone is evaluated relative to its local coordinate "
229 "system, followed by a correction for the difference in target and owner rest pose "
230 "orientations. When applied as local transform to the owner produces the same global "
231 "motion as the target if the parents are still in rest pose."},
232 {0,
nullptr, 0,
nullptr,
nullptr},
240 "The constraint is applied relative to the world coordinate system"},
245 "The constraint is applied in local space of a custom object/bone/vertex group"},
251 "The constraint is applied in Pose Space, the object transformation is ignored"},
256 "The constraint is applied relative to the rest pose local coordinate system "
257 "of the bone, thus including the parent-induced transformation"},
262 "The constraint is applied relative to the local coordinate system of the object"},
263 {0,
nullptr, 0,
nullptr,
nullptr},
267 {
TRACK_X,
"TRACK_X", 0,
"X",
""},
268 {
TRACK_Y,
"TRACK_Y", 0,
"Y",
""},
269 {
TRACK_Z,
"TRACK_Z", 0,
"Z",
""},
270 {
TRACK_nX,
"TRACK_NEGATIVE_X", 0,
"-X",
""},
271 {
TRACK_nY,
"TRACK_NEGATIVE_Y", 0,
"-Y",
""},
272 {
TRACK_nZ,
"TRACK_NEGATIVE_Z", 0,
"-Z",
""},
273 {0,
nullptr, 0,
nullptr,
nullptr},
284 {0,
nullptr, 0,
nullptr,
nullptr},
294 "The constraint is applied relative to the world coordinate system"},
299 "The constraint is applied in local space of a custom object/bone/vertex group"},
304 "The constraint is applied relative to the local coordinate system of the object"},
305 {0,
nullptr, 0,
nullptr,
nullptr},
313 "The transformation of the target is evaluated relative to the world coordinate system"},
318 "The transformation of the target is evaluated relative to a custom object/bone/vertex "
324 "The transformation of the target is evaluated relative to its local coordinate system"},
325 {0,
nullptr, 0,
nullptr,
nullptr},
328# include <fmt/format.h>
347 return &RNA_ChildOfConstraint;
349 return &RNA_TrackToConstraint;
351 return &RNA_KinematicConstraint;
353 return &RNA_FollowPathConstraint;
355 return &RNA_CopyRotationConstraint;
357 return &RNA_CopyLocationConstraint;
359 return &RNA_CopyScaleConstraint;
361 return &RNA_MaintainVolumeConstraint;
363 return &RNA_PythonConstraint;
365 return &RNA_ArmatureConstraint;
367 return &RNA_ActionConstraint;
369 return &RNA_LockedTrackConstraint;
371 return &RNA_StretchToConstraint;
373 return &RNA_FloorConstraint;
375 return &RNA_ClampToConstraint;
377 return &RNA_TransformConstraint;
379 return &RNA_LimitRotationConstraint;
381 return &RNA_LimitLocationConstraint;
383 return &RNA_LimitScaleConstraint;
385 return &RNA_LimitDistanceConstraint;
387 return &RNA_ShrinkwrapConstraint;
389 return &RNA_DampedTrackConstraint;
391 return &RNA_SplineIKConstraint;
393 return &RNA_CopyTransformsConstraint;
395 return &RNA_PivotConstraint;
397 return &RNA_FollowTrackConstraint;
399 return &RNA_CameraSolverConstraint;
401 return &RNA_ObjectSolverConstraint;
403 return &RNA_TransformCacheConstraint;
405 return &RNA_UnknownType;
409static void rna_ConstraintTargetBone_target_set(
PointerRNA *
ptr,
422static void rna_Constraint_name_set(
PointerRNA *
ptr,
const char *value)
425 char oldname[
sizeof(con->
name)];
448static std::optional<std::string> rna_Constraint_do_compute_path(
Object *ob,
bConstraint *con)
454 printf(
"%s: internal error, constraint '%s' not found in object '%s'\n",
461 char name_esc_pchan[
sizeof(pchan->
name) * 2];
462 char name_esc_const[
sizeof(con->
name) * 2];
465 return fmt::format(
"pose.bones[\"{}\"].constraints[\"{}\"]", name_esc_pchan, name_esc_const);
467 char name_esc_const[
sizeof(con->
name) * 2];
469 return fmt::format(
"constraints[\"{}\"]", name_esc_const);
472static std::optional<std::string> rna_Constraint_path(
const PointerRNA *
ptr)
477 return rna_Constraint_do_compute_path(ob, con);
488static std::optional<std::string> rna_ConstraintTarget_path(
const PointerRNA *
ptr)
495 if (con !=
nullptr) {
508 "{}.targets[{}]", rna_Constraint_do_compute_path(ob, con).value_or(
""), index);
510 printf(
"%s: internal error, constraint '%s' of object '%s' does not contain the target\n",
550 rna_Constraint_update(bmain, scene,
ptr);
554static void rna_Constraint_childof_inverse_matrix_update(
Main *bmain,
560 data->
flag &= ~CHILDOF_SET_INVERSE;
561 rna_Constraint_update(bmain, scene,
ptr);
564static void rna_Constraint_ik_type_set(
PointerRNA *
ptr,
int value)
569 if (ikdata->
type != value) {
578 ikdata->
type = value;
583static bool rna_Constraint_RotLike_use_offset_get(
PointerRNA *
ptr)
590static void rna_Constraint_RotLike_use_offset_set(
PointerRNA *
ptr,
bool value)
595 if (curval != value) {
613 return owner_space_object_items;
623 ListBase targets = {
nullptr,
nullptr};
640 return target_space_object_items;
656static void rna_ArmatureConstraint_target_remove(
672static void rna_ArmatureConstraint_target_clear(
ID *
id,
bConstraint *con,
Main *bmain)
681static void rna_ActionConstraint_mix_mode_set(
PointerRNA *
ptr,
int value)
686 acon->mix_mode = value;
698static void rna_ActionConstraint_minmax_range(
705 if (
ELEM(acon->type, 0, 1, 2)) {
715# ifdef WITH_ANIM_BAKLAVA
716static void rna_ActionConstraint_action_slot_handle_set(
722 rna_generic_action_slot_handle_set(new_slot_handle,
725 acon->action_slot_handle,
726 acon->action_slot_name);
734 return rna_generic_action_slot_get(acon->act, acon->action_slot_handle);
737static void rna_ActionConstraint_action_slot_set(
PointerRNA *
ptr,
744 rna_generic_action_slot_set(
745 value, *
ptr->
owner_id, acon->act, acon->action_slot_handle, acon->action_slot_name, reports);
754 rna_iterator_generic_action_slots_begin(iter, acon->act);
758static int rna_SplineIKConstraint_joint_bindings_get_length(
const PointerRNA *
ptr,
765 length[0] = ikData->numpoints;
774static void rna_SplineIKConstraint_joint_bindings_get(
PointerRNA *
ptr,
float *values)
779 memcpy(values, ikData->points, ikData->numpoints *
sizeof(
float));
782static void rna_SplineIKConstraint_joint_bindings_set(
PointerRNA *
ptr,
const float *values)
787 memcpy(ikData->points, values, ikData->numpoints *
sizeof(
float));
790static int rna_ShrinkwrapConstraint_face_cull_get(
PointerRNA *
ptr)
797static void rna_ShrinkwrapConstraint_face_cull_set(
PointerRNA *
ptr,
int value)
801 swc->flag = (swc->flag & ~CON_SHRINKWRAP_PROJECT_CULL_MASK) | value;
817static void rna_Constraint_followTrack_camera_set(
PointerRNA *
ptr,
832 data->camera =
nullptr;
836static void rna_Constraint_followTrack_depthObject_set(
PointerRNA *
ptr,
851 data->depth_ob =
nullptr;
868static void rna_Constraint_objectSolver_camera_set(
PointerRNA *
ptr,
883 data->camera =
nullptr;
894 "The object is constrained inside a virtual sphere around the target object, "
895 "with a radius defined by the limit distance"},
900 "The object is constrained outside a virtual sphere around the target object, "
901 "with a radius defined by the limit distance"},
903 "LIMITDIST_ONSURFACE",
906 "The object is constrained on the surface of a virtual sphere around the target object, "
907 "with a radius defined by the limit distance"},
908 {0,
nullptr, 0,
nullptr,
nullptr},
926 "Follow shape of B-Bone segments when calculating Head/Tail position");
989 srna,
"Constraint Target Bone",
"Target bone for multi-target constraints");
999 prop,
nullptr,
"rna_ConstraintTargetBone_target_set",
nullptr,
"rna_Armature_object_poll");
1026 srna,
"Child Of Constraint",
"Create constraint-based parent-child relationship");
1082 prop,
"Set Inverse Pending",
"Set to true to request recalculation of the inverse matrix");
1125 prop,
"Use Targets",
"Use the targets indicated in the constraint panel");
1143 srna =
RNA_def_struct(brna,
"ArmatureConstraintTargets",
nullptr);
1146 srna,
"Armature Deform Constraint Targets",
"Collection of target bones and weights");
1152 parm =
RNA_def_pointer(func,
"target",
"ConstraintTargetBone",
"",
"New target bone");
1155 func =
RNA_def_function(srna,
"remove",
"rna_ArmatureConstraint_target_remove");
1158 parm =
RNA_def_pointer(func,
"target",
"ConstraintTargetBone",
"",
"Target to remove");
1162 func =
RNA_def_function(srna,
"clear",
"rna_ArmatureConstraint_target_clear");
1174 srna,
"Armature Constraint",
"Applies transformations done by the Armature modifier");
1189 prop,
"Preserve Volume",
"Deform rotation interpolation with quaternions");
1197 "Multiply weights by envelope for all bones, instead of acting like Vertex Group based "
1199 "The specified weights are still used, and only the listed bones are considered.");
1205 "Use Current Location",
1206 "Use the current bone location for envelopes and choosing B-Bone "
1207 "segments instead of rest position");
1219 {0,
"BONE", 0,
"Bone",
""},
1221 {0,
nullptr, 0,
nullptr,
nullptr},
1227 {0,
nullptr, 0,
nullptr,
nullptr},
1230 srna =
RNA_def_struct(brna,
"KinematicConstraint",
"Constraint");
1265 prop,
"Weight",
"For Tree-IK: Weight of position control for this target");
1271 prop,
"Orientation Weight",
"For Tree-IK: Weight of orientation control for this target");
1281 prop,
"Chain Length",
"How many bones are included in the IK effect - 0 uses all bones");
1293 prop,
"Axis Reference",
"Constraint axis Lock options relative to Bone or Target reference");
1352 prop,
"Limit Mode",
"Distances in relation to sphere of influence to allow");
1370 {
TRACK_X,
"UP_X", 0,
"X",
""},
1371 {
TRACK_Y,
"UP_Y", 0,
"Y",
""},
1372 {
TRACK_Z,
"UP_Z", 0,
"Z",
""},
1373 {0,
nullptr, 0,
nullptr,
nullptr},
1378 srna,
"Track To Constraint",
"Aim the constrained object toward the target");
1405 prop,
"Target Z",
"Target's Z axis, not World Z axis, will constraint the Up direction");
1416 srna =
RNA_def_struct(brna,
"CopyLocationConstraint",
"Constraint");
1472 {
ROTLIKE_MIX_REPLACE,
"REPLACE", 0,
"Replace",
"Replace the original rotation with copied"},
1473 {
ROTLIKE_MIX_ADD,
"ADD", 0,
"Add",
"Add euler component values together"},
1478 "Apply copied rotation before original, as if the constraint target is a parent"},
1483 "Apply copied rotation after original, as if the constraint target is a child"},
1488 "Combine rotations like the original Offset checkbox. Does not work well for "
1489 "multiple axis rotations."},
1490 {0,
nullptr, 0,
nullptr,
nullptr},
1493 srna =
RNA_def_struct(brna,
"CopyRotationConstraint",
"Constraint");
1542 prop,
"Mix Mode",
"Specify how the copied and existing rotations are combined");
1548 prop,
"rna_Constraint_RotLike_use_offset_get",
"rna_Constraint_RotLike_use_offset_set");
1550 prop,
"Offset",
"DEPRECATED: Add original rotation into copied rotation");
1561 srna =
RNA_def_struct(brna,
"CopyScaleConstraint",
"Constraint");
1596 "Redistribute the copied change in volume equally "
1597 "between the three axes of the owner");
1610 "Use addition instead of multiplication to combine scale (2.7 compatibility)");
1625 {0,
nullptr, 0,
nullptr,
nullptr},
1633 "Volume is strictly preserved, overriding the scaling of non-free axes"},
1638 "Volume is preserved when the object is scaled uniformly. "
1639 "Deviations from uniform scale on non-free axes are passed through."},
1644 "Volume is preserved when the object is scaled only on the free axis. "
1645 "Non-free axis scaling is passed through."},
1646 {0,
nullptr, 0,
nullptr,
nullptr},
1649 srna =
RNA_def_struct(brna,
"MaintainVolumeConstraint",
"Constraint");
1651 "Maintain Volume Constraint",
1652 "Maintain a constant volume along a single scaling axis");
1668 prop,
"Mode",
"The way the constraint treats original non-free axis scaling");
1690 "Replace the original transformation with copied"},
1695 "Before Original (Full)",
1696 "Apply copied transformation before original, using simple matrix multiplication as if "
1697 "the constraint target is a parent in Full Inherit Scale mode. "
1698 "Will create shear when combining rotation and non-uniform scale."},
1702 "Before Original (Aligned)",
1703 "Apply copied transformation before original, as if the constraint target is a parent in "
1704 "Aligned Inherit Scale mode. This effectively uses Full for location and Split Channels "
1705 "for rotation and scale."},
1709 "Before Original (Split Channels)",
1710 "Apply copied transformation before original, handling location, rotation and scale "
1711 "separately, similar to a sequence of three Copy constraints"},
1716 "After Original (Full)",
1717 "Apply copied transformation after original, using simple matrix multiplication as if "
1718 "the constraint target is a child in Full Inherit Scale mode. "
1719 "Will create shear when combining rotation and non-uniform scale."},
1723 "After Original (Aligned)",
1724 "Apply copied transformation after original, as if the constraint target is a child in "
1725 "Aligned Inherit Scale mode. This effectively uses Full for location and Split Channels "
1726 "for rotation and scale."},
1730 "After Original (Split Channels)",
1731 "Apply copied transformation after original, handling location, rotation and scale "
1732 "separately, similar to a sequence of three Copy constraints"},
1733 {0,
nullptr, 0,
nullptr,
nullptr},
1736 srna =
RNA_def_struct(brna,
"CopyTransformsConstraint",
"Constraint");
1738 srna,
"Copy Transforms Constraint",
"Copy all the transforms of the target");
1753 prop,
"Remove Target Shear",
"Remove shear from the target transformation before combining");
1760 prop,
"Mix Mode",
"Specify how the copied and existing transformations are combined");
1772 {
TRACK_X,
"FLOOR_X", 0,
"X",
""},
1773 {
TRACK_Y,
"FLOOR_Y", 0,
"Y",
""},
1774 {
TRACK_Z,
"FLOOR_Z", 0,
"Z",
""},
1775 {
TRACK_nX,
"FLOOR_NEGATIVE_X", 0,
"-X",
""},
1776 {
TRACK_nY,
"FLOOR_NEGATIVE_Y", 0,
"-Y",
""},
1777 {
TRACK_nZ,
"FLOOR_NEGATIVE_Z", 0,
"-Z",
""},
1778 {0,
nullptr, 0,
nullptr,
nullptr},
1783 srna,
"Floor Constraint",
"Use the target object for location limitation");
1795 prop,
"Floor Location",
"Location of target that object will not pass through");
1817 {20,
"LOCATION_X", 0,
"X Location",
""},
1818 {21,
"LOCATION_Y", 0,
"Y Location",
""},
1819 {22,
"LOCATION_Z", 0,
"Z Location",
""},
1820 {00,
"ROTATION_X", 0,
"X Rotation",
""},
1821 {01,
"ROTATION_Y", 0,
"Y Rotation",
""},
1822 {02,
"ROTATION_Z", 0,
"Z Rotation",
""},
1823 {10,
"SCALE_X", 0,
"X Scale",
""},
1824 {11,
"SCALE_Y", 0,
"Y Scale",
""},
1825 {12,
"SCALE_Z", 0,
"Z Scale",
""},
1826 {0,
nullptr, 0,
nullptr,
nullptr},
1833 "Before Original (Full)",
1834 "Apply the action channels before the original transformation, as if applied to an "
1835 "imaginary parent in Full Inherit Scale mode. Will create shear when combining rotation "
1836 "and non-uniform scale."},
1840 "Before Original (Aligned)",
1841 "Apply the action channels before the original transformation, as if applied to an "
1842 "imaginary parent in Aligned Inherit Scale mode. This effectively uses Full for location "
1843 "and Split Channels for rotation and scale."},
1847 "Before Original (Split Channels)",
1848 "Apply the action channels before the original transformation, handling location, rotation "
1849 "and scale separately"},
1854 "After Original (Full)",
1855 "Apply the action channels after the original transformation, as if applied to an "
1856 "imaginary child in Full Inherit Scale mode. Will create shear when combining rotation "
1857 "and non-uniform scale."},
1861 "After Original (Aligned)",
1862 "Apply the action channels after the original transformation, as if applied to an "
1863 "imaginary child in Aligned Inherit Scale mode. This effectively uses Full for location "
1864 "and Split Channels for rotation and scale."},
1868 "After Original (Split Channels)",
1869 "Apply the action channels after the original transformation, handling location, rotation "
1870 "and scale separately"},
1871 {0,
nullptr, 0,
nullptr,
nullptr},
1876 srna,
"Action Constraint",
"Map an action to the transform axes of a bone");
1891 "Specify how existing transformations and the action channels are combined");
1899 "Transform Channel",
1900 "Transformation channel from the target that is used to key the Action");
1910# ifdef WITH_ANIM_BAKLAVA
1917 prop,
nullptr,
"rna_ActionConstraint_action_slot_handle_set",
nullptr);
1919 "Action Slot Handle",
1920 "A number that identifies which sub-set of the Action is considered "
1921 "to be for this Action Constraint");
1930 "The name of the action slot. The slot identifies which sub-set of the Action "
1931 "is considered to be for this constraint, and its name is used to find the right slot "
1932 "when assigning an Action.");
1941 "The slot identifies which sub-set of the Action is considered to be for this "
1942 "strip, and its name is used to find the right slot when assigning another Action");
1944 "rna_ActionConstraint_action_slot_get",
1945 "rna_ActionConstraint_action_slot_set",
1963 "rna_iterator_ActionConstraint_action_slots_begin",
1964 "rna_iterator_array_next",
1965 "rna_iterator_array_end",
1966 "rna_iterator_array_dereference_get",
1972 prop,
"Action Slots",
"The list of action slots suitable for this NLA strip");
1979 "Bones only: apply the object's transformation channels of the action "
1980 "to the constrained bone, instead of bone's channels");
2013 prop,
"Evaluation Time",
"Interpolates between Action Start and End frames");
2019 "Use Evaluation Time",
2020 "Interpolate between Action Start and End frames, with the Evaluation "
2021 "Time slider instead of the Target object/bone");
2033 {
TRACK_X,
"LOCK_X", 0,
"X",
""},
2034 {
TRACK_Y,
"LOCK_Y", 0,
"Y",
""},
2035 {
TRACK_Z,
"LOCK_Z", 0,
"Z",
""},
2036 {0,
nullptr, 0,
nullptr,
nullptr},
2039 srna =
RNA_def_struct(brna,
"LockedTrackConstraint",
"Constraint");
2042 "Locked Track Constraint",
2043 "Point toward the target along the track axis, while locking the other axis");
2075 {
TRACK_X,
"FORWARD_X", 0,
"X",
""},
2076 {
TRACK_Y,
"FORWARD_Y", 0,
"Y",
""},
2077 {
TRACK_Z,
"FORWARD_Z", 0,
"Z",
""},
2078 {
TRACK_nX,
"TRACK_NEGATIVE_X", 0,
"-X",
""},
2079 {
TRACK_nY,
"TRACK_NEGATIVE_Y", 0,
"-Y",
""},
2080 {
TRACK_nZ,
"TRACK_NEGATIVE_Z", 0,
"-Z",
""},
2081 {0,
nullptr, 0,
nullptr,
nullptr},
2085 {
TRACK_X,
"UP_X", 0,
"X",
""},
2086 {
TRACK_Y,
"UP_Y", 0,
"Y",
""},
2087 {
TRACK_Z,
"UP_Z", 0,
"Z",
""},
2088 {0,
nullptr, 0,
nullptr,
nullptr},
2091 srna =
RNA_def_struct(brna,
"FollowPathConstraint",
"Constraint");
2108 prop,
"Offset",
"Offset from the position corresponding to the time frame");
2116 prop,
"Offset Factor",
"Percentage value defining target position along length of curve");
2134 prop,
"Follow Curve",
"Object will follow the heading and banking of the curve");
2142 "Object will stay locked to a single point somewhere along the length of the curve "
2143 "regardless of time");
2161 {
VOLUME_X,
"VOLUME_X", 0,
"X",
""},
2162 {
VOLUME_Z,
"VOLUME_Z", 0,
"Z",
""},
2163 {
NO_VOLUME,
"NO_VOLUME", 0,
"None",
""},
2164 {0,
nullptr, 0,
nullptr,
nullptr},
2168 {
PLANE_X,
"PLANE_X", 0,
"XZ",
"Rotate around local X, then Z"},
2169 {
PLANE_Z,
"PLANE_Z", 0,
"ZX",
"Rotate around local Z, then X"},
2174 "Use the smallest single axis rotation, similar to Damped Track"},
2175 {0,
nullptr, 0,
nullptr,
nullptr},
2178 srna =
RNA_def_struct(brna,
"StretchToConstraint",
"Constraint");
2194 prop,
"Maintain Volume",
"Maintain the object's volume as it stretches");
2213 prop,
"Volume Variation",
"Factor between volume variation and stretching");
2219 prop,
"Use Volume Variation Minimum",
"Use lower limit for volume variation");
2225 prop,
"Use Volume Variation Maximum",
"Use upper limit for volume variation");
2241 prop,
"Volume Variation Smoothness",
"Strength of volume stretching clamping");
2257 {0,
nullptr, 0,
nullptr,
nullptr},
2263 "Clamp To Constraint",
2264 "Constrain an object's location to the nearest point along the target path");
2286 prop,
"Cyclic",
"Treat curve as cyclic curve (no clamping to curve bounding box)");
2301 {0,
nullptr, 0,
nullptr,
nullptr},
2307 {0,
nullptr, 0,
nullptr,
nullptr},
2317 "Apply new rotation before original, as if it was on a parent"},
2322 "Apply new rotation after original, as if it was on a child"},
2323 {0,
nullptr, 0,
nullptr,
nullptr},
2329 {0,
nullptr, 0,
nullptr,
nullptr},
2332 srna =
RNA_def_struct(brna,
"TransformConstraint",
"Constraint");
2334 srna,
"Transformation Constraint",
"Map transformations of the target to the object");
2352 prop,
"Map To",
"The transformation type to affect on the constrained object");
2359 prop,
"Map To X From",
"The source axis constrained object's X axis uses");
2366 prop,
"Map To Y From",
"The source axis constrained object's Y axis uses");
2373 prop,
"Map To Z From",
"The source axis constrained object's Z axis uses");
2470 prop,
"Location Mix Mode",
"Specify how to combine the new location with original");
2550 prop,
"Rotation Mix Mode",
"Specify how to combine the new rotation with original");
2630 prop,
"Scale Mix Mode",
"Specify how to combine the new scale with original");
2641 srna =
RNA_def_struct(brna,
"LimitLocationConstraint",
"Constraint");
2643 srna,
"Limit Location Constraint",
"Limit the location of the constrained object");
2718 prop,
"Affect Transform",
"Transform tools are affected by this constraint as well");
2729 srna =
RNA_def_struct(brna,
"LimitRotationConstraint",
"Constraint");
2731 srna,
"Limit Rotation Constraint",
"Limit the rotation of the constrained object");
2803 prop,
"Affect Transform",
"Transform tools are affected by this constraint as well");
2811 "Use the old semi-broken behavior that doesn't understand that rotations loop around");
2822 srna =
RNA_def_struct(brna,
"LimitScaleConstraint",
"Constraint");
2824 srna,
"Limit Size Constraint",
"Limit the scaling of the constrained object");
2899 prop,
"Affect Transform",
"Transform tools are affected by this constraint as well");
2910 srna =
RNA_def_struct(brna,
"LimitDistanceConstraint",
"Constraint");
2912 srna,
"Limit Distance Constraint",
"Limit the distance from target object");
2933 prop,
"Limit Mode",
"Distances in relation to sphere of influence to allow");
2939 prop,
"Affect Transform",
"Transforms are affected by this constraint as well");
2954 "Nearest Surface Point",
2955 "Shrink the location to the nearest target surface"},
2960 "Shrink the location to the nearest target surface along a given axis"},
2965 "Shrink the location to the nearest target vertex"},
2969 "Target Normal Project",
2970 "Shrink the location to the nearest target surface "
2971 "along the interpolated vertex normals of the target"},
2972 {0,
nullptr, 0,
nullptr,
nullptr},
2976 {0,
"OFF", 0,
"Off",
"No culling"},
2981 "No projection when in front of the face"},
2986 "No projection when behind the face"},
2987 {0,
nullptr, 0,
nullptr,
nullptr},
2990 srna =
RNA_def_struct(brna,
"ShrinkwrapConstraint",
"Constraint");
2992 srna,
"Shrinkwrap Constraint",
"Create constraint-based shrinkwrap relationship");
3009 prop,
"Shrinkwrap Type",
"Select type of shrinkwrap algorithm for target position");
3016 prop,
"Snap Mode",
"Select how to constrain the object to the target surface");
3043 prop,
"Project Distance",
"Limit the distance used for projection (zero disables)");
3049 prop,
"Project Opposite",
"Project in both specified and opposite directions");
3056 "rna_ShrinkwrapConstraint_face_cull_get",
3057 "rna_ShrinkwrapConstraint_face_cull_set",
3062 "Stop vertices from projecting to a face on the target when facing towards/away");
3068 prop,
"Invert Cull",
"When projecting in the opposite direction invert the face cull mode");
3074 prop,
"Align Axis To Normal",
"Align the specified axis to the surface normal");
3091 srna =
RNA_def_struct(brna,
"DampedTrackConstraint",
"Constraint");
3093 srna,
"Damped Track Constraint",
"Point toward target by taking the shortest rotation path");
3124 "Use the original scaling of the bones"},
3129 "Scale of the X and Z axes is the inverse of the Y-Scale"},
3133 "Volume Preservation",
3134 "Scale of the X and Z axes are adjusted to preserve the volume of the bones"},
3135 {0,
nullptr, 0,
nullptr,
nullptr},
3144 "Scale the bones to fit the entire length of the curve"},
3149 "Use the original Y scale of the bone"},
3150 {0,
nullptr, 0,
nullptr,
nullptr},
3186 "rna_SplineIKConstraint_joint_bindings_get",
3187 "rna_SplineIKConstraint_joint_bindings_set",
3192 "(EXPERIENCED USERS ONLY) The relative positions of the joints along the chain, "
3200 prop,
"Chain Offset",
"Offset the entire chain relative to the root joint");
3207 "Ignore the relative lengths of the bones when fitting to the curve");
3215 "Average radius of the endpoints is used to tweak the X and Z Scaling of the bones, "
3216 "on top of XZ Scale mode");
3226 "Method used for determining the scaling of the X and Z axes of the bones");
3235 "Method used for determining the scaling of the Y axis of the bones, "
3236 "on top of the shape and scaling of the curve itself");
3243 prop,
"Use Original Scale",
"Apply volume preservation over the original scaling");
3250 prop,
"Volume Variation",
"Factor between volume variation and stretching");
3256 prop,
"Use Volume Variation Minimum",
"Use lower limit for volume variation");
3262 prop,
"Use Volume Variation Maximum",
"Use upper limit for volume variation");
3278 prop,
"Volume Variation Smoothness",
"Strength of volume stretching clamping");
3290 {
PIVOTCON_AXIS_NONE,
"ALWAYS_ACTIVE", 0,
"Always",
"Use the pivot point in every rotation"},
3295 "Use the pivot point in the negative rotation range around the X-axis"},
3300 "Use the pivot point in the negative rotation range around the Y-axis"},
3305 "Use the pivot point in the negative rotation range around the Z-axis"},
3310 "Use the pivot point in the positive rotation range around the X-axis"},
3315 "Use the pivot point in the positive rotation range around the Y-axis"},
3320 "Use the pivot point in the positive rotation range around the Z-axis"},
3321 {0,
nullptr, 0,
nullptr,
nullptr},
3339 prop,
"Target",
"Target Object, defining the position of the pivot when defined");
3353 "Use Relative Offset",
3354 "Offset will be an absolute point in space instead of relative to the target");
3361 "Offset of pivot from target (when set), or from owner's location "
3362 "(when Fixed Position is off), or the absolute pivot point");
3370 prop,
"Enabled Rotation Range",
"Rotation range on which pivoting should occur");
3385 {0,
nullptr, 0,
nullptr,
nullptr},
3388 srna =
RNA_def_struct(brna,
"FollowTrackConstraint",
"Constraint");
3390 srna,
"Follow Track Constraint",
"Lock motion to the target motion track");
3426 prop,
"Object",
"Movie tracking object to follow (if empty, camera object is used)");
3433 prop,
"Camera",
"Camera to which motion is parented (if empty active scene camera is used)");
3438 "rna_Constraint_followTrack_camera_set",
3440 "rna_Constraint_cameraObject_poll");
3448 "Object used to define depth in camera space by projecting onto surface of this object");
3453 "rna_Constraint_followTrack_depthObject_set",
3455 "rna_Constraint_followTrack_depthObject_poll");
3478 srna =
RNA_def_struct(brna,
"CameraSolverConstraint",
"Constraint");
3480 srna,
"Camera Solver Constraint",
"Lock motion to the reconstructed camera movement");
3507 srna =
RNA_def_struct(brna,
"ObjectSolverConstraint",
"Constraint");
3509 srna,
"Object Solver Constraint",
"Lock motion to the reconstructed object movement");
3531 prop,
"Set Inverse Pending",
"Set to true to request recalculation of the inverse matrix");
3544 prop,
"Camera",
"Camera to which motion is parented (if empty active scene camera is used)");
3549 "rna_Constraint_objectSolver_camera_set",
3551 "rna_Constraint_cameraObject_poll");
3561 srna =
RNA_def_struct(brna,
"TransformCacheConstraint",
"Constraint");
3563 srna,
"Transform Cache Constraint",
"Look up transformation from an external file");
3580 "Path to the object in the Alembic archive used to lookup the transform matrix");
3596 srna,
"Constraint",
"Constraint modifying the transformation of objects and bones");
3619 "Override Constraint",
3620 "In a local override object, whether this constraint comes from the "
3621 "linked reference object, or is local to the override");
3689 prop,
"Influence",
"Amount of influence constraint will have on the final solution");
3699 "Amount of residual error in Blender space unit for constraints that work on position");
3707 "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_report(ReportList *reports, eReportType type, const char *message)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define STRNCPY(dst, 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 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
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
#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)
void *(* MEM_callocN)(size_t len, const char *str)
decltype(::ActionSlot::handle) slot_handle_t
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_python(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_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_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
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_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[]
struct bConstraintTarget * next