cleanup: style/indentation
This commit is contained in:
parent
387d91829d
commit
d4934f8f6d
@ -790,10 +790,10 @@ static ImBuf *postprocess_frame(MovieClip *clip, MovieClipUser *user, ImBuf *ibu
|
||||
}
|
||||
|
||||
if (postprocess_flag) {
|
||||
bool disable_red = (postprocess_flag & MOVIECLIP_DISABLE_RED) != 0,
|
||||
disable_green = (postprocess_flag & MOVIECLIP_DISABLE_GREEN) != 0,
|
||||
disable_blue = (postprocess_flag & MOVIECLIP_DISABLE_BLUE) != 0,
|
||||
grayscale = (postprocess_flag & MOVIECLIP_PREVIEW_GRAYSCALE) != 0;
|
||||
bool disable_red = (postprocess_flag & MOVIECLIP_DISABLE_RED) != 0;
|
||||
bool disable_green = (postprocess_flag & MOVIECLIP_DISABLE_GREEN) != 0;
|
||||
bool disable_blue = (postprocess_flag & MOVIECLIP_DISABLE_BLUE) != 0;
|
||||
bool grayscale = (postprocess_flag & MOVIECLIP_PREVIEW_GRAYSCALE) != 0;
|
||||
|
||||
if (disable_red || disable_green || disable_blue || grayscale)
|
||||
BKE_tracking_disable_channels(postproc_ibuf, disable_red, disable_green, disable_blue, 1);
|
||||
|
@ -2670,8 +2670,8 @@ static void do_gaussian_blur_effect_byte(Sequence *seq,
|
||||
{
|
||||
#define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
|
||||
GaussianBlurVars *data = seq->effectdata;
|
||||
const int size_x = (int) (data->size_x + 0.5f),
|
||||
size_y = (int) (data->size_y + 0.5f);
|
||||
const int size_x = (int) (data->size_x + 0.5f);
|
||||
const int size_y = (int) (data->size_y + 0.5f);
|
||||
int i, j;
|
||||
|
||||
/* Make gaussian weight tabke. */
|
||||
@ -2754,8 +2754,8 @@ static void do_gaussian_blur_effect_float(Sequence *seq,
|
||||
{
|
||||
#define INDEX(_x, _y) (((_y) * (x) + (_x)) * 4)
|
||||
GaussianBlurVars *data = seq->effectdata;
|
||||
const int size_x = (int) (data->size_x + 0.5f),
|
||||
size_y = (int) (data->size_y + 0.5f);
|
||||
const int size_x = (int) (data->size_x + 0.5f);
|
||||
const int size_y = (int) (data->size_y + 0.5f);
|
||||
int i, j;
|
||||
|
||||
/* Make gaussian weight tabke. */
|
||||
|
@ -1945,7 +1945,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
|
||||
float dist;
|
||||
|
||||
closest_to_line_segment_v3(ve, opco, nv1, nv2);
|
||||
sub_v3_v3v3(ve, opco, ve);
|
||||
sub_v3_v3v3(ve, opco, ve);
|
||||
dist = normalize_v3(ve);
|
||||
if ((dist < outerfacethickness)&&(dist < mindistedge )) {
|
||||
copy_v3_v3(coledge, ve);
|
||||
|
@ -278,8 +278,8 @@ static float npfade(float t)
|
||||
static float grad(int hash_val, float x, float y, float z)
|
||||
{
|
||||
int h = hash_val & 15; /* CONVERT LO 4 BITS OF HASH CODE */
|
||||
float u = h < 8 ? x : y, /* INTO 12 GRADIENT DIRECTIONS. */
|
||||
v = h < 4 ? y : h == 12 || h == 14 ? x : z;
|
||||
float u = h < 8 ? x : y; /* INTO 12 GRADIENT DIRECTIONS. */
|
||||
float v = h < 4 ? y : h == 12 || h == 14 ? x : z;
|
||||
return ((h & 1) == 0 ? u : -u) + ((h & 2) == 0 ? v : -v);
|
||||
}
|
||||
|
||||
|
@ -2896,8 +2896,9 @@ static BevVert *bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v)
|
||||
nwire++;
|
||||
/* If edge beveling, exclude wire edges from edges array.
|
||||
* Mark this edge as "chosen" so loop below won't choose it. */
|
||||
if (!bp->vertex_only)
|
||||
if (!bp->vertex_only) {
|
||||
BM_BEVEL_EDGE_TAG_ENABLE(bme);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!first_bme)
|
||||
|
@ -187,11 +187,11 @@ void MemoryBuffer::addPixel(int x, int y, const float color[4])
|
||||
y >= this->m_rect.ymin && y < this->m_rect.ymax)
|
||||
{
|
||||
const int offset = (this->m_width * (y - this->m_rect.ymin) + x - this->m_rect.xmin) * this->m_num_channels;
|
||||
float *dst = &this->m_buffer[offset];
|
||||
const float *src = color;
|
||||
for (int i = 0; i < this->m_num_channels ; i++, dst++, src++) {
|
||||
*dst += *src;
|
||||
}
|
||||
float *dst = &this->m_buffer[offset];
|
||||
const float *src = color;
|
||||
for (int i = 0; i < this->m_num_channels ; i++, dst++, src++) {
|
||||
*dst += *src;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2745,7 +2745,7 @@ static void mesh_separate_material_assign_mat_nr(Object *ob, const short mat_nr)
|
||||
}
|
||||
|
||||
if (mat_nr < *totcolp) {
|
||||
ma_obdata = (*matarar)[mat_nr];
|
||||
ma_obdata = (*matarar)[mat_nr];
|
||||
}
|
||||
else {
|
||||
ma_obdata = NULL;
|
||||
|
@ -895,7 +895,7 @@ int ED_mesh_mirror_get_vert(Object *ob, int index)
|
||||
index_mirr = eve_mirr ? BM_elem_index_get(eve_mirr) : -1;
|
||||
}
|
||||
else {
|
||||
index_mirr = mesh_get_x_mirror_vert(ob, index, use_topology);
|
||||
index_mirr = mesh_get_x_mirror_vert(ob, index, use_topology);
|
||||
}
|
||||
|
||||
return index_mirr;
|
||||
|
@ -1146,8 +1146,8 @@ BLI_INLINE void rcti_scale_coords(rcti *scaled_rect, const rcti *rect,
|
||||
static void render_update_resolution(Render *re, const RenderPreview *rp,
|
||||
bool use_border, const rcti *clip_rect)
|
||||
{
|
||||
int winx = rp->ar->winx / rp->resolution_divider,
|
||||
winy = rp->ar->winy / rp->resolution_divider;
|
||||
int winx = rp->ar->winx / rp->resolution_divider;
|
||||
int winy = rp->ar->winy / rp->resolution_divider;
|
||||
if (use_border) {
|
||||
rcti scaled_cliprct;
|
||||
rcti_scale_coords(&scaled_cliprct, clip_rect,
|
||||
@ -1461,7 +1461,7 @@ static void render_view3d_do(RenderEngine *engine, const bContext *C)
|
||||
engine->flag &= ~RE_ENGINE_DO_UPDATE;
|
||||
}
|
||||
|
||||
/* callback for render engine , on changes */
|
||||
/* callback for render engine, on changes */
|
||||
void render_view3d_update(RenderEngine *engine, const bContext *C)
|
||||
{
|
||||
/* this shouldn't be needed and causes too many database rebuilds, but we
|
||||
|
@ -2093,7 +2093,7 @@ void ED_update_for_newframe(Main *bmain, Scene *scene, int UNUSED(mute))
|
||||
/* this function applies the changes too */
|
||||
BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene, layers);
|
||||
|
||||
//if ( (CFRA>1) && (!mute) && (scene->r.audio.flag & AUDIO_SCRUB))
|
||||
//if ((CFRA > 1) && (!mute) && (scene->r.audio.flag & AUDIO_SCRUB))
|
||||
// audiostream_scrub( CFRA );
|
||||
|
||||
/* 3d window, preview */
|
||||
|
@ -242,7 +242,7 @@ static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op)
|
||||
}
|
||||
SEQ_END
|
||||
|
||||
fcu = id_data_find_fcurve(&scene->id, scene, &RNA_Scene, "audio_volume", 0, &driven);
|
||||
fcu = id_data_find_fcurve(&scene->id, scene, &RNA_Scene, "audio_volume", 0, &driven);
|
||||
if (fcu || driven)
|
||||
scene->audio.flag |= AUDIO_VOLUME_ANIMATED;
|
||||
else
|
||||
|
@ -828,6 +828,7 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
|
||||
outliner_add_element(soops, &te->subtree, gpl, te, TSE_GP_LAYER, a);
|
||||
a++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1503,7 +1503,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
|
||||
if ((t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) !=
|
||||
(modifiers_prev & (MOD_SNAP | MOD_SNAP_INVERT)))
|
||||
{
|
||||
applyMouseInput(t, &t->mouse, t->mval, t->values);
|
||||
applyMouseInput(t, &t->mouse, t->mval, t->values);
|
||||
}
|
||||
|
||||
/* Per transform event, if present */
|
||||
|
@ -574,11 +574,11 @@ static void stitch_island_calculate_vert_rotation(UvElement *element, StitchStat
|
||||
edgecos = dot_v2v2(normal, state->normals + index_tmp1 * 2);
|
||||
edgesin = cross_v2v2(normal, state->normals + index_tmp1 * 2);
|
||||
if (edgesin > 0.0f) {
|
||||
rotation += acosf(max_ff(-1.0f, min_ff(1.0f, edgecos)));
|
||||
rotation += acosf(max_ff(-1.0f, min_ff(1.0f, edgecos)));
|
||||
rot_elem++;
|
||||
}
|
||||
else {
|
||||
rotation_neg += acosf(max_ff(-1.0f, min_ff(1.0f, edgecos)));
|
||||
rotation_neg += acosf(max_ff(-1.0f, min_ff(1.0f, edgecos)));
|
||||
rot_elem_neg++;
|
||||
}
|
||||
}
|
||||
|
@ -211,8 +211,9 @@ bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg)
|
||||
}
|
||||
|
||||
WVertex::incoming_edge_iterator itE;
|
||||
for (itE = v->incoming_edges_begin(); itE != v->incoming_edges_end(); itE++)
|
||||
area += (*itE)->GetaFace()->getArea();
|
||||
for (itE = v->incoming_edges_begin(); itE != v->incoming_edges_end(); itE++) {
|
||||
area += (*itE)->GetaFace()->getArea();
|
||||
}
|
||||
|
||||
for (itE = v->incoming_edges_begin(); itE != v->incoming_edges_end(); itE++) {
|
||||
WOEdge *e = (*itE)->getPrevOnFace();
|
||||
|
@ -247,8 +247,9 @@ static GPUBuffer *gpu_buffer_alloc_intern(int size, bool use_VBO)
|
||||
bufsize = pool->buffers[i]->size;
|
||||
|
||||
/* only return a buffer that matches the VBO preference */
|
||||
if (pool->buffers[i]->use_vbo != use_VBO)
|
||||
if (pool->buffers[i]->use_vbo != use_VBO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* check for an exact size match */
|
||||
if (bufsize == size) {
|
||||
@ -653,7 +654,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
|
||||
|
||||
/* attempt to map the buffer */
|
||||
if (!(varray = glMapBufferARB(target, GL_WRITE_ONLY_ARB))) {
|
||||
buffer = gpu_try_realloc(pool, buffer, size, true);
|
||||
buffer = gpu_try_realloc(pool, buffer, size, true);
|
||||
|
||||
/* allocation still failed; fall back
|
||||
* to legacy mode */
|
||||
|
@ -2128,18 +2128,18 @@ GPUNodeLink *GPU_lamp_get_data(GPUMaterial *mat, GPULamp *lamp, GPUNodeLink **co
|
||||
|
||||
if (lamp->la->shadowmap_type == LA_SHADMAP_VARIANCE) {
|
||||
GPU_link(mat, "shadows_only_vsm",
|
||||
GPU_builtin(GPU_VIEW_POSITION),
|
||||
GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
|
||||
GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
|
||||
GPU_uniform(&lamp->bias), GPU_uniform(&lamp->la->bleedbias),
|
||||
GPU_uniform(lamp->shadow_color), inp, shadow);
|
||||
GPU_builtin(GPU_VIEW_POSITION),
|
||||
GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
|
||||
GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
|
||||
GPU_uniform(&lamp->bias), GPU_uniform(&lamp->la->bleedbias),
|
||||
GPU_uniform(lamp->shadow_color), inp, shadow);
|
||||
}
|
||||
else {
|
||||
GPU_link(mat, "shadows_only",
|
||||
GPU_builtin(GPU_VIEW_POSITION),
|
||||
GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
|
||||
GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
|
||||
GPU_uniform(&lamp->bias), GPU_uniform(lamp->shadow_color), inp, shadow);
|
||||
GPU_builtin(GPU_VIEW_POSITION),
|
||||
GPU_dynamic_texture(lamp->tex, GPU_DYNAMIC_SAMPLER_2DSHADOW, lamp->ob),
|
||||
GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob),
|
||||
GPU_uniform(&lamp->bias), GPU_uniform(lamp->shadow_color), inp, shadow);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -169,8 +169,8 @@ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from,
|
||||
float tmp[4];
|
||||
int x, y;
|
||||
DitherContext *di = NULL;
|
||||
float inv_width = 1.0f / width,
|
||||
inv_height = 1.0f / height;
|
||||
float inv_width = 1.0f / width;
|
||||
float inv_height = 1.0f / height;
|
||||
|
||||
/* we need valid profiles */
|
||||
BLI_assert(profile_to != IB_PROFILE_NONE);
|
||||
|
@ -188,7 +188,7 @@ typedef enum eGPdata_Flag {
|
||||
GP_DATA_EXPAND = (1 << 2),
|
||||
|
||||
/* is the block overriding all clicks? */
|
||||
/* GP_DATA_EDITPAINT = (1 << 3), */
|
||||
/* GP_DATA_EDITPAINT = (1 << 3), */
|
||||
|
||||
/* new strokes are added in viewport space */
|
||||
GP_DATA_VIEWALIGN = (1 << 4),
|
||||
|
@ -682,14 +682,14 @@ void RNA_api_ui_layout(StructRNA *srna)
|
||||
|
||||
func = RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
|
||||
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
|
||||
RNA_def_function_ui_description(func, "Layout . Generates the UI layout for modifiers");
|
||||
RNA_def_function_ui_description(func, "Generates the UI layout for modifiers");
|
||||
parm = RNA_def_pointer(func, "data", "Modifier", "", "Modifier data");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL);
|
||||
parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
||||
func = RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
|
||||
RNA_def_function_ui_description(func, "Layout . Generates the UI layout for constraints");
|
||||
RNA_def_function_ui_description(func, "Generates the UI layout for constraints");
|
||||
parm = RNA_def_pointer(func, "data", "Constraint", "", "Constraint data");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL);
|
||||
parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
|
||||
|
@ -814,22 +814,26 @@ void free_qtcomponentdata(void)
|
||||
void quicktime_verify_image_type(RenderData *rd, ImageFormatData *imf)
|
||||
{
|
||||
if (imf->imtype == R_IMF_IMTYPE_QUICKTIME) {
|
||||
if ((rd->qtcodecsettings.codecType<= 0) ||
|
||||
(rd->qtcodecsettings.codecSpatialQuality <0) ||
|
||||
(rd->qtcodecsettings.codecSpatialQuality > 100)) {
|
||||
|
||||
if ((rd->qtcodecsettings.codecType <= 0) ||
|
||||
(rd->qtcodecsettings.codecSpatialQuality < 0) ||
|
||||
(rd->qtcodecsettings.codecSpatialQuality > 100))
|
||||
{
|
||||
rd->qtcodecsettings.codecType = kJPEGCodecType;
|
||||
rd->qtcodecsettings.codecSpatialQuality = (codecHighQuality*100)/codecLosslessQuality;
|
||||
rd->qtcodecsettings.codecSpatialQuality = (codecHighQuality * 100) / codecLosslessQuality;
|
||||
}
|
||||
if ((rd->qtcodecsettings.audioSampleRate < 21000) ||
|
||||
(rd->qtcodecsettings.audioSampleRate > 193000))
|
||||
(rd->qtcodecsettings.audioSampleRate > 193000))
|
||||
{
|
||||
rd->qtcodecsettings.audioSampleRate = 48000;
|
||||
}
|
||||
|
||||
if (rd->qtcodecsettings.audioBitDepth == 0)
|
||||
if (rd->qtcodecsettings.audioBitDepth == 0) {
|
||||
rd->qtcodecsettings.audioBitDepth = AUD_FORMAT_S16;
|
||||
}
|
||||
|
||||
if (rd->qtcodecsettings.audioBitRate == 0)
|
||||
if (rd->qtcodecsettings.audioBitRate == 0) {
|
||||
rd->qtcodecsettings.audioBitRate = 256000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -718,10 +718,10 @@ static void render_result_rescale(Render *re)
|
||||
scale_y = (float) result->recty / re->result->recty;
|
||||
for (x = 0; x < re->result->rectx; ++x) {
|
||||
for (y = 0; y < re->result->recty; ++y) {
|
||||
int src_x = x * scale_x,
|
||||
src_y = y * scale_y;
|
||||
int dst_index = y * re->result->rectx + x,
|
||||
src_index = src_y * result->rectx + src_x;
|
||||
int src_x = x * scale_x;
|
||||
int src_y = y * scale_y;
|
||||
int dst_index = y * re->result->rectx + x;
|
||||
int src_index = src_y * result->rectx + src_x;
|
||||
copy_v4_v4(dst_rectf + dst_index * 4,
|
||||
src_rectf + src_index * 4);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ bool KX_MouseActuator::Update()
|
||||
center_x = ((m_canvas->GetWidth() - 1.0) / 2.0) / (m_canvas->GetWidth());
|
||||
}
|
||||
if ((m_canvas->GetHeight() % 2) != 0) {
|
||||
center_y = ((m_canvas->GetHeight() - 1.0) / 2.0) / (m_canvas->GetHeight());
|
||||
center_y = ((m_canvas->GetHeight() - 1.0) / 2.0) / (m_canvas->GetHeight());
|
||||
}
|
||||
|
||||
//preventing initial skipping.
|
||||
|
Loading…
Reference in New Issue
Block a user