forked from bartvdbraak/blender
Fix for crash when using undo during sketching session.
Currently, grease pencil conflicts with such operators as undo and set object mode which makes behavior totally unpredictable and crash for some cases. The only way to solve this proper is to ger rid of pointers to data which can chage stored in operator custom data.
This commit is contained in:
parent
9c9cd71a86
commit
944cdf04dd
@ -1615,7 +1615,12 @@ static int gpencil_area_exists(bContext *C, ScrArea *satest)
|
|||||||
static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
|
static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
|
||||||
{
|
{
|
||||||
tGPsdata *p= op->customdata;
|
tGPsdata *p= op->customdata;
|
||||||
int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */
|
//int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */
|
||||||
|
/* currently, grease pencil conflicts with such operators as undo and set object mode
|
||||||
|
which makes behavior of operator totally unpredictable and crash for some cases.
|
||||||
|
the only way to solve this proper is to ger rid of pointers to data which can
|
||||||
|
chage stored in operator custom data (sergey) */
|
||||||
|
int estate = OPERATOR_RUNNING_MODAL;
|
||||||
|
|
||||||
// if (event->type == NDOF_MOTION)
|
// if (event->type == NDOF_MOTION)
|
||||||
// return OPERATOR_PASS_THROUGH;
|
// return OPERATOR_PASS_THROUGH;
|
||||||
|
Loading…
Reference in New Issue
Block a user