Merge branch 'master' into blender2.8

This commit is contained in:
Campbell Barton
2017-05-15 15:51:54 +10:00
7 changed files with 13 additions and 14 deletions

View File

@@ -165,12 +165,10 @@ def import_from_id(template_id, ignore_not_found=False):
def activate(template_id=None):
template_id_prev = _app_template["id"]
# not needed but may as well avoid activating same template
# ... in fact keep this, it will show errors early on!
"""
# not needed but may as well avoids redundant
# disable/enable for all add-ons on 'File -> New'
if template_id_prev == template_id:
return
"""
if template_id_prev:
_disable(template_id_prev)

View File

@@ -2244,8 +2244,9 @@ static void write_mesh(WriteData *wd, Mesh *mesh)
* outside of save process itself.
* Maybe we can live with this, though?
*/
mesh->totface = BKE_mesh_mpoly_to_mface(&mesh->fdata, &old_mesh->ldata, &old_mesh->pdata,
mesh->totface, old_mesh->totloop, old_mesh->totpoly);
mesh->totface = BKE_mesh_mpoly_to_mface(
&mesh->fdata, &old_mesh->ldata, &old_mesh->pdata,
mesh->totface, old_mesh->totloop, old_mesh->totpoly);
BKE_mesh_update_customdata_pointers(mesh, false);

View File

@@ -635,7 +635,7 @@ static void bm_mesh_loops_calc_normals(
BM_elem_flag_disable(l_curr, BM_ELEM_TAG);
} while ((l_curr = l_curr->next) != l_first);
}
bm->elem_index_dirty &= ~(BM_FACE|BM_LOOP);
bm->elem_index_dirty &= ~(BM_FACE | BM_LOOP);
/* We now know edges that can be smoothed (they are tagged), and edges that will be hard (they aren't).
* Now, time to generate the normals.

View File

@@ -898,7 +898,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
copy_v2_v2_int(mval, &ptc->x);
if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr + i) == 0) &&
(i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
(i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
{
interp_depth = true;
}

View File

@@ -589,7 +589,8 @@ void snode_set_context(const bContext *C)
}
if (snode->nodetree != ntree || snode->id != id || snode->from != from ||
(snode->treepath.last == NULL && ntree)) {
(snode->treepath.last == NULL && ntree))
{
ED_node_tree_start(snode, ntree, id, from);
}
}

View File

@@ -1753,7 +1753,7 @@ static void rna_SceneRenderLayer_pass_update(Main *bmain, Scene *activescene, Po
static void rna_SceneRenderLayer_update_render_passes(ID *id)
{
Scene *scene = (Scene*) id;
Scene *scene = (Scene *)id;
if (scene->nodetree)
ntreeCompositUpdateRLayers(scene->nodetree);
}

View File

@@ -351,9 +351,9 @@ void node_cmp_rlayers_outputs(bNodeTree *ntree, bNode *node)
cmp_node_image_verify_outputs(ntree, node, true);
}
const char* node_cmp_rlayers_sock_to_pass(int sock_index)
const char *node_cmp_rlayers_sock_to_pass(int sock_index)
{
const char* sock_to_passname[] = {
const char *sock_to_passname[] = {
RE_PASSNAME_COMBINED, RE_PASSNAME_COMBINED,
RE_PASSNAME_Z, RE_PASSNAME_NORMAL, RE_PASSNAME_UV, RE_PASSNAME_VECTOR, RE_PASSNAME_RGBA,
RE_PASSNAME_DIFFUSE, RE_PASSNAME_SPEC, RE_PASSNAME_SHADOW, RE_PASSNAME_AO,
@@ -378,8 +378,7 @@ static void node_composit_init_rlayers(const bContext *C, PointerRNA *ptr)
node->id = &scene->id;
for (bNodeSocket *sock = node->outputs.first; sock; sock = sock->next, sock_index++)
{
for (bNodeSocket *sock = node->outputs.first; sock; sock = sock->next, sock_index++) {
NodeImageLayer *sockdata = MEM_callocN(sizeof(NodeImageLayer), "node image layer");
sock->storage = sockdata;