Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-01-03 20:10:39 +0300
committerAntonioya <blendergit@gmail.com>2019-01-03 20:12:25 +0300
commita30bdcc142f1241a302107c637fd47be06073d76 (patch)
treefb35779851e20dc36984d8d41139298e65b720c4 /source/blender/editors/object
parent4b2198a96ac368fa5f2a353c7c148e015246cccf (diff)
Fix T60022: Crash when adding grease pencil object to a collection disabled in viewport.
See D4163 Thanks to Habib Gahbiche (@zazizizou) for the fix.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 316d581870d..6be1afdcb2a 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1030,7 +1030,7 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
mul_v3_fl(mat[1], radius);
mul_v3_fl(mat[2], radius);
- ED_gpencil_create_stroke(C, mat);
+ ED_gpencil_create_stroke(C, ob, mat);
break;
}
case GP_MONKEY:
@@ -1043,7 +1043,7 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
mul_v3_fl(mat[1], radius);
mul_v3_fl(mat[2], radius);
- ED_gpencil_create_monkey(C, mat);
+ ED_gpencil_create_monkey(C, ob, mat);
break;
}
case GP_EMPTY:
@@ -1057,7 +1057,7 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
/* if this is a new object, initialise default stuff (colors, etc.) */
if (newob) {
- ED_gpencil_add_defaults(C);
+ ED_gpencil_add_defaults(C, ob);
}
return OPERATOR_FINISHED;