Merge branch 'master' into blender2.8
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 16 Mar 2018 03:16:21 +0000 (04:16 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 16 Mar 2018 03:35:37 +0000 (04:35 +0100)
1  2 
intern/cycles/render/buffers.cpp
intern/ghost/CMakeLists.txt
intern/ghost/intern/GHOST_WindowX11.cpp
source/blender/editors/io/io_alembic.c
source/blender/editors/render/render_internal.c
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/source/pipeline.c

Simple merge
Simple merge
index ca4ab30a08d74791d656575a9820109123439261,08181af2ef316cfcb56656ca8a2fb7beb1c021af..b584782e183d1fa0869fa7386cb8c41609aff274
@@@ -543,6 -545,22 +545,12 @@@ static int wm_alembic_import_exec(bCont
                }
        }
  
 -      /* Switch to object mode to avoid being stuck in other modes (T54326). */
 -      if (CTX_data_mode_enum(C) != CTX_MODE_OBJECT) {
 -              Object *obedit = CTX_data_edit_object(C);
 -
 -              if (obedit != NULL) {
 -                      ED_object_mode_toggle(C, obedit->mode);
 -              }
 -              else {
 -                      Object *ob = CTX_data_active_object(C);
 -
 -                      if (ob) {
 -                              ED_object_mode_toggle(C, ob->mode);
 -                      }
 -              }
++      /* Switch out of edit mode to avoid being stuck in it (T54326). */
++      Object *obedit = CTX_data_edit_object(C);
++      if (obedit) {
++              ED_object_mode_toggle(C, OB_MODE_EDIT);
+       }
        bool ok = ABC_import(C, filename, scale, is_sequence, set_frame_range,
                             sequence_len, offset, validate_meshes,
                             as_background_job);
index 33c633c76bc40328dd7a0f20c811b2bf1466dc3d,e17a503cd4ec4b1324a59779b62ccb9cfff86558..170cd0ad41997984561bb9d947752e10135d83e9
@@@ -268,23 -269,30 +273,30 @@@ RenderResult *RE_MultilayerConvert(voi
  
  RenderLayer *render_get_active_layer(Render *re, RenderResult *rr)
  {
-       RenderLayer *rl = BLI_findlink(&rr->layers, re->active_view_layer);
-       
-       if (rl)
-               return rl;
-       else 
-               return rr->layers.first;
 -      SceneRenderLayer *srl = BLI_findlink(&re->r.layers, re->r.actlay);
++      ViewLayer *view_layer = BLI_findlink(&re->view_layers, re->active_view_layer);
 -      if (srl) {
++      if (view_layer) {
+               RenderLayer *rl = BLI_findstring(&rr->layers,
 -                                               srl->name,
++                                               view_layer->name,
+                                                offsetof(RenderLayer, name));
+               if (rl) {
+                       return rl;
+               }
+       }
+       return rr->layers.first;
  }
  
 -static int render_scene_needs_vector(Render *re)
 +static int UNUSED_FUNCTION(render_scene_needs_vector)(Render *re)
  {
 -      SceneRenderLayer *srl;
 -      
 -      for (srl = re->r.layers.first; srl; srl = srl->next)
 -              if (!(srl->layflag & SCE_LAY_DISABLE))
 -                      if (srl->passflag & SCE_PASS_VECTOR)
 +      ViewLayer *view_layer;
 +      for (view_layer = re->view_layers.first; view_layer; view_layer = view_layer->next)
 +              if (view_layer->flag & VIEW_LAYER_RENDER) {
 +                      if (view_layer->passflag & SCE_PASS_VECTOR) {
                                return 1;
 -
 +                      }
 +              }
        return 0;
  }