style cleanup
This commit is contained in:
parent
35b187e283
commit
08358a60b0
|
@ -132,7 +132,7 @@ GHOST_SystemX11(
|
|||
GHOST_ASSERT(false, "Could not instantiate timer!");
|
||||
}
|
||||
|
||||
/* Taking care not to overflow the tv.tv_sec*1000 */
|
||||
/* Taking care not to overflow the tv.tv_sec * 1000 */
|
||||
m_start_time = GHOST_TUns64(tv.tv_sec) * 1000 + tv.tv_usec / 1000;
|
||||
|
||||
|
||||
|
@ -190,7 +190,7 @@ getMilliSeconds() const
|
|||
GHOST_ASSERT(false, "Could not compute time!");
|
||||
}
|
||||
|
||||
/* Taking care not to overflow the tv.tv_sec*1000 */
|
||||
/* Taking care not to overflow the tv.tv_sec * 1000 */
|
||||
return GHOST_TUns64(tv.tv_sec) * 1000 + tv.tv_usec / 1000 - m_start_time;
|
||||
}
|
||||
|
||||
|
|
|
@ -904,7 +904,7 @@ void BKE_image_free_all_textures(void)
|
|||
image_free_buffers(ima);
|
||||
}
|
||||
}
|
||||
/* printf("freed total %d MB\n", totsize/(1024*1024)); */
|
||||
/* printf("freed total %d MB\n", totsize / (1024 * 1024)); */
|
||||
}
|
||||
|
||||
/* except_frame is weak, only works for seqs without offset... */
|
||||
|
|
|
@ -2335,22 +2335,22 @@ void interp_weights_poly_v3(float *w, float v[][3], const int n, const float co[
|
|||
{
|
||||
/* TODO: t1 and t2 overlap each iter, we could call this only once per iter and reuse previous value */
|
||||
float totweight, t1, t2, len, *vmid, *vprev, *vnext;
|
||||
int i, inext, icur;
|
||||
int i, i_next, i_curr;
|
||||
bool edge_interp = false;
|
||||
|
||||
totweight = 0.0f;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
icur = i;
|
||||
inext = (i == n - 1) ? 0 : i + 1;
|
||||
i_curr = i;
|
||||
i_next = (i == n - 1) ? 0 : i + 1;
|
||||
|
||||
vmid = v[i];
|
||||
vprev = (i == 0) ? v[n - 1] : v[i - 1];
|
||||
vnext = v[inext];
|
||||
vnext = v[i_next];
|
||||
|
||||
/* Mark Mayer et al algorithm that is used here does not operate well if vertex is close
|
||||
* to borders of face. In that case, do simple linear interpolation between the two edge vertices */
|
||||
if (dist_to_line_segment_v3(co, vmid, vnext) < 10*FLT_EPSILON) {
|
||||
if (dist_to_line_segment_v3(co, vmid, vnext) < 10 * FLT_EPSILON) {
|
||||
edge_interp = true;
|
||||
break;
|
||||
}
|
||||
|
@ -2364,14 +2364,14 @@ void interp_weights_poly_v3(float *w, float v[][3], const int n, const float co[
|
|||
}
|
||||
|
||||
if (edge_interp) {
|
||||
float len_cur = len_v3v3(co, vmid);
|
||||
float len_curr = len_v3v3(co, vmid);
|
||||
float len_next = len_v3v3(co, vnext);
|
||||
float edge_len = len_cur + len_next;
|
||||
float edge_len = len_curr + len_next;
|
||||
for (i = 0; i < n; i++)
|
||||
w[i] = 0.0;
|
||||
|
||||
w[icur] = len_next/edge_len;
|
||||
w[inext] = len_cur/edge_len;
|
||||
w[i_curr] = len_next / edge_len;
|
||||
w[i_next] = len_curr / edge_len;
|
||||
}
|
||||
else {
|
||||
if (totweight != 0.0f) {
|
||||
|
@ -2387,22 +2387,22 @@ void interp_weights_poly_v2(float *w, float v[][2], const int n, const float co[
|
|||
{
|
||||
/* TODO: t1 and t2 overlap each iter, we could call this only once per iter and reuse previous value */
|
||||
float totweight, t1, t2, len, *vmid, *vprev, *vnext;
|
||||
int i, inext, icur;
|
||||
int i, i_next, i_curr;
|
||||
bool edge_interp = false;
|
||||
|
||||
totweight = 0.0f;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
icur = i;
|
||||
inext = (i == n - 1) ? 0 : i + 1;
|
||||
i_curr = i;
|
||||
i_next = (i == n - 1) ? 0 : i + 1;
|
||||
|
||||
vmid = v[i];
|
||||
vprev = (i == 0) ? v[n - 1] : v[i - 1];
|
||||
vnext = v[inext];
|
||||
vnext = v[i_next];
|
||||
|
||||
/* Mark Mayer et al algorithm that is used here does not operate well if vertex is close
|
||||
* to borders of face. In that case, do simple linear interpolation between the two edge vertices */
|
||||
if (dist_to_line_segment_v2(co, vmid, vnext) < 10*FLT_EPSILON) {
|
||||
if (dist_to_line_segment_v2(co, vmid, vnext) < 10 * FLT_EPSILON) {
|
||||
edge_interp = true;
|
||||
break;
|
||||
}
|
||||
|
@ -2416,14 +2416,14 @@ void interp_weights_poly_v2(float *w, float v[][2], const int n, const float co[
|
|||
}
|
||||
|
||||
if (edge_interp) {
|
||||
float len_cur = len_v2v2(co, vmid);
|
||||
float len_curr = len_v2v2(co, vmid);
|
||||
float len_next = len_v2v2(co, vnext);
|
||||
float edge_len = len_cur + len_next;
|
||||
float edge_len = len_curr + len_next;
|
||||
for (i = 0; i < n; i++)
|
||||
w[i] = 0.0;
|
||||
|
||||
w[icur] = len_next/edge_len;
|
||||
w[inext] = len_cur/edge_len;
|
||||
w[i_curr] = len_next / edge_len;
|
||||
w[i_next] = len_curr / edge_len;
|
||||
}
|
||||
else {
|
||||
if (totweight != 0.0f) {
|
||||
|
|
|
@ -1769,7 +1769,7 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
|
|||
mdb->totalphi = MEM_callocN(sizeof(float) * mdb->size3, "MeshDeformBindTotalPhi");
|
||||
mdb->boundisect = MEM_callocN(sizeof(*mdb->boundisect) * mdb->size3, "MDefBoundIsect");
|
||||
mdb->semibound = MEM_callocN(sizeof(int) * mdb->size3, "MDefSemiBound");
|
||||
mdb->bvhtree = bvhtree_from_mesh_faces(&mdb->bvhdata, mdb->cagedm, FLT_EPSILON*100, 4, 6);
|
||||
mdb->bvhtree = bvhtree_from_mesh_faces(&mdb->bvhdata, mdb->cagedm, FLT_EPSILON * 100, 4, 6);
|
||||
mdb->inside = MEM_callocN(sizeof(int) * mdb->totvert, "MDefInside");
|
||||
|
||||
if (mmd->flag & MOD_MDEF_DYNAMIC_BIND)
|
||||
|
|
|
@ -315,7 +315,7 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char **
|
|||
UI_ThemeColor(TH_GRID);
|
||||
|
||||
if (unit->system) {
|
||||
/* Use GRID_MIN_PX*2 for units because very very small grid
|
||||
/* Use GRID_MIN_PX * 2 for units because very very small grid
|
||||
* items are less useful when dealing with units */
|
||||
void *usys;
|
||||
int len, i;
|
||||
|
@ -381,7 +381,7 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char **
|
|||
drawgrid_draw(ar, wx, wy, x, y, sublines * dx);
|
||||
}
|
||||
}
|
||||
else { /* start blending out (GRID_MIN_PX < dx < (GRID_MIN_PX*10)) */
|
||||
else { /* start blending out (GRID_MIN_PX < dx < (GRID_MIN_PX * 10)) */
|
||||
UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX_D * 6.0));
|
||||
drawgrid_draw(ar, wx, wy, x, y, dx);
|
||||
|
||||
|
|
|
@ -816,7 +816,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
|
|||
|
||||
|
||||
/* scale the mouse movement by this value - scales mouse movement to the view size
|
||||
* moffset[0]/(ar->winx-xmargin*2) - window size minus margin (same for y)
|
||||
* moffset[0] / (ar->winx-xmargin * 2) - window size minus margin (same for y)
|
||||
*
|
||||
* the mouse moves isn't linear */
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ typedef enum ThumbSource {
|
|||
} ThumbSource;
|
||||
|
||||
/* don't generate thumbs for images bigger then this (100mb) */
|
||||
#define THUMB_SIZE_MAX (100 * 1024*1024)
|
||||
#define THUMB_SIZE_MAX (100 * 1024 * 1024)
|
||||
|
||||
// IB_metadata
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
|||
step_tot = ((step_tot + 1) * ltmd->iter) - (ltmd->iter - 1);
|
||||
|
||||
/* will the screw be closed?
|
||||
* Note! smaller then FLT_EPSILON*100 gives problems with float precision so its never closed. */
|
||||
* Note! smaller then FLT_EPSILON * 100 gives problems with float precision so its never closed. */
|
||||
if (fabsf(screw_ofs) <= (FLT_EPSILON * 100.0f) &&
|
||||
fabsf(fabsf(angle) - ((float)M_PI * 2.0f)) <= (FLT_EPSILON * 100.0f))
|
||||
{
|
||||
|
|
|
@ -557,7 +557,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
|
|||
[qtexport->movie setAttribute:[NSNumber numberWithBool:YES] forKey:QTMovieEditableAttribute];
|
||||
[qtexport->movie setAttribute:@"Made with Blender" forKey:QTMovieCopyrightAttribute];
|
||||
|
||||
qtexport->frameDuration = QTMakeTime(rd->frs_sec_base*1000, rd->frs_sec*1000);
|
||||
qtexport->frameDuration = QTMakeTime(rd->frs_sec_base * 1000, rd->frs_sec * 1000);
|
||||
|
||||
/* specifying the codec attributes : try to retrieve them from render data first*/
|
||||
if (rd->qtcodecsettings.codecType) {
|
||||
|
|
Loading…
Reference in New Issue