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>2011-05-04 09:56:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-04 09:56:26 +0400
commitff7ae1d4f4350445caceaf17194db3d03036f3d0 (patch)
tree3b7f7905dc4a78c746addd5dc67def623d68965a
parentea5b43d862a4004280660405d50560d576f6fed9 (diff)
rna object constraint remove function wasn't calling ED_object_constraint_update().
-rw-r--r--source/blender/makesrna/intern/rna_object.c3
-rw-r--r--source/blender/makesrna/intern/rna_pose.c5
2 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 2ff72c90042..11e7dd81cb6 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1096,8 +1096,9 @@ static void rna_Object_constraints_remove(Object *object, ReportList *reports, b
}
remove_constraint(&object->constraints, con);
+ ED_object_constraint_update(object);
ED_object_constraint_set_active(object, NULL);
- WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT, object);
+ WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, object);
}
static ModifierData *rna_Object_modifier_new(Object *object, bContext *C, ReportList *reports, const char *name, int type)
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 7c5c4882253..996a80548b3 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -475,16 +475,13 @@ static void rna_PoseChannel_constraints_remove(ID *id, bPoseChannel *pchan, Repo
const short is_ik= ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK);
remove_constraint(&pchan->constraints, con);
-
ED_object_constraint_update(ob);
-
constraints_set_active(&pchan->constraints, NULL);
+ WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, id);
if (is_ik) {
BIK_clear_data(ob->pose);
}
-
- WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, id);
}
}