Code cleanup: style

This commit is contained in:
Campbell Barton 2014-05-09 18:29:21 +10:00
parent 663c800ef3
commit 164841e30e
8 changed files with 24 additions and 23 deletions

View File

@ -1593,7 +1593,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
continue;
}
if (sculpt_mode &&
(!has_multires || multires_applied || sculpt_dyntopo))
(!has_multires || multires_applied || sculpt_dyntopo))
{
bool unsupported = false;

View File

@ -2589,8 +2589,7 @@ void DAG_ids_check_recalc(Main *bmain, Scene *scene, bool time)
/* we tag based on first ID type character to avoid
* looping over all ID's in case there are no tags */
if (id && bmain->id_tag_update[id->name[0]])
{
if (id && bmain->id_tag_update[id->name[0]]) {
updated = true;
break;
}

View File

@ -573,7 +573,7 @@ static bool sculpt_modifiers_active(Scene *scene, Sculpt *sd, Object *ob)
* \param need_mask So the DerivedMesh thats returned has mask data
*/
void BKE_sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob,
bool need_pmap, bool need_mask)
bool need_pmap, bool need_mask)
{
DerivedMesh *dm;
SculptSession *ss = ob->sculpt;
@ -688,14 +688,14 @@ int BKE_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd)
int i, j;
gmask = CustomData_add_layer(&me->ldata, CD_GRID_PAINT_MASK,
CD_CALLOC, NULL, me->totloop);
CD_CALLOC, NULL, me->totloop);
for (i = 0; i < me->totloop; i++) {
GridPaintMask *gpm = &gmask[i];
gpm->level = level;
gpm->data = MEM_callocN(sizeof(float) * gridarea,
"GridPaintMask.data");
"GridPaintMask.data");
}
/* if vertices already have mask, copy into multires data */
@ -720,9 +720,9 @@ int BKE_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd)
gpm->data[0] = avg;
gpm->data[1] = (paint_mask[l->v] +
paint_mask[next->v]) * 0.5f;
paint_mask[next->v]) * 0.5f;
gpm->data[2] = (paint_mask[l->v] +
paint_mask[prev->v]) * 0.5f;
paint_mask[prev->v]) * 0.5f;
gpm->data[3] = paint_mask[l->v];
}
}
@ -734,7 +734,7 @@ int BKE_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd)
/* create vertex paint mask layer if there isn't one already */
if (!paint_mask) {
CustomData_add_layer(&me->vdata, CD_PAINT_MASK,
CD_CALLOC, NULL, me->totvert);
CD_CALLOC, NULL, me->totvert);
ret |= SCULPT_MASK_LAYER_CALC_VERT;
}

View File

@ -83,9 +83,9 @@ void MathNode::convertToOperations(NodeConverter &converter, const CompositorCon
case 17: /* Modulo */
operation = new MathModuloOperation();
break;
case 18: /* Absolute Value */
operation = new MathAbsoluteOperation();
break;
case 18: /* Absolute Value */
operation = new MathAbsoluteOperation();
break;
}
if (operation) {

View File

@ -3291,7 +3291,8 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
break;
}
else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE) ||
WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_BAKE)) {
WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_BAKE))
{
/* Skip bake jobs in compositor to avoid compo header displaying
* progress bar which is not being updated (bake jobs only need
* to update NC_IMAGE context.

View File

@ -216,11 +216,11 @@ static void node_shader_exec_math(void *UNUSED(data), int UNUSED(thread), bNode
r = fmod(a, b);
break;
}
case 18: /* Absolute */
{
r = fabs(a);
break;
}
case 18: /* Absolute */
{
r = fabs(a);
break;
}
}
out[0]->vec[0] = r;

View File

@ -183,11 +183,11 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
break;
}
case 18: /* Absolute */
{
*out = fabs(in0);
break;
}
case 18: /* Absolute */
{
*out = fabs(in0);
break;
}
default:
{

View File

@ -486,6 +486,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void)
default:
break;
}
break;
}
default:
break;