forked from bartvdbraak/blender
style cleanup
This commit is contained in:
parent
00025c74b4
commit
4e7b18876c
@ -92,6 +92,13 @@ __attribute__((nonnull(1)))
|
||||
#endif
|
||||
;
|
||||
|
||||
void *BLI_mempool_as_arrayN(BLI_mempool *pool, const char *allocstr)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((warn_unused_result))
|
||||
__attribute__((nonnull(1, 2)))
|
||||
#endif
|
||||
;
|
||||
|
||||
/** iteration stuff. note: this may easy to produce bugs with **/
|
||||
/* private structure */
|
||||
typedef struct BLI_mempool_iter {
|
||||
|
@ -20,7 +20,7 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file blender/bmesh/tools/bmesh_triangulate.c
|
||||
/** \file blender/bmesh/tools/bmesh_triangulate.h
|
||||
* \ingroup bmesh
|
||||
*
|
||||
* Triangulate.
|
||||
|
@ -383,7 +383,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
|
||||
buf[x] = -MAXFLOAT;
|
||||
}
|
||||
for (x = xmin; x < xmax; ++x) {
|
||||
buf[x - rect->xmin + window - 1] = buffer[4*(y * width + x)];
|
||||
buf[x - rect->xmin + window - 1] = buffer[4 * (y * width + x)];
|
||||
}
|
||||
|
||||
for (i = 0; i < (bwidth + 3 * half_window) / window; i++) {
|
||||
@ -397,7 +397,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
|
||||
|
||||
start = half_window + (i - 1) * window + 1;
|
||||
for (x = -min(0, start); x < window - max(0, start + window - bwidth); x++) {
|
||||
rectf[bwidth * (y-ymin) + (start + x)] = max(temp[x], temp[x + window - 1]);
|
||||
rectf[bwidth * (y - ymin) + (start + x)] = max(temp[x], temp[x + window - 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -408,7 +408,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
|
||||
buf[y] = -MAXFLOAT;
|
||||
}
|
||||
for (y = ymin; y < ymax; y++) {
|
||||
buf[y - rect->ymin + window - 1] = rectf[(y-ymin) * bwidth + x];
|
||||
buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
|
||||
}
|
||||
|
||||
for (i = 0; i < (bheight + 3 * half_window) / window; i++) {
|
||||
@ -422,7 +422,7 @@ void *DilateStepOperation::initializeTileData(rcti *rect)
|
||||
|
||||
start = half_window + (i - 1) * window + 1;
|
||||
for (y = -min(0, start); y < window - max(0, start + window - bheight); y++) {
|
||||
rectf[bwidth * (y + start + (rect->ymin-ymin)) + x] = max(temp[y], temp[y + window - 1]);
|
||||
rectf[bwidth * (y + start + (rect->ymin - ymin)) + x] = max(temp[y], temp[y + window - 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -510,7 +510,7 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
|
||||
buf[x] = MAXFLOAT;
|
||||
}
|
||||
for (x = xmin; x < xmax; ++x) {
|
||||
buf[x - rect->xmin + window - 1] = buffer[4*(y * width + x)];
|
||||
buf[x - rect->xmin + window - 1] = buffer[4 * (y * width + x)];
|
||||
}
|
||||
|
||||
for (i = 0; i < (bwidth + 3 * half_window) / window; i++) {
|
||||
@ -524,7 +524,7 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
|
||||
|
||||
start = half_window + (i - 1) * window + 1;
|
||||
for (x = -min(0, start); x < window - max(0, start + window - bwidth); x++) {
|
||||
rectf[bwidth * (y-ymin) + (start + x)] = min(temp[x], temp[x + window - 1]);
|
||||
rectf[bwidth * (y - ymin) + (start + x)] = min(temp[x], temp[x + window - 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -535,7 +535,7 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
|
||||
buf[y] = MAXFLOAT;
|
||||
}
|
||||
for (y = ymin; y < ymax; y++) {
|
||||
buf[y - rect->ymin + window - 1] = rectf[(y-ymin) * bwidth + x];
|
||||
buf[y - rect->ymin + window - 1] = rectf[(y - ymin) * bwidth + x];
|
||||
}
|
||||
|
||||
for (i = 0; i < (bheight + 3 * half_window) / window; i++) {
|
||||
@ -549,7 +549,7 @@ void *ErodeStepOperation::initializeTileData(rcti *rect)
|
||||
|
||||
start = half_window + (i - 1) * window + 1;
|
||||
for (y = -min(0, start); y < window - max(0, start + window - bheight); y++) {
|
||||
rectf[bwidth * (y + start + (rect->ymin-ymin)) + x] = min(temp[y], temp[y + window - 1]);
|
||||
rectf[bwidth * (y + start + (rect->ymin - ymin)) + x] = min(temp[y], temp[y + window - 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -289,8 +289,8 @@ static void rna_Particle_uv_on_emitter(ParticleData *particle, ParticleSystemMod
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object, ParticleSystemModifierData *modifier, int particle_no, int step,
|
||||
float n_co[3])
|
||||
static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object, ParticleSystemModifierData *modifier,
|
||||
int particle_no, int step, float n_co[3])
|
||||
{
|
||||
ParticleSettings *part = 0;
|
||||
ParticleData *pars = 0;
|
||||
@ -307,7 +307,7 @@ static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *o
|
||||
part = particlesystem->part;
|
||||
pars = particlesystem->particles;
|
||||
|
||||
if(particlesystem->renderdata) {
|
||||
if (particlesystem->renderdata) {
|
||||
step_nbr = part->ren_step;
|
||||
totchild = particlesystem->totchild;
|
||||
}
|
||||
@ -381,10 +381,12 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Par
|
||||
|
||||
part = particlesystem->part;
|
||||
|
||||
if(particlesystem->renderdata)
|
||||
if (particlesystem->renderdata) {
|
||||
totchild = particlesystem->totchild;
|
||||
else
|
||||
}
|
||||
else {
|
||||
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
|
||||
}
|
||||
|
||||
/* can happen for disconnected/global hair */
|
||||
if (part->type == PART_HAIR && !particlesystem->childcache)
|
||||
@ -466,10 +468,11 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Par
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier, ParticleData *particle, int particle_no, int vcol_no,
|
||||
float n_mcol[3])
|
||||
static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier,
|
||||
ParticleData *particle, int particle_no, int vcol_no,
|
||||
float n_mcol[3])
|
||||
{
|
||||
ParticleSettings *part = 0;
|
||||
ParticleSettings *part;
|
||||
int totpart;
|
||||
int totchild = 0;
|
||||
int num;
|
||||
@ -481,10 +484,12 @@ static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, P
|
||||
|
||||
part = particlesystem->part;
|
||||
|
||||
if(particlesystem->renderdata)
|
||||
if (particlesystem->renderdata) {
|
||||
totchild = particlesystem->totchild;
|
||||
else
|
||||
}
|
||||
else {
|
||||
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
|
||||
}
|
||||
|
||||
/* can happen for disconnected/global hair */
|
||||
if (part->type == PART_HAIR && !particlesystem->childcache)
|
||||
@ -495,7 +500,7 @@ static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, P
|
||||
if (particle_no >= totpart + totchild)
|
||||
return;
|
||||
|
||||
/* 3. start creating renderable things */
|
||||
/* 3. start creating renderable things */
|
||||
/* setup per particle individual stuff */
|
||||
if (particle_no < totpart) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user