diff options
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_undo.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index c39a3aa5cfc..f9b479ca03d 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -43,7 +43,9 @@ #include "BKE_blender_undo.h" #include "BKE_context.h" +#include "BKE_global.h" #include "BKE_gpencil.h" +#include "BKE_main.h" #include "ED_gpencil.h" @@ -151,7 +153,7 @@ void gpencil_undo_push(bGPdata *gpd) /* create new undo node */ undo_node = MEM_callocN(sizeof(bGPundonode), "gpencil undo node"); - undo_node->gpd = gpencil_data_duplicate(gpd, true); + undo_node->gpd = gpencil_data_duplicate(G.main, gpd, true); cur_node = undo_node; diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index b2c6107ab61..d62625baaa4 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -552,8 +552,8 @@ bool gp_smooth_stroke(bGPDstroke *gps, int i, float inf, bool affect_pressure) } /* Only affect endpoints by a fraction of the normal strength, - * to prevent the stroke from shrinking too much - */ + * to prevent the stroke from shrinking too much + */ if ((i == 0) || (i == gps->totpoints - 1)) { inf *= 0.1f; } |