Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Wed, 13 Sep 2017 13:44:13 +0000 (23:44 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 13 Sep 2017 13:44:13 +0000 (23:44 +1000)
1  2 
source/blender/blenkernel/intern/action.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/object/object_bake_api.c
source/blender/editors/space_node/drawnode.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_userdef.c
tests/python/CMakeLists.txt

@@@ -626,8 -624,10 +626,10 @@@ static Mesh *bake_mesh_new_from_object(
        if (ob->mode & OB_MODE_EDIT)
                ED_object_editmode_load(ob);
  
 -      Mesh *me = BKE_mesh_new_from_object(bmain, scene, ob, 1, 2, 0, 0);
 +      Mesh *me = BKE_mesh_new_from_object(eval_ctx, bmain, scene, ob, 1, 2, 0, 0);
-       BKE_mesh_split_faces(me, true);
+       if (me->flag & ME_AUTOSMOOTH) {
+               BKE_mesh_split_faces(me, true);
+       }
  
        return me;
  }
@@@ -2154,24 -2204,18 +2154,25 @@@ static void node_composit_backdrop_view
        if (node->custom1 == 0) {
                const float backdropWidth = backdrop->x;
                const float backdropHeight = backdrop->y;
-               const float cx  = x + snode->zoom * backdropWidth * node->custom3;
+               const float cx = x + snode->zoom * backdropWidth  * node->custom3;
                const float cy = y + snode->zoom * backdropHeight * node->custom4;
+               const float cross_size = 12 * U.pixelsize;
  
 -              glColor3f(1.0, 1.0, 1.0);
 +              Gwn_VertFormat *format = immVertexFormat();
 +              unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
  
 -              glBegin(GL_LINES);
 -              glVertex2f(cx - cross_size, cy - cross_size);
 -              glVertex2f(cx + cross_size, cy + cross_size);
 -              glVertex2f(cx + cross_size, cy - cross_size);
 -              glVertex2f(cx - cross_size, cy + cross_size);
 -              glEnd();
 +              immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 +
 +              immUniformColor3f(1.0f, 1.0f, 1.0f);
 +
 +              immBegin(GWN_PRIM_LINES, 4);
-               immVertex2f(pos, cx - 25, cy - 25);
-               immVertex2f(pos, cx + 25, cy + 25);
-               immVertex2f(pos, cx + 25, cy - 25);
-               immVertex2f(pos, cx - 25, cy + 25);
++              immVertex2f(pos, cx - cross_size, cy - cross_size);
++              immVertex2f(pos, cx + cross_size, cy + cross_size);
++              immVertex2f(pos, cx + cross_size, cy - cross_size);
++              immVertex2f(pos, cx - cross_size, cy + cross_size);
 +              immEnd();
 +
 +              immUnbindProgram();
        }
  }
  
Simple merge