Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_constraint.c
| Context not available. | |||||
| } | } | ||||
| /* checks validity of object pointers, and NULLs, | /* checks validity of object pointers, and NULLs, | ||||
| * if Bone doesnt exist it sets the CONSTRAINT_DISABLE flag. | * if Bone doesn't exist it sets the CONSTRAINT_DISABLE flag. | ||||
| */ | */ | ||||
| static void test_constraints(Main *bmain, Object *owner, bPoseChannel *pchan) | static void test_constraints(Main *bmain, Object *owner, bPoseChannel *pchan) | ||||
| { | { | ||||
| Context not available. | |||||
| } | } | ||||
| if (ID_IS_STATIC_OVERRIDE(ob)) { | if (ID_IS_STATIC_OVERRIDE(ob)) { | ||||
| CTX_wm_operator_poll_msg_set(C, "Cannot edit constraints comming from static override"); | CTX_wm_operator_poll_msg_set(C, "Cannot edit constraints coming from static override"); | ||||
| return (((bConstraint *)ptr.data)->flag & CONSTRAINT_STATICOVERRIDE_LOCAL) != 0; | return (((bConstraint *)ptr.data)->flag & CONSTRAINT_STATICOVERRIDE_LOCAL) != 0; | ||||
| } | } | ||||
| Context not available. | |||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| /* create a new constraint of the type requried, and add it to the active/given constraints list */ | /* create a new constraint of the type required, and add it to the active/given constraints list */ | ||||
| if (pchan) | if (pchan) | ||||
| con = BKE_constraint_add_for_pose(ob, pchan, NULL, type); | con = BKE_constraint_add_for_pose(ob, pchan, NULL, type); | ||||
| else | else | ||||
| Context not available. | |||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| /* prepare popup menu to choose targetting options */ | /* prepare popup menu to choose targeting options */ | ||||
| pup = UI_popup_menu_begin(C, IFACE_("Add IK"), ICON_NONE); | pup = UI_popup_menu_begin(C, IFACE_("Add IK"), ICON_NONE); | ||||
| layout = UI_popup_menu_layout(pup); | layout = UI_popup_menu_layout(pup); | ||||
| Context not available. | |||||
| { | { | ||||
| bConstraint *con, *next; | bConstraint *con, *next; | ||||
| /* TODO: should we be checking if these contraints were local before we try and remove them? */ | /* TODO: should we be checking if these constraints were local before we try and remove them? */ | ||||
| for (con = pchan->constraints.first; con; con = next) { | for (con = pchan->constraints.first; con; con = next) { | ||||
| next = con->next; | next = con->next; | ||||
| if (con->type == CONSTRAINT_TYPE_KINEMATIC) { | if (con->type == CONSTRAINT_TYPE_KINEMATIC) { | ||||
| Context not available. | |||||