[Bf-blender-cvs] [bd59206] master: Cleanup: style, spelling
Campbell Barton
noreply at git.blender.org
Tue Jul 19 01:33:22 CEST 2016
Commit: bd59206b5c28674a757746a64aaf31abc107cedb
Author: Campbell Barton
Date: Tue Jul 19 08:39:38 2016 +1000
Branches: master
https://developer.blender.org/rBbd59206b5c28674a757746a64aaf31abc107cedb
Cleanup: style, spelling
===================================================================
M source/blender/blenkernel/intern/CCGSubSurf_intern.h
M source/blender/blenkernel/intern/colortools.c
M source/blender/blenkernel/intern/image.c
M source/blender/blenlib/intern/BLI_kdopbvh.c
M source/blender/blenloader/intern/writefile.c
M source/blender/bmesh/intern/bmesh_polygon.c
M source/blender/render/extern/include/RE_pipeline.h
M source/blender/render/intern/source/pipeline.c
M source/blender/render/intern/source/zbuf.c
===================================================================
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_intern.h b/source/blender/blenkernel/intern/CCGSubSurf_intern.h
index 7ec9f32..0cdf3ac 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_intern.h
+++ b/source/blender/blenkernel/intern/CCGSubSurf_intern.h
@@ -86,7 +86,7 @@ void ccg_ehashIterator_next(EHashIterator *ehi);
int ccg_ehashIterator_isStopped(EHashIterator *ehi);
/**
- * Standard allocator implementarion.
+ * Standard allocator implementation.
*/
CCGAllocatorIFC *ccg_getStandardAllocatorIFC(void);
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 4089475..53a7402 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -1266,7 +1266,7 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, const ColorManagedViewSettings *
switch (scopes->wavefrm_mode) {
case SCOPES_WAVEFRM_RGB:
- //break;
+ /* fall-through */
case SCOPES_WAVEFRM_RGB_PARADE:
ycc_mode = -1;
break;
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index ae3163d..7cf2b95 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1083,39 +1083,48 @@ int BKE_image_imtype_to_ftype(const char imtype, ImbFormatOptions *r_options)
{
memset(r_options, 0, sizeof(*r_options));
- if (imtype == R_IMF_IMTYPE_TARGA)
+ if (imtype == R_IMF_IMTYPE_TARGA) {
return IMB_FTYPE_TGA;
+ }
else if (imtype == R_IMF_IMTYPE_RAWTGA) {
r_options->flag = RAWTGA;
return IMB_FTYPE_TGA;
}
- else if (imtype == R_IMF_IMTYPE_IRIS)
+ else if (imtype == R_IMF_IMTYPE_IRIS) {
return IMB_FTYPE_IMAGIC;
+ }
#ifdef WITH_HDR
- else if (imtype == R_IMF_IMTYPE_RADHDR)
+ else if (imtype == R_IMF_IMTYPE_RADHDR) {
return IMB_FTYPE_RADHDR;
+ }
#endif
else if (imtype == R_IMF_IMTYPE_PNG) {
r_options->quality = 15;
return IMB_FTYPE_PNG;
}
#ifdef WITH_DDS
- else if (imtype == R_IMF_IMTYPE_DDS)
+ else if (imtype == R_IMF_IMTYPE_DDS) {
return IMB_FTYPE_DDS;
+ }
#endif
- else if (imtype == R_IMF_IMTYPE_BMP)
+ else if (imtype == R_IMF_IMTYPE_BMP) {
return IMB_FTYPE_BMP;
+ }
#ifdef WITH_TIFF
- else if (imtype == R_IMF_IMTYPE_TIFF)
+ else if (imtype == R_IMF_IMTYPE_TIFF) {
return IMB_FTYPE_TIF;
+ }
#endif
- else if (imtype == R_IMF_IMTYPE_OPENEXR || imtype == R_IMF_IMTYPE_MULTILAYER)
+ else if (imtype == R_IMF_IMTYPE_OPENEXR || imtype == R_IMF_IMTYPE_MULTILAYER) {
return IMB_FTYPE_OPENEXR;
+ }
#ifdef WITH_CINEON
- else if (imtype == R_IMF_IMTYPE_CINEON)
+ else if (imtype == R_IMF_IMTYPE_CINEON) {
return IMB_FTYPE_CINEON;
- else if (imtype == R_IMF_IMTYPE_DPX)
+ }
+ else if (imtype == R_IMF_IMTYPE_DPX) {
return IMB_FTYPE_DPX;
+ }
#endif
#ifdef WITH_OPENJPEG
else if (imtype == R_IMF_IMTYPE_JP2) {
@@ -1132,46 +1141,60 @@ int BKE_image_imtype_to_ftype(const char imtype, ImbFormatOptions *r_options)
char BKE_image_ftype_to_imtype(const int ftype, const ImbFormatOptions *options)
{
- if (ftype == 0)
+ if (ftype == 0) {
return R_IMF_IMTYPE_TARGA;
- else if (ftype == IMB_FTYPE_IMAGIC)
+ }
+ else if (ftype == IMB_FTYPE_IMAGIC) {
return R_IMF_IMTYPE_IRIS;
+ }
#ifdef WITH_HDR
- else if (ftype == IMB_FTYPE_RADHDR)
+ else if (ftype == IMB_FTYPE_RADHDR) {
return R_IMF_IMTYPE_RADHDR;
+ }
#endif
- else if (ftype == IMB_FTYPE_PNG)
+ else if (ftype == IMB_FTYPE_PNG) {
return R_IMF_IMTYPE_PNG;
+ }
#ifdef WITH_DDS
- else if (ftype == IMB_FTYPE_DDS)
+ else if (ftype == IMB_FTYPE_DDS) {
return R_IMF_IMTYPE_DDS;
+ }
#endif
- else if (ftype == IMB_FTYPE_BMP)
+ else if (ftype == IMB_FTYPE_BMP) {
return R_IMF_IMTYPE_BMP;
+ }
#ifdef WITH_TIFF
- else if (ftype == IMB_FTYPE_TIF)
+ else if (ftype == IMB_FTYPE_TIF) {
return R_IMF_IMTYPE_TIFF;
+ }
#endif
- else if (ftype == IMB_FTYPE_OPENEXR)
+ else if (ftype == IMB_FTYPE_OPENEXR) {
return R_IMF_IMTYPE_OPENEXR;
+ }
#ifdef WITH_CINEON
- else if (ftype == IMB_FTYPE_CINEON)
+ else if (ftype == IMB_FTYPE_CINEON) {
return R_IMF_IMTYPE_CINEON;
- else if (ftype == IMB_FTYPE_DPX)
+ }
+ else if (ftype == IMB_FTYPE_DPX) {
return R_IMF_IMTYPE_DPX;
+ }
#endif
else if (ftype == IMB_FTYPE_TGA) {
- if (options && (options->flag & RAWTGA))
+ if (options && (options->flag & RAWTGA)) {
return R_IMF_IMTYPE_RAWTGA;
- else
+ }
+ else {
return R_IMF_IMTYPE_TARGA;
+ }
}
#ifdef WITH_OPENJPEG
- else if (ftype == IMB_FTYPE_JP2)
+ else if (ftype == IMB_FTYPE_JP2) {
return R_IMF_IMTYPE_JP2;
+ }
#endif
- else
+ else {
return R_IMF_IMTYPE_JPEG90;
+ }
}
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 92f4e99..b14007a 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -1917,7 +1917,7 @@ static void dist_squared_ray_to_aabb_scaled_v3_precalc(
}
/* un-normalize ray */
if (ray_is_normalized && scale &&
- (data->scale[0] != 1.0f || data->scale[1] != 1.0f || data->scale[2] != 1.0f))
+ (data->scale[0] != 1.0f || data->scale[1] != 1.0f || data->scale[2] != 1.0f))
{
data->ray.direction[0] = ray_direction[0] * data->scale[0];
data->ray.direction[1] = ray_direction[1] * data->scale[1];
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index ba783e0..88f1c4d 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2268,7 +2268,7 @@ static void write_meshes(WriteData *wd, ListBase *idbase)
mesh->edit_btmesh = NULL;
/* now fill in polys to mfaces */
- /* XXX This breaks writing design, by using temp allocated memory, which will likely generate
+ /* XXX This breaks writing desing, by using temp allocated memory, which will likely generate
* duplicates in stored 'old' addresses.
* This is very bad, but do not see easy way to avoid this, aside from generating those data
* outside of save process itself.
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 13b6a3c..08e9704 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -57,10 +57,9 @@
static bool testedgesidef(const float v1[2], const float v2[2], const float v3[2])
{
/* is v3 to the right of v1 - v2 ? With exception: v3 == v1 || v3 == v2 */
- double inp;
-
- //inp = (v2[cox] - v1[cox]) * (v1[coy] - v3[coy]) + (v1[coy] - v2[coy]) * (v1[cox] - v3[cox]);
- inp = (v2[0] - v1[0]) * (v1[1] - v3[1]) + (v1[1] - v2[1]) * (v1[0] - v3[0]);
+ const float inp =
+ ((v2[0] - v1[0]) * (v1[1] - v3[1])) +
+ ((v1[1] - v2[1]) * (v1[0] - v3[0]));
if (inp < 0.0) {
return false;
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index ce0691b..39f62f9 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -231,8 +231,9 @@ struct RenderStats *RE_GetStats(struct Render *re);
void RE_ResultGet32(struct Render *re, unsigned int *rect);
void RE_AcquiredResultGet32(struct Render *re, struct RenderResult *result, unsigned int *rect, const int view_id);
-void RE_render_result_rect_from_ibuf(struct RenderResult *rr, struct RenderData *rd,
- struct ImBuf *ibuf, const int view_id);
+void RE_render_result_rect_from_ibuf(
+ struct RenderResult *rr, struct RenderData *rd,
+ struct ImBuf *ibuf, const int view_id);
struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char *name);
float *RE_RenderLayerGetPass(volatile struct RenderLayer *rl, int passtype, const char *viewname);
@@ -249,8 +250,8 @@ struct Object *RE_GetCamera(struct Render *re); /* return camera override if set
void RE_SetOverrideCamera(struct Render *re, struct Object *camera);
void RE_SetCamera(struct Render *re, struct Object *camera);
void RE_SetEnvmapCamera(struct Render *re, struct Object *cam_ob, float viewscale, float clipsta, float clipend);
-void RE_SetWindow(struct Render *re, rctf *viewplane, float clipsta, float clipend);
-void RE_SetOrtho(struct Render *re, rctf *viewplane, float clipsta, float clipend);
+void RE_SetWindow(struct Render *re, const rctf *viewplane, float clipsta, float clipend);
+void RE_SetOrtho(struct Render *re, const rctf *viewplane, float clipsta, float clipend);
void RE_SetPixelSize(struct Render *re, float pixsize);
/* option to set viewmatrix before making dbase */
@@ -258,10 +259,12 @@ void RE_SetView(struct Render *re, float mat[4][4]);
/* get current view and window transform */
void RE_GetView(struct Render *re, float mat[4][4]);
-void RE_GetViewPlane(struct Render *re, rctf *viewplane, rcti *disprect);
+void RE_GetViewPlane(struct Render *re, rctf *r_viewplane, rcti *r_disprect);
/* make or free the dbase */
-void RE_Database_FromScene(struct Render *re, struct Main *bmain, struct Scene *scene, unsigned int lay, int use_camera_view);
+void RE_Database_FromScene(
+ struct Render *re, struct Main *bmain, struct Scene *scene,
+ unsigned int lay, int use_camera_view);
void RE_Database_Preprocess(struct Render *re);
void RE_Database_Free(struct Render *re);
@@ -304,11 +307,16 @@ void RE_SetReports(struct Render *re, struct ReportList *reports);
void RE_PreviewRender(struct Render *re, struct Main *bmain, struct Scene *scene);
bool RE_ReadRenderResult(struct Scene *scene, struct Scene *scenode);
-bool RE_WriteRenderResult(struct ReportList *reports, RenderResult *rr, const char *filename, struct ImageFormatData *imf, const bool multiview, const char *view);
-struct RenderResult *RE_MultilayerConvert(void *exrhandle, const char *colorspace, bool predivide, int rectx, int recty);
+bool RE_WriteRenderResult(
+ struct ReportList *reports, RenderResult *rr, const char *filename,
+ struct ImageFormatData *imf, const bool multiview, const char *view);
+struct RenderResult *RE_MultilayerConvert(
+ void *exrhandle, const char *colorspace, bool predivide, int rectx, int recty);
extern const float default_en
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list