Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-02-11 23:25:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-11 23:29:31 +0300
commit23214ecad03bfef75c78b6a812970959da363344 (patch)
tree6d7f84634658b88a1b2557d7c3803c3d7aa379f5 /source/blender/editors/object
parent27b2ab8cf4ae9140ff53d812c142e7d65cbeee11 (diff)
Outliner: ContextMenus for constraints/modifiers
Context menu to toggle render, visibility & delete D996 by @lichtwerk
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_constraint.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 8f793f7f7f9..97d926761b5 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1182,20 +1182,13 @@ static int constraint_delete_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob = ptr.id.data;
bConstraint *con = ptr.data;
ListBase *lb = get_constraint_lb(ob, con, NULL);
- const bool is_ik = ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK);
/* free the constraint */
- if (BKE_constraint_remove(lb, con)) {
+ if (BKE_constraint_remove_ex(lb, ob, con, true)) {
/* there's no active constraint now, so make sure this is the case */
- BKE_constraints_active_set(lb, NULL);
-
+ BKE_constraints_active_set(&ob->constraints, NULL);
ED_object_constraint_update(ob); /* needed to set the flags on posebones correctly */
- /* ITASC needs to be rebuilt once a constraint is removed [#26920] */
- if (is_ik) {
- BIK_clear_data(ob->pose);
- }
-
/* notifiers */
WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob);