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

index eb2d1117f1ece9bb32e961c81c5e3f59d468f0f0,d25730d7c109bf8a2ddc07a5f6b2de8dc96a0229..0a4989ebad43c872b9aeb963c4020305a3e58d18
@@@ -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;
  }
index bee2379cd8195523fc6dc2fd23f5648ea9bf8f6f,7ef34669ee2a9790e837ac1d5b227c7ac86a68f9..67584fbe1f152667d9106bc43ac406a384758d18
@@@ -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