57#include "RNA_prototypes.hh"
101 if (pose_bone ==
nullptr) {
103 if (pose_bone ==
nullptr) {
117 if (
ELEM(
nullptr, ob, con)) {
161static void validate_pyconstraint_cb(
Main *bmain,
void *arg1,
void *arg2)
164 Text *text =
nullptr;
165 int index = *((
int *)arg2);
171 for (text =
static_cast<Text *
>(bmain->
texts.
first), i = 1; text && index != i;
172 i++, text =
static_cast<Text *
>(text->id.next))
181static char *buildmenu_pyconstraints(
Main *bmain,
Text *con_text,
int *pyconindex)
190 STRNCPY(buf,
"Scripts: %t|[None]%x0|");
194 if (con_text ==
nullptr) {
200 i++, text =
static_cast<Text *
>(text->id.next))
203 if (text == con_text) {
230static void update_pyconstraint_cb(
void *arg1,
void *arg2)
254 const char subtarget[],
257 ListBase targets = {
nullptr,
nullptr};
265 if (
abs(index) < targets_num) {
266 index = targets_num -
abs(index);
269 index = targets_num - 1;
272 else if (index >= targets_num) {
273 index = targets_num - 1;
297 ListBase targets = {
nullptr,
nullptr};
298 bool check_targets =
true;
301 con->
flag &= ~CONSTRAINT_DISABLE;
314 else if (data->tar == owner) {
322 data->poletar =
nullptr;
325 else if (data->poletar == owner) {
334 check_targets =
false;
344 else if (data->tar == owner) {
351 check_targets =
false;
357 if (data->act ==
nullptr) {
363 if (!
ELEM(data->act->idroot,
ID_OB, 0)) {
382 check_targets =
false;
389 if (data->upflag == data->trackflag) {
392 if (data->upflag + 3 == data->trackflag) {
400 if (data->reserved2 == data->reserved1) {
403 if (data->reserved2 + 3 == data->reserved1) {
410 if (data->lockflag == data->trackflag) {
413 if (data->lockflag + 3 == data->trackflag) {
423 if ((data->points ==
nullptr) || (data->numpoints != data->chainlen + 1)) {
428 data->flag &= ~CONSTRAINT_SPLINEIK_BOUND;
435 if (data->clip !=
nullptr && data->track[0]) {
439 if (data->object[0]) {
446 if (!tracking_object) {
477 if ((data->cache_file ==
nullptr) || (data->object_path[0] ==
'\0')) {
492 else if (ct->tar == owner) {
499 else if (
STREQ(pchan->
name, ct->subtarget)) {
501 ct->subtarget[0] =
'\0';
528 Curve *cu =
static_cast<Curve *
>(ct->tar->data);
557 else if (check_targets) {
570 switch (owner->
type) {
625 if (pchan->constraints.first) {
658#define EDIT_CONSTRAINT_OWNER_OBJECT 0
659#define EDIT_CONSTRAINT_OWNER_BONE 1
666 "Edit a constraint on the active object"},
668 {0,
nullptr, 0,
nullptr,
nullptr},
673 const bool is_liboverride_allowed)
690 C,
"Cannot edit constraints coming from linked data in a library override");
713 ot->
srna,
"constraint",
nullptr,
MAX_NAME,
"Constraint",
"Name of the constraint to edit");
723 ot->
srna,
"report",
false,
"Report",
"Create a notification after the operation");
760 if (event !=
nullptr) {
777 if (r_retval !=
nullptr) {
809 printf(
"constraint found = %p, %s\n", (
void *)con, (con) ? con->
name :
"<Not found>");
813 if (con && (type != 0) && (con->
type != type)) {
836 if (data ==
nullptr) {
841 data->orglength = 0.0f;
859 ot->
name =
"Reset Original Length";
860 ot->
idname =
"CONSTRAINT_OT_stretchto_reset";
861 ot->
description =
"Reset original length of bone for Stretch To Constraint";
891 if (data ==
nullptr) {
914 ot->
name =
"Reset Distance";
915 ot->
idname =
"CONSTRAINT_OT_limitdistance_reset";
916 ot->
description =
"Reset limiting distance for Limit Distance Constraint";
948 short flag_backup = con->
flag;
951 con->
flag = flag_backup;
963 if (data ==
nullptr) {
964 printf(
"DEBUG: Child-Of Set Inverse - object = '%s'\n", (ob) ? ob->
id.
name + 2 :
"<None>");
993 ot->
idname =
"CONSTRAINT_OT_childof_set_inverse";
994 ot->
description =
"Set inverse correction for Child Of constraint";
1016 if (data ==
nullptr) {
1041 ot->
name =
"Clear Inverse";
1042 ot->
idname =
"CONSTRAINT_OT_childof_clear_inverse";
1043 ot->
description =
"Clear inverse correction for Child Of constraint";
1074 float standardRange = 1.0;
1077 if (data ==
nullptr) {
1095 standardRange = 100.0f;
1120 standardRange = 1.0f;
1137 float A = standardRange /
float(
len);
1161 ot->
name =
"Auto Animate Path";
1162 ot->
idname =
"CONSTRAINT_OT_followpath_path_animate";
1164 "Add default animation for path used by constraint if it isn't animated already";
1182 "First frame of path animation",
1191 "Number of frames that path animation should take",
1210 if (data ==
nullptr) {
1211 printf(
"DEBUG: ObjectSolver Set Inverse - object = '%s'\n", (ob) ? ob->
id.
name + 2 :
"<None>");
1213 op->
reports,
RPT_ERROR,
"Could not find constraint data for ObjectSolver Set Inverse");
1240 ot->
name =
"Set Inverse";
1241 ot->
idname =
"CONSTRAINT_OT_objectsolver_set_inverse";
1242 ot->
description =
"Set inverse correction for Object Solver constraint";
1269 if (data ==
nullptr) {
1296 ot->
name =
"Clear Inverse";
1297 ot->
idname =
"CONSTRAINT_OT_objectsolver_clear_inverse";
1298 ot->
description =
"Clear inverse correction for Object Solver constraint";
1451 if (con ==
nullptr) {
1494 ot->
name =
"Delete Constraint";
1495 ot->
idname =
"CONSTRAINT_OT_delete";
1496 ot->
description =
"Remove constraint from constraint stack";
1523 if (con ==
nullptr) {
1533 const bool is_first_constraint = con !=
constraints->first;
1566 if (is_first_constraint) {
1569 "Applied constraint was not first, result may not be as expected");
1593 ot->
name =
"Apply Constraint";
1594 ot->
idname =
"CONSTRAINT_OT_apply";
1595 ot->
description =
"Apply constraint and remove from the stack";
1620 if (con ==
nullptr) {
1678 ot->
name =
"Duplicate Constraint";
1680 ot->
description =
"Duplicate constraint at the same position in the stack";
1705 if (con ==
nullptr) {
1719 Object *prev_ob =
nullptr;
1724 if (pchan == chan) {
1734 if (prev_ob == ob) {
1789 if (pchan != chan) {
1831 ot->
name =
"Copy Constraint To Selected";
1832 ot->
idname =
"CONSTRAINT_OT_copy_to_selected";
1833 ot->
description =
"Copy constraint to other selected objects/bones";
1856 if (con && con->
next) {
1885 ot->
name =
"Move Constraint Down";
1886 ot->
idname =
"CONSTRAINT_OT_move_down";
1887 ot->
description =
"Move constraint down in constraint stack";
1912 if (con && con->
prev) {
1941 ot->
name =
"Move Constraint Up";
1942 ot->
idname =
"CONSTRAINT_OT_move_up";
1967 if (new_index < 0) {
1994 ot->
name =
"Move Constraint to Index";
1995 ot->
idname =
"CONSTRAINT_OT_move_to_index";
1997 "Change the constraint's position in the list so it evaluates after the set number of "
2014 "The index to move the constraint to",
2028 Object *prev_ob =
nullptr;
2033 pchan->constflag = 0;
2035 if (prev_ob != ob) {
2054 ot->
name =
"Clear Pose Constraints";
2055 ot->
idname =
"POSE_OT_constraints_clear";
2056 ot->
description =
"Clear all constraints from the selected bones";
2093 ot->
name =
"Clear Object Constraints";
2094 ot->
idname =
"OBJECT_OT_constraints_clear";
2095 ot->
description =
"Clear all constraints from the selected objects";
2119 Object *prev_ob =
nullptr;
2124 if (pchan != chan) {
2129 if (prev_ob != ob) {
2149 ot->
name =
"Copy Constraints to Selected Bones";
2150 ot->
idname =
"POSE_OT_constraints_copy";
2151 ot->
description =
"Copy constraints to other selected bones";
2194 ot->
name =
"Copy Constraints to Selected Objects";
2195 ot->
idname =
"OBJECT_OT_constraints_copy";
2196 ot->
description =
"Copy constraints to other selected objects";
2218 bool only_curve =
false, only_mesh =
false, only_ob =
false;
2225 *tar_pchan =
nullptr;
2266 if (pchan != pchanact) {
2278 if (found ==
false) {
2294 if (pchan !=
nullptr) {
2303 ((!only_mesh) || (ob->type ==
OB_MESH)))
2325 if ((found ==
false) && (add)) {
2352 view_layer->
basact = base;
2379 if (pchan ==
nullptr) {
2402 Object *tar_ob =
nullptr;
2427 menustr = buildmenu_pyconstraints(bmain,
nullptr, &scriptint);
2434 validate_pyconstraint_cb(bmain, con->
data, &scriptint);
2478 short with_targets = 0;
2488 if (strstr(op->
idname,
"with_targets")) {
2500 short with_targets = 0;
2510 if (strstr(op->
idname,
"with_targets")) {
2539 return object_constraint_items;
2547 ot->
name =
"Add Constraint";
2549 ot->
idname =
"OBJECT_OT_constraint_add";
2576 ot->
name =
"Add Constraint (with Targets)";
2578 "Add a constraint to the active object, with target (where applicable) set to the "
2579 "selected objects/bones";
2580 ot->
idname =
"OBJECT_OT_constraint_add_with_targets";
2599 ot->
name =
"Add Constraint";
2601 ot->
idname =
"POSE_OT_constraint_add";
2618 ot->
name =
"Add Constraint (with Targets)";
2620 "Add a constraint to the active bone, with target (where applicable) set to the selected "
2622 ot->
idname =
"POSE_OT_constraint_add_with_targets";
2655 Object *tar_ob =
nullptr;
2659 if (
ELEM(
nullptr, ob, pchan)) {
2686 layout,
IFACE_(
"To Active Bone"), ICON_NONE,
"POSE_OT_ik_add",
"with_targets", 1);
2690 layout,
IFACE_(
"To Active Object"), ICON_NONE,
"POSE_OT_ik_add",
"with_targets", 1);
2696 layout,
IFACE_(
"To New Empty Object"), ICON_NONE,
"POSE_OT_ik_add",
"with_targets", 1);
2698 layout,
IFACE_(
"Without Targets"), ICON_NONE,
"POSE_OT_ik_add",
"with_targets", 0);
2722 ot->
name =
"Add IK to Bone";
2739 "Assign IK Constraint with targets derived from the select bones/objects");
2752 Object *prev_ob =
nullptr;
2760 for (con =
static_cast<bConstraint *
>(pchan->constraints.first); con; con =
next) {
2768 if (prev_ob != ob) {
2787 ot->
description =
"Remove all IK Constraints from selected bones";
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)
bool BKE_constraint_remove(ListBase *list, struct bConstraint *con)
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.
char * BLI_dynstr_get_cstring(const DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
DynStr * BLI_dynstr_new(void) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL()
void BLI_dynstr_append(DynStr *__restrict ds, const char *cstr) ATTR_NONNULL()
#define LISTBASE_FOREACH(type, var, list)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void BLI_remlink(struct 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_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void unit_m4(float m[4][4])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
bool BPY_is_pyconstraint(Text *text)
void BPY_pyconstraint_update(Object *owner, bConstraint *con)
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
@ 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 uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
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)
btSequentialImpulseConstraintSolverMt int btPersistentManifold int btTypedConstraint ** constraints
Slot * slot_for_handle(slot_handle_t handle)
const Depsgraph * depsgraph
draw_view in_light_buf[] float
void MEM_freeN(void *vmemh)
bool action_treat_as_legacy(const bAction &action)
bAction * id_action_ensure(Main *bmain, ID *id)
FCurve * action_fcurve_ensure(Main *bmain, bAction *act, const char group[], PointerRNA *ptr, FCurveDescriptor fcurve_descriptor)
FCurve * fcurve_find_in_assigned_slot(AnimData &adt, FCurveDescriptor fcurve_descriptor)
static int constraint_type_get(Object *owner, bPoseChannel *pchan)
void object_test_constraints(Main *bmain, Object *ob)
static int stretchto_reset_exec(bContext *C, wmOperator *op)
static bool edit_constraint_poll(bContext *C)
bConstraint * constraint_active_get(Object *ob)
static int followpath_path_animate_exec(bContext *C, wmOperator *op)
void constraint_link(Main *bmain, Object *ob_dst, ListBase *dst, ListBase *src)
static int constraint_delete_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 int objectsolver_set_inverse_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void object_pose_tag_update(Main *bmain, Object *ob)
static int constraint_apply_exec(bContext *C, wmOperator *op)
void CONSTRAINT_OT_move_down(wmOperatorType *ot)
static int stretchto_reset_invoke(bContext *C, wmOperator *op, const wmEvent *)
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)
void constraint_copy_for_pose(Main *bmain, Object *ob_dst, bPoseChannel *pchan, bConstraint *con)
static int object_constraints_clear_exec(bContext *C, wmOperator *)
static void test_constraints(Main *bmain, Object *ob, bPoseChannel *pchan)
void constraint_dependency_tag_update(Main *bmain, Object *ob, bConstraint *con)
static int pose_constraints_clear_exec(bContext *C, wmOperator *)
static bool edit_constraint_liboverride_allowed_poll(bContext *C)
static int constraint_copy_exec(bContext *C, wmOperator *op)
static int objectsolver_clear_inverse_invoke(bContext *C, wmOperator *op, const wmEvent *)
void constraint_update(Main *bmain, Object *ob)
static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase *list, int type, const bool setTarget)
static bConstraint * edit_constraint_property_get(bContext *C, wmOperator *op, Object *ob, int type)
static const EnumPropertyItem * object_constraint_add_itemf(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
static int limitdistance_reset_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 int limitdistance_reset_invoke(bContext *C, wmOperator *op, const wmEvent *)
void base_select(Base *base, eObjectSelect_Mode mode)
static int objectsolver_clear_inverse_exec(bContext *C, wmOperator *op)
ListBase * pose_constraint_list(const bContext *C)
void CONSTRAINT_OT_limitdistance_reset(wmOperatorType *ot)
static bool get_new_constraint_target(bContext *C, int con_type, Object **tar_ob, bPoseChannel **tar_pchan, bool add)
void CONSTRAINT_OT_copy(wmOperatorType *ot)
static int constraint_apply_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int pose_constraint_add_exec(bContext *C, wmOperator *op)
static int constraint_copy_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void CONSTRAINT_OT_apply(wmOperatorType *ot)
void constraint_tag_update(Main *bmain, Object *ob, bConstraint *con)
void CONSTRAINT_OT_move_up(wmOperatorType *ot)
ListBase * constraint_active_list(Object *ob)
void POSE_OT_constraints_copy(wmOperatorType *ot)
static int object_constraint_add_exec(bContext *C, wmOperator *op)
static int constraint_move_up_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int constraint_move_up_exec(bContext *C, wmOperator *op)
static int constraint_move_down_exec(bContext *C, wmOperator *op)
static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
Object * context_active_object(const bContext *C)
static int childof_set_inverse_exec(bContext *C, wmOperator *op)
void POSE_OT_ik_add(wmOperatorType *ot)
void POSE_OT_ik_clear(wmOperatorType *ot)
static int object_constraint_copy_exec(bContext *C, wmOperator *)
void POSE_OT_constraint_add(wmOperatorType *ot)
void constraint_dependency_update(Main *bmain, Object *ob)
void CONSTRAINT_OT_delete(wmOperatorType *ot)
static int objectsolver_set_inverse_exec(bContext *C, wmOperator *op)
bool constraint_move_to_index(Object *ob, bConstraint *con, int index)
static int constraint_delete_exec(bContext *C, wmOperator *op)
static int followpath_path_animate_invoke(bContext *C, wmOperator *op, const wmEvent *)
void CONSTRAINT_OT_stretchto_reset(wmOperatorType *ot)
static int childof_clear_inverse_exec(bContext *C, wmOperator *op)
static int pose_ik_add_invoke(bContext *C, wmOperator *op, const wmEvent *)
void OBJECT_OT_constraint_add(wmOperatorType *ot)
static int constraint_move_to_index_invoke(bContext *C, wmOperator *op, const wmEvent *event)
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 int childof_set_inverse_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int childof_clear_inverse_invoke(bContext *C, wmOperator *op, const wmEvent *)
static int pose_ik_clear_exec(bContext *C, wmOperator *)
static int pose_ik_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_constraints_clear(wmOperatorType *ot)
static void edit_constraint_properties(wmOperatorType *ot)
static void set_constraint_nth_target(bConstraint *con, Object *target, const char subtarget[], int index)
static int constraint_copy_to_selected_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int constraint_move_to_index_exec(bContext *C, wmOperator *op)
void CONSTRAINT_OT_objectsolver_clear_inverse(wmOperatorType *ot)
static int constraint_copy_to_selected_exec(bContext *C, wmOperator *op)
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)
static bool edit_constraint_invoke_properties(bContext *C, wmOperator *op, const wmEvent *event, int *r_retval)
void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
static int constraint_move_down_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void CONSTRAINT_OT_copy_to_selected(wmOperatorType *ot)
void POSE_OT_constraints_clear(wmOperatorType *ot)
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_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(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
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
ccl_device_inline int abs(int x)
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)