Cleanup: remove redundant parenthesis

This commit is contained in:
Campbell Barton
2022-09-26 14:23:52 +10:00
parent 6275541df7
commit 34477bbfcd
31 changed files with 69 additions and 70 deletions

View File

@@ -3141,7 +3141,7 @@ bool GHOST_SystemWayland::processEvents(bool waitForEvent)
wl_display_roundtrip(d->display);
}
if ((getEventManager()->getNumEvents() > 0)) {
if (getEventManager()->getNumEvents() > 0) {
any_processed = true;
}
@@ -3219,7 +3219,7 @@ GHOST_TSuccess GHOST_SystemWayland::getButtons(GHOST_Buttons &buttons) const
char *GHOST_SystemWayland::getClipboard(bool /*selection*/) const
{
char *clipboard = static_cast<char *>(malloc((selection.size() + 1)));
char *clipboard = static_cast<char *>(malloc(selection.size() + 1));
memcpy(clipboard, selection.data(), selection.size() + 1);
return clipboard;
}
@@ -3656,12 +3656,12 @@ static void cursor_visible_set(GWL_Seat *seat,
if (set_mode == CURSOR_VISIBLE_ALWAYS_SET) {
/* Pass. */
}
else if ((set_mode == CURSOR_VISIBLE_ONLY_SHOW)) {
else if (set_mode == CURSOR_VISIBLE_ONLY_SHOW) {
if (!use_visible) {
return;
}
}
else if ((set_mode == CURSOR_VISIBLE_ONLY_HIDE)) {
else if (set_mode == CURSOR_VISIBLE_ONLY_HIDE) {
if (use_visible) {
return;
}

View File

@@ -660,7 +660,7 @@ bool GHOST_SystemX11::processEvents(bool waitForEvent)
}
/* dispatch event to XIM server */
if ((XFilterEvent(&xevent, (Window) nullptr) == True)) {
if (XFilterEvent(&xevent, (Window) nullptr) == True) {
/* do nothing now, the event is consumed by XIM. */
continue;
}
@@ -673,7 +673,7 @@ bool GHOST_SystemX11::processEvents(bool waitForEvent)
}
else if (xevent.type == KeyPress) {
if ((xevent.xkey.keycode == m_last_release_keycode) &&
((xevent.xkey.time <= m_last_release_time))) {
(xevent.xkey.time <= m_last_release_time)) {
continue;
}
}

View File

@@ -154,7 +154,7 @@ static void kelvinlet_scale(float disp[3],
sub_v3_v3v3(radius_vertex, vertex_co, location);
const float radius = len_v3(radius_vertex);
const float radius_e = sqrtf(pow2f(radius) + pow2f(p->radius_scaled[0]));
const float u = (2.0f * p->b - p->a) * ((1.0f / pow3f(radius_e))) +
const float u = (2.0f * p->b - p->a) * (1.0f / pow3f(radius_e)) +
((3.0f * pow2f(p->radius_scaled[0])) / (2.0f * pow5f(radius_e)));
const float fade = u * p->c;
mul_v3_v3fl(disp, radius_vertex, fade * p->f);
@@ -181,7 +181,7 @@ static void kelvinlet_twist(float disp[3],
sub_v3_v3v3(radius_vertex, vertex_co, location);
const float radius = len_v3(radius_vertex);
const float radius_e = sqrtf(pow2f(radius) + pow2f(p->radius_scaled[0]));
const float u = -p->a * ((1.0f / pow3f(radius_e))) +
const float u = -p->a * (1.0f / pow3f(radius_e)) +
((3.0f * pow2f(p->radius_scaled[0])) / (2.0f * pow5f(radius_e)));
const float fade = u * p->c;
cross_v3_v3v3(q_r, normal, radius_vertex);

View File

@@ -805,7 +805,7 @@ static void hash_array_from_cref(const BArrayInfo *info,
static void hash_accum(hash_key *hash_array, const size_t hash_array_len, size_t iter_steps)
{
/* _very_ unlikely, can happen if you select a chunk-size of 1 for example. */
if (UNLIKELY((iter_steps > hash_array_len))) {
if (UNLIKELY(iter_steps > hash_array_len)) {
iter_steps = hash_array_len;
}
@@ -1403,7 +1403,7 @@ BArrayStore *BLI_array_store_create(uint stride, uint chunk_count)
/* Triangle number, identifying now much read-ahead we need:
* https://en.wikipedia.org/wiki/Triangular_number (+ 1) */
bs->info.accum_read_ahead_len =
(uint)((((bs->info.accum_steps * (bs->info.accum_steps + 1))) / 2) + 1);
(uint)(((bs->info.accum_steps * (bs->info.accum_steps + 1)) / 2) + 1);
bs->info.accum_read_ahead_bytes = bs->info.accum_read_ahead_len * stride;
#else
bs->info.accum_read_ahead_bytes = BCHUNK_HASH_LEN * stride;

View File

@@ -1273,7 +1273,7 @@ bool BM_face_split_edgenet_connect_islands(BMesh *bm,
BMVert *v_other;
/* NOTE: remapping will _never_ map a vertex to an already mapped vertex. */
while (UNLIKELY((v_other = bm_face_split_edgenet_partial_connect(bm, v_delimit, f)))) {
while (UNLIKELY(v_other = bm_face_split_edgenet_partial_connect(bm, v_delimit, f))) {
struct TempVertPair *tvp = BLI_memarena_alloc(mem_arena, sizeof(*tvp));
tvp->next = temp_vert_pairs.list;
tvp->v_orig = v_delimit;

View File

@@ -6285,7 +6285,7 @@ static void find_bevel_edge_order(BMesh *bm, BevVert *bv, BMEdge *first_bme)
BMLoop *l;
BM_ITER_ELEM (l, &iter, bme, BM_LOOPS_OF_EDGE) {
BMFace *f = l->f;
if ((l->prev->e == bme2 || l->next->e == bme2)) {
if (l->prev->e == bme2 || l->next->e == bme2) {
if (!bestf || l->v == bv->v) {
bestf = f;
}

View File

@@ -451,7 +451,7 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm,
}
while ((BLI_heap_is_empty(vheap) == false) &&
(BLI_heap_node_value((vnode_top = BLI_heap_top(vheap))) < angle_limit)) {
(BLI_heap_node_value(vnode_top = BLI_heap_top(vheap)) < angle_limit)) {
BMEdge *e_new = NULL;
BMVert *v;

View File

@@ -1490,7 +1490,7 @@ bool BM_mesh_intersect(BMesh *bm,
(void)use_separate;
#endif /* USE_SEPARATE */
if ((boolean_mode != BMESH_ISECT_BOOLEAN_NONE)) {
if (boolean_mode != BMESH_ISECT_BOOLEAN_NONE) {
BVHTree *tree_pair[2] = {tree_a, tree_b};
/* group vars */

View File

@@ -228,7 +228,7 @@ static LinkNode *mesh_calc_path_region_elem(BMesh *bm,
/* Walk along the chain, fill in values until we reach a vertex with 3+ edges. */
{
BMEdge *e_chain = e;
while (BM_vert_is_edge_pair_manifold(v_b) && ((depths[side][v_b_index] == -1))) {
while (BM_vert_is_edge_pair_manifold(v_b) && (depths[side][v_b_index] == -1)) {
depths[side][v_b_index] = pass;
BMEdge *e_chain_next = BM_DISK_EDGE_NEXT(e_chain, v_b);

View File

@@ -1341,7 +1341,7 @@ static size_t animfilter_fcurves(ListBase *anim_data,
* Back to step 2 :)
*/
for (fcu = first;
((fcu = animfilter_fcurve_next(ads, fcu, fcurve_type, filter_mode, owner, owner_id)));
(fcu = animfilter_fcurve_next(ads, fcu, fcurve_type, filter_mode, owner, owner_id));
fcu = fcu->next) {
if (UNLIKELY(fcurve_type == ANIMTYPE_NLACURVE)) {
/* NLA Control Curve - Basically the same as normal F-Curves,
@@ -1602,7 +1602,7 @@ static size_t animfilter_nla_controls(
/* add control curves from each NLA strip... */
/* NOTE: ANIMTYPE_FCURVES are created here, to avoid duplicating the code needed */
BEGIN_ANIMFILTER_SUBCHANNELS (((adt->flag & ADT_NLA_SKEYS_COLLAPSED) == 0)) {
BEGIN_ANIMFILTER_SUBCHANNELS ((adt->flag & ADT_NLA_SKEYS_COLLAPSED) == 0) {
NlaTrack *nlt;
NlaStrip *strip;
@@ -1892,7 +1892,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
}
/* check selection and object type filters */
if ((ads->filterflag & ADS_FILTER_ONLYSEL) && !((base->flag & BASE_SELECTED))) {
if ((ads->filterflag & ADS_FILTER_ONLYSEL) && !(base->flag & BASE_SELECTED)) {
/* only selected should be shown */
continue;
}

View File

@@ -1377,12 +1377,12 @@ static int armature_dissolve_selected_exec(bContext *C, wmOperator *UNUSED(op))
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
/* break connections for unseen bones */
if (((arm->layer & ebone->layer) &&
((ED_armature_ebone_selectflag_get(ebone) & (BONE_TIPSEL | BONE_SELECTED)))) == 0) {
(ED_armature_ebone_selectflag_get(ebone) & (BONE_TIPSEL | BONE_SELECTED))) == 0) {
ebone->temp.ebone = NULL;
}
if (((arm->layer & ebone->layer) &&
((ED_armature_ebone_selectflag_get(ebone) & (BONE_ROOTSEL | BONE_SELECTED)))) == 0) {
(ED_armature_ebone_selectflag_get(ebone) & (BONE_ROOTSEL | BONE_SELECTED))) == 0) {
if (ebone->parent && (ebone->flag & BONE_CONNECTED)) {
ebone->parent->temp.ebone = NULL;
}

View File

@@ -5588,7 +5588,7 @@ static int gpencil_cutter_lasso_select(bContext *C,
/* Select points */
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
if ((gpl->flag & GP_LAYER_LOCKED) || ((gpl->flag & GP_LAYER_HIDE))) {
if ((gpl->flag & GP_LAYER_LOCKED) || (gpl->flag & GP_LAYER_HIDE)) {
continue;
}

View File

@@ -3716,7 +3716,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
* is essential for ensuring that they can quickly return to that view.
*/
}
else if ((!ELEM(p->paintmode, GP_PAINTMODE_ERASER, GP_PAINTMODE_SET_CP))) {
else if (!ELEM(p->paintmode, GP_PAINTMODE_ERASER, GP_PAINTMODE_SET_CP)) {
gpencil_guide_event_handling(C, op, event, p);
estate = OPERATOR_RUNNING_MODAL;
}

View File

@@ -1703,7 +1703,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e
}
case EVT_PADPLUSKEY:
case WHEELUPMOUSE: {
if ((event->val != KM_RELEASE)) {
if (event->val != KM_RELEASE) {
tgpi->tot_edges = tgpi->tot_edges + 1;
CLAMP(tgpi->tot_edges, tgpi->type == GP_STROKE_BOX ? 1 : MIN_EDGES, MAX_EDGES);
RNA_int_set(op->ptr, "edges", tgpi->tot_edges);
@@ -1713,7 +1713,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e
}
case EVT_PADMINUS:
case WHEELDOWNMOUSE: {
if ((event->val != KM_RELEASE)) {
if (event->val != KM_RELEASE) {
tgpi->tot_edges = tgpi->tot_edges - 1;
CLAMP(tgpi->tot_edges, tgpi->type == GP_STROKE_BOX ? 1 : MIN_EDGES, MAX_EDGES);
RNA_int_set(op->ptr, "edges", tgpi->tot_edges);
@@ -1723,7 +1723,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e
}
case EVT_FKEY: /* brush thickness/ brush strength */
{
if ((event->val == KM_PRESS)) {
if (event->val == KM_PRESS) {
if (event->modifier & KM_SHIFT) {
tgpi->prev_flag = tgpi->flag;
tgpi->flag = IN_BRUSH_STRENGTH;
@@ -1869,7 +1869,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e
}
case EVT_PADPLUSKEY:
case WHEELUPMOUSE: {
if ((event->val != KM_RELEASE)) {
if (event->val != KM_RELEASE) {
tgpi->tot_edges = tgpi->tot_edges + 1;
CLAMP(tgpi->tot_edges, tgpi->type == GP_STROKE_BOX ? 1 : MIN_EDGES, MAX_EDGES);
RNA_int_set(op->ptr, "edges", tgpi->tot_edges);
@@ -1881,7 +1881,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e
}
case EVT_PADMINUS:
case WHEELDOWNMOUSE: {
if ((event->val != KM_RELEASE)) {
if (event->val != KM_RELEASE) {
tgpi->tot_edges = tgpi->tot_edges - 1;
CLAMP(tgpi->tot_edges, tgpi->type == GP_STROKE_BOX ? 1 : MIN_EDGES, MAX_EDGES);
RNA_int_set(op->ptr, "edges", tgpi->tot_edges);
@@ -1893,7 +1893,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e
}
case EVT_GKEY: /* grab mode */
{
if ((event->val == KM_PRESS)) {
if (event->val == KM_PRESS) {
tgpi->flag = IN_MOVE;
WM_cursor_modal_set(win, WM_CURSOR_NSEW_SCROLL);
}
@@ -1901,7 +1901,7 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e
}
case EVT_FKEY: /* brush thickness/ brush strength */
{
if ((event->val == KM_PRESS)) {
if (event->val == KM_PRESS) {
if (event->modifier & KM_SHIFT) {
tgpi->prev_flag = tgpi->flag;
tgpi->flag = IN_BRUSH_STRENGTH;

View File

@@ -9553,8 +9553,8 @@ static int ui_handle_list_event(bContext *C, const wmEvent *event, ARegion *regi
else if (val == KM_PRESS) {
if ((ELEM(type, EVT_UPARROWKEY, EVT_DOWNARROWKEY, EVT_LEFTARROWKEY, EVT_RIGHTARROWKEY) &&
(event->modifier & (KM_SHIFT | KM_CTRL | KM_ALT | KM_OSKEY)) == 0) ||
((ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && (event->modifier & KM_CTRL) &&
(event->modifier & (KM_SHIFT | KM_ALT | KM_OSKEY)) == 0))) {
(ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && (event->modifier & KM_CTRL) &&
(event->modifier & (KM_SHIFT | KM_ALT | KM_OSKEY)) == 0)) {
const int value_orig = RNA_property_int_get(&listbox->rnapoin, listbox->rnaprop);
int value, min, max;

View File

@@ -4173,7 +4173,7 @@ static bool project_paint_check_face_sel(const ProjPaintState *ps,
int orig_index;
if ((face_lookup->index_mp_to_orig != NULL) &&
(((orig_index = (face_lookup->index_mp_to_orig[lt->poly]))) != ORIGINDEX_NONE)) {
((orig_index = (face_lookup->index_mp_to_orig[lt->poly])) != ORIGINDEX_NONE)) {
return face_lookup->select_poly_orig && face_lookup->select_poly_orig[orig_index];
}
return ps->select_poly_eval && ps->select_poly_eval[lt->poly];

View File

@@ -258,7 +258,7 @@ BLI_INLINE float wval_exclusion(float weight, float paintval, float fac)
return weight;
}
mfac = 1.0f - fac;
temp = 0.5f - ((2.0f * (weight - 0.5f) * (paintval - 0.5f)));
temp = 0.5f - (2.0f * (weight - 0.5f) * (paintval - 0.5f));
return temp * fac + weight * mfac;
}

View File

@@ -1188,22 +1188,22 @@ static void buttons_panel_context_draw(const bContext *C, Panel *panel)
PointerRNA *ptr = &path->ptr[i];
/* Skip scene and view layer to save space. */
if ((!ELEM(sbuts->mainb,
BCONTEXT_RENDER,
BCONTEXT_OUTPUT,
BCONTEXT_SCENE,
BCONTEXT_VIEW_LAYER,
BCONTEXT_WORLD) &&
ptr->type == &RNA_Scene)) {
if (!ELEM(sbuts->mainb,
BCONTEXT_RENDER,
BCONTEXT_OUTPUT,
BCONTEXT_SCENE,
BCONTEXT_VIEW_LAYER,
BCONTEXT_WORLD) &&
ptr->type == &RNA_Scene) {
continue;
}
if ((!ELEM(sbuts->mainb,
BCONTEXT_RENDER,
BCONTEXT_OUTPUT,
BCONTEXT_SCENE,
BCONTEXT_VIEW_LAYER,
BCONTEXT_WORLD) &&
ptr->type == &RNA_ViewLayer)) {
if (!ELEM(sbuts->mainb,
BCONTEXT_RENDER,
BCONTEXT_OUTPUT,
BCONTEXT_SCENE,
BCONTEXT_VIEW_LAYER,
BCONTEXT_WORLD) &&
ptr->type == &RNA_ViewLayer) {
continue;
}

View File

@@ -2714,7 +2714,7 @@ uint filelist_entry_select_set(const FileList *filelist,
BLI_assert(entry);
BLI_assert(ELEM(check, CHECK_DIRS, CHECK_FILES, CHECK_ALL));
if (((check == CHECK_ALL)) || ((check == CHECK_DIRS) && (entry->typeflag & FILE_TYPE_DIR)) ||
if ((check == CHECK_ALL) || ((check == CHECK_DIRS) && (entry->typeflag & FILE_TYPE_DIR)) ||
((check == CHECK_FILES) && !(entry->typeflag & FILE_TYPE_DIR))) {
switch (select) {
case FILE_SEL_REMOVE:
@@ -2775,7 +2775,7 @@ uint filelist_entry_select_get(FileList *filelist, FileDirEntry *entry, FileChec
BLI_assert(entry);
BLI_assert(ELEM(check, CHECK_DIRS, CHECK_FILES, CHECK_ALL));
if (((check == CHECK_ALL)) || ((check == CHECK_DIRS) && (entry->typeflag & FILE_TYPE_DIR)) ||
if ((check == CHECK_ALL) || ((check == CHECK_DIRS) && (entry->typeflag & FILE_TYPE_DIR)) ||
((check == CHECK_FILES) && !(entry->typeflag & FILE_TYPE_DIR))) {
/* Default NULL pointer if not found is fine here! */
return POINTER_AS_UINT(

View File

@@ -1571,7 +1571,7 @@ static int outliner_filter_subtree(SpaceOutliner *space_outliner,
for (te = static_cast<TreeElement *>(lb->first); te; te = te_next) {
te_next = te->next;
if ((outliner_element_visible_get(scene, view_layer, te, exclude_filter) == false)) {
if (outliner_element_visible_get(scene, view_layer, te, exclude_filter) == false) {
/* Don't free the tree, but extract the children from the parent and add to this tree. */
/* This also needs filtering the subtree prior (see T69246). */
outliner_filter_subtree(

View File

@@ -2403,7 +2403,7 @@ void ED_view3d_datamask(const bContext *C,
(v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_WEIGHT)) {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}
if ((CTX_data_mode_enum(C) == CTX_MODE_SCULPT)) {
if (CTX_data_mode_enum(C) == CTX_MODE_SCULPT) {
r_cddata_masks->vmask |= CD_MASK_PAINT_MASK;
}
}

View File

@@ -1040,7 +1040,7 @@ static int gizmo_ruler_modal(bContext *C,
const bool do_snap = !(tweak_flag & WM_GIZMO_TWEAK_SNAP);
#endif
const bool do_thickness = tweak_flag & WM_GIZMO_TWEAK_PRECISE;
if ((ruler_info->drag_state_prev.do_thickness != do_thickness)) {
if (ruler_info->drag_state_prev.do_thickness != do_thickness) {
do_cursor_update = true;
}

View File

@@ -1658,8 +1658,8 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
orient_type_set = orient_type_curr;
}
if (((prop = RNA_struct_find_property(op->ptr, "orient_matrix_type")) &&
!RNA_property_is_set(op->ptr, prop))) {
if ((prop = RNA_struct_find_property(op->ptr, "orient_matrix_type")) &&
!RNA_property_is_set(op->ptr, prop)) {
/* Set the first time to register on redo. */
RNA_property_enum_set(op->ptr, prop, orient_type_set);
RNA_float_set_array(op->ptr, "orient_matrix", &t->spacemtx[0][0]);

View File

@@ -658,7 +658,7 @@ static void createTransObject(bContext *C, TransInfo *t)
if (ob->parent != NULL) {
if (ob->parent && !BLI_gset_haskey(objects_in_transdata, ob->parent) &&
!BLI_gset_haskey(objects_in_transdata, ob)) {
if (((base->flag_legacy & BA_WAS_SEL) && (base->flag & BASE_SELECTED) == 0)) {
if ((base->flag_legacy & BA_WAS_SEL) && (base->flag & BASE_SELECTED) == 0) {
Base *base_parent = BKE_view_layer_base_find(view_layer, ob->parent);
if (base_parent && !BASE_XFORM_INDIRECT(base_parent)) {
Object *ob_parent_recurse = ob->parent;

View File

@@ -3461,7 +3461,7 @@ static eSnapMode transform_snap_context_project_view3d_mixed_impl(SnapObjectCont
copy_v3_v3(r_face_nor, no);
}
if ((snap_to_flag & SCE_SNAP_MODE_FACE_RAYCAST)) {
if (snap_to_flag & SCE_SNAP_MODE_FACE_RAYCAST) {
retval = SCE_SNAP_MODE_FACE_RAYCAST;
copy_v3_v3(r_loc, loc);

View File

@@ -195,7 +195,7 @@ static int PHashSizes[] = {
1048583, 2097169, 4194319, 8388617, 16777259, 33554467, 67108879, 134217757, 268435459,
};
#define PHASH_hash(ph, item) (uintptr_t(item) % (uint((ph)->cursize)))
#define PHASH_hash(ph, item) (uintptr_t(item) % uint((ph)->cursize))
#define PHASH_edge(v1, v2) (((v1) < (v2)) ? ((v1)*39) ^ ((v2)*31) : ((v1)*31) ^ ((v2)*39))
static PHash *phash_new(PHashLink **list, int sizehint)
@@ -3061,7 +3061,7 @@ static void p_chart_lscm_begin(PChart *chart, bool live, bool abf)
}
}
if ((live && (!select || !deselect))) {
if (live && (!select || !deselect)) {
chart->u.lscm.context = nullptr;
}
else {

View File

@@ -5255,12 +5255,12 @@ static void lineart_gpencil_generate(LineartCache *cache,
if (shaodow_selection) {
if (ec->shadow_mask_bits != LRT_SHADOW_MASK_UNDEFINED) {
/* TODO(@Yiming): Give a behavior option for how to display undefined shadow info. */
if ((shaodow_selection == LRT_SHADOW_FILTER_ILLUMINATED &&
(!(ec->shadow_mask_bits & LRT_SHADOW_MASK_ILLUMINATED)))) {
if (shaodow_selection == LRT_SHADOW_FILTER_ILLUMINATED &&
(!(ec->shadow_mask_bits & LRT_SHADOW_MASK_ILLUMINATED))) {
continue;
}
if ((shaodow_selection == LRT_SHADOW_FILTER_SHADED &&
(!(ec->shadow_mask_bits & LRT_SHADOW_MASK_SHADED)))) {
if (shaodow_selection == LRT_SHADOW_FILTER_SHADED &&
(!(ec->shadow_mask_bits & LRT_SHADOW_MASK_SHADED))) {
continue;
}
if (shaodow_selection == LRT_SHADOW_FILTER_ILLUMINATED_ENCLOSED_SHAPES) {
@@ -5326,7 +5326,7 @@ static void lineart_gpencil_generate(LineartCache *cache,
if (source_vgname && vgname) {
Object *eval_ob = DEG_get_evaluated_object(depsgraph, ec->object_ref);
int gpdg = -1;
if ((match_output || (gpdg = BKE_object_defgroup_name_index(gpencil_object, vgname)) >= 0)) {
if (match_output || (gpdg = BKE_object_defgroup_name_index(gpencil_object, vgname)) >= 0) {
if (eval_ob && eval_ob->type == OB_MESH) {
int dindex = 0;
Mesh *me = BKE_object_get_evaluated_mesh(eval_ob);

View File

@@ -1022,7 +1022,7 @@ bool ArmatureImporter::get_joint_bind_mat(float m[4][4], COLLADAFW::Node *joint)
bool found = false;
for (it = skin_by_data_uid.begin(); it != skin_by_data_uid.end(); it++) {
SkinInfo &skin = it->second;
if ((found = skin.get_joint_inv_bind_matrix(m, joint))) {
if (found = skin.get_joint_inv_bind_matrix(m, joint)) {
invert_m4(m);
break;
}

View File

@@ -7252,7 +7252,7 @@ static void pyrna_subtype_set_rna(PyObject *newclass, StructRNA *srna)
PyC_ObSpit("RNA WAS SET - ", RNA_struct_py_type_get(srna));
}
Py_XDECREF(((PyObject *)RNA_struct_py_type_get(srna)));
Py_XDECREF((PyObject *)RNA_struct_py_type_get(srna));
RNA_struct_py_type_set(srna, (void *)newclass); /* Store for later use */
@@ -8461,7 +8461,7 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr,
#undef BPY_REPLACEMENT_STRING
if (item == NULL && (((flag & PROP_REGISTER_OPTIONAL) != PROP_REGISTER_OPTIONAL))) {
if (item == NULL && ((flag & PROP_REGISTER_OPTIONAL) != PROP_REGISTER_OPTIONAL)) {
PyErr_Format(PyExc_AttributeError,
"expected %.200s, %.200s class to have an \"%.200s\" attribute",
class_type,

View File

@@ -2325,7 +2325,7 @@ void RE_RenderAnim(Render *re,
if (is_movie == false && do_write_file) {
if (rd.mode & R_TOUCH) {
if (!is_multiview_name) {
if ((BLI_file_size(name) == 0)) {
if (BLI_file_size(name) == 0) {
/* BLI_exists(name) is implicit */
BLI_delete(name, false, false);
}
@@ -2340,7 +2340,7 @@ void RE_RenderAnim(Render *re,
BKE_scene_multiview_filepath_get(srv, name, filepath);
if ((BLI_file_size(filepath) == 0)) {
if (BLI_file_size(filepath) == 0) {
/* BLI_exists(filepath) is implicit */
BLI_delete(filepath, false, false);
}

View File

@@ -703,8 +703,7 @@ void seq_cache_thumbnail_cleanup(Scene *scene, rctf *view_area_safe)
const int frame_index = key->timeline_frame - SEQ_time_left_handle_frame_get(scene, key->seq);
const int frame_step = SEQ_render_thumbnails_guaranteed_set_frame_step_get(scene, key->seq);
const int relative_base_frame = round_fl_to_int((frame_index / (float)frame_step)) *
frame_step;
const int relative_base_frame = round_fl_to_int(frame_index / (float)frame_step) * frame_step;
const int nearest_guaranted_absolute_frame = relative_base_frame +
SEQ_time_left_handle_frame_get(scene, key->seq);