Blender V2.61 - r43446
|
#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 "BKE_tracking.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 519 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 518 of file object_constraint.c.
Referenced by edit_constraint_invoke_properties(), and edit_constraint_property_get().
static void child_get_inverse_matrix | ( | Scene * | scene, |
Object * | ob, | ||
bConstraint * | con, | ||
float | invmat[4][4] | ||
) | [static] |
Definition at line 706 of file object_constraint.c.
References bPoseChannel::constraints, copy_m4_m4(), ListBase::first, get_active_posechannel(), Object::imat, invert_m4_m4(), ListBase::last, mult_m4_m4m4(), bConstraint::next, NULL, Object::obmat, Object::pose, bPoseChannel::pose_mat, bConstraint::prev, unit_m4(), what_does_parent(), and where_is_pose().
Referenced by childof_set_inverse_exec(), and objectsolver_set_inverse_exec().
static int childof_clear_inverse_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 831 of file object_constraint.c.
References BKE_report(), CONSTRAINT_TYPE_CHILDOF, bConstraint::data, 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 850 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 785 of file object_constraint.c.
References BKE_report(), child_get_inverse_matrix(), CONSTRAINT_TYPE_CHILDOF, CTX_data_scene(), bConstraint::data, data, ED_object_active_context(), edit_constraint_property_get(), Object::id, bChildOfConstraint::invmat, 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 int childof_set_inverse_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 806 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 1452 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 1003 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 1049 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 1070 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 1097 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 1118 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 858 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 814 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 1034 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 688 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 1079 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 1126 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_objectsolver_clear_inverse | ( | wmOperatorType * | ot | ) |
Definition at line 948 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, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void CONSTRAINT_OT_objectsolver_set_inverse | ( | wmOperatorType * | ot | ) |
Definition at line 905 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, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void CONSTRAINT_OT_stretchto_reset | ( | wmOperatorType * | ot | ) |
Definition at line 645 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 997 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 989 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 966 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 978 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 549 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_string_set(), and RNA_struct_property_is_set().
Referenced by childof_clear_inverse_invoke(), childof_set_inverse_invoke(), constraint_move_down_invoke(), constraint_move_up_invoke(), limitdistance_reset_invoke(), objectsolver_clear_inverse_invoke(), objectsolver_set_inverse_invoke(), and stretchto_reset_invoke().
static int edit_constraint_poll | ( | bContext * | C | ) | [static] |
Definition at line 538 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(), CONSTRAINT_OT_objectsolver_clear_inverse(), CONSTRAINT_OT_objectsolver_set_inverse(), and CONSTRAINT_OT_stretchto_reset().
Definition at line 527 of file object_constraint.c.
References CTX_data_pointer_get_type(), PointerRNA::data, ED_object_active_context(), Object::id, PointerRNA::id, and ID::lib.
Referenced by edit_constraint_poll().
static void edit_constraint_properties | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 543 of file object_constraint.c.
References MAX_NAME, 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(), CONSTRAINT_OT_objectsolver_clear_inverse(), CONSTRAINT_OT_objectsolver_set_inverse(), and CONSTRAINT_OT_stretchto_reset().
static bConstraint* edit_constraint_property_get | ( | wmOperator * | op, |
Object * | ob, | ||
int | type | ||
) | [static] |
Definition at line 576 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(), MAX_NAME, NULL, wmOperator::ptr, RNA_enum_get(), RNA_string_get(), and bConstraint::type.
Referenced by childof_clear_inverse_exec(), childof_set_inverse_exec(), constraint_move_down_exec(), constraint_move_up_exec(), limitdistance_reset_exec(), objectsolver_clear_inverse_exec(), objectsolver_set_inverse_exec(), and stretchto_reset_exec().
bConstraint* get_active_constraint | ( | Object * | ob | ) | [read] |
Definition at line 139 of file object_constraint.c.
References constraints_get_active(), and get_active_constraints().
Definition at line 84 of file object_constraint.c.
References Object::constraints, bPoseChannel::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 103 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 1313 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, copy_v3_v3(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_scene(), CU_PATH, ED_object_active_context(), Base::flag, Curve::flag, get_active_posechannel(), Object::lay, Base::lay, Object::loc, mul_v3_m4v3(), NULL, OB_ARMATURE, OB_CURVE, OB_EMPTY, OB_MESH, Object::obmat, bPoseChannel::pose_head, bPoseChannel::pose_tail, SELECT, and Object::type.
Referenced by constraint_add_exec(), and pose_ik_add_invoke().
static int limitdistance_reset_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 662 of file object_constraint.c.
References CONSTRAINT_TYPE_DISTLIMIT, bConstraint::data, 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 680 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 1567 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 1269 of file object_constraint.c.
References Object::constraints, copy_constraints(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_id_tag_update(), DAG_scene_sort(), ED_object_active_context(), NA_ADDED, NC_OBJECT, ND_CONSTRAINT, NULL, OB_RECALC_DATA, OPERATOR_FINISHED, TRUE, and WM_event_add_notifier().
Referenced by OBJECT_OT_constraints_copy().
static int object_constraints_clear_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1186 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 1610 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 1629 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 1208 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 1295 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 500 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 objectsolver_clear_inverse_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 921 of file object_constraint.c.
References BKE_report(), CONSTRAINT_TYPE_OBJECTSOLVER, bConstraint::data, data, ED_object_active_context(), edit_constraint_property_get(), bObjectSolverConstraint::invmat, 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 int objectsolver_clear_inverse_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 940 of file object_constraint.c.
References edit_constraint_invoke_properties(), objectsolver_clear_inverse_exec(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_objectsolver_clear_inverse().
static int objectsolver_set_inverse_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 876 of file object_constraint.c.
References BKE_report(), child_get_inverse_matrix(), CONSTRAINT_TYPE_OBJECTSOLVER, CTX_data_scene(), bConstraint::data, data, ED_object_active_context(), edit_constraint_property_get(), Object::id, bObjectSolverConstraint::invmat, ID::name, NC_OBJECT, ND_CONSTRAINT, NULL, 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 int objectsolver_set_inverse_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 897 of file object_constraint.c.
References edit_constraint_invoke_properties(), objectsolver_set_inverse_exec(), and OPERATOR_CANCELLED.
Referenced by CONSTRAINT_OT_objectsolver_set_inverse().
static int pose_constraint_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1588 of file object_constraint.c.
References BKE_report(), constraint_add_exec(), ED_object_active_context(), get_active_constraints(), wmOperator::idname, object_pose_armature_get(), 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 1222 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 1147 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(), free_constraints(), Object::id, NC_OBJECT, ND_CONSTRAINT, OB_RECALC_DATA, object_pose_armature_get(), 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 1744 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 1691 of file object_constraint.c.
References BKE_report(), CONSTRAINT_TYPE_KINEMATIC, bPoseChannel::constraints, CTX_data_active_object(), ELEM, ListBase::first, get_active_posechannel(), get_new_constraint_target(), bConstraint::next, NULL, object_pose_armature_get(), 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 1775 of file object_constraint.c.
References CONSTRAINT_TYPE_KINEMATIC, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, DAG_id_tag_update(), Object::id, NA_REMOVED, NC_OBJECT, ND_CONSTRAINT, bConstraint::next, next, OB_RECALC_DATA, object_pose_armature_get(), 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 1648 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 1667 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 1173 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 1254 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 1753 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 1804 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 223 of file object_constraint.c.
References abs(), BLI_countlist(), BLI_strncpy(), 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 619 of file object_constraint.c.
References CONSTRAINT_TYPE_STRETCHTO, bConstraint::data, 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 637 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 262 of file object_constraint.c.
References bActionConstraint::act, BIK_test_constraint(), BKE_tracking_get_camera_object(), BKE_tracking_named_object(), BKE_tracking_named_track(), CAMERASOLVER_ACTIVECLIP, bSplineIKConstraint::chainlen, bObjectSolverConstraint::clip, bCameraSolverConstraint::clip, bFollowTrackConstraint::clip, CONSTRAINT_DISABLE, constraint_get_typeinfo(), CONSTRAINT_OBTYPE_BONE, CONSTRAINT_OBTYPE_OBJECT, CONSTRAINT_SPLINEIK_BOUND, CONSTRAINT_TYPE_ACTION, 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, bPoseChannel::constraints, Object::constraints, CU_PATH, Object::data, bConstraint::data, data, ELEM3, exist_object(), ListBase::first, Curve::flag, bObjectSolverConstraint::flag, bCameraSolverConstraint::flag, bFollowTrackConstraint::flag, bSplineIKConstraint::flag, bConstraint::flag, bConstraintTypeInfo::flush_constraint_targets, get_armature(), bConstraintTypeInfo::get_constraint_targets, get_named_bone(), bLockTrackConstraint::lockflag, MEM_freeN(), bPoseChannel::name, bConstraintTarget::next, bConstraint::next, NULL, bSplineIKConstraint::numpoints, OB_ARMATURE, OB_CURVE, bFollowTrackConstraint::object, bSplineIKConstraint::points, bKinematicConstraint::polesubtarget, bKinematicConstraint::poletar, bTrackToConstraint::reserved1, bTrackToConstraint::reserved2, bConstraintTarget::subtarget, bPivotConstraint::subtarget, bKinematicConstraint::subtarget, bConstraintTarget::tar, bPivotConstraint::tar, bKinematicConstraint::tar, bFollowTrackConstraint::track, bLockTrackConstraint::trackflag, bFollowPathConstraint::trackflag, MovieClip::tracking, 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 148 of file object_constraint.c.
References data, G, i, Text::id, Object::index, ID::next, NULL, 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 521 of file object_constraint.c.