style cleanup
This commit is contained in:
parent
96b024333e
commit
6701933f5c
@ -2769,7 +2769,7 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
|
||||
for (b = 0; b < gattribs->totlayer; b++) {
|
||||
if (gattribs->layer[b].type == CD_MTFACE) {
|
||||
/* uv coordinates */
|
||||
if(dm->type == DM_TYPE_EDITBMESH) {
|
||||
if (dm->type == DM_TYPE_EDITBMESH) {
|
||||
/* exception .. */
|
||||
CustomData *ldata = dm->getLoopDataLayout(dm);
|
||||
|
||||
@ -2806,7 +2806,7 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs,
|
||||
}
|
||||
}
|
||||
else if (gattribs->layer[b].type == CD_MCOL) {
|
||||
if(dm->type == DM_TYPE_EDITBMESH) {
|
||||
if (dm->type == DM_TYPE_EDITBMESH) {
|
||||
/* exception .. */
|
||||
CustomData *ldata = dm->getLoopDataLayout(dm);
|
||||
|
||||
|
@ -1561,7 +1561,7 @@ static void do_nla(Scene *scene, Object *ob, int blocktype)
|
||||
}
|
||||
}
|
||||
/* To handle repeat, we add 0.1 frame extra to make sure the last frame is included */
|
||||
else {
|
||||
else {
|
||||
|
||||
/* Mod to repeat */
|
||||
if (strip->repeat!=1.0f) {
|
||||
|
@ -635,7 +635,7 @@ int where_on_path(Object *ob, float ctime, float vec[4], float dir[3], float qua
|
||||
p3= pp + s3;
|
||||
|
||||
/* note, commented out for follow constraint */
|
||||
//if(cu->flag & CU_FOLLOW) {
|
||||
//if (cu->flag & CU_FOLLOW) {
|
||||
|
||||
key_curve_tangent_weights(1.0f-fac, data, KEY_BSPLINE);
|
||||
|
||||
|
@ -1254,7 +1254,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
|
||||
|
||||
madd_v3_v3fl(pa->state.vel, acc, dtime);
|
||||
|
||||
//if(bpa->data.mode != eBoidMode_InAir)
|
||||
//if (bpa->data.mode != eBoidMode_InAir)
|
||||
bpa->ground = boid_find_ground(bbd, pa, ground_co, ground_nor);
|
||||
|
||||
/* change modes, constrain movement & keep track of down vector */
|
||||
|
@ -700,7 +700,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
|
||||
GPU_normal_setup( dm );
|
||||
GPU_uv_setup( dm );
|
||||
if ( col != NULL ) {
|
||||
/*if( realcol && dm->drawObject->colType == CD_TEXTURE_MCOL ) {
|
||||
/*if ( realcol && dm->drawObject->colType == CD_TEXTURE_MCOL ) {
|
||||
col = 0;
|
||||
}
|
||||
else if ( mcol && dm->drawObject->colType == CD_MCOL ) {
|
||||
|
@ -1803,7 +1803,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
|
||||
while (base) {
|
||||
BLI_remlink(&sce->base,base);
|
||||
BLI_addhead(&tempbase,base);
|
||||
//if(G.debug & G_DEBUG)
|
||||
//if (G.debug & G_DEBUG)
|
||||
printf("cyclic %s\n", base->object->id.name);
|
||||
base = sce->base.first;
|
||||
}
|
||||
|
@ -3337,7 +3337,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
|
||||
else if (brush->ray_dir == MOD_DPAINT_RAY_BRUSH_AVG) {
|
||||
copy_v3_v3(proj_ray, avg_brushNor);
|
||||
}
|
||||
else { /* MOD_DPAINT_RAY_ZPLUS */
|
||||
else { /* MOD_DPAINT_RAY_ZPLUS */
|
||||
proj_ray[2] = 1.0f;
|
||||
}
|
||||
hit.index = -1;
|
||||
|
@ -1320,7 +1320,7 @@ static void emDM_getVert(DerivedMesh *dm, int index, MVert *vert_r)
|
||||
ev = BM_vert_at_index(bmdm->tc->bm, index); /* warning, does list loop, _not_ ideal */
|
||||
|
||||
bmvert_to_mvert(bmdm->tc->bm, ev, vert_r);
|
||||
if(bmdm->vertexCos)
|
||||
if (bmdm->vertexCos)
|
||||
copy_v3_v3(vert_r->co, bmdm->vertexCos[index]);
|
||||
}
|
||||
|
||||
|
@ -622,7 +622,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
|
||||
ret = psys_get_particle_state(&sim, *efd->index, &state, 0);
|
||||
|
||||
/* TODO */
|
||||
//if(eff->pd->forcefiled == PFIELD_HARMONIC && ret==0) {
|
||||
//if (eff->pd->forcefiled == PFIELD_HARMONIC && ret==0) {
|
||||
// if (pa->dietime < eff->psys->cfra)
|
||||
// eff->flag |= PE_VELOCITY_TO_IMPULSE;
|
||||
//}
|
||||
|
@ -1695,7 +1695,7 @@ static int psys_map_index_on_dm(DerivedMesh *dm, int from, int index, int index_
|
||||
|
||||
*mapindex = index;
|
||||
}
|
||||
else { /* FROM_FACE/FROM_VOLUME */
|
||||
else { /* FROM_FACE/FROM_VOLUME */
|
||||
if (index >= dm->getNumTessFaces(dm))
|
||||
return 0;
|
||||
|
||||
@ -1713,7 +1713,7 @@ static int psys_map_index_on_dm(DerivedMesh *dm, int from, int index, int index_
|
||||
|
||||
*mapindex = index_dmcache;
|
||||
}
|
||||
else { /* FROM_FACE/FROM_VOLUME */
|
||||
else { /* FROM_FACE/FROM_VOLUME */
|
||||
/* find a face on the derived mesh that uses this face */
|
||||
MFace *mface;
|
||||
OrigSpaceFace *osface;
|
||||
|
@ -1479,7 +1479,7 @@ void psys_threads_free(ParticleThread *threads)
|
||||
if (ctx->index) MEM_freeN(ctx->index);
|
||||
if (ctx->skip) MEM_freeN(ctx->skip);
|
||||
if (ctx->seams) MEM_freeN(ctx->seams);
|
||||
//if(ctx->vertpart) MEM_freeN(ctx->vertpart);
|
||||
//if (ctx->vertpart) MEM_freeN(ctx->vertpart);
|
||||
BLI_kdtree_free(ctx->tree);
|
||||
|
||||
/* threads */
|
||||
@ -4125,7 +4125,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
|
||||
pa->dietime = sim->scene->r.efra + 1;
|
||||
pa->lifetime = sim->scene->r.efra;
|
||||
pa->alive = PARS_ALIVE;
|
||||
//if(a<25) fprintf(stderr,"FSPARTICLE debug set %s , a%d = %f,%f,%f , life=%f\n", filename, a, pa->co[0],pa->co[1],pa->co[2], pa->lifetime );
|
||||
//if (a < 25) fprintf(stderr,"FSPARTICLE debug set %s , a%d = %f,%f,%f , life=%f\n", filename, a, pa->co[0],pa->co[1],pa->co[2], pa->lifetime );
|
||||
}
|
||||
else {
|
||||
// skip...
|
||||
|
@ -1352,7 +1352,8 @@ static void seq_proxy_build_frame(SeqRenderData context,
|
||||
IMB_freeImBuf(ibuf);
|
||||
}
|
||||
|
||||
struct SeqIndexBuildContext *seq_proxy_rebuild_context(Main *bmain, Scene *scene, Sequence *seq){
|
||||
struct SeqIndexBuildContext *seq_proxy_rebuild_context(Main *bmain, Scene *scene, Sequence *seq)
|
||||
{
|
||||
SeqIndexBuildContext *context;
|
||||
Sequence *nseq;
|
||||
|
||||
@ -3778,7 +3779,7 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
|
||||
sound = sound_new_file(CTX_data_main(C), seq_load->path); /* handles relative paths */
|
||||
|
||||
if (sound == NULL || sound->playback_handle == NULL) {
|
||||
//if(op)
|
||||
//if (op)
|
||||
// BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
|
||||
return NULL;
|
||||
}
|
||||
@ -3787,7 +3788,7 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
|
||||
|
||||
if (info.specs.channels == AUD_CHANNELS_INVALID) {
|
||||
sound_delete(bmain, sound);
|
||||
//if(op)
|
||||
//if (op)
|
||||
// BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1358,7 +1358,7 @@ static void scan_for_ext_face_forces(Object *ob,float timenow)
|
||||
/*---edges intruding*/
|
||||
|
||||
/*+++ close vertices*/
|
||||
if (( bf->flag & BFF_INTERSECT)==0) {
|
||||
if (( bf->flag & BFF_INTERSECT)==0) {
|
||||
bf->flag &= ~BFF_CLOSEVERT;
|
||||
tune = -1.0f;
|
||||
feedback[0]=feedback[1]=feedback[2]=0.0f;
|
||||
@ -2190,7 +2190,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
|
||||
}
|
||||
|
||||
/* debugerin */
|
||||
if (sb->totpoint < ifirst) {
|
||||
if (sb->totpoint < ifirst) {
|
||||
printf("Aye 998");
|
||||
return (998);
|
||||
}
|
||||
@ -2960,7 +2960,7 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float *
|
||||
|
||||
/* the freezer coming sooner or later */
|
||||
/*
|
||||
if ((dot_v3v3(dx,dx)<freezeloc )&&(dot_v3v3(bp->force,bp->force)<freezeforce )) {
|
||||
if ((dot_v3v3(dx,dx)<freezeloc )&&(dot_v3v3(bp->force,bp->force)<freezeforce )) {
|
||||
bp->frozen /=2;
|
||||
}
|
||||
else {
|
||||
|
@ -142,7 +142,7 @@ static float squared_distance(const float v2[3], const float v1[3], float *UNUSE
|
||||
|
||||
dist = dot_v3v3(d, d);
|
||||
|
||||
//if(n1 && n2 && (dot_v3v3(n1, n2) < 0.0f))
|
||||
//if (n1 && n2 && (dot_v3v3(n1, n2) < 0.0f))
|
||||
|
||||
/* can someone explain why this is done?*/
|
||||
if (n2 && (dot_v3v3(d, n2) < 0.0f)) {
|
||||
|
@ -222,7 +222,7 @@ gzFile BLI_gzopen(const char *filename, const char *mode)
|
||||
int i = 0;
|
||||
|
||||
/* xxx Creates file before transcribing the path */
|
||||
if(mode[0] == 'w')
|
||||
if (mode[0] == 'w')
|
||||
fclose(ufopen(filename,"a"));
|
||||
|
||||
UTF16_ENCODE(filename);
|
||||
|
@ -1126,10 +1126,10 @@ int isect_axial_line_tri_v3(const int axis, const float p1[3], const float p2[3]
|
||||
//return isect_line_tri_v3(p1,p2,v0,v1,v2,lambda);
|
||||
|
||||
///* first a simple bounding box test */
|
||||
//if(MIN3(v0[a1],v1[a1],v2[a1]) > p1[a1]) return 0;
|
||||
//if(MIN3(v0[a2],v1[a2],v2[a2]) > p1[a2]) return 0;
|
||||
//if(MAX3(v0[a1],v1[a1],v2[a1]) < p1[a1]) return 0;
|
||||
//if(MAX3(v0[a2],v1[a2],v2[a2]) < p1[a2]) return 0;
|
||||
//if (MIN3(v0[a1],v1[a1],v2[a1]) > p1[a1]) return 0;
|
||||
//if (MIN3(v0[a2],v1[a2],v2[a2]) > p1[a2]) return 0;
|
||||
//if (MAX3(v0[a1],v1[a1],v2[a1]) < p1[a1]) return 0;
|
||||
//if (MAX3(v0[a2],v1[a2],v2[a2]) < p1[a2]) return 0;
|
||||
|
||||
///* then a full intersection test */
|
||||
|
||||
|
@ -1452,7 +1452,7 @@ static int ray_aabb_intersect(PBVHNode *node, void *data_v)
|
||||
|
||||
// XXX jwilkins: tmax does not need to be updated since we don't use it
|
||||
// keeping this here for future reference
|
||||
//if(tzmax < tmax) tmax = tzmax;
|
||||
//if (tzmax < tmax) tmax = tzmax;
|
||||
|
||||
node->tmin = tmin;
|
||||
|
||||
|
@ -13255,9 +13255,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
Object *ob;
|
||||
ModifierData *md;
|
||||
|
||||
for(ob = main->object.first; ob; ob = ob->id.next) {
|
||||
for(md=ob->modifiers.first; md; md=md->next) {
|
||||
if(md->type == eModifierType_Lattice) {
|
||||
for (ob = main->object.first; ob; ob = ob->id.next) {
|
||||
for (md=ob->modifiers.first; md; md=md->next) {
|
||||
if (md->type == eModifierType_Lattice) {
|
||||
LatticeModifierData *lmd = (LatticeModifierData *)md;
|
||||
lmd->strength = 1.0f;
|
||||
}
|
||||
@ -13275,11 +13275,11 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
for (md = ob->modifiers.first; md; md = md->next) {
|
||||
if (md->type == eModifierType_Fluidsim) {
|
||||
FluidsimModifierData *fmd = (FluidsimModifierData *)md;
|
||||
if(fmd->fss->viscosityMode == 3) {
|
||||
if (fmd->fss->viscosityMode == 3) {
|
||||
fmd->fss->viscosityValue = 5.0;
|
||||
fmd->fss->viscosityExponent = 5;
|
||||
}
|
||||
else if(fmd->fss->viscosityMode == 4) {
|
||||
else if (fmd->fss->viscosityMode == 4) {
|
||||
fmd->fss->viscosityValue = 2.0;
|
||||
fmd->fss->viscosityExponent = 3;
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ static void laplacian_triangle_area(LaplacianSystem *sys, int i1, int i2, int i3
|
||||
t2= cotan_weight(v2, v3, v1);
|
||||
t3= cotan_weight(v3, v1, v2);
|
||||
|
||||
if (angle_v3v3v3(v2, v1, v3) > DEG2RADF(90.0f)) obtuse= 1;
|
||||
if (angle_v3v3v3(v2, v1, v3) > DEG2RADF(90.0f)) obtuse= 1;
|
||||
else if (angle_v3v3v3(v1, v2, v3) > DEG2RADF(90.0f)) obtuse= 2;
|
||||
else if (angle_v3v3v3(v1, v3, v2) > DEG2RADF(90.0f)) obtuse= 3;
|
||||
|
||||
|
@ -2892,7 +2892,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
|
||||
|
||||
calchandlesNurb(nu);
|
||||
}
|
||||
} /* End of 'if(nu->type == CU_BEZIER)' */
|
||||
} /* End of 'if (nu->type == CU_BEZIER)' */
|
||||
else if (nu->pntsv==1) {
|
||||
/*
|
||||
* All flat lines (ie. co-planar), except flat Nurbs. Flat NURB curves
|
||||
@ -3085,7 +3085,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
|
||||
nu->pntsv= (number_cuts+1)*nu->pntsv-number_cuts;
|
||||
nurbs_knot_calc_u(nu);
|
||||
nurbs_knot_calc_v(nu);
|
||||
} /* End of 'if(sel== nu->pntsu*nu->pntsv)' (subdivide entire NURB) */
|
||||
} /* End of 'if (sel== nu->pntsu*nu->pntsv)' (subdivide entire NURB) */
|
||||
else {
|
||||
/* subdivide in v direction? */
|
||||
sel= 0;
|
||||
@ -3177,7 +3177,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
|
||||
MEM_freeN(usel);
|
||||
MEM_freeN(vsel);
|
||||
|
||||
} /* End of 'if(nu->type == CU_NURBS)' */
|
||||
} /* End of 'if (nu->type == CU_NURBS)' */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
|
||||
ui_apply_but_BLOCK(C, but, data);
|
||||
break;
|
||||
case COL:
|
||||
if(data->cancel)
|
||||
if (data->cancel)
|
||||
ui_apply_but_VEC(C, but, data);
|
||||
else
|
||||
ui_apply_but_BLOCK(C, but, data);
|
||||
@ -2062,7 +2062,7 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data
|
||||
}
|
||||
|
||||
/* this makes adjacent blocks auto open from now on */
|
||||
//if(but->block->auto_open==0) but->block->auto_open= 1;
|
||||
//if (but->block->auto_open==0) but->block->auto_open= 1;
|
||||
}
|
||||
|
||||
static void ui_blockopen_end(bContext *C, uiBut *but, uiHandleButtonData *data)
|
||||
|
@ -735,8 +735,8 @@ typedef struct MirrTopoVert_t {
|
||||
|
||||
static int mirrtopo_hash_sort(const void *l1, const void *l2)
|
||||
{
|
||||
if ((MirrTopoHash_t)(intptr_t)l1 > (MirrTopoHash_t)(intptr_t)l2) return 1;
|
||||
else if ((MirrTopoHash_t)(intptr_t)l1 < (MirrTopoHash_t)(intptr_t)l2) return -1;
|
||||
if ((MirrTopoHash_t)(intptr_t)l1 > (MirrTopoHash_t)(intptr_t)l2) return 1;
|
||||
else if ((MirrTopoHash_t)(intptr_t)l1 < (MirrTopoHash_t)(intptr_t)l2) return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1418,7 +1418,7 @@ static int edbm_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op),
|
||||
|
||||
static int edbm_shortest_path_select_poll(bContext *C)
|
||||
{
|
||||
if(ED_operator_editmesh_region_view3d(C)) {
|
||||
if (ED_operator_editmesh_region_view3d(C)) {
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
BMEditMesh *em = BMEdit_FromObject(obedit);
|
||||
return (em->selectmode & SCE_SELECT_EDGE) != 0;
|
||||
@ -1907,7 +1907,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
BMW_end(&walker);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
BM_ITER_MESH (v, &iter, em->bm, BM_VERTS_OF_MESH) {
|
||||
if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
|
||||
BM_elem_flag_enable(v, BM_ELEM_TAG);
|
||||
|
@ -685,7 +685,10 @@ static int edbm_vertex_slide_exec(bContext *C, wmOperator *op)
|
||||
start_vert = (BMVert *)ese->ele;
|
||||
|
||||
/* Prepare operator */
|
||||
if (!EDBM_op_init(em, &bmop, op, "vertex_slide vert=%e edge=%hev distance_t=%f", start_vert, BM_ELEM_SELECT, distance_t)) {
|
||||
if (!EDBM_op_init(em, &bmop, op,
|
||||
"vertex_slide vert=%e edge=%hev distance_t=%f",
|
||||
start_vert, BM_ELEM_SELECT, distance_t))
|
||||
{
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
/* Execute operator */
|
||||
|
@ -345,7 +345,7 @@ static void bake_rasterize(const MBakeRast *bake_rast, const float st0_in[2], co
|
||||
yhi_beg= (int) ceilf(tmi);
|
||||
yhi= (int) ceilf(thi);
|
||||
|
||||
/*if(fTmi>ceilf(fTlo))*/
|
||||
/*if (fTmi>ceilf(fTlo))*/
|
||||
rasterize_half(bake_rast, slo, tlo, smi, tmi, slo, tlo, shi, thi, ylo, yhi_beg, is_mid_right);
|
||||
rasterize_half(bake_rast, smi, tmi, shi, thi, slo, tlo, shi, thi, yhi_beg, yhi, is_mid_right);
|
||||
}
|
||||
|
@ -1479,7 +1479,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
|
||||
case OB_MESH:
|
||||
ob->data= copy_mesh(ob->data);
|
||||
//me= ob->data;
|
||||
//if(me && me->key)
|
||||
//if (me && me->key)
|
||||
// ipo_idnew(me->key->ipo); /* drivers */
|
||||
break;
|
||||
case OB_MBALL:
|
||||
|
@ -233,7 +233,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
|
||||
if (nr==1) {
|
||||
// XXX old animation system
|
||||
//ipo= ob->ipo;
|
||||
//if(ipo==0) return OPERATOR_CANCELLED;
|
||||
//if (ipo==0) return OPERATOR_CANCELLED;
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
else if (nr==2) {
|
||||
@ -266,7 +266,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
|
||||
if (nr==1) {
|
||||
// XXX old animation system
|
||||
//if(base->object->ipo==ipo) base->flag |= SELECT;
|
||||
//if (base->object->ipo==ipo) base->flag |= SELECT;
|
||||
//changed = 1;
|
||||
}
|
||||
else if (nr==2) {
|
||||
|
@ -706,7 +706,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);
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ static void make_vertexcol(Object *ob) /* single ob */
|
||||
}
|
||||
}
|
||||
|
||||
//if(shade)
|
||||
//if (shade)
|
||||
// shadeMeshMCol(scene, ob, me);
|
||||
//else
|
||||
|
||||
@ -822,7 +822,7 @@ static int sample_backbuf_area(ViewContext *vc, int *indexar, int totface, int x
|
||||
|
||||
/* brecht: disabled this because it obviously fails for
|
||||
* brushes with size > 64, why is this here? */
|
||||
/*if(size > 64.0) size = 64.0;*/
|
||||
/*if (size > 64.0) size = 64.0;*/
|
||||
|
||||
ibuf = view3d_read_backbuf(vc, x - size, y - size, x + size, y + size);
|
||||
if (ibuf) {
|
||||
|
@ -3082,9 +3082,9 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
|
||||
{
|
||||
copy_v2_v2(cache->tex_mouse, cache->mouse);
|
||||
|
||||
if ( (brush->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) &&
|
||||
(brush->flag & BRUSH_RANDOM_ROTATION) &&
|
||||
!(brush->flag & BRUSH_RAKE))
|
||||
if ((brush->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) &&
|
||||
(brush->flag & BRUSH_RANDOM_ROTATION) &&
|
||||
!(brush->flag & BRUSH_RAKE))
|
||||
{
|
||||
cache->special_rotation = 2.0f * (float)M_PI * BLI_frand();
|
||||
}
|
||||
|
@ -503,7 +503,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
|
||||
|
||||
|
||||
if (!(file->selflag & EDITING_FILE)) {
|
||||
if ((params->active_file == i) || (file->selflag & HILITED_FILE) || (file->selflag & SELECTED_FILE) ) {
|
||||
if ((params->active_file == i) || (file->selflag & HILITED_FILE) || (file->selflag & SELECTED_FILE)) {
|
||||
int colorid = (file->selflag & SELECTED_FILE) ? TH_HILITE : TH_BACK;
|
||||
int shade = (params->active_file == i) || (file->selflag & HILITED_FILE) ? 20 : 0;
|
||||
draw_tile(sx, sy-1, layout->tile_w+4, sfile->layout->tile_h+layout->tile_border_y, colorid, shade);
|
||||
|
@ -191,7 +191,7 @@ static FileSelect file_select_do(bContext* C, int selected_idx)
|
||||
retval = FILE_SELECT_DIR;
|
||||
}
|
||||
}
|
||||
else {
|
||||
else {
|
||||
if (file->relname) {
|
||||
BLI_strncpy(params->file, file->relname, FILE_MAXFILE);
|
||||
}
|
||||
|
@ -641,7 +641,7 @@ struct ImBuf * filelist_geticon(struct FileList* filelist, int index)
|
||||
if ( strcmp(filelist->filelist[fidx].relname, "..") == 0) {
|
||||
ibuf = gSpecialFileImages[SPECIAL_IMG_PARENT];
|
||||
}
|
||||
else if ( strcmp(filelist->filelist[fidx].relname, ".") == 0) {
|
||||
else if (strcmp(filelist->filelist[fidx].relname, ".") == 0) {
|
||||
ibuf = gSpecialFileImages[SPECIAL_IMG_REFRESH];
|
||||
}
|
||||
else {
|
||||
|
@ -308,7 +308,7 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout* layout, const rcti* r
|
||||
CLAMP(rowmax, 0, layout->rows-1);
|
||||
}
|
||||
|
||||
if ( (colmin > layout->columns-1) || (rowmin > layout->rows-1) ) {
|
||||
if ((colmin > layout->columns-1) || (rowmin > layout->rows-1)) {
|
||||
sel.first = -1;
|
||||
}
|
||||
else {
|
||||
@ -317,7 +317,7 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout* layout, const rcti* r
|
||||
else
|
||||
sel.first = colmin + layout->columns*rowmin;
|
||||
}
|
||||
if ( (colmax > layout->columns-1) || (rowmax > layout->rows-1) ) {
|
||||
if ((colmax > layout->columns-1) || (rowmax > layout->rows-1)) {
|
||||
sel.last = -1;
|
||||
}
|
||||
else {
|
||||
|
@ -154,7 +154,8 @@ static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf,
|
||||
}
|
||||
|
||||
/* gets active viewer user */
|
||||
struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree){
|
||||
struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree)
|
||||
{
|
||||
bNode *node;
|
||||
|
||||
if (ntree)
|
||||
|
@ -546,7 +546,7 @@ static void image_keymap(struct wmKeyConfig *keyconf)
|
||||
RNA_boolean_set(kmi->ptr, "toggle", TRUE);
|
||||
|
||||
/* fast switch to render slots */
|
||||
for(i = 0; i < MAX2(IMA_MAX_RENDER_SLOT, 9); i++) {
|
||||
for (i = 0; i < MAX2(IMA_MAX_RENDER_SLOT, 9); i++) {
|
||||
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_int", ONEKEY+i, KM_PRESS, 0, 0);
|
||||
RNA_string_set(kmi->ptr, "data_path", "space_data.image.render_slot");
|
||||
RNA_int_set(kmi->ptr, "value", i);
|
||||
|
@ -672,7 +672,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
|
||||
|
||||
BLI_strncpy(showname, nodeLabel(node), sizeof(showname));
|
||||
|
||||
//if(node->flag & NODE_MUTED)
|
||||
//if (node->flag & NODE_MUTED)
|
||||
// BLI_snprintf(showname, sizeof(showname), "[%s]", showname); // XXX - don't print into self!
|
||||
|
||||
uiDefBut(node->block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(rct->ymax-NODE_DY),
|
||||
@ -830,7 +830,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
|
||||
if (node->miniwidth>0.0f) {
|
||||
BLI_strncpy(showname, nodeLabel(node), sizeof(showname));
|
||||
|
||||
//if(node->flag & NODE_MUTED)
|
||||
//if (node->flag & NODE_MUTED)
|
||||
// BLI_snprintf(showname, sizeof(showname), "[%s]", showname); // XXX - don't print into self!
|
||||
|
||||
uiDefBut(node->block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(centy-10),
|
||||
|
@ -1200,7 +1200,7 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
|
||||
set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel);
|
||||
|
||||
if (scenelevel) {
|
||||
//if(objectlevel || datalevel || idlevel) error("Mixed selection");
|
||||
//if (objectlevel || datalevel || idlevel) error("Mixed selection");
|
||||
//else pupmenu("Scene Operations%t|Delete");
|
||||
}
|
||||
else if (objectlevel) {
|
||||
|
@ -247,7 +247,8 @@ ImBuf *make_waveform_view_from_ibuf(ImBuf *ibuf)
|
||||
}
|
||||
|
||||
|
||||
static ImBuf *make_sep_waveform_view_from_ibuf_byte(ImBuf *ibuf){
|
||||
static ImBuf *make_sep_waveform_view_from_ibuf_byte(ImBuf *ibuf)
|
||||
{
|
||||
ImBuf *rval = IMB_allocImBuf(
|
||||
ibuf->x + 3, 515, 32, IB_rect);
|
||||
int x, y;
|
||||
|
@ -182,11 +182,11 @@ static void draw_empty_cone(float size);
|
||||
static int check_object_draw_texture(Scene *scene, View3D *v3d, int drawtype)
|
||||
{
|
||||
/* texture and material draw modes */
|
||||
if(ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) && drawtype > OB_SOLID)
|
||||
if (ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) && drawtype > OB_SOLID)
|
||||
return TRUE;
|
||||
|
||||
/* textured solid */
|
||||
if(v3d->drawtype == OB_SOLID && (v3d->flag2 & V3D_SOLID_TEX) && !scene_use_new_shading_nodes(scene))
|
||||
if (v3d->drawtype == OB_SOLID && (v3d->flag2 & V3D_SOLID_TEX) && !scene_use_new_shading_nodes(scene))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
@ -6526,7 +6526,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
|
||||
zbufoff = 1;
|
||||
dt = OB_SOLID;
|
||||
}
|
||||
else if(ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT))
|
||||
else if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT))
|
||||
dt = OB_PAINT;
|
||||
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
@ -2987,7 +2987,7 @@ static int viewpan_exec(bContext *C, wmOperator *op)
|
||||
initgrabz(rv3d, 0.0, 0.0, 0.0);
|
||||
if (pandir == V3D_VIEW_PANRIGHT) { mval_f[0] = -32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
|
||||
else if (pandir == V3D_VIEW_PANLEFT) { mval_f[0] = 32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
|
||||
else if (pandir == V3D_VIEW_PANUP) { mval_f[1] = -25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
|
||||
else if (pandir == V3D_VIEW_PANUP) { mval_f[1] = -25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
|
||||
else if (pandir == V3D_VIEW_PANDOWN) { mval_f[1] = 25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); }
|
||||
add_v3_v3(rv3d->ofs, vec);
|
||||
|
||||
|
@ -4706,12 +4706,12 @@ void projectSVData(TransInfo *t, int final)
|
||||
if (!em)
|
||||
return;
|
||||
|
||||
if(!(t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT))
|
||||
if (!(t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT))
|
||||
return;
|
||||
|
||||
/* don't do this at all for non-basis shape keys, too easy to
|
||||
accidentally break uv maps or vertex colors then */
|
||||
if(em->bm->shapenr > 1)
|
||||
if (em->bm->shapenr > 1)
|
||||
return;
|
||||
|
||||
BLI_smallhash_init(&visit);
|
||||
|
@ -1984,7 +1984,7 @@ static void get_edge_center(float cent_r[3], BMVert *eve)
|
||||
static void VertsToTransData(TransInfo *t, TransData *td, BMEditMesh *em, BMVert *eve, float *bweight)
|
||||
{
|
||||
td->flag = 0;
|
||||
//if(key)
|
||||
//if (key)
|
||||
// td->loc = key->co;
|
||||
//else
|
||||
td->loc = eve->co;
|
||||
|
@ -921,7 +921,7 @@ void drawLine(TransInfo *t, float *center, float *dir, char axis, short options)
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
//if(t->obedit) glLoadMatrixf(t->obedit->obmat); // sets opengl viewing
|
||||
//if (t->obedit) glLoadMatrixf(t->obedit->obmat); // sets opengl viewing
|
||||
|
||||
|
||||
copy_v3_v3(v3, dir);
|
||||
|
@ -4131,8 +4131,9 @@ void param_face_add(ParamHandle *handle, ParamKey key, int nverts,
|
||||
p_face_add_construct(phandle, key, vkeys, co, uv, 1, 2, 3, pin, select);
|
||||
}
|
||||
}
|
||||
else if(!p_face_exists(phandle, vkeys, 0, 1, 2))
|
||||
else if (!p_face_exists(phandle, vkeys, 0, 1, 2)) {
|
||||
p_face_add_construct(phandle, key, vkeys, co, uv, 0, 1, 2, pin, select);
|
||||
}
|
||||
}
|
||||
|
||||
void param_edge_set_seam(ParamHandle *handle, ParamKey *vkeys)
|
||||
|
@ -243,7 +243,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
|
||||
key = (ParamKey)efa;
|
||||
|
||||
|
||||
if(efa->len == 3 || efa->len == 4) {
|
||||
if (efa->len == 3 || efa->len == 4) {
|
||||
/* for quads let parametrize split, it can make better decisions
|
||||
about which split is best for unwrapping than scanfill */
|
||||
i = 0;
|
||||
@ -294,7 +294,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
|
||||
ls[1] = sefa->v2->tmp.p;
|
||||
ls[2] = sefa->v3->tmp.p;
|
||||
|
||||
for(i = 0; i < 3; i++) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, ls[i]->head.data, CD_MLOOPUV);
|
||||
vkeys[i] = (ParamKey)BM_elem_index_get(ls[i]->v);
|
||||
co[i] = ls[i]->v->co;
|
||||
|
@ -263,11 +263,11 @@ void GPU_codegen_exit(void)
|
||||
glsl_material_library = NULL;
|
||||
}
|
||||
|
||||
/*if(FUNCTION_PROTOTYPES) {
|
||||
/*if (FUNCTION_PROTOTYPES) {
|
||||
MEM_freeN(FUNCTION_PROTOTYPES);
|
||||
FUNCTION_PROTOTYPES = NULL;
|
||||
}*/
|
||||
/*if(FUNCTION_LIB) {
|
||||
/*if (FUNCTION_LIB) {
|
||||
GPU_shader_free(FUNCTION_LIB);
|
||||
FUNCTION_LIB = NULL;
|
||||
}*/
|
||||
@ -587,7 +587,7 @@ static char *code_generate_fragment(ListBase *nodes, GPUOutput *output, const ch
|
||||
codegen_set_unique_ids(nodes);
|
||||
codegen_print_uniforms_functions(ds, nodes);
|
||||
|
||||
//if(G.debug & G_DEBUG)
|
||||
//if (G.debug & G_DEBUG)
|
||||
// BLI_dynstr_appendf(ds, "/* %s */\n", name);
|
||||
|
||||
BLI_dynstr_append(ds, "void main(void)\n");
|
||||
@ -602,7 +602,7 @@ static char *code_generate_fragment(ListBase *nodes, GPUOutput *output, const ch
|
||||
code = BLI_dynstr_get_cstring(ds);
|
||||
BLI_dynstr_free(ds);
|
||||
|
||||
//if(G.debug & G_DEBUG) printf("%s\n", code);
|
||||
//if (G.debug & G_DEBUG) printf("%s\n", code);
|
||||
|
||||
return code;
|
||||
}
|
||||
@ -645,7 +645,7 @@ static char *code_generate_vertex(ListBase *nodes)
|
||||
|
||||
BLI_dynstr_free(ds);
|
||||
|
||||
//if(G.debug & G_DEBUG) printf("%s\n", code);
|
||||
//if (G.debug & G_DEBUG) printf("%s\n", code);
|
||||
|
||||
return code;
|
||||
}
|
||||
@ -1319,7 +1319,7 @@ GPUPass *GPU_generate_pass(ListBase *nodes, GPUNodeLink *outlink, GPUVertexAttri
|
||||
GPUPass *pass;
|
||||
char *vertexcode, *fragmentcode;
|
||||
|
||||
/*if(!FUNCTION_LIB) {
|
||||
/*if (!FUNCTION_LIB) {
|
||||
GPU_nodes_free(nodes);
|
||||
return NULL;
|
||||
}*/
|
||||
|
@ -631,7 +631,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
|
||||
|
||||
visifac= lamp_get_visibility(mat, lamp, &lv, &dist);
|
||||
|
||||
/*if(ma->mode & MA_TANGENT_V)
|
||||
/*if (ma->mode & MA_TANGENT_V)
|
||||
GPU_link(mat, "shade_tangent_v", lv, GPU_attribute(CD_TANGENT, ""), &vn);*/
|
||||
|
||||
GPU_link(mat, "shade_inp", vn, lv, &inp);
|
||||
|
@ -188,7 +188,7 @@ int IMB_ispic(const char *filename)
|
||||
) {
|
||||
return IMB_ispic_name(filename);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -392,7 +392,7 @@ int IMB_isanim(const char *filename)
|
||||
|| BLI_testextensie(filename, ".mv")) {
|
||||
type = imb_get_anim_type(filename);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
return(FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -1094,7 +1094,7 @@ static int make_structDNA(char *baseDirectory, FILE *file)
|
||||
sp += firststruct;
|
||||
for (a=firststruct; a<nr_types; a++, sp++) {
|
||||
if (*sp) {
|
||||
fprintf(fp, "\tif(sizeof(struct %s) - %d) printf(\"ALIGN ERROR:", types[a], *sp);
|
||||
fprintf(fp, "\tif (sizeof(struct %s) - %d) printf(\"ALIGN ERROR:", types[a], *sp);
|
||||
fprintf(fp, "%%d %s %d ", types[a], *sp);
|
||||
fprintf(fp, "\\n\", sizeof(struct %s) - %d);\n", types[a], *sp);
|
||||
}
|
||||
|
@ -1743,7 +1743,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
|
||||
|
||||
if (dparm->prop == func->c_ret)
|
||||
fprintf(f, "\t_retdata= _data;\n");
|
||||
else {
|
||||
else {
|
||||
const char *data_str;
|
||||
if (cptr || (flag & PROP_DYNAMIC)) {
|
||||
ptrstr = "**";
|
||||
|
@ -412,7 +412,7 @@ static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value)
|
||||
if (value > settings->end)
|
||||
value = settings->end;
|
||||
|
||||
/*if(settings->type==PART_REACTOR && value < 1.0) */
|
||||
/*if (settings->type==PART_REACTOR && value < 1.0) */
|
||||
/* value = 1.0; */
|
||||
/*else */
|
||||
if (value < MINAFRAMEF)
|
||||
@ -723,7 +723,7 @@ static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str)
|
||||
static EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
|
||||
PropertyRNA *UNUSED(prop), int *UNUSED(free))
|
||||
{
|
||||
/*if(part->type==PART_REACTOR) */
|
||||
/*if (part->type==PART_REACTOR) */
|
||||
/* return part_reactor_from_items; */
|
||||
/*else */
|
||||
return part_from_items;
|
||||
|
@ -453,9 +453,10 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
|
||||
v2 = _E(geom_slot, indexMap[i]-1);
|
||||
|
||||
/* check in case the target vertex (v2) is already marked
|
||||
for merging */
|
||||
while((v3 = BMO_slot_map_ptr_get(em->bm, &weld_op, "targetmap", v2)))
|
||||
* for merging */
|
||||
while ((v3 = BMO_slot_map_ptr_get(em->bm, &weld_op, "targetmap", v2))) {
|
||||
v2 = v3;
|
||||
}
|
||||
|
||||
BMO_slot_map_ptr_insert(em->bm, &weld_op, "targetmap", v, v2);
|
||||
}
|
||||
@ -551,7 +552,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
|
||||
result = arrayModifier_doArray(amd, md->scene, ob, dm, 0);
|
||||
|
||||
//if(result != dm)
|
||||
//if (result != dm)
|
||||
// CDDM_calc_normals_mapping(result);
|
||||
|
||||
return result;
|
||||
|
@ -187,7 +187,7 @@ static void node_composit_exec_math(void *UNUSED(data), bNode *node, bNodeStack
|
||||
}
|
||||
/* and if it doesn't exist use the second input since we
|
||||
know that one of them must exist at this point*/
|
||||
else {
|
||||
else {
|
||||
stackbuf=alloc_compbuf(cbuf2->x, cbuf2->y, CB_VAL, 1);
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **UNUSED(i
|
||||
out[GEOM_OUT_VCOL]->vec[3]= scol->col[3];
|
||||
out[GEOM_OUT_VCOL_ALPHA]->vec[0]= scol->col[3];
|
||||
}
|
||||
else {
|
||||
else {
|
||||
memcpy(out[GEOM_OUT_VCOL]->vec, defaultvcol, sizeof(defaultvcol));
|
||||
out[GEOM_OUT_VCOL_ALPHA]->vec[0]= 1.0f;
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ static PyObject *bpy_resource_path(PyObject *UNUSED(self), PyObject *args, PyObj
|
||||
return NULL;
|
||||
|
||||
/* stupid string compare */
|
||||
if (!strcmp(type, "USER")) folder_id = BLENDER_RESOURCE_PATH_USER;
|
||||
if (!strcmp(type, "USER")) folder_id = BLENDER_RESOURCE_PATH_USER;
|
||||
else if (!strcmp(type, "LOCAL")) folder_id = BLENDER_RESOURCE_PATH_LOCAL;
|
||||
else if (!strcmp(type, "SYSTEM")) folder_id = BLENDER_RESOURCE_PATH_SYSTEM;
|
||||
else {
|
||||
|
@ -101,7 +101,7 @@ void bpy_context_update(bContext *C)
|
||||
/* don't do this from a non-main (e.g. render) thread, it can cause a race
|
||||
condition on C->data.recursion. ideal solution would be to disable
|
||||
context entirely from non-main threads, but that's more complicated */
|
||||
if(!BLI_thread_is_main())
|
||||
if (!BLI_thread_is_main())
|
||||
return;
|
||||
|
||||
BPy_SetContext(C);
|
||||
|
@ -2483,7 +2483,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
|
||||
ver->n[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn;
|
||||
ver->n[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn;
|
||||
normalize_v3(ver->n);
|
||||
//if(ob->transflag & OB_NEG_SCALE) negate_v3(ver->n);
|
||||
//if (ob->transflag & OB_NEG_SCALE) negate_v3(ver->n);
|
||||
|
||||
if (need_orco) {
|
||||
ver->orco= orco;
|
||||
@ -5514,7 +5514,7 @@ static int load_fluidsimspeedvectors(Render *re, ObjectInstanceRen *obi, float *
|
||||
// set both to the same value
|
||||
speed[0]= speed[2]= zco[0];
|
||||
speed[1]= speed[3]= zco[1];
|
||||
//if(a<20) fprintf(stderr,"speed %d %f,%f | camco %f,%f,%f | hoco %f,%f,%f,%f\n", a, speed[0], speed[1], camco[0],camco[1], camco[2], hoco[0],hoco[1], hoco[2],hoco[3]); // NT DEBUG
|
||||
//if (a < 20) fprintf(stderr,"speed %d %f,%f | camco %f,%f,%f | hoco %f,%f,%f,%f\n", a, speed[0], speed[1], camco[0],camco[1], camco[2], hoco[0],hoco[1], hoco[2],hoco[3]); // NT DEBUG
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -102,7 +102,7 @@ static RayObject* RE_rayobject_create(Render *re, int type, int size)
|
||||
if (type == R_RAYSTRUCTURE_AUTO)
|
||||
{
|
||||
//TODO
|
||||
//if(detect_simd())
|
||||
//if (detect_simd())
|
||||
#ifdef __SSE__
|
||||
type = BLI_cpu_support_sse2()? R_RAYSTRUCTURE_SIMD_SVBVH: R_RAYSTRUCTURE_VBVH;
|
||||
#else
|
||||
|
@ -1647,7 +1647,7 @@ static void texco_mapping(ShadeInput* shi, Tex* tex, MTex* mtex, float* co, floa
|
||||
}
|
||||
}
|
||||
if (tex->extend == TEX_REPEAT && (tex->flag & TEX_REPEAT_YMIR)) {
|
||||
if (tex->texfilter == TXF_BOX)
|
||||
if (tex->texfilter == TXF_BOX)
|
||||
texvec[1] -= floorf(texvec[1]);
|
||||
else if (texvec[1] < 0.f || texvec[1] > 1.f) {
|
||||
const float ty = 0.5f*texvec[1];
|
||||
|
@ -1189,7 +1189,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
|
||||
har->add = 255.0f*add;
|
||||
}
|
||||
/* now what on earth is this good for?? */
|
||||
//if(mtex->texco & 16) {
|
||||
//if (mtex->texco & 16) {
|
||||
// har->alfa= tin;
|
||||
//}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ static int sizeoflampbuf(ShadBuf *shb)
|
||||
cp= shb->cbuf;
|
||||
num= (shb->size*shb->size)/256;
|
||||
|
||||
while(num--) count+= *(cp++);
|
||||
while (num--) count+= *(cp++);
|
||||
|
||||
return 256*count;
|
||||
}
|
||||
@ -446,7 +446,7 @@ static void compress_deepshadowbuf(Render *re, ShadBuf *shb, APixstr *apixbuf, A
|
||||
|
||||
/* merge buffers */
|
||||
dsb= shsample->deepbuf[a];
|
||||
while(1) {
|
||||
while (1) {
|
||||
minz= 0;
|
||||
found= 0;
|
||||
|
||||
@ -829,7 +829,7 @@ static void *do_shadow_thread(void *re_v)
|
||||
lar->thread_ready= 1;
|
||||
BLI_unlock_thread(LOCK_CUSTOM1);
|
||||
}
|
||||
} while(lar && !re->test_break(re->tbh));
|
||||
} while (lar && !re->test_break(re->tbh));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -894,7 +894,7 @@ void threaded_makeshadowbufs(Render *re)
|
||||
if (lar->shb && !lar->thread_ready)
|
||||
break;
|
||||
BLI_unlock_thread(LOCK_CUSTOM1);
|
||||
} while(lar);
|
||||
} while (lar);
|
||||
|
||||
BLI_end_threads(&threads);
|
||||
|
||||
@ -1371,7 +1371,7 @@ float shadow_halo(LampRen *lar, const float p1[3], const float p2[3])
|
||||
|
||||
/* printf("start %x %x \n", (int)(0x7FFFFFFF*zf1), (int)(0x7FFFFFFF*zf2)); */
|
||||
|
||||
while(1) {
|
||||
while (1) {
|
||||
labdao= labda;
|
||||
|
||||
if (labdax==labday) {
|
||||
@ -1613,7 +1613,7 @@ static int isb_bsp_insert(ISBBranch *root, MemArena *memarena, ISBSample *sample
|
||||
root->totsamp++;
|
||||
|
||||
/* going over branches until last one found */
|
||||
while(bspn->left) {
|
||||
while (bspn->left) {
|
||||
if (zco[bspn->index] <= bspn->divider[bspn->index])
|
||||
bspn= bspn->left;
|
||||
else
|
||||
@ -2244,7 +2244,7 @@ static void isb_make_buffer(RenderPart *pa, LampRen *lar)
|
||||
PixStr *ps= (PixStr *)(*rd);
|
||||
int mask= (1<<sample);
|
||||
|
||||
while(ps) {
|
||||
while (ps) {
|
||||
if (ps->mask & mask)
|
||||
break;
|
||||
ps= ps->next;
|
||||
@ -2315,7 +2315,7 @@ static void isb_make_buffer(RenderPart *pa, LampRen *lar)
|
||||
|
||||
if (*rd) {
|
||||
PixStr *ps= (PixStr *)(*rd);
|
||||
while(ps) {
|
||||
while (ps) {
|
||||
if (ps->shadfac)
|
||||
isb_add_shadfac(isbsa, isbdata->memarena, ps->obi, ps->facenr, ps->shadfac, count_mask(ps->mask));
|
||||
ps= ps->next;
|
||||
@ -2382,7 +2382,7 @@ static int isb_add_samples_transp(RenderPart *pa, ISBBranch *root, MemArena *mem
|
||||
int x= xcos[xi];
|
||||
|
||||
samp1= *(samp + y*pa->rectx + x);
|
||||
while(samp1) {
|
||||
while (samp1) {
|
||||
bsp_err |= isb_bsp_insert(root, memarena, (ISBSample *)samp1);
|
||||
samp1= samp1->next;
|
||||
}
|
||||
@ -2572,7 +2572,7 @@ float ISB_getshadow(ShadeInput *shi, ShadBuf *shb)
|
||||
int obi= shi->obi - R.objectinstance;
|
||||
ISBShadfacA *isbsa= *(isbdata->shadfaca + sindex);
|
||||
|
||||
while(isbsa) {
|
||||
while (isbsa) {
|
||||
if (isbsa->facenr==shi->facenr+1 && isbsa->obi==obi)
|
||||
return isbsa->shadfac>=1.0f?0.0f:1.0f - isbsa->shadfac;
|
||||
isbsa= isbsa->next;
|
||||
|
@ -1152,7 +1152,7 @@ float lamp_get_visibility(LampRen *lar, const float co[3], float lv[3], float *d
|
||||
/* area type has no quad or sphere option */
|
||||
if (lar->type==LA_AREA) {
|
||||
/* area is single sided */
|
||||
//if(dot_v3v3(lv, lar->vec) > 0.0f)
|
||||
//if (dot_v3v3(lv, lar->vec) > 0.0f)
|
||||
// visifac= 1.0f;
|
||||
//else
|
||||
// visifac= 0.0f;
|
||||
|
@ -285,12 +285,12 @@ static void build_Rd_table(ScatterSettings *ss)
|
||||
|
||||
for (i= 0; i < size; i++) {
|
||||
r= i*(RD_TABLE_RANGE/RD_TABLE_SIZE);
|
||||
/*if(r < ss->invsigma_t_*ss->invsigma_t_)
|
||||
/*if (r < ss->invsigma_t_*ss->invsigma_t_)
|
||||
r= ss->invsigma_t_*ss->invsigma_t_;*/
|
||||
ss->tableRd[i]= Rd(ss, sqrt(r));
|
||||
|
||||
r= i*(RD_TABLE_RANGE_2/RD_TABLE_SIZE);
|
||||
/*if(r < ss->invsigma_t_)
|
||||
/*if (r < ss->invsigma_t_)
|
||||
r= ss->invsigma_t_;*/
|
||||
ss->tableRd2[i]= Rd(ss, r);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user