[Bf-blender-cvs] [09c900b1bf3] greasepencil-object: Fix error drawing with no object active
Antonio Vazquez
noreply at git.blender.org
Mon Apr 30 16:18:47 CEST 2018
Commit: 09c900b1bf3502474e569ca82ddfe7dd84c4630a
Author: Antonio Vazquez
Date: Mon Apr 30 16:18:34 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB09c900b1bf3502474e569ca82ddfe7dd84c4630a
Fix error drawing with no object active
===================================================================
M source/blender/editors/gpencil/gpencil_paint.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index ced48f8c8ac..f7941af26d3 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1616,7 +1616,6 @@ static bool gp_session_initdata(bContext *C, wmOperator *op, tGPsdata *p)
p->bmain = CTX_data_main(C);
p->scene = CTX_data_scene(C);
p->graph = CTX_data_depsgraph(C);
- p->ob = CTX_data_active_object(C);
p->win = CTX_wm_window(C);
p->disable_fill = RNA_boolean_get(op->ptr, "disable_fill");
@@ -1677,6 +1676,9 @@ static bool gp_session_initdata(bContext *C, wmOperator *op, tGPsdata *p)
p->scene->gp_object = obact;
}
}
+ /* assign object after all checks to be sure we have one active */
+ p->ob = obact;
+
break;
}
case SPACE_NODE:
More information about the Bf-blender-cvs
mailing list