Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / transform / transform_conversions.c
index 2139dba8a798d29dc983472b068361b8252e8572..137f7c1656a9eeef68f355c4ca8722261583477e 100644 (file)
@@ -818,6 +818,7 @@ static void pose_grab_with_ik_clear(Object *ob)
        bKinematicConstraint *data;
        bPoseChannel *pchan;
        bConstraint *con, *next;
+       bool need_dependency_update = false;
 
        for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
                /* clear all temporary lock flags */
@@ -832,6 +833,7 @@ static void pose_grab_with_ik_clear(Object *ob)
                                data = con->data;
                                if (data->flag & CONSTRAINT_IK_TEMP) {
                                        /* iTaSC needs clear for removed constraints */
+                                       need_dependency_update = true;
                                        BIK_clear_data(ob->pose);
 
                                        BLI_remlink(&pchan->constraints, con);
@@ -847,10 +849,10 @@ static void pose_grab_with_ik_clear(Object *ob)
        }
 
 #ifdef WITH_LEGACY_DEPSGRAPH
-       if (!DEG_depsgraph_use_legacy())
+       if (!DEG_depsgraph_use_legacy() && need_dependency_update)
 #endif
        {
-               /* TODO(sergey): Consuder doing partial update only. */
+               /* TODO(sergey): Consider doing partial update only. */
                DAG_relations_tag_update(G.main);
        }
 }
@@ -7622,7 +7624,9 @@ static void createTransGPencil(bContext *C, TransInfo *t)
                                                                copy_m3_m3(td->mtx, mtx);
                                                                unit_m3(td->axismtx); // XXX?
                                                        }
-                                                       
+                                                       /* Triangulation must be calculated again, so save the stroke for recalc function */
+                                                       td->extra = gps;
+
                                                        td++;
                                                        tail++;
                                                }