diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-05-15 14:04:41 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-05-15 14:04:44 +0300 |
commit | b60f80e9b312fa152205fcfc0ed8670c1ce7c63d (patch) | |
tree | d38b9dd63e3d288f9cbff576222bbd512fd9659e | |
parent | df94f2f399b7e008fb5c5a1e8865fb659d67e23f (diff) |
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.
-rw-r--r-- | source/blender/editors/object/object_bake_api.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 968081818a2..14224e9c939 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -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; } |