|
Blender
V2.93
|
#include <stdio.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_dynstr.h"#include "BLI_math.h"#include "BLI_utildefines.h"#include "BLT_translation.h"#include "DNA_anim_types.h"#include "DNA_armature_types.h"#include "DNA_constraint_types.h"#include "DNA_curve_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_text_types.h"#include "BIK_api.h"#include "BKE_action.h"#include "BKE_armature.h"#include "BKE_constraint.h"#include "BKE_context.h"#include "BKE_fcurve.h"#include "BKE_main.h"#include "BKE_object.h"#include "BKE_report.h"#include "BKE_tracking.h"#include "DEG_depsgraph.h"#include "DEG_depsgraph_build.h"#include "DEG_depsgraph_query.h"#include "WM_api.h"#include "WM_types.h"#include "RNA_access.h"#include "RNA_define.h"#include "RNA_enum_types.h"#include "ED_keyframing.h"#include "ED_object.h"#include "ED_screen.h"#include "UI_interface.h"#include "UI_resources.h"#include "object_intern.h"Go to the source code of this file.
Generic Functions for Operators Using Constraint Names and Data Context | |
| #define | EDIT_CONSTRAINT_OWNER_OBJECT 0 |
| #define | EDIT_CONSTRAINT_OWNER_BONE 1 |
| static const EnumPropertyItem | constraint_owner_items [] |
| static bool | edit_constraint_poll_generic (bContext *C, StructRNA *rna_type, const bool is_liboverride_allowed) |
| static bool | edit_constraint_poll (bContext *C) |
| static bool | edit_constraint_liboverride_allowed_poll (bContext *C) |
| static void | edit_constraint_properties (wmOperatorType *ot) |
| static void | edit_constraint_report_property (wmOperatorType *ot) |
| static bool | edit_constraint_invoke_properties (bContext *C, wmOperator *op, const wmEvent *event, int *r_retval) |
| static bConstraint * | edit_constraint_property_get (bContext *C, wmOperator *op, Object *ob, int type) |
| #define EDIT_CONSTRAINT_OWNER_BONE 1 |
Definition at line 676 of file object_constraint.c.
| #define EDIT_CONSTRAINT_OWNER_OBJECT 0 |
Definition at line 675 of file object_constraint.c.
|
static |
Definition at line 1023 of file object_constraint.c.
References BKE_report(), C, CONSTRAINT_TYPE_CHILDOF, CTX_data_main(), data, bConstraint::data, ED_object_active_context(), ED_object_constraint_update(), edit_constraint_property_get(), NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, unit_m4(), and WM_event_add_notifier().
Referenced by childof_clear_inverse_invoke(), and CONSTRAINT_OT_childof_clear_inverse().
|
static |
Definition at line 1044 of file object_constraint.c.
References C, childof_clear_inverse_exec(), edit_constraint_invoke_properties(), NULL, and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_childof_clear_inverse().
|
static |
Definition at line 969 of file object_constraint.c.
References BKE_report(), C, CHILDOF_SET_INVERSE, CONSTRAINT_TYPE_CHILDOF, CTX_data_main(), data, bConstraint::data, ED_object_active_context(), ED_object_constraint_update(), edit_constraint_property_get(), force_evaluation_if_constraint_disabled(), Object::id, ID::name, NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by childof_set_inverse_invoke(), and CONSTRAINT_OT_childof_set_inverse().
|
static |
Definition at line 995 of file object_constraint.c.
References C, childof_set_inverse_exec(), edit_constraint_invoke_properties(), NULL, and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_childof_set_inverse().
|
static |
Definition at line 2047 of file object_constraint.c.
References Object::adt, BKE_constraint_add_for_object(), BKE_constraint_add_for_pose(), BKE_constraints_proxylocked_owner(), BKE_pose_channel_active(), BKE_pose_tag_recalc(), BKE_pose_update_constraint_flags(), BKE_report(), BPY_pyconstraint_update(), C, CONSTRAINT_TYPE_NULL, CONSTRAINT_TYPE_PYTHON, Object::constraints, CTX_data_main(), bConstraint::data, DEG_id_tag_update(), DEG_relations_tag_update(), get_new_constraint_target(), Object::id, ID_RECALC_ANIMATION, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, MEM_freeN, NA_ADDED, bPoseChannel::name, NC_OBJECT, ND_CONSTRAINT, NULL, OB_ARMATURE, object_test_constraints(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, wmOperator::reports, RPT_ERROR, set_constraint_nth_target(), type, Object::type, and WM_event_add_notifier().
Referenced by object_constraint_add_exec(), pose_constraint_add_exec(), and pose_ik_add_exec().
|
static |
Definition at line 1474 of file object_constraint.c.
References BKE_constraint_remove_ex(), BKE_constraints_active_set(), BKE_reportf(), C, Object::constraints, CTX_data_main(), DEG_relations_tag_update(), ED_object_active_context(), ED_object_constraint_list_from_constraint(), ED_object_constraint_update(), edit_constraint_property_get(), MAX_NAME, NA_REMOVED, bConstraint::name, NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_INFO, and WM_event_add_notifier().
Referenced by constraint_delete_invoke(), and CONSTRAINT_OT_delete().
|
static |
Definition at line 1508 of file object_constraint.c.
References C, constraint_delete_exec(), edit_constraint_invoke_properties(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_delete().
|
static |
Definition at line 1541 of file object_constraint.c.
References BLI_insertlinkafter(), BLI_remlink(), C, ED_object_active_context(), ED_object_constraint_list_from_constraint(), edit_constraint_property_get(), NC_OBJECT, ND_CONSTRAINT, bConstraint::next, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by constraint_move_down_invoke(), and CONSTRAINT_OT_move_down().
|
static |
Definition at line 1562 of file object_constraint.c.
References C, constraint_move_down_exec(), and edit_constraint_invoke_properties().
Referenced by CONSTRAINT_OT_move_down().
|
static |
Definition at line 1649 of file object_constraint.c.
References C, ED_object_active_context(), ED_object_constraint_move_to_index(), edit_constraint_property_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, and RNA_int_get().
Referenced by constraint_move_to_index_invoke(), and CONSTRAINT_OT_move_to_index().
|
static |
Definition at line 1668 of file object_constraint.c.
References C, constraint_move_to_index_exec(), and edit_constraint_invoke_properties().
Referenced by CONSTRAINT_OT_move_to_index().
|
static |
Definition at line 1596 of file object_constraint.c.
References BLI_insertlinkbefore(), BLI_remlink(), C, ED_object_active_context(), ED_object_constraint_list_from_constraint(), edit_constraint_property_get(), NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, bConstraint::prev, and WM_event_add_notifier().
Referenced by constraint_move_up_invoke(), and CONSTRAINT_OT_move_up().
|
static |
Definition at line 1617 of file object_constraint.c.
References C, constraint_move_up_exec(), and edit_constraint_invoke_properties().
Referenced by CONSTRAINT_OT_move_up().
| void CONSTRAINT_OT_childof_clear_inverse | ( | wmOperatorType * | ot | ) |
Definition at line 1052 of file object_constraint.c.
References childof_clear_inverse_exec(), childof_clear_inverse_invoke(), wmOperatorType::description, edit_constraint_liboverride_allowed_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_childof_set_inverse | ( | wmOperatorType * | ot | ) |
Definition at line 1003 of file object_constraint.c.
References childof_set_inverse_exec(), childof_set_inverse_invoke(), wmOperatorType::description, edit_constraint_liboverride_allowed_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 1517 of file object_constraint.c.
References constraint_delete_exec(), constraint_delete_invoke(), wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), edit_constraint_report_property(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_followpath_path_animate | ( | wmOperatorType * | ot | ) |
Definition at line 1177 of file object_constraint.c.
References wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, followpath_path_animate_exec(), followpath_path_animate_invoke(), wmOperatorType::idname, wmOperatorType::invoke, MAXFRAME, MINAFRAME, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_int(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_limitdistance_reset | ( | wmOperatorType * | ot | ) |
Definition at line 925 of file object_constraint.c.
References wmOperatorType::description, edit_constraint_liboverride_allowed_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, limitdistance_reset_exec(), limitdistance_reset_invoke(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_move_down | ( | wmOperatorType * | ot | ) |
Definition at line 1571 of file object_constraint.c.
References constraint_move_down_exec(), constraint_move_down_invoke(), wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_move_to_index | ( | wmOperatorType * | ot | ) |
Definition at line 1677 of file object_constraint.c.
References constraint_move_to_index_exec(), constraint_move_to_index_invoke(), wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_int(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_move_up | ( | wmOperatorType * | ot | ) |
Definition at line 1626 of file object_constraint.c.
References constraint_move_up_exec(), constraint_move_up_invoke(), wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_objectsolver_clear_inverse | ( | wmOperatorType * | ot | ) |
Definition at line 1314 of file object_constraint.c.
References wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, objectsolver_clear_inverse_exec(), objectsolver_clear_inverse_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_objectsolver_set_inverse | ( | wmOperatorType * | ot | ) |
Definition at line 1258 of file object_constraint.c.
References wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, objectsolver_set_inverse_exec(), objectsolver_set_inverse_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_stretchto_reset | ( | wmOperatorType * | ot | ) |
Definition at line 870 of file object_constraint.c.
References wmOperatorType::description, edit_constraint_liboverride_allowed_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, stretchto_reset_exec(), and stretchto_reset_invoke().
Referenced by ED_operatortypes_object().
|
static |
Definition at line 578 of file object_constraint.c.
References CONSTRAINT_OBTYPE_BONE, CONSTRAINT_OBTYPE_OBJECT, OB_ARMATURE, type, and Object::type.
Referenced by test_constraints().
| bConstraint* ED_object_constraint_active_get | ( | Object * | ob | ) |
Definition at line 168 of file object_constraint.c.
References BKE_constraints_active_get(), and ED_object_constraint_active_list().
If object is in pose-mode, return active bone constraints, else object constraints. No constraints are returned for a bone on an inactive bone-layer.
Definition at line 87 of file object_constraint.c.
References BKE_pose_channel_active(), bPoseChannel::constraints, Object::constraints, Object::mode, NULL, and OB_MODE_POSE.
Referenced by ED_object_constraint_active_get(), BCAnimationSampler::find_depending_animated(), pose_constraint_add_exec(), and pose_ik_add_exec().
| void ED_object_constraint_active_set | ( | Object * | ob, |
| bConstraint * | con | ||
| ) |
Definition at line 1339 of file object_constraint.c.
References BKE_constraints_active_set(), CONSTRAINT_ACTIVE, ED_object_constraint_list_from_constraint(), bConstraint::flag, and NULL.
Referenced by constraint_active_func().
| void ED_object_constraint_copy_for_object | ( | Main * | bmain, |
| Object * | ob_dst, | ||
| bConstraint * | con | ||
| ) |
Definition at line 1451 of file object_constraint.c.
References BKE_constraint_copy_for_object(), ED_object_constraint_dependency_tag_update(), NA_ADDED, NC_OBJECT, ND_CONSTRAINT, and WM_main_add_notifier().
Referenced by datastack_drop_copy().
| void ED_object_constraint_copy_for_pose | ( | Main * | bmain, |
| Object * | ob_dst, | ||
| bPoseChannel * | pchan, | ||
| bConstraint * | con | ||
| ) |
Definition at line 1458 of file object_constraint.c.
References BKE_constraint_copy_for_pose(), ED_object_constraint_dependency_tag_update(), NA_ADDED, NC_OBJECT, ND_CONSTRAINT, and WM_main_add_notifier().
Referenced by datastack_drop_copy().
| void ED_object_constraint_dependency_tag_update | ( | Main * | bmain, |
| Object * | ob, | ||
| bConstraint * | con | ||
| ) |
Definition at line 1415 of file object_constraint.c.
References DEG_relations_tag_update(), ED_object_constraint_tag_update(), object_pose_tag_update(), and Object::pose.
Referenced by ED_object_constraint_copy_for_object(), ED_object_constraint_copy_for_pose(), and ED_object_constraint_link().
Definition at line 1382 of file object_constraint.c.
References DEG_relations_tag_update(), ED_object_constraint_update(), object_pose_tag_update(), and Object::pose.
Definition at line 1441 of file object_constraint.c.
References BKE_constraints_copy(), BKE_constraints_free(), ED_object_constraint_dependency_tag_update(), LISTBASE_FOREACH, NA_ADDED, NC_OBJECT, ND_CONSTRAINT, NULL, and WM_main_add_notifier().
Referenced by datastack_drop_link().
| ListBase* ED_object_constraint_list_from_constraint | ( | Object * | ob, |
| bConstraint * | con, | ||
| bPoseChannel ** | r_pchan | ||
| ) |
Definition at line 127 of file object_constraint.c.
References BLI_findindex(), bPose::chanbase, bPoseChannel::constraints, Object::constraints, ELEM, ListBase::first, bPoseChannel::next, NULL, and Object::pose.
Referenced by constraint_delete_exec(), constraint_move_down_exec(), constraint_move_up_exec(), ED_object_constraint_active_set(), ED_object_constraint_move_to_index(), and edit_constraint_invoke_properties().
| bool ED_object_constraint_move_to_index | ( | Object * | ob, |
| bConstraint * | con, | ||
| const int | index | ||
| ) |
Definition at line 1425 of file object_constraint.c.
References BLI_assert, BLI_findindex(), BLI_listbase_link_move(), ED_object_constraint_list_from_constraint(), NC_OBJECT, ND_CONSTRAINT, NULL, and WM_main_add_notifier().
Referenced by constraint_move_to_index_exec(), and datastack_drop_reorder().
| void ED_object_constraint_tag_update | ( | Main * | bmain, |
| Object * | ob, | ||
| bConstraint * | con | ||
| ) |
Definition at line 1392 of file object_constraint.c.
References BKE_pose_tag_update_constraint_flags(), DEG_id_tag_update(), Object::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, OB_ARMATURE, object_test_constraint(), Object::pose, and Object::type.
Referenced by ED_object_constraint_dependency_tag_update().
Definition at line 1352 of file object_constraint.c.
References BKE_pose_update_constraint_flags(), DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, OB_ARMATURE, object_test_constraints(), Object::pose, and Object::type.
Referenced by childof_clear_inverse_exec(), childof_set_inverse_exec(), constraint_delete_exec(), constraint_fn(), ED_object_constraint_dependency_update(), limitdistance_reset_exec(), objectsolver_clear_inverse_exec(), objectsolver_set_inverse_exec(), and stretchto_reset_exec().
Get the constraints for the active pose bone. Bone may be on an inactive bone-layer (unlike ED_object_constraint_active_list, such constraints are not excluded here).
Definition at line 112 of file object_constraint.c.
References C, bPoseChannel::constraints, CTX_data_pointer_get(), PointerRNA::data, and NULL.
Referenced by edit_constraint_property_get().
|
static |
Definition at line 745 of file object_constraint.c.
References BLI_assert, C, Object::constraints, CTX_data_pointer_get_type(), PointerRNA::data, ED_object_active_context(), ED_object_constraint_list_from_constraint(), EDIT_CONSTRAINT_OWNER_BONE, EDIT_CONSTRAINT_OWNER_OBJECT, bConstraint::name, NULL, OPERATOR_CANCELLED, OPERATOR_PASS_THROUGH, PointerRNA::owner_id, wmOperator::ptr, ptr, RNA_Constraint, RNA_enum_set(), RNA_pointer_is_null(), RNA_string_set(), RNA_struct_is_a(), RNA_struct_property_is_set(), PointerRNA::type, and UI_region_panel_custom_data_under_cursor().
Referenced by childof_clear_inverse_invoke(), childof_set_inverse_invoke(), constraint_delete_invoke(), constraint_move_down_invoke(), constraint_move_to_index_invoke(), constraint_move_up_invoke(), followpath_path_animate_invoke(), limitdistance_reset_invoke(), objectsolver_clear_inverse_invoke(), objectsolver_set_inverse_invoke(), and stretchto_reset_invoke().
|
static |
Definition at line 722 of file object_constraint.c.
References C, edit_constraint_poll_generic(), and RNA_Constraint.
Referenced by CONSTRAINT_OT_childof_clear_inverse(), CONSTRAINT_OT_childof_set_inverse(), CONSTRAINT_OT_limitdistance_reset(), and CONSTRAINT_OT_stretchto_reset().
|
static |
Definition at line 715 of file object_constraint.c.
References C, edit_constraint_poll_generic(), and RNA_Constraint.
Referenced by CONSTRAINT_OT_delete(), CONSTRAINT_OT_followpath_path_animate(), CONSTRAINT_OT_move_down(), CONSTRAINT_OT_move_to_index(), CONSTRAINT_OT_move_up(), CONSTRAINT_OT_objectsolver_clear_inverse(), and CONSTRAINT_OT_objectsolver_set_inverse().
|
static |
Definition at line 688 of file object_constraint.c.
References BKE_constraint_is_nonlocal_in_liboverride(), C, CTX_data_pointer_get_type(), CTX_wm_operator_poll_msg_set(), PointerRNA::data, ED_object_active_context(), ID_IS_LINKED, PointerRNA::owner_id, and ptr.
Referenced by edit_constraint_liboverride_allowed_poll(), and edit_constraint_poll().
|
static |
Definition at line 727 of file object_constraint.c.
References constraint_owner_items, MAX_NAME, NULL, ot, PROP_HIDDEN, RNA_def_enum(), RNA_def_property_flag(), RNA_def_string(), and wmOperatorType::srna.
Referenced by CONSTRAINT_OT_childof_clear_inverse(), CONSTRAINT_OT_childof_set_inverse(), CONSTRAINT_OT_delete(), CONSTRAINT_OT_followpath_path_animate(), CONSTRAINT_OT_limitdistance_reset(), CONSTRAINT_OT_move_down(), CONSTRAINT_OT_move_to_index(), CONSTRAINT_OT_move_up(), CONSTRAINT_OT_objectsolver_clear_inverse(), CONSTRAINT_OT_objectsolver_set_inverse(), and CONSTRAINT_OT_stretchto_reset().
|
static |
Definition at line 804 of file object_constraint.c.
References BKE_constraints_find_name(), C, Object::constraints, ED_object_pose_constraint_list(), EDIT_CONSTRAINT_OWNER_BONE, G, G_DEBUG, MAX_NAME, bConstraint::name, NULL, wmOperator::ptr, RNA_enum_get(), RNA_string_get(), type, and bConstraint::type.
Referenced by childof_clear_inverse_exec(), childof_set_inverse_exec(), constraint_delete_exec(), constraint_move_down_exec(), constraint_move_to_index_exec(), constraint_move_up_exec(), followpath_path_animate_exec(), limitdistance_reset_exec(), objectsolver_clear_inverse_exec(), objectsolver_set_inverse_exec(), and stretchto_reset_exec().
|
static |
Definition at line 738 of file object_constraint.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by CONSTRAINT_OT_delete().
|
static |
Definition at line 1077 of file object_constraint.c.
References A, AnimData::action, add_fmodifier(), Curve::adt, B, FCurve::bezt, BKE_fcurve_find(), BKE_report(), C, FMod_Generator::coefficients, CONSTRAINT_TYPE_FOLLOWPATH, CTX_data_main(), bAction::curves, data, FModifier::data, bConstraint::data, ED_action_fcurve_ensure(), ED_id_action_ensure(), ED_object_active_context(), edit_constraint_property_get(), ELEM, ListBase::first, float(), FMODIFIER_TYPE_GENERATOR, FOLLOWPATH_STATIC, FCurve::fpt, Curve::id, Object::id, if(), len, MEM_freeN, FCurve::modifiers, NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, ptr, wmOperator::reports, RNA_FollowPathConstraint, RNA_int_get(), RNA_path_from_ID_to_property(), RNA_pointer_create(), RNA_struct_find_property(), RPT_ERROR, RPT_WARNING, and WM_event_add_notifier().
Referenced by CONSTRAINT_OT_followpath_path_animate(), and followpath_path_animate_invoke().
|
static |
Definition at line 1166 of file object_constraint.c.
References C, edit_constraint_invoke_properties(), followpath_path_animate_exec(), NULL, and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_followpath_path_animate().
|
static |
Definition at line 953 of file object_constraint.c.
References BKE_object_eval_constraints(), C, CONSTRAINT_DISABLE, CONSTRAINT_OFF, CTX_data_ensure_evaluated_depsgraph(), DEG_get_evaluated_scene(), depsgraph, bConstraint::flag, and scene.
Referenced by childof_set_inverse_exec(), and objectsolver_set_inverse_exec().
|
static |
Definition at line 1899 of file object_constraint.c.
References add(), BA_SELECT, BASACT, BKE_object_add(), BKE_pose_channel_active(), BKE_pose_channel_active_or_first_selected(), C, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_LOCLIMIT, CONSTRAINT_TYPE_NULL, CONSTRAINT_TYPE_ROTLIMIT, CONSTRAINT_TYPE_SAMEVOL, CONSTRAINT_TYPE_SHRINKWRAP, CONSTRAINT_TYPE_SIZELIMIT, CONSTRAINT_TYPE_SPLINEIK, copy_v3_v3(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_view_layer(), CU_PATH, ED_object_active_context(), ED_object_base_select(), Curve::flag, Object::loc, mul_v3_m4v3(), NULL, OB_ARMATURE, OB_CURVE, OB_EMPTY, OB_MESH, OB_MODE_POSE, Object::obmat, bPoseChannel::pose_head, bPoseChannel::pose_tail, and Object::type.
Referenced by constraint_add_exec(), and pose_ik_add_invoke().
|
static |
Definition at line 897 of file object_constraint.c.
References C, CONSTRAINT_TYPE_DISTLIMIT, CTX_data_main(), data, bConstraint::data, ED_object_active_context(), ED_object_constraint_update(), edit_constraint_property_get(), NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by CONSTRAINT_OT_limitdistance_reset(), and limitdistance_reset_invoke().
|
static |
Definition at line 917 of file object_constraint.c.
References C, edit_constraint_invoke_properties(), limitdistance_reset_exec(), NULL, and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_limitdistance_reset().
|
static |
Definition at line 2162 of file object_constraint.c.
References BKE_report(), C, constraint_add_exec(), Object::constraints, ED_object_active_context(), wmOperator::idname, OPERATOR_CANCELLED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and type.
Referenced by OBJECT_OT_constraint_add(), and OBJECT_OT_constraint_add_with_targets().
|
static |
Definition at line 2208 of file object_constraint.c.
References CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK, ELEM, EnumPropertyItem::identifier, NULL, rna_enum_constraint_type_items, RNA_enum_item_add(), RNA_enum_item_end(), and EnumPropertyItem::value.
Referenced by OBJECT_OT_constraint_add(), and OBJECT_OT_constraint_add_with_targets().
|
static |
Definition at line 1853 of file object_constraint.c.
References BKE_constraints_copy(), C, Object::constraints, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), DEG_id_tag_update(), DEG_relations_tag_update(), ED_object_active_context(), ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, NA_ADDED, NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by OBJECT_OT_constraints_copy().
|
static |
Definition at line 1750 of file object_constraint.c.
References BKE_constraints_free(), C, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_TRANSFORM, NA_REMOVED, NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by OBJECT_OT_constraints_clear().
| void OBJECT_OT_constraint_add | ( | wmOperatorType * | ot | ) |
Definition at line 2230 of file object_constraint.c.
References wmOperatorType::description, DummyRNA_NULL_items, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_constraint_add_exec(), object_constraint_add_itemf(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), RNA_def_enum_funcs(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
| void OBJECT_OT_constraint_add_with_targets | ( | wmOperatorType * | ot | ) |
Definition at line 2259 of file object_constraint.c.
References wmOperatorType::description, DummyRNA_NULL_items, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_constraint_add_exec(), object_constraint_add_itemf(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), RNA_def_enum_funcs(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
| void OBJECT_OT_constraints_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1776 of file object_constraint.c.
References wmOperatorType::description, ED_operator_object_active_local_editable(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, object_constraints_clear_exec(), ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void OBJECT_OT_constraints_copy | ( | wmOperatorType * | ot | ) |
Definition at line 1877 of file object_constraint.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_constraint_copy_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
Definition at line 1368 of file object_constraint.c.
References Object::adt, BKE_pose_tag_recalc(), DEG_id_tag_update(), Object::id, ID_RECALC_ANIMATION, Object::pose, and Object::proxy.
Referenced by ED_object_constraint_dependency_tag_update(), and ED_object_constraint_dependency_update().
|
static |
Definition at line 648 of file object_constraint.c.
References BLI_findindex(), bPose::chanbase, CONSTRAINT_OBTYPE_BONE, CONSTRAINT_OBTYPE_OBJECT, bPoseChannel::constraints, Object::constraints, ListBase::first, bPoseChannel::next, NULL, OB_ARMATURE, Object::pose, test_constraint(), and Object::type.
Referenced by ED_object_constraint_tag_update().
Definition at line 631 of file object_constraint.c.
References bPose::chanbase, bPoseChannel::constraints, Object::constraints, ListBase::first, bPoseChannel::next, NULL, OB_ARMATURE, Object::pose, test_constraints(), and Object::type.
Referenced by constraint_add_exec(), and ED_object_constraint_update().
|
static |
Definition at line 1283 of file object_constraint.c.
References BKE_report(), C, CONSTRAINT_TYPE_OBJECTSOLVER, CTX_data_main(), data, bConstraint::data, ED_object_active_context(), ED_object_constraint_update(), edit_constraint_property_get(), NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, unit_m4(), and WM_event_add_notifier().
Referenced by CONSTRAINT_OT_objectsolver_clear_inverse(), and objectsolver_clear_inverse_invoke().
|
static |
Definition at line 1304 of file object_constraint.c.
References C, edit_constraint_invoke_properties(), NULL, objectsolver_clear_inverse_exec(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_objectsolver_clear_inverse().
|
static |
Definition at line 1221 of file object_constraint.c.
References BKE_report(), C, CONSTRAINT_TYPE_OBJECTSOLVER, CTX_data_main(), data, bConstraint::data, ED_object_active_context(), ED_object_constraint_update(), edit_constraint_property_get(), force_evaluation_if_constraint_disabled(), Object::id, ID::name, NC_OBJECT, ND_CONSTRAINT, NULL, OBJECTSOLVER_SET_INVERSE, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by CONSTRAINT_OT_objectsolver_set_inverse(), and objectsolver_set_inverse_invoke().
|
static |
Definition at line 1248 of file object_constraint.c.
References C, edit_constraint_invoke_properties(), NULL, objectsolver_set_inverse_exec(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_objectsolver_set_inverse().
|
static |
Definition at line 2184 of file object_constraint.c.
References BKE_object_pose_armature_get(), BKE_report(), C, constraint_add_exec(), ED_object_active_context(), ED_object_constraint_active_list(), wmOperator::idname, OPERATOR_CANCELLED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and type.
Referenced by POSE_OT_constraint_add(), and POSE_OT_constraint_add_with_targets().
|
static |
Definition at line 1794 of file object_constraint.c.
References BKE_constraints_copy(), BKE_pose_tag_recalc(), BKE_report(), C, bPoseChannel::constflag, bPoseChannel::constraints, CTX_data_active_pose_bone(), CTX_DATA_BEGIN_WITH_ID, CTX_DATA_END, CTX_data_main(), DEG_id_tag_update(), DEG_relations_tag_update(), ELEM, ListBase::first, ID_RECALC_GEOMETRY, NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by POSE_OT_constraints_copy().
|
static |
Definition at line 1711 of file object_constraint.c.
References BKE_constraints_free(), C, CTX_DATA_BEGIN_WITH_ID, CTX_DATA_END, CTX_data_main(), DEG_id_tag_update(), DEG_relations_tag_update(), ID_RECALC_GEOMETRY, NA_REMOVED, NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_FINISHED, PCHAN_HAS_CONST, PCHAN_HAS_IK, PCHAN_HAS_SPLINEIK, and WM_event_add_notifier().
Referenced by POSE_OT_constraints_clear().
|
static |
Definition at line 2396 of file object_constraint.c.
References C, constraint_add_exec(), CONSTRAINT_TYPE_KINEMATIC, CTX_data_active_object(), ED_object_constraint_active_list(), wmOperator::ptr, and RNA_boolean_get().
Referenced by POSE_OT_ik_add().
|
static |
Definition at line 2335 of file object_constraint.c.
References BKE_object_pose_armature_get(), BKE_pose_channel_active(), BKE_report(), C, CONSTRAINT_TYPE_KINEMATIC, bPoseChannel::constraints, CTX_data_active_object(), ELEM, ListBase::first, get_new_constraint_target(), IFACE_, bConstraint::next, NULL, OPERATOR_CANCELLED, OPERATOR_INTERFACE, wmOperator::reports, RPT_ERROR, bConstraint::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and uiItemBooleanO().
Referenced by POSE_OT_ik_add().
|
static |
Definition at line 2438 of file object_constraint.c.
References BKE_constraint_remove(), C, CONSTRAINT_TYPE_KINEMATIC, CTX_DATA_BEGIN_WITH_ID, CTX_DATA_END, DEG_id_tag_update(), ID_RECALC_GEOMETRY, NA_REMOVED, NC_OBJECT, ND_CONSTRAINT, bConstraint::next, next, NULL, OPERATOR_FINISHED, PCHAN_HAS_IK, PCHAN_HAS_TARGET, bConstraint::type, and WM_event_add_notifier().
Referenced by POSE_OT_ik_clear().
| void POSE_OT_constraint_add | ( | wmOperatorType * | ot | ) |
Definition at line 2284 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode_exclusive(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_constraint_add_exec(), wmOperatorType::prop, RNA_def_enum(), rna_enum_constraint_type_items, wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
| void POSE_OT_constraint_add_with_targets | ( | wmOperatorType * | ot | ) |
Definition at line 2303 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode_exclusive(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_constraint_add_exec(), wmOperatorType::prop, RNA_def_enum(), rna_enum_constraint_type_items, wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
| void POSE_OT_constraints_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1737 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode_exclusive(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, and pose_constraints_clear_exec().
Referenced by ED_operatortypes_object().
| void POSE_OT_constraints_copy | ( | wmOperatorType * | ot | ) |
Definition at line 1832 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode_exclusive(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_constraint_copy_exec().
Referenced by ED_operatortypes_object().
| void POSE_OT_ik_add | ( | wmOperatorType * | ot | ) |
Definition at line 2407 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode_exclusive(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, pose_ik_add_exec(), pose_ik_add_invoke(), RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
| void POSE_OT_ik_clear | ( | wmOperatorType * | ot | ) |
Definition at line 2471 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode_exclusive(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and pose_ik_clear_exec().
Referenced by ED_operatortypes_object().
|
static |
Definition at line 269 of file object_constraint.c.
References abs(), BKE_constraint_typeinfo_get(), BLI_listbase_count(), BLI_strncpy(), ListBase::first, bConstraintTypeInfo::flush_constraint_targets, bConstraintTypeInfo::get_constraint_targets, bConstraintTarget::next, NULL, bConstraintTarget::subtarget, and bConstraintTarget::tar.
Referenced by constraint_add_exec().
|
static |
Definition at line 842 of file object_constraint.c.
References C, CONSTRAINT_TYPE_STRETCHTO, CTX_data_main(), data, bConstraint::data, ED_object_active_context(), ED_object_constraint_update(), edit_constraint_property_get(), NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by CONSTRAINT_OT_stretchto_reset(), and stretchto_reset_invoke().
|
static |
Definition at line 862 of file object_constraint.c.
References C, edit_constraint_invoke_properties(), NULL, OPERATOR_CANCELLED, and stretchto_reset_exec().
Referenced by CONSTRAINT_OT_stretchto_reset().
|
static |
Definition at line 315 of file object_constraint.c.
References ACTCON_USE_EVAL_TIME, BIK_test_constraint(), BKE_armature_find_bone_name(), BKE_armature_from_object(), BKE_constraint_typeinfo_get(), BKE_object_exists_check(), BKE_tracking_object_get_camera(), BKE_tracking_object_get_named(), BKE_tracking_track_get_named(), CAMERASOLVER_ACTIVECLIP, CONSTRAINT_DISABLE, CONSTRAINT_OBTYPE_BONE, CONSTRAINT_SPLINEIK_BOUND, CONSTRAINT_TYPE_ACTION, CONSTRAINT_TYPE_ARMATURE, CONSTRAINT_TYPE_CAMERASOLVER, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_LOCKTRACK, CONSTRAINT_TYPE_OBJECTSOLVER, CONSTRAINT_TYPE_PIVOT, CONSTRAINT_TYPE_SPLINEIK, CONSTRAINT_TYPE_TRACKTO, CONSTRAINT_TYPE_TRANSFORM_CACHE, CU_PATH, data, bConstraint::data, Object::data, ELEM, ListBase::first, bConstraint::flag, Curve::flag, bConstraintTypeInfo::flush_constraint_targets, bConstraintTypeInfo::get_constraint_targets, ID_OB, MEM_SAFE_FREE, bPoseChannel::name, bConstraintTarget::next, NULL, OB_ARMATURE, OB_CURVE, STREQ, bConstraintTarget::subtarget, bConstraintTarget::tar, type, bConstraint::type, and Object::type.
Referenced by object_test_constraint(), and test_constraints().
|
static |
Definition at line 601 of file object_constraint.c.
References CONSTRAINT_OBTYPE_BONE, CONSTRAINT_OBTYPE_OBJECT, constraint_type_get(), bPoseChannel::constraints, Object::constraints, ListBase::first, bConstraint::next, NULL, test_constraint(), and type.
Referenced by object_test_constraints().
|
static |
Definition at line 678 of file object_constraint.c.
Referenced by edit_constraint_properties().