From 15b37a4a4dc8e3684aa53140e7285eb3deaec52b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 19 Mar 2015 18:28:49 +0500 Subject: Speedup for constraints update from python script General idea is to avoid actual calculation from property update() callback and tag things for update later instead. That said, pose constraint flags are now tagged for update and handled as a part of object update. In the new depsgraph it'll be a nice dedicated operation node. Also avoid updating disabled flags for all the modifiers. This part of the path is not totally optimal since it'll still need to iterate over bones in order to get pchan, but to optimize it further would be nice to find a way to avoid pchan requirement all together. Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1191 --- source/blender/makesrna/intern/rna_constraint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_constraint.c') diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index aaacf07567e..0f4830a8a7e 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -271,12 +271,12 @@ static char *rna_Constraint_path(PointerRNA *ptr) static void rna_Constraint_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - ED_object_constraint_update(ptr->id.data); + ED_object_constraint_tag_update(ptr->id.data, ptr->data); } static void rna_Constraint_dependency_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { - ED_object_constraint_dependency_update(bmain, ptr->id.data); + ED_object_constraint_dependency_tag_update(bmain, ptr->id.data, ptr->data); } static void rna_Constraint_influence_update(Main *bmain, Scene *scene, PointerRNA *ptr) -- cgit v1.2.3