Fix T51501: Cycles baking cancel affects baking script

Basically upon invoking cycles baking we could canell it which would
leave G.is_break hanging as true. Since we were not setting is_break to
false before exec baking, it would misbehave.
This commit is contained in:
Dalai Felinto 2017-05-15 13:04:41 +02:00
parent df94f2f399
commit b60f80e9b3

@ -1172,6 +1172,9 @@ static int bake_exec(bContext *C, wmOperator *op)
BakeAPIRender bkr = {NULL};
Scene *scene = CTX_data_scene(C);
G.is_break = false;
G.is_rendering = true;
bake_set_props(op, scene);
bake_init_api_data(op, C, &bkr);
@ -1223,6 +1226,7 @@ static int bake_exec(bContext *C, wmOperator *op)
finally:
G.is_rendering = false;
BLI_freelistN(&bkr.selected_objects);
return result;
}