[Bf-blender-cvs] [d1a439f71db] greasepencil-object: GPencil: Avoid double geometry update when trace a stroke

Antonio Vazquez noreply at git.blender.org
Thu Aug 20 16:37:34 CEST 2020


Commit: d1a439f71db1443bbb1c294b33161be2da107857
Author: Antonio Vazquez
Date:   Thu Aug 20 16:13:20 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rBd1a439f71db1443bbb1c294b33161be2da107857

GPencil: Avoid double geometry update when trace a stroke

As the sample function is already calling the update function, it's not needed to call again.

===================================================================

M	source/blender/editors/gpencil/gpencil_trace_utils.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_trace_utils.c b/source/blender/editors/gpencil/gpencil_trace_utils.c
index e33657099fa..fff10a39082 100644
--- a/source/blender/editors/gpencil/gpencil_trace_utils.c
+++ b/source/blender/editors/gpencil/gpencil_trace_utils.c
@@ -348,10 +348,9 @@ void ED_gpencil_trace_data_to_strokes(Main *bmain,
           break;
       }
     }
-    /* Resample stroke. */
+    /* Resample stroke. Don't need to call to BKE_gpencil_stroke_geometry_update() because
+     * the sample function already call that. */
     BKE_gpencil_stroke_sample(gps, MAX2(sample, 0.001f), false);
-    /* Update geometry. */
-    BKE_gpencil_stroke_geometry_update(gps);
 
     path = path->next;
   }



More information about the Bf-blender-cvs mailing list