[Bf-blender-cvs] [37d8d4787cf] blender2.8: Merge branch 'master' into blender2.8
Campbell Barton
noreply at git.blender.org
Wed Sep 13 15:34:36 CEST 2017
Commit: 37d8d4787cfa3d04b09f935c5600f1a3ea7b74e7
Author: Campbell Barton
Date: Wed Sep 13 23:44:13 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB37d8d4787cfa3d04b09f935c5600f1a3ea7b74e7
Merge branch 'master' into blender2.8
===================================================================
===================================================================
diff --cc source/blender/editors/object/object_bake_api.c
index eb2d1117f1e,d25730d7c10..0a4989ebad4
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@@ -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;
}
diff --cc source/blender/editors/space_node/drawnode.c
index bee2379cd81,7ef34669ee2..67584fbe1f1
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@@ -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();
}
}
More information about the Bf-blender-cvs
mailing list