Cleanup: warnings, style
This commit is contained in:
@@ -1985,6 +1985,8 @@ void BKE_pose_rebuild_ex(Object *ob, bArmature *arm, const bool sort_bones)
|
||||
if (counter > 1 && sort_bones) {
|
||||
DAG_pose_sort(ob);
|
||||
}
|
||||
#else
|
||||
UNUSED_VARS(sort_bones);
|
||||
#endif
|
||||
|
||||
ob->pose->flag &= ~POSE_RECALC;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -894,7 +894,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;
|
||||
}
|
||||
|
||||
@@ -581,7 +581,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1732,7 +1732,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);
|
||||
}
|
||||
|
||||
@@ -107,8 +107,8 @@ static void cmp_node_image_add_pass_output(bNodeTree *ntree, bNode *node,
|
||||
|
||||
BLI_strncpy(sockdata->pass_name, passname, sizeof(sockdata->pass_name));
|
||||
|
||||
sock_index = BLI_listbase_count(&node->outputs)-1;
|
||||
if (sock_index != after_index+1) {
|
||||
sock_index = BLI_listbase_count(&node->outputs) - 1;
|
||||
if (sock_index != after_index + 1) {
|
||||
bNodeSocket *after_sock = BLI_findlink(&node->outputs, after_index);
|
||||
BLI_remlink(&node->outputs, sock);
|
||||
BLI_insertlinkafter(&node->outputs, after_sock, sock);
|
||||
@@ -218,9 +218,9 @@ static void cmp_node_rlayer_create_outputs(bNodeTree *ntree, bNode *node, LinkNo
|
||||
|
||||
if (scene) {
|
||||
RenderEngineType *engine_type = RE_engines_find(scene->r.engine);
|
||||
if(engine_type && engine_type->update_render_passes) {
|
||||
if (engine_type && engine_type->update_render_passes) {
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, node->custom1);
|
||||
if(srl) {
|
||||
if (srl) {
|
||||
RLayerUpdateData *data = MEM_mallocN(sizeof(RLayerUpdateData), "render layer update data");
|
||||
data->available_sockets = available_sockets;
|
||||
data->prev_index = -1;
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user