60#include "RNA_prototypes.hh"
105 if (pose_bone ==
nullptr) {
107 if (pose_bone ==
nullptr) {
121 if (
ELEM(
nullptr, ob, con)) {
142 return &pchan->constraints;
165 const char subtarget[],
168 ListBase targets = {
nullptr,
nullptr};
176 if (
abs(index) < targets_num) {
177 index = targets_num -
abs(index);
180 index = targets_num - 1;
183 else if (index >= targets_num) {
184 index = targets_num - 1;
208 ListBase targets = {
nullptr,
nullptr};
209 bool check_targets =
true;
225 else if (
data->tar == owner) {
233 data->poletar =
nullptr;
236 else if (
data->poletar == owner) {
245 check_targets =
false;
255 else if (
data->tar == owner) {
262 check_targets =
false;
268 if (
data->act ==
nullptr) {
293 check_targets =
false;
300 if (
data->upflag ==
data->trackflag) {
303 if (
data->upflag + 3 ==
data->trackflag) {
311 if (
data->reserved2 ==
data->reserved1) {
314 if (
data->reserved2 + 3 ==
data->reserved1) {
321 if (
data->lockflag ==
data->trackflag) {
324 if (
data->lockflag + 3 ==
data->trackflag) {
334 if ((
data->points ==
nullptr) || (
data->numpoints !=
data->chainlen + 1)) {
346 if (
data->clip !=
nullptr &&
data->track[0]) {
350 if (
data->object[0]) {
357 if (!tracking_object) {
388 if ((
data->cache_file ==
nullptr) || (
data->object_path[0] ==
'\0')) {
403 else if (ct->tar == owner) {
410 else if (
STREQ(pchan->
name, ct->subtarget)) {
412 ct->subtarget[0] =
'\0';
439 Curve *cu =
static_cast<Curve *
>(ct->tar->data);
468 else if (check_targets) {
481 switch (owner->
type) {
536 if (pchan->constraints.first) {
569#define EDIT_CONSTRAINT_OWNER_OBJECT 0
570#define EDIT_CONSTRAINT_OWNER_BONE 1
577 "Edit a constraint on the active object"},
579 {0,
nullptr, 0,
nullptr,
nullptr},
584 const bool is_liboverride_allowed)
601 C,
"Cannot edit constraints coming from linked data in a library override");
624 ot->srna,
"constraint",
nullptr,
MAX_NAME,
"Constraint",
"Name of the constraint to edit");
634 ot->srna,
"report",
false,
"Report",
"Create a notification after the operation");
671 if (event !=
nullptr) {
688 if (r_retval !=
nullptr) {
695 if (r_retval !=
nullptr) {
723 printf(
"constraint found = %p, %s\n", (
void *)con, (con) ? con->
name :
"<Not found>");
727 if (con && (type != 0) && (con->
type != type)) {
750 if (
data ==
nullptr) {
755 data->orglength = 0.0f;
775 ot->name =
"Reset Original Length";
776 ot->idname =
"CONSTRAINT_OT_stretchto_reset";
777 ot->description =
"Reset original length of bone for Stretch To Constraint";
807 if (
data ==
nullptr) {
832 ot->name =
"Reset Distance";
833 ot->idname =
"CONSTRAINT_OT_limitdistance_reset";
834 ot->description =
"Reset limiting distance for Limit Distance Constraint";
866 short flag_backup = con->
flag;
869 con->
flag = flag_backup;
881 if (
data ==
nullptr) {
882 printf(
"DEBUG: Child-Of Set Inverse - object = '%s'\n", (ob) ? ob->
id.
name + 2 :
"<None>");
912 ot->name =
"Set Inverse";
913 ot->idname =
"CONSTRAINT_OT_childof_set_inverse";
914 ot->description =
"Set inverse correction for Child Of constraint";
936 if (
data ==
nullptr) {
971 if (con ==
nullptr) {
991 ot->name =
"Clear Inverse";
992 ot->idname =
"CONSTRAINT_OT_childof_clear_inverse";
993 ot->description =
"Clear inverse correction for Child Of constraint";
1024 float standardRange = 1.0;
1027 if (
data ==
nullptr) {
1045 standardRange = 100.0f;
1070 standardRange = 1.0f;
1113 ot->name =
"Auto Animate Path";
1114 ot->idname =
"CONSTRAINT_OT_followpath_path_animate";
1116 "Add default animation for path used by constraint if it isn't animated already";
1134 "First frame of path animation",
1143 "Number of frames that path animation should take",
1162 if (
data ==
nullptr) {
1163 printf(
"DEBUG: ObjectSolver Set Inverse - object = '%s'\n", (ob) ? ob->
id.
name + 2 :
"<None>");
1165 op->
reports,
RPT_ERROR,
"Could not find constraint data for ObjectSolver Set Inverse");
1194 ot->name =
"Set Inverse";
1195 ot->idname =
"CONSTRAINT_OT_objectsolver_set_inverse";
1196 ot->description =
"Set inverse correction for Object Solver constraint";
1223 if (
data ==
nullptr) {
1255 if (con ==
nullptr) {
1271 ot->name =
"Clear Inverse";
1272 ot->idname =
"CONSTRAINT_OT_objectsolver_clear_inverse";
1273 ot->description =
"Clear inverse correction for Object Solver constraint";
1426 if (con ==
nullptr) {
1469 ot->name =
"Delete Constraint";
1470 ot->idname =
"CONSTRAINT_OT_delete";
1471 ot->description =
"Remove constraint from constraint stack";
1498 if (con ==
nullptr) {
1508 const bool is_first_constraint = con !=
constraints->first;
1541 if (is_first_constraint) {
1544 "Applied constraint was not first, result may not be as expected");
1568 ot->name =
"Apply Constraint";
1569 ot->idname =
"CONSTRAINT_OT_apply";
1570 ot->description =
"Apply constraint and remove from the stack";
1595 if (con ==
nullptr) {
1653 ot->name =
"Duplicate Constraint";
1654 ot->idname =
"CONSTRAINT_OT_copy";
1655 ot->description =
"Duplicate constraint at the same position in the stack";
1680 if (con ==
nullptr) {
1694 Object *prev_ob =
nullptr;
1699 if (pchan == chan) {
1709 if (prev_ob == ob) {
1766 if (pchan != chan) {
1808 ot->name =
"Copy Constraint To Selected";
1809 ot->idname =
"CONSTRAINT_OT_copy_to_selected";
1810 ot->description =
"Copy constraint to other selected objects/bones";
1833 if (con && con->
next) {
1864 ot->name =
"Move Constraint Down";
1865 ot->idname =
"CONSTRAINT_OT_move_down";
1866 ot->description =
"Move constraint down in constraint stack";
1891 if (con && con->
prev) {
1922 ot->name =
"Move Constraint Up";
1923 ot->idname =
"CONSTRAINT_OT_move_up";
1924 ot->description =
"Move constraint up in constraint stack";
1948 new_index = std::max(new_index, 0);
1975 ot->name =
"Move Constraint to Index";
1976 ot->idname =
"CONSTRAINT_OT_move_to_index";
1978 "Change the constraint's position in the list so it evaluates after the set number of "
1995 "The index to move the constraint to",
2009 Object *prev_ob =
nullptr;
2014 pchan->constflag = 0;
2016 if (prev_ob != ob) {
2035 ot->name =
"Clear Pose Constraints";
2036 ot->idname =
"POSE_OT_constraints_clear";
2037 ot->description =
"Clear all constraints from the selected bones";
2074 ot->name =
"Clear Object Constraints";
2075 ot->idname =
"OBJECT_OT_constraints_clear";
2076 ot->description =
"Clear all constraints from the selected objects";
2100 Object *prev_ob =
nullptr;
2105 if (pchan != chan) {
2110 if (prev_ob != ob) {
2130 ot->name =
"Copy Constraints to Selected Bones";
2131 ot->idname =
"POSE_OT_constraints_copy";
2132 ot->description =
"Copy constraints to other selected bones";
2175 ot->name =
"Copy Constraints to Selected Objects";
2176 ot->idname =
"OBJECT_OT_constraints_copy";
2177 ot->description =
"Copy constraints to other selected objects";
2199 bool only_curve =
false, only_mesh =
false, only_ob =
false;
2206 *tar_pchan =
nullptr;
2252 if (pchan != pchanact) {
2264 if (found ==
false) {
2280 if (pchan !=
nullptr) {
2289 ((!only_mesh) || (ob->type ==
OB_MESH)))
2311 if ((found ==
false) && (
add)) {
2338 view_layer->
basact = base;
2365 if (pchan ==
nullptr) {
2388 Object *tar_ob =
nullptr;
2448 short with_targets = 0;
2458 if (strstr(op->
idname,
"with_targets")) {
2470 short with_targets = 0;
2480 if (strstr(op->
idname,
"with_targets")) {
2509 return object_constraint_items;
2517 ot->name =
"Add Constraint";
2518 ot->description =
"Add a constraint to the active object";
2519 ot->idname =
"OBJECT_OT_constraint_add";
2546 ot->name =
"Add Constraint (with Targets)";
2548 "Add a constraint to the active object, with target (where applicable) set to the "
2549 "selected objects/bones";
2550 ot->idname =
"OBJECT_OT_constraint_add_with_targets";
2569 ot->name =
"Add Constraint";
2570 ot->description =
"Add a constraint to the active bone";
2571 ot->idname =
"POSE_OT_constraint_add";
2588 ot->name =
"Add Constraint (with Targets)";
2590 "Add a constraint to the active bone, with target (where applicable) set to the selected "
2592 ot->idname =
"POSE_OT_constraint_add_with_targets";
2625 Object *tar_ob =
nullptr;
2629 if (
ELEM(
nullptr, ob, pchan)) {
2655 PointerRNA op_ptr = layout->
op(
"POSE_OT_ik_add",
IFACE_(
"Target Selected Bone"), ICON_NONE);
2660 "POSE_OT_ik_add",
IFACE_(
"Target Selected Object"), ICON_NONE);
2666 PointerRNA op_ptr = layout->
op(
"POSE_OT_ik_add",
IFACE_(
"Target New Empty Object"), ICON_NONE);
2668 op_ptr = layout->
op(
"POSE_OT_ik_add",
IFACE_(
"Without Target"), ICON_NONE);
2693 ot->name =
"Add IK to Bone";
2695 "Add an IK Constraint to the active Bone. The target can be a selected bone or object";
2696 ot->idname =
"POSE_OT_ik_add";
2711 "Assign IK Constraint with targets derived from the select bones/objects");
2724 Object *prev_ob =
nullptr;
2732 for (con =
static_cast<bConstraint *
>(pchan->constraints.first); con; con =
next) {
2740 if (prev_ob != ob) {
2758 ot->name =
"Remove IK";
2759 ot->description =
"Remove all IK Constraints from selected bones";
2760 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)
bool is_identity_m4(const float m[4][4])
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])
#define STRNCPY_UTF8(dst, 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)
#define ID_IS_EDITABLE(_id)
@ 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)
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 bool objectsolver_clear_inverse_poll(bContext *C)
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)
static bool childof_clear_inverse_poll(bContext *C)
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)
int RNA_int_get(PointerRNA *ptr, const char *name)
std::string RNA_string_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, blender::wm::OpCallContext 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 *)