[Bf-blender-cvs] [fc39e89] master: Style Cleanup: whitespace
Campbell Barton
noreply at git.blender.org
Sun Jan 12 12:28:17 CET 2014
Commit: fc39e895e945d5125ede6b6a5157f1160eec1fc5
Author: Campbell Barton
Date: Sun Jan 12 22:27:55 2014 +1100
https://developer.blender.org/rBfc39e895e945d5125ede6b6a5157f1160eec1fc5
Style Cleanup: whitespace
===================================================================
M source/blender/blenkernel/intern/customdata.c
M source/blender/bmesh/intern/bmesh_interp.c
M source/blender/compositor/nodes/COM_ZCombineNode.cpp
M source/blender/editors/render/render_opengl.c
M source/blender/editors/sculpt_paint/paint_cursor.c
M source/blender/editors/sculpt_paint/paint_image_2d.c
M source/blender/editors/space_view3d/drawobject.c
M source/blender/editors/space_view3d/view3d_buttons.c
M source/blender/editors/space_view3d/view3d_project.c
M source/blender/imbuf/intern/rectop.c
M source/blender/makesrna/intern/makesrna.c
M source/blender/makesrna/intern/rna_access.c
===================================================================
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 39b1a94..ccb167a 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -1474,7 +1474,7 @@ int CustomData_get_active_layer_index(const CustomData *data, int type)
{
const int layer_index = data->typemap[type];
BLI_assert(customdata_typemap_is_valid(data));
- return (layer_index != -1) ? layer_index + data->layers[layer_index].active: -1;
+ return (layer_index != -1) ? layer_index + data->layers[layer_index].active : -1;
}
int CustomData_get_render_layer_index(const CustomData *data, int type)
diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c
index 70d1d4c..182826b 100644
--- a/source/blender/bmesh/intern/bmesh_interp.c
+++ b/source/blender/bmesh/intern/bmesh_interp.c
@@ -776,7 +776,7 @@ void BM_data_layer_add(BMesh *bm, CustomData *data, int type)
CustomData olddata;
olddata = *data;
- olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers): NULL;
+ olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers) : NULL;
/* the pool is now owned by olddata and must not be shared */
data->pool = NULL;
@@ -792,7 +792,7 @@ void BM_data_layer_add_named(BMesh *bm, CustomData *data, int type, const char *
CustomData olddata;
olddata = *data;
- olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers): NULL;
+ olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers) : NULL;
/* the pool is now owned by olddata and must not be shared */
data->pool = NULL;
@@ -809,7 +809,7 @@ void BM_data_layer_free(BMesh *bm, CustomData *data, int type)
bool has_layer;
olddata = *data;
- olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers): NULL;
+ olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers) : NULL;
/* the pool is now owned by olddata and must not be shared */
data->pool = NULL;
@@ -828,7 +828,7 @@ void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n)
bool has_layer;
olddata = *data;
- olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers): NULL;
+ olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers) : NULL;
/* the pool is now owned by olddata and must not be shared */
data->pool = NULL;
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cpp b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
index b5fe488..685c969 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.cpp
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
@@ -89,7 +89,7 @@ void ZCombineNode::convertToOperations(ExecutionSystem *system, CompositorContex
addLink(system, maskoperation->getOutputSocket(), antialiasoperation->getInputSocket(0));
// use mask to blend between the input colors.
- ZCombineMaskOperation *zcombineoperation = this->getbNode()->custom1?new ZCombineMaskAlphaOperation():new ZCombineMaskOperation();
+ ZCombineMaskOperation *zcombineoperation = this->getbNode()->custom1 ? new ZCombineMaskAlphaOperation() : new ZCombineMaskOperation();
addLink(system, antialiasoperation->getOutputSocket(), zcombineoperation->getInputSocket(0));
this->getInputSocket(0)->relinkConnections(zcombineoperation->getInputSocket(1), 0, system);
this->getInputSocket(2)->relinkConnections(zcombineoperation->getInputSocket(2), 2, system);
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index a1d0996..1fe8f1d 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -250,7 +250,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
char err_out[256] = "unknown";
ImBuf *ibuf_view = ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, oglrender->sizex, oglrender->sizey,
IB_rect, OB_SOLID, FALSE, TRUE,
- (draw_sky) ? R_ADDSKY: R_ALPHAPREMUL, err_out);
+ (draw_sky) ? R_ADDSKY : R_ALPHAPREMUL, err_out);
camera = scene->camera;
if (ibuf_view) {
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 00ae9f7..07993db 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -729,7 +729,7 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush,
ViewContext *vc, int x, int y, float zoom, PaintMode mode)
{
/* color means that primary brush texture is colured and secondary is used for alpha/mask control */
- bool col = ELEM3(mode, PAINT_TEXTURE_PROJECTIVE, PAINT_TEXTURE_2D, PAINT_VERTEX) ? true: false;
+ bool col = ELEM3(mode, PAINT_TEXTURE_PROJECTIVE, PAINT_TEXTURE_2D, PAINT_VERTEX) ? true : false;
OverlayControlFlags flags = BKE_paint_get_overlay_flags();
/* save lots of GL state
* TODO: check on whether all of these are needed? */
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index b2f429c..be2f872 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -201,7 +201,7 @@ static unsigned short *brush_painter_mask_new(BrushPainter *painter, int size)
Brush *brush = painter->brush;
bool use_masking = painter->cache.use_masking;
- float alpha = (use_masking)? 1.0f: BKE_brush_alpha_get(scene, brush);
+ float alpha = (use_masking) ? 1.0f : BKE_brush_alpha_get(scene, brush);
int radius = BKE_brush_size_get(scene, brush);
int xoff = -size * 0.5f + 0.5f;
int yoff = -size * 0.5f + 0.5f;
@@ -243,7 +243,7 @@ static ImBuf *brush_painter_imbuf_new(BrushPainter *painter, int size)
bool is_texbrush = painter->cache.is_texbrush;
bool is_maskbrush = painter->cache.is_maskbrush;
- float alpha = (use_masking)? 1.0f: BKE_brush_alpha_get(scene, brush);
+ float alpha = (use_masking) ? 1.0f : BKE_brush_alpha_get(scene, brush);
int radius = BKE_brush_size_get(scene, brush);
int xoff = -size * 0.5f + 0.5f;
int yoff = -size * 0.5f + 0.5f;
@@ -682,7 +682,7 @@ static void paint_2d_ibuf_rgb_set(ImBuf *ibuf, int x, int y, const short is_toru
if (ibuf->rect_float) {
float *rrgbf = ibuf->rect_float + (ibuf->x * y + x) * 4;
- float map_alpha = (rgb[3] == 0.0f)? rrgbf[3] : rrgbf[3] / rgb[3];
+ float map_alpha = (rgb[3] == 0.0f) ? rrgbf[3] : rrgbf[3] / rgb[3];
mul_v3_v3fl(rrgbf, rgb, map_alpha);
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index f34eb6a..173e10b 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -611,7 +611,7 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char
if (ibuf && ibuf->rect) {
const bool use_clip = (U.glalphaclip != 1.0f);
- int zoomfilter = (U.gameflags & USER_DISABLE_MIPMAP )? GL_NEAREST : GL_LINEAR;
+ int zoomfilter = (U.gameflags & USER_DISABLE_MIPMAP ) ? GL_NEAREST : GL_LINEAR;
/* Setup GL params */
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 3b4405a..b4bc202 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -884,7 +884,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
ot = ot_weight_paste;
WM_operator_properties_create_ptr(&op_ptr, ot);
RNA_int_set(&op_ptr, "weight_group", i);
- icon = (locked) ? ICON_BLANK1:ICON_PASTEDOWN;
+ icon = (locked) ? ICON_BLANK1 : ICON_PASTEDOWN;
uiItemFullO_ptr(row, ot, "", icon, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0);
/* The weight entry delete function */
@@ -892,7 +892,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
ot = ot_weight_delete;
WM_operator_properties_create_ptr(&op_ptr, ot);
RNA_int_set(&op_ptr, "weight_group", i);
- icon = (locked) ? ICON_LOCKED:ICON_X;
+ icon = (locked) ? ICON_LOCKED : ICON_X;
uiItemFullO_ptr(row, ot, "", icon, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0);
yco -= UI_UNIT_Y;
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c
index 28ffdea..0954563 100644
--- a/source/blender/editors/space_view3d/view3d_project.c
+++ b/source/blender/editors/space_view3d/view3d_project.c
@@ -141,7 +141,7 @@ static eV3DProjStatus ed_view3d_project__internal(const ARegion *ar,
if (((flag & V3D_PROJ_TEST_CLIP_ZERO) == 0) || (fabsf(vec4[3]) > (float)BL_ZERO_CLIP)) {
if (((flag & V3D_PROJ_TEST_CLIP_NEAR) == 0) || (vec4[3] > (float)BL_NEAR_CLIP)) {
- const float scalar = (vec4[3] != 0.0f) ? (1.0f / vec4[3]): 0.0f;
+ const float scalar = (vec4[3] != 0.0f) ? (1.0f / vec4[3]) : 0.0f;
const float fx = ((float)ar->winx / 2.0f) * (1.0f + (vec4[0] * scalar));
if (((flag & V3D_PROJ_TEST_CLIP_WIN) == 0) || (fx > 0.0f && fx < (float)ar->winx)) {
const float fy = ((float)ar->winy / 2.0f) * (1.0f + (vec4[1] * scalar));
diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c
index 16268b1..6df7587 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -321,7 +321,7 @@ void IMB_rectblend(ImBuf *dbuf, ImBuf *obuf, ImBuf *sbuf, unsigned short *dmask,
drf = drectf;
srf = srectf;
for (x = width; x > 0; x--, drf += 4, srf += 4) {
- float map_alpha = (srf[3] == 0.0f)? drf[3] : drf[3] / srf[3];
+ float map_alpha = (srf[3] == 0.0f) ? drf[3] : drf[3] / srf[3];
drf[0] = srf[0] * map_alpha;
drf[1] = srf[1] * map_alpha;
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 6a25b97..160de41 100644
--- a/source/blender/makes
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list