From a30bdcc142f1241a302107c637fd47be06073d76 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Thu, 3 Jan 2019 18:10:39 +0100 Subject: Fix T60022: Crash when adding grease pencil object to a collection disabled in viewport. See D4163 Thanks to Habib Gahbiche (@zazizizou) for the fix. --- source/blender/editors/include/ED_gpencil.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index fb216a8c9a9..c231d0dc355 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -220,13 +220,13 @@ void ED_gpencil_brush_draw_eraser(struct Brush *brush, int x, int y); /* ----------- Add Primitive Utilities -------------- */ -void ED_gpencil_create_monkey(struct bContext *C, float mat[4][4]); -void ED_gpencil_create_stroke(struct bContext *C, float mat[4][4]); +void ED_gpencil_create_monkey(struct bContext *C, struct Object *ob, float mat[4][4]); +void ED_gpencil_create_stroke(struct bContext *C, struct Object *ob, float mat[4][4]); /* ------------ Object Utilities ------------ */ struct Object *ED_gpencil_add_object( struct bContext *C, struct Scene *scene, const float loc[3], unsigned short local_view_bits); -void ED_gpencil_add_defaults(struct bContext *C); +void ED_gpencil_add_defaults(struct bContext *C, struct Object *ob); /* set object modes */ void ED_gpencil_setup_modes(struct bContext *C, struct bGPdata *gpd, int newmode); -- cgit v1.2.3