style cleanup
This commit is contained in:
@@ -75,7 +75,7 @@ void calcAlpha(ImBuf * ibuf)
|
||||
|
||||
if (ibuf) {
|
||||
rect = (char *) ibuf->rect;
|
||||
for (i = ibuf->x * ibuf->y ; i > 0 ; i--) {
|
||||
for (i = ibuf->x * ibuf->y; i > 0; i--) {
|
||||
rect[3] = MAX3(rect[0], rect[1], rect[2]);
|
||||
rect += 4;
|
||||
}
|
||||
|
||||
@@ -851,7 +851,7 @@ makebreak:
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
// if ((mem[j]!='\r') && (mem[j]!='\n') && (mem[j])) {
|
||||
// if ((mem[j] != '\r') && (mem[j] != '\n') && (mem[j])) {
|
||||
ct->xof += ct->charnr * linedata[ct->linenr];
|
||||
// }
|
||||
ct++;
|
||||
|
||||
@@ -2227,7 +2227,7 @@ static ImBuf *seq_render_scene_strip(
|
||||
/* for old scened this can be uninitialized,
|
||||
* should probably be added to do_versions at some point if the functionality stays */
|
||||
if (context.scene->r.seq_prev_type == 0)
|
||||
context.scene->r.seq_prev_type = 3 /* ==OB_SOLID */;
|
||||
context.scene->r.seq_prev_type = 3 /* == OB_SOLID */;
|
||||
|
||||
/* opengl offscreen render */
|
||||
BKE_scene_update_for_newframe(context.bmain, scene, scene->lay);
|
||||
|
||||
@@ -261,7 +261,9 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size
|
||||
{
|
||||
int len=0;
|
||||
|
||||
if (dst_w==NULL || src_c==NULL) return(0);
|
||||
if (dst_w == NULL || src_c == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*src_c && len < maxcpy) {
|
||||
size_t step= 0;
|
||||
|
||||
@@ -104,7 +104,7 @@ void add_memfilechunk(MemFile *compare, MemFile *current, const char *buf, unsig
|
||||
static MemFileChunk *compchunk = NULL;
|
||||
MemFileChunk *curchunk;
|
||||
|
||||
/* this function inits when compare != NULL or when current==NULL */
|
||||
/* this function inits when compare != NULL or when current == NULL */
|
||||
if (compare) {
|
||||
compchunk = compare->chunks.first;
|
||||
return;
|
||||
|
||||
@@ -1312,7 +1312,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
|
||||
*
|
||||
*/
|
||||
|
||||
/* Here we check for consistancy and create 2 edges */
|
||||
/* Here we check for consistency and create 2 edges */
|
||||
if (totf == 0 && totv >= 4 && totv == tote + 2) {
|
||||
/* find a free standing vertex and 2 endpoint verts */
|
||||
BMVert *v_free = NULL, *v_a = NULL, *v_b = NULL;
|
||||
|
||||
@@ -105,7 +105,8 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
|
||||
VariableSizeBokehBlurOperation *operation = new VariableSizeBokehBlurOperation();
|
||||
if (data->preview) {
|
||||
operation->setQuality(COM_QUALITY_LOW);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
operation->setQuality(context->getQuality());
|
||||
}
|
||||
operation->setMaxBlur(data->maxblur);
|
||||
|
||||
@@ -156,7 +156,8 @@ bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
|
||||
newInput.xmin = input->xmin - (this->m_size * this->getWidth() / 100.0f);
|
||||
newInput.ymax = input->ymax + (this->m_size * this->getWidth() / 100.0f);
|
||||
newInput.ymin = input->ymin - (this->m_size * this->getWidth() / 100.0f);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
newInput.xmax = input->xmax + (10.0f * this->getWidth() / 100.0f);
|
||||
newInput.xmin = input->xmin - (10.0f * this->getWidth() / 100.0f);
|
||||
newInput.ymax = input->ymax + (10.0f * this->getWidth() / 100.0f);
|
||||
|
||||
@@ -50,7 +50,8 @@ bool CombineChannelsOperation::determineDependingAreaOfInterest(rcti *input, Rea
|
||||
output->xmax = tempOutput.xmax;
|
||||
output->ymax = tempOutput.ymax;
|
||||
first = false;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
output->xmin = MIN2(output->xmin, tempOutput.xmin);
|
||||
output->ymin = MIN2(output->ymin, tempOutput.ymin);
|
||||
output->xmax = MAX2(output->xmax, tempOutput.xmax);
|
||||
|
||||
@@ -286,7 +286,8 @@ void GaussianBlurReferenceOperation::executePixel(float *color, int x, int y, vo
|
||||
|
||||
if (refradx == 1 && refrady == 1) {
|
||||
memorybuffer->readNoCheck(color, x, y);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
int minxr = x - refradx < 0 ? -x : -refradx;
|
||||
int maxxr = x + refradx > imgx ? imgx - x : refradx;
|
||||
int minyr = y - refrady < 0 ? -y : -refrady;
|
||||
|
||||
@@ -78,7 +78,8 @@ bool ProjectorLensDistortionOperation::determineDependingAreaOfInterest(rcti *in
|
||||
newInput.ymin = input->ymin;
|
||||
newInput.xmin = input->xmin - this->m_kr2 - 2;
|
||||
newInput.xmax = input->xmax + this->m_kr2 + 2;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
newInput.xmin = input->xmin - 7; /* (0.25f * 20 * 1) + 2 == worse case dispersion */
|
||||
newInput.ymin = input->ymin;
|
||||
newInput.ymax = input->ymax;
|
||||
|
||||
@@ -4775,7 +4775,7 @@ static void envelope_bone_weighting(Object *ob, Mesh *mesh, float (*verts)[3], i
|
||||
distance = distfactor_to_bone(verts[i], root[j], tip[j],
|
||||
bone->rad_head * scale, bone->rad_tail * scale, bone->dist * scale);
|
||||
|
||||
/* add the vert to the deform group if weight!=0.0 */
|
||||
/* add the vert to the deform group if (weight != 0.0) */
|
||||
if (distance != 0.0f)
|
||||
ED_vgroup_vert_add(ob, dgroup, i, distance, WEIGHT_REPLACE);
|
||||
else
|
||||
|
||||
@@ -1427,8 +1427,8 @@ void CURVE_OT_separate(wmOperatorType *ot)
|
||||
|
||||
static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
|
||||
{
|
||||
/* return u!=-1: 1 row in u-direction selected. U has value between 0-pntsv
|
||||
* return v!=-1: 1 column in v-direction selected. V has value between 0-pntsu
|
||||
/* return (u != -1): 1 row in u-direction selected. U has value between 0-pntsv
|
||||
* return (v != -1): 1 column in v-direction selected. V has value between 0-pntsu
|
||||
*/
|
||||
BPoint *bp;
|
||||
int a, b, sel;
|
||||
|
||||
@@ -416,7 +416,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
|
||||
|
||||
if (nr == OBJECT_SELECT_LINKED_IPO) {
|
||||
// XXX old animation system
|
||||
//if (ob->ipo==0) return OPERATOR_CANCELLED;
|
||||
//if (ob->ipo == 0) return OPERATOR_CANCELLED;
|
||||
//object_select_all_by_ipo(C, ob->ipo)
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
@@ -705,7 +705,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
|
||||
}
|
||||
else {
|
||||
/* validate owner */
|
||||
//if (ri->rect==NULL)
|
||||
//if (ri->rect == NULL)
|
||||
// ri->rect= MEM_mallocN(sizeof(int)*ri->pr_rectx*ri->pr_recty, "BIF_previewrender");
|
||||
//RE_ResultGet32(re, ri->rect);
|
||||
}
|
||||
|
||||
@@ -1297,7 +1297,7 @@ void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space)
|
||||
if (swap_space == 1) {
|
||||
SWAP(ListBase, sa1->spacedata, sa2->spacedata);
|
||||
/* exception: ensure preview is reset */
|
||||
// if (sa1->spacetype==SPACE_VIEW3D)
|
||||
// if (sa1->spacetype == SPACE_VIEW3D)
|
||||
// XXX BIF_view3d_previewrender_free(sa1->spacedata.first);
|
||||
}
|
||||
else if (swap_space == 2) {
|
||||
|
||||
@@ -1483,7 +1483,7 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene)
|
||||
|
||||
if (!v3d->camera || !BKE_scene_base_find(scene, v3d->camera)) {
|
||||
v3d->camera = BKE_scene_camera_find(sc->scene);
|
||||
// XXX if (sc==curscreen) handle_view3d_lock();
|
||||
// XXX if (sc == curscreen) handle_view3d_lock();
|
||||
if (!v3d->camera) {
|
||||
ARegion *ar;
|
||||
for (ar = v3d->regionbase.first; ar; ar = ar->next) {
|
||||
|
||||
@@ -1461,7 +1461,7 @@ static float project_paint_uvpixel_mask(
|
||||
|
||||
/* This only works when the opacity dosnt change while painting, stylus pressure messes with this
|
||||
* so don't use it. */
|
||||
// if (ps->is_airbrush==0) mask *= BKE_brush_alpha_get(ps->brush);
|
||||
// if (ps->is_airbrush == 0) mask *= BKE_brush_alpha_get(ps->brush);
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
|
||||
|
||||
// XXX: restore the case below if not enough updates occur...
|
||||
//default:
|
||||
// if (wmn->data==ND_KEYS)
|
||||
// if (wmn->data == ND_KEYS)
|
||||
// ED_area_tag_redraw(sa);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
|
||||
else id_lib_extern(&ima->id);
|
||||
|
||||
/* we also need to correct the aspect of uvs */
|
||||
if(tf->unwrap & TF_CORRECT_ASPECT) {
|
||||
if (tf->unwrap & TF_CORRECT_ASPECT) {
|
||||
BMIter liter;
|
||||
BMLoop *l;
|
||||
|
||||
|
||||
@@ -660,10 +660,11 @@ static void p_flush_uvs(PHandle *handle, PChart *chart)
|
||||
}
|
||||
|
||||
for (f = chart->faces; f; f = f->nextlink) {
|
||||
if(f->unwrap_flag) {
|
||||
if (f->unwrap_flag) {
|
||||
if (handle->do_aspect) {
|
||||
*f->unwrap_flag |= TF_CORRECT_ASPECT;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
*f->unwrap_flag &= ~TF_CORRECT_ASPECT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,7 +678,8 @@ void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float * frect, int
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, rectw, recth, 0, GL_RGBA, GL_UNSIGNED_BYTE, pix);
|
||||
|
||||
glGenerateMipmapEXT(GL_TEXTURE_2D);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (use_high_bit_depth)
|
||||
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA16, rectw, recth, GL_RGBA, GL_FLOAT, frect);
|
||||
else
|
||||
|
||||
@@ -2155,10 +2155,10 @@ static PyObject *bpy_bmelemseq_sort(BPy_BMElemSeq *self, PyObject *args, PyObjec
|
||||
BPY_BM_CHECK_OBJ(self);
|
||||
|
||||
if (args != NULL) {
|
||||
if(!PyArg_ParseTupleAndKeywords(args, kw,
|
||||
"|Oi:BMElemSeq.sort",
|
||||
(char **)kwlist,
|
||||
&keyfunc, &reverse))
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kw,
|
||||
"|Oi:BMElemSeq.sort",
|
||||
(char **)kwlist,
|
||||
&keyfunc, &reverse))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void),
|
||||
obr= RE_addRenderObject(re, NULL, NULL, 0, 0, 0);
|
||||
|
||||
for (x = sx, fx = sx * stargrid; x <= ex; x++, fx += stargrid) {
|
||||
for (y = sy, fy = sy * stargrid; y <= ey ; y++, fy += stargrid) {
|
||||
for (y = sy, fy = sy * stargrid; y <= ey; y++, fy += stargrid) {
|
||||
for (z = sz, fz = sz * stargrid; z <= ez; z++, fz += stargrid) {
|
||||
|
||||
BLI_srand((hash[z & 0xff] << 24) + (hash[y & 0xff] << 16) + (hash[x & 0xff] << 8));
|
||||
|
||||
@@ -346,7 +346,7 @@ static void wait_for_console_key(void)
|
||||
HANDLE hConsoleInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
|
||||
if (!ELEM(hConsoleInput, NULL, INVALID_HANDLE_VALUE) && FlushConsoleInputBuffer(hConsoleInput)) {
|
||||
for(;;) {
|
||||
for (;;) {
|
||||
INPUT_RECORD buffer;
|
||||
DWORD ignored;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user