mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #119945: Dependency Graph not updated properly when adding constraints through python
The issue was that when adding a constraint through python to an object that is already animated, the constraint did not evaluate properly at first. The fix is to update the depsgraph when creating a constraint through the API. Such an update already happened when running the operator to create a constraint. Pull Request: https://projects.blender.org/blender/blender/pulls/122198
This commit is contained in:
parent
3afc0e5ed7
commit
b11ffad1df
1 changed files with 3 additions and 0 deletions
|
|
@ -1685,6 +1685,9 @@ static bConstraint *rna_Object_constraints_new(Object *object, Main *bmain, int
|
|||
ED_object_constraint_tag_update(bmain, object, new_con);
|
||||
WM_main_add_notifier(NC_OBJECT | ND_CONSTRAINT | NA_ADDED, object);
|
||||
|
||||
/* The Depsgraph needs to be updated to reflect the new relationship that was added. */
|
||||
DEG_relations_tag_update(bmain);
|
||||
|
||||
return new_con;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue