[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39068] branches/soc-2011-pepper/source/ blender/editors/object/object_constraint.c: Bugfix [#28106] Missing 3D view update after copy of constraints
Joshua Leung
aligorith at gmail.com
Fri Aug 5 13:31:41 CEST 2011
Revision: 39068
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39068
Author: aligorith
Date: 2011-08-05 11:31:41 +0000 (Fri, 05 Aug 2011)
Log Message:
-----------
Bugfix [#28106] Missing 3D view update after copy of constraints
Modified Paths:
--------------
branches/soc-2011-pepper/source/blender/editors/object/object_constraint.c
Modified: branches/soc-2011-pepper/source/blender/editors/object/object_constraint.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/object/object_constraint.c 2011-08-05 11:23:28 UTC (rev 39067)
+++ branches/soc-2011-pepper/source/blender/editors/object/object_constraint.c 2011-08-05 11:31:41 UTC (rev 39068)
@@ -1115,14 +1115,19 @@
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
{
/* if we're not handling the object we're copying from, copy all constraints over */
- if (obact != ob)
+ if (obact != ob) {
copy_constraints(&ob->constraints, &obact->constraints, TRUE);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ }
}
CTX_DATA_END;
/* force depsgraph to get recalculated since new relationships added */
DAG_scene_sort(bmain, scene); /* sort order of objects */
-
+
+ /* notifiers for updates */
+ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_ADDED, NULL);
+
return OPERATOR_FINISHED;
}
More information about the Bf-blender-cvs
mailing list