|
Blender
V2.59
|
#include <stdio.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_math.h"#include "BLI_dynstr.h"#include "BLI_utildefines.h"#include "DNA_constraint_types.h"#include "DNA_curve_types.h"#include "DNA_scene_types.h"#include "DNA_text_types.h"#include "DNA_object_types.h"#include "BKE_action.h"#include "BKE_armature.h"#include "BKE_constraint.h"#include "BKE_context.h"#include "BKE_depsgraph.h"#include "BKE_global.h"#include "BKE_main.h"#include "BKE_object.h"#include "BKE_report.h"#include "BIK_api.h"#include "WM_api.h"#include "WM_types.h"#include "RNA_access.h"#include "RNA_define.h"#include "RNA_enum_types.h"#include "ED_object.h"#include "ED_armature.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.
Definition in file object_constraint.c.
| #define EDIT_CONSTRAINT_OWNER_BONE 1 |
Definition at line 484 of file object_constraint.c.
Referenced by edit_constraint_invoke_properties(), and edit_constraint_property_get().
| #define EDIT_CONSTRAINT_OWNER_OBJECT 0 |
Definition at line 483 of file object_constraint.c.
Referenced by edit_constraint_invoke_properties(), and edit_constraint_property_get().
| static int childof_clear_inverse_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 759 of file object_constraint.c.
References BKE_report(), CONSTRAINT_TYPE_CHILDOF, bConstraint::data, Object::data, ED_object_active_context(), edit_constraint_property_get(), bChildOfConstraint::invmat, 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 int childof_clear_inverse_invoke | ( | bContext * | C, |
| wmOperator * | op, | ||
| wmEvent * | UNUSEDevent | ||
| ) | [static] |
Definition at line 778 of file object_constraint.c.
References childof_clear_inverse_exec(), edit_constraint_invoke_properties(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_childof_clear_inverse().
| static int childof_set_inverse_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 671 of file object_constraint.c.
References BKE_report(), CONSTRAINT_TYPE_CHILDOF, copy_m4_m4(), CTX_data_scene(), bConstraint::data, Object::data, ED_object_active_context(), edit_constraint_property_get(), bConstraint::enforce, get_active_posechannel(), Object::id, Object::imat, invert_m4_m4(), bChildOfConstraint::invmat, mul_m4_m4m4(), ID::name, NC_OBJECT, ND_CONSTRAINT, NULL, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, bPoseChannel::pose_mat, wmOperator::reports, RPT_ERROR, unit_m4(), what_does_parent(), where_is_pose(), and WM_event_add_notifier().
Referenced by childof_set_inverse_invoke(), and CONSTRAINT_OT_childof_set_inverse().
| static int childof_set_inverse_invoke | ( | bContext * | C, |
| wmOperator * | op, | ||
| wmEvent * | UNUSEDevent | ||
| ) | [static] |
Definition at line 734 of file object_constraint.c.
References childof_set_inverse_exec(), edit_constraint_invoke_properties(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_childof_set_inverse().
| static int constraint_add_exec | ( | bContext * | C, |
| wmOperator * | op, | ||
| Object * | ob, | ||
| ListBase * | list, | ||
| int | type, | ||
| short | setTarget | ||
| ) | [static] |
Definition at line 1284 of file object_constraint.c.
References add_ob_constraint(), add_pose_constraint(), BKE_report(), BPY_pyconstraint_update(), CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_NULL, CONSTRAINT_TYPE_PYTHON, CONSTRAINT_TYPE_RIGIDBODYJOINT, CONSTRAINT_TYPE_SPLINEIK, bPoseChannel::constraints, Object::constraints, CTX_data_main(), CTX_data_scene(), DAG_id_tag_update(), DAG_scene_sort(), bConstraint::data, bPose::flag, get_active_posechannel(), get_new_constraint_target(), Object::id, MEM_freeN(), NA_ADDED, bPoseChannel::name, NC_OBJECT, ND_CONSTRAINT, NULL, OB_ARMATURE, OB_RECALC_DATA, OB_RECALC_OB, object_test_constraints(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, POSE_RECALC, wmOperator::reports, RPT_ERROR, set_constraint_nth_target(), Object::type, update_pose_constraint_flags(), validate_pyconstraint_cb(), and WM_event_add_notifier().
Referenced by object_constraint_add_exec(), pose_constraint_add_exec(), and pose_ik_add_exec().
| static int constraint_delete_exec | ( | bContext * | C, |
| wmOperator * | UNUSEDop | ||
| ) | [static] |
Definition at line 841 of file object_constraint.c.
References BIK_clear_data(), CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK, constraints_set_active(), CTX_data_pointer_get_type(), PointerRNA::data, ED_object_constraint_update(), ELEM, get_constraint_lb(), PointerRNA::id, NA_REMOVED, NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, remove_constraint(), RNA_Constraint, bConstraint::type, and WM_event_add_notifier().
Referenced by CONSTRAINT_OT_delete().
| static int constraint_move_down_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 887 of file object_constraint.c.
References BLI_insertlinkafter(), BLI_remlink(), ED_object_active_context(), edit_constraint_property_get(), get_constraint_lb(), 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 int constraint_move_down_invoke | ( | bContext * | C, |
| wmOperator * | op, | ||
| wmEvent * | UNUSEDevent | ||
| ) | [static] |
Definition at line 908 of file object_constraint.c.
References constraint_move_down_exec(), edit_constraint_invoke_properties(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_move_down().
| static int constraint_move_up_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 935 of file object_constraint.c.
References BLI_insertlinkbefore(), BLI_remlink(), ED_object_active_context(), edit_constraint_property_get(), get_constraint_lb(), 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 int constraint_move_up_invoke | ( | bContext * | C, |
| wmOperator * | op, | ||
| wmEvent * | UNUSEDevent | ||
| ) | [static] |
Definition at line 956 of file object_constraint.c.
References constraint_move_up_exec(), edit_constraint_invoke_properties(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_move_up().
| void CONSTRAINT_OT_childof_clear_inverse | ( | wmOperatorType * | ot | ) |
Definition at line 786 of file object_constraint.c.
References childof_clear_inverse_exec(), childof_clear_inverse_invoke(), wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_childof_set_inverse | ( | wmOperatorType * | ot | ) |
Definition at line 742 of file object_constraint.c.
References childof_set_inverse_exec(), childof_set_inverse_invoke(), wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 872 of file object_constraint.c.
References constraint_delete_exec(), constraint_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_limitdistance_reset | ( | wmOperatorType * | ot | ) |
Definition at line 652 of file object_constraint.c.
References wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, limitdistance_reset_exec(), limitdistance_reset_invoke(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_move_down | ( | wmOperatorType * | ot | ) |
Definition at line 917 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, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_move_up | ( | wmOperatorType * | ot | ) |
Definition at line 964 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, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void CONSTRAINT_OT_stretchto_reset | ( | wmOperatorType * | ot | ) |
Definition at line 609 of file object_constraint.c.
References wmOperatorType::description, edit_constraint_poll(), edit_constraint_properties(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, stretchto_reset_exec(), and stretchto_reset_invoke().
Referenced by ED_operatortypes_object().
| static int constraint_poll | ( | bContext * | C | ) | [static] |
Definition at line 835 of file object_constraint.c.
References CTX_data_pointer_get_type(), PointerRNA::data, PointerRNA::id, and RNA_Constraint.
Referenced by CONSTRAINT_OT_delete().
Definition at line 827 of file object_constraint.c.
References DAG_scene_sort(), ED_object_constraint_update(), bPose::flag, Object::pose, and POSE_RECALC.
| void ED_object_constraint_set_active | ( | Object * | ob, |
| bConstraint * | con | ||
| ) |
Definition at line 804 of file object_constraint.c.
References CONSTRAINT_ACTIVE, constraints_set_active(), bConstraint::flag, get_constraint_lb(), and NULL.
Referenced by constraint_active_func().
| void ED_object_constraint_update | ( | Object * | ob | ) |
Definition at line 816 of file object_constraint.c.
References DAG_id_tag_update(), Object::id, OB_ARMATURE, OB_RECALC_DATA, OB_RECALC_OB, object_test_constraints(), Object::pose, Object::type, and update_pose_constraint_flags().
Referenced by constraint_delete_exec(), ED_object_constraint_dependency_update(), limitdistance_reset_exec(), and stretchto_reset_exec().
| static int edit_constraint_invoke_properties | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 514 of file object_constraint.c.
References Object::constraints, CTX_data_pointer_get_type(), PointerRNA::data, ED_object_active_context(), EDIT_CONSTRAINT_OWNER_BONE, EDIT_CONSTRAINT_OWNER_OBJECT, get_constraint_lb(), PointerRNA::id, bConstraint::name, NULL, wmOperator::ptr, RNA_Constraint, RNA_enum_set(), RNA_property_is_set(), and RNA_string_set().
Referenced by childof_clear_inverse_invoke(), childof_set_inverse_invoke(), constraint_move_down_invoke(), constraint_move_up_invoke(), limitdistance_reset_invoke(), and stretchto_reset_invoke().
| static int edit_constraint_poll | ( | bContext * | C | ) | [static] |
Definition at line 503 of file object_constraint.c.
References edit_constraint_poll_generic(), and RNA_Constraint.
Referenced by CONSTRAINT_OT_childof_clear_inverse(), CONSTRAINT_OT_childof_set_inverse(), CONSTRAINT_OT_limitdistance_reset(), CONSTRAINT_OT_move_down(), CONSTRAINT_OT_move_up(), and CONSTRAINT_OT_stretchto_reset().
Definition at line 492 of file object_constraint.c.
References CTX_data_pointer_get_type(), PointerRNA::data, ED_object_active_context(), PointerRNA::id, Object::id, and ID::lib.
Referenced by edit_constraint_poll().
| static void edit_constraint_properties | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 508 of file object_constraint.c.
References RNA_def_enum(), RNA_def_string(), and wmOperatorType::srna.
Referenced by CONSTRAINT_OT_childof_clear_inverse(), CONSTRAINT_OT_childof_set_inverse(), CONSTRAINT_OT_limitdistance_reset(), CONSTRAINT_OT_move_down(), CONSTRAINT_OT_move_up(), and CONSTRAINT_OT_stretchto_reset().
| static bConstraint* edit_constraint_property_get | ( | wmOperator * | op, |
| Object * | ob, | ||
| int | type | ||
| ) | [static] |
Definition at line 541 of file object_constraint.c.
References bPoseChannel::constraints, Object::constraints, constraints_findByName(), EDIT_CONSTRAINT_OWNER_BONE, EDIT_CONSTRAINT_OWNER_OBJECT, get_active_constraints(), get_active_posechannel(), bConstraint::name, NULL, wmOperator::ptr, RNA_enum_get(), and RNA_string_get().
Referenced by childof_clear_inverse_exec(), childof_set_inverse_exec(), constraint_move_down_exec(), constraint_move_up_exec(), limitdistance_reset_exec(), and stretchto_reset_exec().
| bConstraint* get_active_constraint | ( | Object * | ob | ) | [read] |
Definition at line 140 of file object_constraint.c.
References constraints_get_active(), and get_active_constraints().
Definition at line 85 of file object_constraint.c.
References bPoseChannel::constraints, Object::constraints, get_active_posechannel(), Object::mode, NULL, and OB_MODE_POSE.
Referenced by edit_constraint_property_get(), get_active_constraint(), pose_constraint_add_exec(), and pose_ik_add_exec().
| ListBase* get_constraint_lb | ( | Object * | ob, |
| bConstraint * | con, | ||
| bPoseChannel ** | pchan_r | ||
| ) | [read] |
Definition at line 104 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_set_active(), and edit_constraint_invoke_properties().
| static short get_new_constraint_target | ( | bContext * | C, |
| int | con_type, | ||
| Object ** | tar_ob, | ||
| bPoseChannel ** | tar_pchan, | ||
| short | add | ||
| ) | [static] |
Definition at line 1146 of file object_constraint.c.
References add(), add_object(), BASACT, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_LOCLIMIT, CONSTRAINT_TYPE_NULL, CONSTRAINT_TYPE_RIGIDBODYJOINT, CONSTRAINT_TYPE_ROTLIMIT, CONSTRAINT_TYPE_SAMEVOL, CONSTRAINT_TYPE_SHRINKWRAP, CONSTRAINT_TYPE_SIZELIMIT, CONSTRAINT_TYPE_SPLINEIK, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_scene(), CU_PATH, ED_object_active_context(), Base::flag, Curve::flag, get_active_posechannel(), Base::lay, Object::lay, Object::loc, mul_v3_m4v3(), NULL, OB_ARMATURE, OB_CURVE, OB_EMPTY, OB_MESH, Object::obmat, bPoseChannel::pose_head, bPoseChannel::pose_tail, SELECT, Object::type, and VECCOPY.
Referenced by constraint_add_exec(), and pose_ik_add_invoke().
| static int limitdistance_reset_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 626 of file object_constraint.c.
References CONSTRAINT_TYPE_DISTLIMIT, bConstraint::data, Object::data, bDistLimitConstraint::dist, 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 int limitdistance_reset_invoke | ( | bContext * | C, |
| wmOperator * | op, | ||
| wmEvent * | UNUSEDevent | ||
| ) | [static] |
Definition at line 644 of file object_constraint.c.
References edit_constraint_invoke_properties(), limitdistance_reset_exec(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_limitdistance_reset().
| static int object_constraint_add_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 1397 of file object_constraint.c.
References BKE_report(), constraint_add_exec(), Object::constraints, ED_object_active_context(), wmOperator::idname, OPERATOR_CANCELLED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and Object::type.
Referenced by OBJECT_OT_constraint_add(), and OBJECT_OT_constraint_add_with_targets().
| static int object_constraint_copy_exec | ( | bContext * | C, |
| wmOperator * | UNUSEDop | ||
| ) | [static] |
Definition at line 1107 of file object_constraint.c.
References Object::constraints, copy_constraints(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_scene_sort(), ED_object_active_context(), OPERATOR_FINISHED, and TRUE.
Referenced by OBJECT_OT_constraints_copy().
| static int object_constraints_clear_exec | ( | bContext * | C, |
| wmOperator * | UNUSEDop | ||
| ) | [static] |
Definition at line 1024 of file object_constraint.c.
References CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_id_tag_update(), DAG_scene_sort(), free_constraints(), NC_OBJECT, ND_CONSTRAINT, NULL, OB_RECALC_OB, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by OBJECT_OT_constraints_clear().
| void OBJECT_OT_constraint_add | ( | wmOperatorType * | ot | ) |
Definition at line 1440 of file object_constraint.c.
References constraint_type_items, wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_constraint_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
| void OBJECT_OT_constraint_add_with_targets | ( | wmOperatorType * | ot | ) |
Definition at line 1459 of file object_constraint.c.
References constraint_type_items, wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_constraint_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
| void OBJECT_OT_constraints_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1046 of file object_constraint.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, object_constraints_clear_exec(), and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void OBJECT_OT_constraints_copy | ( | wmOperatorType * | ot | ) |
Definition at line 1128 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, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
| void object_test_constraints | ( | Object * | owner | ) |
Definition at line 465 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 int pose_constraint_add_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 1418 of file object_constraint.c.
References BKE_report(), constraint_add_exec(), ED_object_active_context(), ED_object_pose_armature(), get_active_constraints(), wmOperator::idname, OPERATOR_CANCELLED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and Object::type.
Referenced by POSE_OT_constraint_add(), and POSE_OT_constraint_add_with_targets().
| static int pose_constraint_copy_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 1060 of file object_constraint.c.
References BKE_report(), bPoseChannel::constflag, bPoseChannel::constraints, copy_constraints(), CTX_data_active_pose_bone(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_scene_sort(), ELEM, ListBase::first, NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, TRUE, and WM_event_add_notifier().
Referenced by POSE_OT_constraints_copy().
| static int pose_constraints_clear_exec | ( | bContext * | C, |
| wmOperator * | UNUSEDop | ||
| ) | [static] |
Definition at line 985 of file object_constraint.c.
References CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_id_tag_update(), DAG_scene_sort(), ED_object_pose_armature(), free_constraints(), Object::id, NC_OBJECT, ND_CONSTRAINT, OB_RECALC_DATA, OPERATOR_FINISHED, PCHAN_HAS_CONST, PCHAN_HAS_IK, PCHAN_HAS_SPLINEIK, and WM_event_add_notifier().
Referenced by POSE_OT_constraints_clear().
| static int pose_ik_add_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 1574 of file object_constraint.c.
References constraint_add_exec(), CONSTRAINT_TYPE_KINEMATIC, CTX_data_active_object(), get_active_constraints(), wmOperator::ptr, and RNA_boolean_get().
Referenced by POSE_OT_ik_add().
| static int pose_ik_add_invoke | ( | bContext * | C, |
| wmOperator * | op, | ||
| wmEvent * | UNUSEDevt | ||
| ) | [static] |
Definition at line 1521 of file object_constraint.c.
References BKE_report(), CONSTRAINT_TYPE_KINEMATIC, bPoseChannel::constraints, CTX_data_active_object(), ED_object_pose_armature(), ELEM, ListBase::first, get_active_posechannel(), get_new_constraint_target(), bConstraint::next, NULL, OPERATOR_CANCELLED, wmOperator::reports, RPT_ERROR, bConstraint::type, uiItemBooleanO(), uiPupMenuBegin(), uiPupMenuEnd(), and uiPupMenuLayout().
Referenced by POSE_OT_ik_add().
| static int pose_ik_clear_exec | ( | bContext * | C, |
| wmOperator * | UNUSEDop | ||
| ) | [static] |
Definition at line 1605 of file object_constraint.c.
References CONSTRAINT_TYPE_KINEMATIC, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, DAG_id_tag_update(), ED_object_pose_armature(), Object::id, NA_REMOVED, NC_OBJECT, ND_CONSTRAINT, bConstraint::next, next, OB_RECALC_DATA, OPERATOR_FINISHED, PCHAN_HAS_IK, PCHAN_HAS_TARGET, remove_constraint(), bConstraint::type, and WM_event_add_notifier().
Referenced by POSE_OT_ik_clear().
| void POSE_OT_constraint_add | ( | wmOperatorType * | ot | ) |
Definition at line 1478 of file object_constraint.c.
References constraint_type_items, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, pose_constraint_add_exec(), wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
| void POSE_OT_constraint_add_with_targets | ( | wmOperatorType * | ot | ) |
Definition at line 1497 of file object_constraint.c.
References constraint_type_items, wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, pose_constraint_add_exec(), wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
| void POSE_OT_constraints_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1011 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, and pose_constraints_clear_exec().
Referenced by ED_operatortypes_object().
| void POSE_OT_constraints_copy | ( | wmOperatorType * | ot | ) |
Definition at line 1092 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and pose_constraint_copy_exec().
Referenced by ED_operatortypes_object().
| void POSE_OT_ik_add | ( | wmOperatorType * | ot | ) |
Definition at line 1583 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, 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 1634 of file object_constraint.c.
References wmOperatorType::description, ED_operator_posemode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and pose_ik_clear_exec().
Referenced by ED_operatortypes_object().
| static void set_constraint_nth_target | ( | bConstraint * | con, |
| Object * | target, | ||
| const char | subtarget[], | ||
| int | index | ||
| ) | [static] |
Definition at line 224 of file object_constraint.c.
References TNT::abs(), BLI_countlist(), constraint_get_typeinfo(), ListBase::first, bConstraintTypeInfo::flush_constraint_targets, bConstraintTypeInfo::get_constraint_targets, i, bConstraintTarget::next, NULL, bConstraintTarget::subtarget, and bConstraintTarget::tar.
Referenced by constraint_add_exec().
| static int stretchto_reset_exec | ( | bContext * | C, |
| wmOperator * | op | ||
| ) | [static] |
Definition at line 583 of file object_constraint.c.
References CONSTRAINT_TYPE_STRETCHTO, bConstraint::data, Object::data, ED_object_active_context(), ED_object_constraint_update(), edit_constraint_property_get(), NC_OBJECT, ND_CONSTRAINT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, bStretchToConstraint::orglength, and WM_event_add_notifier().
Referenced by CONSTRAINT_OT_stretchto_reset(), and stretchto_reset_invoke().
| static int stretchto_reset_invoke | ( | bContext * | C, |
| wmOperator * | op, | ||
| wmEvent * | UNUSEDevent | ||
| ) | [static] |
Definition at line 601 of file object_constraint.c.
References edit_constraint_invoke_properties(), OPERATOR_CANCELLED, and stretchto_reset_exec().
Referenced by CONSTRAINT_OT_stretchto_reset().
| static void test_constraints | ( | Object * | owner, |
| bPoseChannel * | pchan | ||
| ) | [static] |
Definition at line 263 of file object_constraint.c.
References bActionConstraint::act, BIK_test_constraint(), bSplineIKConstraint::chainlen, CONSTRAINT_DISABLE, constraint_get_typeinfo(), CONSTRAINT_OBTYPE_BONE, CONSTRAINT_OBTYPE_OBJECT, CONSTRAINT_SPLINEIK_BOUND, CONSTRAINT_TYPE_ACTION, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_LOCKTRACK, CONSTRAINT_TYPE_PIVOT, CONSTRAINT_TYPE_SPLINEIK, CONSTRAINT_TYPE_TRACKTO, bPoseChannel::constraints, Object::constraints, CU_PATH, bConstraint::data, Object::data, ELEM3, exist_object(), ListBase::first, bConstraint::flag, bSplineIKConstraint::flag, Curve::flag, bConstraintTypeInfo::flush_constraint_targets, get_armature(), bConstraintTypeInfo::get_constraint_targets, get_named_bone(), bLockTrackConstraint::lockflag, MEM_freeN(), bPoseChannel::name, bConstraint::next, bConstraintTarget::next, NULL, bSplineIKConstraint::numpoints, OB_ARMATURE, OB_CURVE, bSplineIKConstraint::points, bKinematicConstraint::polesubtarget, bKinematicConstraint::poletar, bTrackToConstraint::reserved1, bTrackToConstraint::reserved2, bConstraintTarget::subtarget, bKinematicConstraint::subtarget, bPivotConstraint::subtarget, bConstraintTarget::tar, bKinematicConstraint::tar, bPivotConstraint::tar, bLockTrackConstraint::trackflag, bFollowPathConstraint::trackflag, bConstraint::type, Object::type, and bFollowPathConstraint::upflag.
Referenced by object_test_constraints().
| static void validate_pyconstraint_cb | ( | void * | arg1, |
| void * | arg2 | ||
| ) | [static] |
Definition at line 149 of file object_constraint.c.
References Object::data, ListBase::first, G, i, Text::id, Object::index, Global::main, ID::next, NULL, Main::text, and bPythonConstraint::text.
Referenced by constraint_add_exec().
EnumPropertyItem constraint_owner_items[] [static] |
{
{EDIT_CONSTRAINT_OWNER_OBJECT, "OBJECT", 0, "Object", "Edit a constraint on the active object"},
{EDIT_CONSTRAINT_OWNER_BONE, "BONE", 0, "Bone", "Edit a constraint on the active bone"},
{0, NULL, 0, NULL, NULL}}
Definition at line 486 of file object_constraint.c.