60#include "RNA_prototypes.hh"
104 if (pose_bone ==
nullptr) {
106 if (pose_bone ==
nullptr) {
120 if (
ELEM(
nullptr, ob, con)) {
141 return &pchan->constraints;
164 const char subtarget[],
167 ListBase targets = {
nullptr,
nullptr};
175 if (
abs(index) < targets_num) {
176 index = targets_num -
abs(index);
179 index = targets_num - 1;
182 else if (index >= targets_num) {
183 index = targets_num - 1;
207 ListBase targets = {
nullptr,
nullptr};
208 bool check_targets =
true;
224 else if (
data->tar == owner) {
232 data->poletar =
nullptr;
235 else if (
data->poletar == owner) {
244 check_targets =
false;
254 else if (
data->tar == owner) {
261 check_targets =
false;
267 if (
data->act ==
nullptr) {
292 check_targets =
false;
299 if (
data->upflag ==
data->trackflag) {
302 if (
data->upflag + 3 ==
data->trackflag) {
310 if (
data->reserved2 ==
data->reserved1) {
313 if (
data->reserved2 + 3 ==
data->reserved1) {
320 if (
data->lockflag ==
data->trackflag) {
323 if (
data->lockflag + 3 ==
data->trackflag) {
333 if ((
data->points ==
nullptr) || (
data->numpoints !=
data->chainlen + 1)) {
345 if (
data->clip !=
nullptr &&
data->track[0]) {
349 if (
data->object[0]) {
356 if (!tracking_object) {
387 if ((
data->cache_file ==
nullptr) || (
data->object_path[0] ==
'\0')) {
402 else if (ct->tar == owner) {
409 else if (
STREQ(pchan->
name, ct->subtarget)) {
411 ct->subtarget[0] =
'\0';
438 Curve *cu =
static_cast<Curve *
>(ct->tar->data);
467 else if (check_targets) {
480 switch (owner->
type) {
535 if (pchan->constraints.first) {
568#define EDIT_CONSTRAINT_OWNER_OBJECT 0
569#define EDIT_CONSTRAINT_OWNER_BONE 1
576 "Edit a constraint on the active object"},
578 {0,
nullptr, 0,
nullptr,
nullptr},
583 const bool is_liboverride_allowed)
600 C,
"Cannot edit constraints coming from linked data in a library override");
623 ot->srna,
"constraint",
nullptr,
MAX_NAME,
"Constraint",
"Name of the constraint to edit");
633 ot->srna,
"report",
false,
"Report",
"Create a notification after the operation");
670 if (event !=
nullptr) {
687 if (r_retval !=
nullptr) {
694 if (r_retval !=
nullptr) {
722 printf(
"constraint found = %p, %s\n", (
void *)con, (con) ? con->
name :
"<Not found>");
726 if (con && (type != 0) && (con->
type != type)) {
749 if (
data ==
nullptr) {
754 data->orglength = 0.0f;
774 ot->name =
"Reset Original Length";
775 ot->idname =
"CONSTRAINT_OT_stretchto_reset";
776 ot->description =
"Reset original length of bone for Stretch To Constraint";
806 if (
data ==
nullptr) {
831 ot->name =
"Reset Distance";
832 ot->idname =
"CONSTRAINT_OT_limitdistance_reset";
833 ot->description =
"Reset limiting distance for Limit Distance Constraint";
865 short flag_backup = con->
flag;
868 con->
flag = flag_backup;
880 if (
data ==
nullptr) {
881 printf(
"DEBUG: Child-Of Set Inverse - object = '%s'\n", (ob) ? ob->
id.
name + 2 :
"<None>");
911 ot->name =
"Set Inverse";
912 ot->idname =
"CONSTRAINT_OT_childof_set_inverse";
913 ot->description =
"Set inverse correction for Child Of constraint";
935 if (
data ==
nullptr) {
962 ot->name =
"Clear Inverse";
963 ot->idname =
"CONSTRAINT_OT_childof_clear_inverse";
964 ot->description =
"Clear inverse correction for Child Of constraint";
995 float standardRange = 1.0;
998 if (
data ==
nullptr) {
1016 standardRange = 100.0f;
1041 standardRange = 1.0f;
1058 float A = standardRange / float(
len);
1059 float B = float(-sfra) *
A;
1084 ot->name =
"Auto Animate Path";
1085 ot->idname =
"CONSTRAINT_OT_followpath_path_animate";
1087 "Add default animation for path used by constraint if it isn't animated already";
1105 "First frame of path animation",
1114 "Number of frames that path animation should take",
1133 if (
data ==
nullptr) {
1134 printf(
"DEBUG: ObjectSolver Set Inverse - object = '%s'\n", (ob) ? ob->
id.
name + 2 :
"<None>");
1136 op->
reports,
RPT_ERROR,
"Could not find constraint data for ObjectSolver Set Inverse");
1165 ot->name =
"Set Inverse";
1166 ot->idname =
"CONSTRAINT_OT_objectsolver_set_inverse";
1167 ot->description =
"Set inverse correction for Object Solver constraint";
1194 if (
data ==
nullptr) {
1221 ot->name =
"Clear Inverse";
1222 ot->idname =
"CONSTRAINT_OT_objectsolver_clear_inverse";
1223 ot->description =
"Clear inverse correction for Object Solver constraint";
1376 if (con ==
nullptr) {
1419 ot->name =
"Delete Constraint";
1420 ot->idname =
"CONSTRAINT_OT_delete";
1421 ot->description =
"Remove constraint from constraint stack";
1448 if (con ==
nullptr) {
1458 const bool is_first_constraint = con !=
constraints->first;
1491 if (is_first_constraint) {
1494 "Applied constraint was not first, result may not be as expected");
1518 ot->name =
"Apply Constraint";
1519 ot->idname =
"CONSTRAINT_OT_apply";
1520 ot->description =
"Apply constraint and remove from the stack";
1545 if (con ==
nullptr) {
1603 ot->name =
"Duplicate Constraint";
1604 ot->idname =
"CONSTRAINT_OT_copy";
1605 ot->description =
"Duplicate constraint at the same position in the stack";
1630 if (con ==
nullptr) {
1644 Object *prev_ob =
nullptr;
1649 if (pchan == chan) {
1659 if (prev_ob == ob) {
1716 if (pchan != chan) {
1758 ot->name =
"Copy Constraint To Selected";
1759 ot->idname =
"CONSTRAINT_OT_copy_to_selected";
1760 ot->description =
"Copy constraint to other selected objects/bones";
1783 if (con && con->
next) {
1814 ot->name =
"Move Constraint Down";
1815 ot->idname =
"CONSTRAINT_OT_move_down";
1816 ot->description =
"Move constraint down in constraint stack";
1841 if (con && con->
prev) {
1872 ot->name =
"Move Constraint Up";
1873 ot->idname =
"CONSTRAINT_OT_move_up";
1874 ot->description =
"Move constraint up in constraint stack";
1898 new_index = std::max(new_index, 0);
1925 ot->name =
"Move Constraint to Index";
1926 ot->idname =
"CONSTRAINT_OT_move_to_index";
1928 "Change the constraint's position in the list so it evaluates after the set number of "
1945 "The index to move the constraint to",
1959 Object *prev_ob =
nullptr;
1964 pchan->constflag = 0;
1966 if (prev_ob != ob) {
1985 ot->name =
"Clear Pose Constraints";
1986 ot->idname =
"POSE_OT_constraints_clear";
1987 ot->description =
"Clear all constraints from the selected bones";
2024 ot->name =
"Clear Object Constraints";
2025 ot->idname =
"OBJECT_OT_constraints_clear";
2026 ot->description =
"Clear all constraints from the selected objects";
2050 Object *prev_ob =
nullptr;
2055 if (pchan != chan) {
2060 if (prev_ob != ob) {
2080 ot->name =
"Copy Constraints to Selected Bones";
2081 ot->idname =
"POSE_OT_constraints_copy";
2082 ot->description =
"Copy constraints to other selected bones";
2125 ot->name =
"Copy Constraints to Selected Objects";
2126 ot->idname =
"OBJECT_OT_constraints_copy";
2127 ot->description =
"Copy constraints to other selected objects";
2149 bool only_curve =
false, only_mesh =
false, only_ob =
false;
2156 *tar_pchan =
nullptr;
2202 if (pchan != pchanact) {
2214 if (found ==
false) {
2230 if (pchan !=
nullptr) {
2239 ((!only_mesh) || (ob->type ==
OB_MESH)))
2261 if ((found ==
false) && (
add)) {
2288 view_layer->
basact = base;
2315 if (pchan ==
nullptr) {
2338 Object *tar_ob =
nullptr;
2398 short with_targets = 0;
2408 if (strstr(op->
idname,
"with_targets")) {
2420 short with_targets = 0;
2430 if (strstr(op->
idname,
"with_targets")) {
2459 return object_constraint_items;
2467 ot->name =
"Add Constraint";
2468 ot->description =
"Add a constraint to the active object";
2469 ot->idname =
"OBJECT_OT_constraint_add";
2496 ot->name =
"Add Constraint (with Targets)";
2498 "Add a constraint to the active object, with target (where applicable) set to the "
2499 "selected objects/bones";
2500 ot->idname =
"OBJECT_OT_constraint_add_with_targets";
2519 ot->name =
"Add Constraint";
2520 ot->description =
"Add a constraint to the active bone";
2521 ot->idname =
"POSE_OT_constraint_add";
2538 ot->name =
"Add Constraint (with Targets)";
2540 "Add a constraint to the active bone, with target (where applicable) set to the selected "
2542 ot->idname =
"POSE_OT_constraint_add_with_targets";
2575 Object *tar_ob =
nullptr;
2579 if (
ELEM(
nullptr, ob, pchan)) {
2605 PointerRNA op_ptr = layout->
op(
"POSE_OT_ik_add",
IFACE_(
"To Active Bone"), ICON_NONE);
2609 PointerRNA op_ptr = layout->
op(
"POSE_OT_ik_add",
IFACE_(
"To Active Object"), ICON_NONE);
2615 PointerRNA op_ptr = layout->
op(
"POSE_OT_ik_add",
IFACE_(
"To New Empty Object"), ICON_NONE);
2617 op_ptr = layout->
op(
"POSE_OT_ik_add",
IFACE_(
"Without Targets"), ICON_NONE);
2642 ot->name =
"Add IK to Bone";
2643 ot->description =
"Add IK Constraint to the active Bone";
2644 ot->idname =
"POSE_OT_ik_add";
2659 "Assign IK Constraint with targets derived from the select bones/objects");
2672 Object *prev_ob =
nullptr;
2680 for (con =
static_cast<bConstraint *
>(pchan->constraints.first); con; con =
next) {
2688 if (prev_ob != ob) {
2706 ot->name =
"Remove IK";
2707 ot->description =
"Remove all IK Constraints from selected bones";
2708 ot->idname =
"POSE_OT_ik_clear";
Functions and classes to work with Actions.
Functions for backward compatibility with the legacy Action API.
Functions to work with AnimData.
void BIK_test_constraint(struct Object *ob, struct bConstraint *cons)
Blender kernel action and pose functionality.
void BKE_pose_tag_recalc(Main *bmain, bPose *pose) ATTR_NONNULL(1
void BKE_pose_update_constraint_flags(bPose *pose) ATTR_NONNULL(1)
bPoseChannel * BKE_pose_channel_active_or_first_selected(Object *ob) ATTR_WARN_UNUSED_RESULT
bPoseChannel * BKE_pose_channel_active_if_bonecoll_visible(Object *ob) ATTR_WARN_UNUSED_RESULT
void BKE_pose_tag_update_constraint_flags(bPose *pose) ATTR_NONNULL(1)
bArmature * BKE_armature_from_object(Object *ob)
Bone * BKE_armature_find_bone_name(bArmature *arm, const char *name)
struct bConstraint * BKE_constraints_find_name(struct ListBase *list, const char *name)
void BKE_constraints_free(struct ListBase *list)
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_constraints_copy(struct ListBase *dst, const struct ListBase *src, bool do_extern)
bool BKE_constraint_remove_ex(ListBase *list, struct Object *ob, struct bConstraint *con)
struct bConstraint * BKE_constraint_copy_for_pose(struct Object *ob, struct bPoseChannel *pchan, struct bConstraint *src)
struct bConstraint * BKE_constraint_add_for_object(struct Object *ob, const char *name, short type)
bool BKE_constraint_apply_and_remove_for_pose(struct Depsgraph *depsgraph, struct Scene *scene, ListBase *constraints, struct Object *ob, struct bConstraint *con, struct bPoseChannel *pchan)
bool BKE_constraint_is_nonlocal_in_liboverride(const struct Object *ob, const struct bConstraint *con)
struct bConstraint * BKE_constraint_add_for_pose(struct Object *ob, struct bPoseChannel *pchan, const char *name, short type)
bool BKE_constraint_apply_and_remove_for_object(struct Depsgraph *depsgraph, struct Scene *scene, ListBase *constraints, struct Object *ob, struct bConstraint *con)
struct bConstraint * BKE_constraint_copy_for_object(struct Object *ob, struct bConstraint *src)
struct bConstraint * BKE_constraints_active_get(struct ListBase *list)
void BKE_constraints_active_set(ListBase *list, struct bConstraint *con)
#define CTX_DATA_BEGIN_WITH_ID(C, Type, instance, member, Type_id, instance_id)
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
bPoseChannel * CTX_data_active_pose_bone(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
FModifier * add_fmodifier(ListBase *modifiers, int type, FCurve *owner_fcu)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Base * BKE_view_layer_active_base_get(ViewLayer *view_layer)
General operations, lookup, etc. for blender objects.
bool BKE_object_exists_check(Main *bmain, const Object *obtest)
Object * BKE_object_add(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name) ATTR_NONNULL(1
void BKE_object_eval_constraints(Depsgraph *depsgraph, Scene *scene, Object *ob)
Object * BKE_object_pose_armature_get(Object *ob)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
struct MovieTrackingObject * BKE_tracking_object_get_camera(const struct MovieTracking *tracking)
struct MovieTrackingObject * BKE_tracking_object_get_named(struct MovieTracking *tracking, const char *name)
struct MovieTrackingTrack * BKE_tracking_object_find_track_with_name(struct MovieTrackingObject *tracking_object, const char *name)
A dynamically sized string ADT.
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkafter(ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_insertlinkbefore(ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
void unit_m4(float m[4][4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
char * STRNCPY(char(&dst)[N], const char *src)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
@ FMODIFIER_TYPE_GENERATOR
@ CONSTRAINT_OVERRIDE_LIBRARY_LOCAL
@ CONSTRAINT_TYPE_TRACKTO
@ CONSTRAINT_TYPE_CHILDOF
@ CONSTRAINT_TYPE_FOLLOWTRACK
@ CONSTRAINT_TYPE_OBJECTSOLVER
@ CONSTRAINT_TYPE_ARMATURE
@ CONSTRAINT_TYPE_SHRINKWRAP
@ CONSTRAINT_TYPE_ROTLIMIT
@ CONSTRAINT_TYPE_CAMERASOLVER
@ CONSTRAINT_TYPE_SPLINEIK
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_DISTLIMIT
@ CONSTRAINT_TYPE_LOCLIMIT
@ CONSTRAINT_TYPE_CLAMPTO
@ CONSTRAINT_TYPE_LOCKTRACK
@ CONSTRAINT_TYPE_SIZELIMIT
@ CONSTRAINT_TYPE_FOLLOWPATH
@ CONSTRAINT_TYPE_STRETCHTO
@ CONSTRAINT_TYPE_SAMEVOL
@ CONSTRAINT_TYPE_TRANSFORM_CACHE
@ CONSTRAINT_OBTYPE_OBJECT
@ CAMERASOLVER_ACTIVECLIP
@ CONSTRAINT_SPLINEIK_BOUND
@ OBJECTSOLVER_SET_INVERSE
Object is a sort of wrapper for general info.
bool ED_operator_object_active_local_editable(bContext *C)
bool ED_operator_object_active_editable(bContext *C)
bool ED_operator_posemode_exclusive(bContext *C)
bool ED_operator_object_active_local_editable_posemode_exclusive(bContext *C)
bool ED_operator_object_active_editable_ex(bContext *C, const Object *ob)
Read Guarded memory(de)allocation.
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
PointerRNA * UI_region_panel_custom_data_under_cursor(const bContext *C, const wmEvent *event)
BMesh const char void * data
BPy_StructRNA * depsgraph
btSequentialImpulseConstraintSolverMt int btPersistentManifold int btTypedConstraint ** constraints
Slot * slot_for_handle(slot_handle_t handle)
#define ID_IS_EDITABLE(_id)
void * MEM_callocN(size_t len, const char *str)
static void add(blender::Map< std::string, std::string > &messages, Message &msg)
bool action_treat_as_legacy(const bAction &action)
bAction * id_action_ensure(Main *bmain, ID *id)
FCurve * action_fcurve_ensure_ex(Main *bmain, bAction *act, const char group[], PointerRNA *ptr, const FCurveDescriptor &fcurve_descriptor)
FCurve * fcurve_find_in_assigned_slot(AnimData &adt, const FCurveDescriptor &fcurve_descriptor)
static int constraint_type_get(Object *owner, bPoseChannel *pchan)
void object_test_constraints(Main *bmain, Object *ob)
static wmOperatorStatus objectsolver_set_inverse_exec(bContext *C, wmOperator *op)
static bool edit_constraint_poll(bContext *C)
bConstraint * constraint_active_get(Object *ob)
void constraint_link(Main *bmain, Object *ob_dst, ListBase *dst, ListBase *src)
static wmOperatorStatus constraint_move_up_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus followpath_path_animate_exec(bContext *C, wmOperator *op)
static wmOperatorStatus constraint_move_down_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool edit_constraint_poll_generic(bContext *C, StructRNA *rna_type, const bool is_liboverride_allowed)
void constraint_copy_for_object(Main *bmain, Object *ob_dst, bConstraint *con)
static void object_pose_tag_update(Main *bmain, Object *ob)
static wmOperatorStatus constraint_copy_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void CONSTRAINT_OT_move_down(wmOperatorType *ot)
static void edit_constraint_report_property(wmOperatorType *ot)
static void object_test_constraint(Main *bmain, Object *ob, bConstraint *con)
void constraint_active_set(Object *ob, bConstraint *con)
static wmOperatorStatus constraint_delete_exec(bContext *C, wmOperator *op)
static wmOperatorStatus childof_set_inverse_invoke(bContext *C, wmOperator *op, const wmEvent *)
void constraint_copy_for_pose(Main *bmain, Object *ob_dst, bPoseChannel *pchan, bConstraint *con)
static wmOperatorStatus constraint_apply_exec(bContext *C, wmOperator *op)
static void test_constraints(Main *bmain, Object *ob, bPoseChannel *pchan)
static wmOperatorStatus constraint_copy_to_selected_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void constraint_dependency_tag_update(Main *bmain, Object *ob, bConstraint *con)
static bool edit_constraint_liboverride_allowed_poll(bContext *C)
static wmOperatorStatus constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase *list, int type, const bool setTarget)
void constraint_update(Main *bmain, Object *ob)
static bConstraint * edit_constraint_property_get(bContext *C, wmOperator *op, Object *ob, int type)
static wmOperatorStatus childof_clear_inverse_invoke(bContext *C, wmOperator *op, const wmEvent *)
static const EnumPropertyItem * object_constraint_add_itemf(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
static wmOperatorStatus object_constraint_add_exec(bContext *C, wmOperator *op)
static wmOperatorStatus constraint_copy_exec(bContext *C, wmOperator *op)
void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot)
void CONSTRAINT_OT_objectsolver_set_inverse(wmOperatorType *ot)
static bool constraint_copy_to_selected_poll(bContext *C)
static void force_evaluation_if_constraint_disabled(bContext *C, Object *ob, bConstraint *con)
static wmOperatorStatus stretchto_reset_exec(bContext *C, wmOperator *op)
void base_select(Base *base, eObjectSelect_Mode mode)
ListBase * pose_constraint_list(const bContext *C)
static wmOperatorStatus constraint_copy_to_selected_exec(bContext *C, wmOperator *op)
void CONSTRAINT_OT_limitdistance_reset(wmOperatorType *ot)
static wmOperatorStatus pose_ik_clear_exec(bContext *C, wmOperator *)
static wmOperatorStatus objectsolver_clear_inverse_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool get_new_constraint_target(bContext *C, int con_type, Object **tar_ob, bPoseChannel **tar_pchan, bool add)
static wmOperatorStatus constraint_move_up_exec(bContext *C, wmOperator *op)
static wmOperatorStatus pose_ik_add_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus limitdistance_reset_exec(bContext *C, wmOperator *op)
static wmOperatorStatus constraint_move_down_exec(bContext *C, wmOperator *op)
void CONSTRAINT_OT_copy(wmOperatorType *ot)
void CONSTRAINT_OT_apply(wmOperatorType *ot)
void constraint_tag_update(Main *bmain, Object *ob, bConstraint *con)
static wmOperatorStatus objectsolver_set_inverse_invoke(bContext *C, wmOperator *op, const wmEvent *)
void CONSTRAINT_OT_move_up(wmOperatorType *ot)
ListBase * constraint_active_list(Object *ob)
void POSE_OT_constraints_copy(wmOperatorType *ot)
static wmOperatorStatus childof_clear_inverse_exec(bContext *C, wmOperator *op)
static wmOperatorStatus object_constraint_copy_exec(bContext *C, wmOperator *)
static wmOperatorStatus objectsolver_clear_inverse_exec(bContext *C, wmOperator *op)
static wmOperatorStatus childof_set_inverse_exec(bContext *C, wmOperator *op)
static wmOperatorStatus limitdistance_reset_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus constraint_apply_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Object * context_active_object(const bContext *C)
static wmOperatorStatus constraint_delete_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus constraint_move_to_index_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus followpath_path_animate_invoke(bContext *C, wmOperator *op, const wmEvent *)
void POSE_OT_ik_add(wmOperatorType *ot)
void POSE_OT_ik_clear(wmOperatorType *ot)
void POSE_OT_constraint_add(wmOperatorType *ot)
void constraint_dependency_update(Main *bmain, Object *ob)
static wmOperatorStatus constraint_move_to_index_exec(bContext *C, wmOperator *op)
void CONSTRAINT_OT_delete(wmOperatorType *ot)
bool constraint_move_to_index(Object *ob, bConstraint *con, int index)
static wmOperatorStatus stretchto_reset_invoke(bContext *C, wmOperator *op, const wmEvent *)
void CONSTRAINT_OT_stretchto_reset(wmOperatorType *ot)
void OBJECT_OT_constraint_add(wmOperatorType *ot)
static wmOperatorStatus pose_constraints_clear_exec(bContext *C, wmOperator *)
void CONSTRAINT_OT_move_to_index(wmOperatorType *ot)
void OBJECT_OT_constraints_copy(wmOperatorType *ot)
static void test_constraint(Main *bmain, Object *owner, bPoseChannel *pchan, bConstraint *con, int type)
static wmOperatorStatus pose_constraint_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_constraints_clear(wmOperatorType *ot)
static void edit_constraint_properties(wmOperatorType *ot)
static wmOperatorStatus pose_constraint_copy_exec(bContext *C, wmOperator *op)
static void set_constraint_nth_target(bConstraint *con, Object *target, const char subtarget[], int index)
static wmOperatorStatus pose_ik_add_exec(bContext *C, wmOperator *op)
void CONSTRAINT_OT_objectsolver_clear_inverse(wmOperatorType *ot)
void CONSTRAINT_OT_childof_clear_inverse(wmOperatorType *ot)
void CONSTRAINT_OT_followpath_path_animate(wmOperatorType *ot)
static const EnumPropertyItem constraint_owner_items[]
void CONSTRAINT_OT_childof_set_inverse(wmOperatorType *ot)
void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
static wmOperatorStatus object_constraints_clear_exec(bContext *C, wmOperator *)
void CONSTRAINT_OT_copy_to_selected(wmOperatorType *ot)
void POSE_OT_constraints_clear(wmOperatorType *ot)
static bool edit_constraint_invoke_properties(bContext *C, wmOperator *op, const wmEvent *event, wmOperatorStatus *r_retval)
ListBase * constraint_list_from_constraint(Object *ob, bConstraint *con, bPoseChannel **r_pchan)
#define EDIT_CONSTRAINT_OWNER_BONE
#define EDIT_CONSTRAINT_OWNER_OBJECT
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool RNA_pointer_is_null(const PointerRNA *ptr)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_id_pointer_create(ID *id)
const EnumPropertyItem rna_enum_constraint_type_items[]
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
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_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
std::optional< std::string > RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
struct bConstraintTarget * next
struct bConstraint * prev
struct bConstraint * next
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, wmOperatorCallContext context, eUI_Item_Flag flag)
struct ReportList * reports
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)