Style Cleanup: whitespace
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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? */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1833,7 +1833,7 @@ static void rna_def_struct_function_prototype_cpp(FILE *f, StructRNA *UNUSED(srn
|
||||
if (flag & PROP_DYNAMIC)
|
||||
ptrstr = pout ? "**" : "*";
|
||||
else if (type == PROP_POINTER)
|
||||
ptrstr = pout ? "*": "";
|
||||
ptrstr = pout ? "*" : "";
|
||||
else if (dp->prop->arraydimension)
|
||||
ptrstr = "*";
|
||||
else if (type == PROP_STRING && (flag & PROP_THICK_WRAP))
|
||||
|
||||
@@ -6378,8 +6378,8 @@ bool RNA_property_equals(PointerRNA *a, PointerRNA *b, PropertyRNA *prop, eRNAEq
|
||||
int *array_a, *array_b;
|
||||
bool equals;
|
||||
|
||||
array_a = (len > 16) ? MEM_callocN(sizeof(int) * len, "RNA equals"): fixed_a;
|
||||
array_b = (len > 16) ? MEM_callocN(sizeof(int) * len, "RNA equals"): fixed_b;
|
||||
array_a = (len > 16) ? MEM_callocN(sizeof(int) * len, "RNA equals") : fixed_a;
|
||||
array_b = (len > 16) ? MEM_callocN(sizeof(int) * len, "RNA equals") : fixed_b;
|
||||
|
||||
RNA_property_int_get_array(a, prop, array_a);
|
||||
RNA_property_int_get_array(b, prop, array_b);
|
||||
|
||||
Reference in New Issue
Block a user