Cleanup: redundant parenthesis
This commit is contained in:
parent
790d942b69
commit
3aa1143d57
|
@ -109,7 +109,8 @@ MemFileUndoData *BKE_memfile_undo_encode(Main *bmain, MemFileUndoData *mfu_prev)
|
|||
static int counter = 0;
|
||||
char filename[FILE_MAX];
|
||||
char numstr[32];
|
||||
int fileflags = G.fileflags & ~(G_FILE_HISTORY); /* don't do file history on undo */
|
||||
/* Don't do file history on undo. */
|
||||
const int fileflags = G.fileflags & ~G_FILE_HISTORY;
|
||||
|
||||
/* Calculate current filename. */
|
||||
counter++;
|
||||
|
|
|
@ -218,7 +218,7 @@ static int rule_avoid_collision(BoidRule *rule,
|
|||
BoidValues *val,
|
||||
ParticleData *pa)
|
||||
{
|
||||
const int raycast_flag = BVH_RAYCAST_DEFAULT & ~(BVH_RAYCAST_WATERTIGHT);
|
||||
const int raycast_flag = BVH_RAYCAST_DEFAULT & ~BVH_RAYCAST_WATERTIGHT;
|
||||
BoidRuleAvoidCollision *acbr = (BoidRuleAvoidCollision *)rule;
|
||||
KDTreeNearest_3d *ptn = NULL;
|
||||
ParticleTarget *pt;
|
||||
|
@ -854,7 +854,7 @@ static Object *boid_find_ground(BoidBrainData *bbd,
|
|||
float ground_co[3],
|
||||
float ground_nor[3])
|
||||
{
|
||||
const int raycast_flag = BVH_RAYCAST_DEFAULT & ~(BVH_RAYCAST_WATERTIGHT);
|
||||
const int raycast_flag = BVH_RAYCAST_DEFAULT & ~BVH_RAYCAST_WATERTIGHT;
|
||||
BoidParticle *bpa = pa->boid;
|
||||
|
||||
if (bpa->data.mode == eBoidMode_Climbing) {
|
||||
|
|
|
@ -428,7 +428,7 @@ static float eff_calc_visibility(ListBase *colliders,
|
|||
EffectorData *efd,
|
||||
EffectedPoint *point)
|
||||
{
|
||||
const int raycast_flag = BVH_RAYCAST_DEFAULT & ~(BVH_RAYCAST_WATERTIGHT);
|
||||
const int raycast_flag = BVH_RAYCAST_DEFAULT & ~BVH_RAYCAST_WATERTIGHT;
|
||||
ListBase *colls = colliders;
|
||||
ColliderCache *col;
|
||||
float norm[3], len = 0.0;
|
||||
|
|
|
@ -308,7 +308,7 @@ static void area_add_window_regions(ScrArea *area, SpaceLink *sl, ListBase *lb)
|
|||
region->v2d.tot.ymax = 0.0f;
|
||||
|
||||
region->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
|
||||
region->v2d.scroll |= (V2D_SCROLL_RIGHT);
|
||||
region->v2d.scroll |= V2D_SCROLL_RIGHT;
|
||||
region->v2d.align = V2D_ALIGN_NO_POS_Y;
|
||||
region->v2d.flag |= V2D_VIEWSYNC_AREA_VERTICAL;
|
||||
break;
|
||||
|
@ -334,7 +334,7 @@ static void area_add_window_regions(ScrArea *area, SpaceLink *sl, ListBase *lb)
|
|||
region->v2d.minzoom = 0.01f;
|
||||
region->v2d.maxzoom = 50;
|
||||
region->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
|
||||
region->v2d.scroll |= (V2D_SCROLL_RIGHT);
|
||||
region->v2d.scroll |= V2D_SCROLL_RIGHT;
|
||||
region->v2d.keepzoom = V2D_LOCKZOOM_Y;
|
||||
region->v2d.align = V2D_ALIGN_NO_POS_Y;
|
||||
region->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
|
||||
|
|
|
@ -370,7 +370,7 @@ static void eevee_id_object_update(void *UNUSED(vedata), Object *object)
|
|||
{
|
||||
EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_get(object);
|
||||
if (ped != NULL && ped->dd.recalc != 0) {
|
||||
ped->need_update = (ped->dd.recalc & (ID_RECALC_TRANSFORM)) != 0;
|
||||
ped->need_update = (ped->dd.recalc & ID_RECALC_TRANSFORM) != 0;
|
||||
ped->dd.recalc = 0;
|
||||
}
|
||||
EEVEE_LightEngineData *led = EEVEE_light_data_get(object);
|
||||
|
|
|
@ -754,7 +754,7 @@ static void bone_connect_to_new_parent(ListBase *edbo,
|
|||
float offset[3];
|
||||
|
||||
if ((selbone->parent) && (selbone->flag & BONE_CONNECTED)) {
|
||||
selbone->parent->flag &= ~(BONE_TIPSEL);
|
||||
selbone->parent->flag &= ~BONE_TIPSEL;
|
||||
}
|
||||
|
||||
/* make actbone the parent of selbone */
|
||||
|
@ -956,7 +956,7 @@ static void editbone_clear_parent(EditBone *ebone, int mode)
|
|||
{
|
||||
if (ebone->parent) {
|
||||
/* for nice selection */
|
||||
ebone->parent->flag &= ~(BONE_TIPSEL);
|
||||
ebone->parent->flag &= ~BONE_TIPSEL;
|
||||
}
|
||||
|
||||
if (mode == 1) {
|
||||
|
|
|
@ -188,7 +188,7 @@ static void *ed_armature_pick_bone_from_selectbuffer_impl(const bool is_editmode
|
|||
Base *base = NULL;
|
||||
bool sel;
|
||||
|
||||
hitresult &= ~(BONESEL_ANY);
|
||||
hitresult &= ~BONESEL_ANY;
|
||||
/* Determine what the current bone is */
|
||||
if (is_editmode == false) {
|
||||
base = ED_armature_base_and_pchan_from_select_buffer(bases, bases_len, hitresult, &pchan);
|
||||
|
@ -1302,7 +1302,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op)
|
|||
if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
|
||||
ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
|
||||
if (ebone->parent) {
|
||||
ebone->parent->flag |= (BONE_TIPSEL);
|
||||
ebone->parent->flag |= BONE_TIPSEL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1317,7 +1317,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op)
|
|||
if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
|
||||
ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
|
||||
if (ebone->parent) {
|
||||
ebone->parent->flag |= (BONE_TIPSEL);
|
||||
ebone->parent->flag |= BONE_TIPSEL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2054,7 +2054,7 @@ static void annotation_draw_apply_event(
|
|||
/* Key to toggle stabilization. */
|
||||
if (event->shift > 0 && p->paintmode == GP_PAINTMODE_DRAW) {
|
||||
/* Using permanent stabilization, shift will deactivate the flag. */
|
||||
if (p->flags & (GP_PAINTFLAG_USE_STABILIZER)) {
|
||||
if (p->flags & GP_PAINTFLAG_USE_STABILIZER) {
|
||||
if (p->flags & GP_PAINTFLAG_USE_STABILIZER_TEMP) {
|
||||
gpencil_draw_toggle_stabilizer_cursor(p, false);
|
||||
p->flags &= ~GP_PAINTFLAG_USE_STABILIZER_TEMP;
|
||||
|
|
|
@ -4872,7 +4872,7 @@ static void ui_numedit_set_active(uiBut *but)
|
|||
|
||||
/* Don't change the cursor once pressed. */
|
||||
if ((but->flag & UI_SELECT) == 0) {
|
||||
if ((but->drawflag & (UI_BUT_ACTIVE_LEFT)) || (but->drawflag & (UI_BUT_ACTIVE_RIGHT))) {
|
||||
if ((but->drawflag & UI_BUT_ACTIVE_LEFT) || (but->drawflag & UI_BUT_ACTIVE_RIGHT)) {
|
||||
if (data->changed_cursor) {
|
||||
WM_cursor_modal_restore(data->window);
|
||||
data->changed_cursor = false;
|
||||
|
@ -9947,7 +9947,7 @@ static int ui_handle_menu_event(bContext *C,
|
|||
if (ELEM(event->val, KM_PRESS, KM_DBL_CLICK)) {
|
||||
if ((is_parent_menu == false) && (U.uiflag & USER_MENUOPENAUTO) == 0) {
|
||||
/* for root menus, allow clicking to close */
|
||||
if (block->flag & (UI_BLOCK_OUT_1)) {
|
||||
if (block->flag & UI_BLOCK_OUT_1) {
|
||||
menu->menuretval = UI_RETURN_OK;
|
||||
}
|
||||
else {
|
||||
|
@ -9955,7 +9955,7 @@ static int ui_handle_menu_event(bContext *C,
|
|||
}
|
||||
}
|
||||
else if (saferct && !BLI_rctf_isect_pt(&saferct->parent, event->x, event->y)) {
|
||||
if (block->flag & (UI_BLOCK_OUT_1)) {
|
||||
if (block->flag & UI_BLOCK_OUT_1) {
|
||||
menu->menuretval = UI_RETURN_OK;
|
||||
}
|
||||
else {
|
||||
|
@ -10049,7 +10049,7 @@ static int ui_handle_menu_event(bContext *C,
|
|||
|
||||
/* strict check, and include the parent rect */
|
||||
if (!menu->dotowards && !saferct) {
|
||||
if (block->flag & (UI_BLOCK_OUT_1)) {
|
||||
if (block->flag & UI_BLOCK_OUT_1) {
|
||||
menu->menuretval = UI_RETURN_OK;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1000,7 +1000,7 @@ void ui_draw_aligned_panel(uiStyle *style,
|
|||
* can't be dragged. This may be changed in future. */
|
||||
show_background);
|
||||
const int panel_col = is_subpanel ? TH_PANEL_SUB_BACK : TH_PANEL_BACK;
|
||||
const bool draw_box_style = (panel->type && panel->type->flag & (PNL_DRAW_BOX));
|
||||
const bool draw_box_style = (panel->type && panel->type->flag & PNL_DRAW_BOX);
|
||||
|
||||
/* Use the theme for box widgets for box-style panels. */
|
||||
uiWidgetColors *box_wcol = NULL;
|
||||
|
|
|
@ -113,10 +113,10 @@ BLI_INLINE void clamp_rctf_to_rcti(rcti *dst, const rctf *src)
|
|||
static int view2d_scroll_mapped(int scroll)
|
||||
{
|
||||
if (scroll & V2D_SCROLL_HORIZONTAL_FULLR) {
|
||||
scroll &= ~(V2D_SCROLL_HORIZONTAL);
|
||||
scroll &= ~V2D_SCROLL_HORIZONTAL;
|
||||
}
|
||||
if (scroll & V2D_SCROLL_VERTICAL_FULLR) {
|
||||
scroll &= ~(V2D_SCROLL_VERTICAL);
|
||||
scroll &= ~V2D_SCROLL_VERTICAL;
|
||||
}
|
||||
return scroll;
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ static void view2d_masks(View2D *v2d, const rcti *mask_scroll)
|
|||
}
|
||||
|
||||
/* horizontal scroller */
|
||||
if (scroll & (V2D_SCROLL_BOTTOM)) {
|
||||
if (scroll & V2D_SCROLL_BOTTOM) {
|
||||
/* on bottom edge of region */
|
||||
v2d->hor = *mask_scroll;
|
||||
v2d->hor.ymax = scroll_height;
|
||||
|
@ -211,7 +211,7 @@ static void view2d_masks(View2D *v2d, const rcti *mask_scroll)
|
|||
|
||||
/* adjust vertical scroller if there's a horizontal scroller, to leave corner free */
|
||||
if (scroll & V2D_SCROLL_VERTICAL) {
|
||||
if (scroll & (V2D_SCROLL_BOTTOM)) {
|
||||
if (scroll & V2D_SCROLL_BOTTOM) {
|
||||
/* on bottom edge of region */
|
||||
v2d->vert.ymin = v2d->hor.ymax;
|
||||
}
|
||||
|
|
|
@ -2299,8 +2299,8 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, const wmEvent *
|
|||
}
|
||||
|
||||
/* zone is also inappropriate if scroller is not visible... */
|
||||
if (((vsm->scroller == 'h') && (v2d->scroll & (V2D_SCROLL_HORIZONTAL_FULLR))) ||
|
||||
((vsm->scroller == 'v') && (v2d->scroll & (V2D_SCROLL_VERTICAL_FULLR)))) {
|
||||
if (((vsm->scroller == 'h') && (v2d->scroll & V2D_SCROLL_HORIZONTAL_FULLR)) ||
|
||||
((vsm->scroller == 'v') && (v2d->scroll & V2D_SCROLL_VERTICAL_FULLR))) {
|
||||
/* free customdata initialized */
|
||||
scroller_activate_exit(C, op);
|
||||
|
||||
|
|
|
@ -810,7 +810,7 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese
|
|||
continue;
|
||||
}
|
||||
|
||||
if (metaelem_id != (hitresult & 0xFFFF0000 & ~(MBALLSEL_ANY))) {
|
||||
if (metaelem_id != (hitresult & 0xFFFF0000 & ~MBALLSEL_ANY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ bool ED_object_mode_compat_test(const Object *ob, eObjectMode mode)
|
|||
case OB_SURF:
|
||||
case OB_FONT:
|
||||
case OB_MBALL:
|
||||
if (mode & (OB_MODE_EDIT)) {
|
||||
if (mode & OB_MODE_EDIT) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1145,7 +1145,7 @@ static void region_overlap_fix(ScrArea *area, ARegion *region)
|
|||
|
||||
/* find overlapping previous region on same place */
|
||||
for (ar1 = region->prev; ar1; ar1 = ar1->prev) {
|
||||
if (ar1->flag & (RGN_FLAG_HIDDEN)) {
|
||||
if (ar1->flag & RGN_FLAG_HIDDEN) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1194,7 +1194,7 @@ static void region_overlap_fix(ScrArea *area, ARegion *region)
|
|||
/* At this point, 'region' is in its final position and still open.
|
||||
* Make a final check it does not overlap any previous 'other side' region. */
|
||||
for (ar1 = region->prev; ar1; ar1 = ar1->prev) {
|
||||
if (ar1->flag & (RGN_FLAG_HIDDEN)) {
|
||||
if (ar1->flag & RGN_FLAG_HIDDEN) {
|
||||
continue;
|
||||
}
|
||||
if (ELEM(ar1->alignment, RGN_ALIGN_FLOAT)) {
|
||||
|
@ -2566,16 +2566,16 @@ void ED_region_panels_layout_ex(const bContext *C,
|
|||
/* only allow scrolling in vertical direction */
|
||||
v2d->keepofs |= V2D_LOCKOFS_X | V2D_KEEPOFS_Y;
|
||||
v2d->keepofs &= ~(V2D_LOCKOFS_Y | V2D_KEEPOFS_X);
|
||||
v2d->scroll &= ~(V2D_SCROLL_BOTTOM);
|
||||
v2d->scroll |= (V2D_SCROLL_RIGHT);
|
||||
v2d->scroll &= ~V2D_SCROLL_BOTTOM;
|
||||
v2d->scroll |= V2D_SCROLL_RIGHT;
|
||||
}
|
||||
else {
|
||||
/* for now, allow scrolling in both directions (since layouts are optimized for vertical,
|
||||
* they often don't fit in horizontal layout)
|
||||
*/
|
||||
v2d->keepofs &= ~(V2D_LOCKOFS_X | V2D_LOCKOFS_Y | V2D_KEEPOFS_X | V2D_KEEPOFS_Y);
|
||||
v2d->scroll |= (V2D_SCROLL_BOTTOM);
|
||||
v2d->scroll &= ~(V2D_SCROLL_RIGHT);
|
||||
v2d->scroll |= V2D_SCROLL_BOTTOM;
|
||||
v2d->scroll &= ~V2D_SCROLL_RIGHT;
|
||||
}
|
||||
|
||||
/* collect categories */
|
||||
|
|
|
@ -4311,7 +4311,7 @@ static int match_region_with_redraws(int spacetype,
|
|||
}
|
||||
break;
|
||||
case SPACE_NODE:
|
||||
if (redraws & (TIME_NODES)) {
|
||||
if (redraws & TIME_NODES) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -909,7 +909,7 @@ PaintStroke *paint_stroke_new(bContext *C,
|
|||
stroke->zoom_2d = max_ff(zoomx, zoomy);
|
||||
|
||||
if (stroke->stroke_mode == BRUSH_STROKE_INVERT) {
|
||||
if (br->flag & (BRUSH_CURVE)) {
|
||||
if (br->flag & BRUSH_CURVE) {
|
||||
RNA_enum_set(op->ptr, "mode", BRUSH_STROKE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
@ -1467,8 +1467,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
|||
}
|
||||
else if (first_modal ||
|
||||
/* regular dabs */
|
||||
(!(br->flag & (BRUSH_AIRBRUSH)) &&
|
||||
(ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE))) ||
|
||||
(!(br->flag & BRUSH_AIRBRUSH) && (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE))) ||
|
||||
/* airbrush */
|
||||
((br->flag & BRUSH_AIRBRUSH) && event->type == TIMER &&
|
||||
event->customdata == stroke->timer)) {
|
||||
|
|
|
@ -128,7 +128,7 @@ static SpaceLink *action_new(const ScrArea *area, const Scene *scene)
|
|||
region->v2d.minzoom = 0.01f;
|
||||
region->v2d.maxzoom = 50;
|
||||
region->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
|
||||
region->v2d.scroll |= (V2D_SCROLL_RIGHT);
|
||||
region->v2d.scroll |= V2D_SCROLL_RIGHT;
|
||||
region->v2d.keepzoom = V2D_LOCKZOOM_Y;
|
||||
region->v2d.keepofs = V2D_KEEPOFS_Y;
|
||||
region->v2d.align = V2D_ALIGN_NO_POS_Y;
|
||||
|
|
|
@ -118,7 +118,7 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene)
|
|||
MovieTrackingDopesheet *dopesheet = &tracking->dopesheet;
|
||||
MovieTrackingDopesheetChannel *channel;
|
||||
float strip[4], selected_strip[4];
|
||||
float height = (dopesheet->tot_channel * CHANNEL_STEP) + (CHANNEL_HEIGHT);
|
||||
float height = (dopesheet->tot_channel * CHANNEL_STEP) + CHANNEL_HEIGHT;
|
||||
|
||||
uint keyframe_len = 0;
|
||||
|
||||
|
@ -305,7 +305,7 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *region)
|
|||
|
||||
MovieTracking *tracking = &clip->tracking;
|
||||
MovieTrackingDopesheet *dopesheet = &tracking->dopesheet;
|
||||
int height = (dopesheet->tot_channel * CHANNEL_STEP) + (CHANNEL_HEIGHT);
|
||||
int height = (dopesheet->tot_channel * CHANNEL_STEP) + CHANNEL_HEIGHT;
|
||||
|
||||
if (height > BLI_rcti_size_y(&v2d->mask)) {
|
||||
/* don't use totrect set, as the width stays the same
|
||||
|
|
|
@ -96,7 +96,7 @@ static void init_preview_region(const Scene *scene,
|
|||
region->v2d.minzoom = 0.01f;
|
||||
region->v2d.maxzoom = 50;
|
||||
region->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
|
||||
region->v2d.scroll |= (V2D_SCROLL_RIGHT);
|
||||
region->v2d.scroll |= V2D_SCROLL_RIGHT;
|
||||
region->v2d.keepzoom = V2D_LOCKZOOM_Y;
|
||||
region->v2d.keepofs = V2D_KEEPOFS_Y;
|
||||
region->v2d.align = V2D_ALIGN_NO_POS_Y;
|
||||
|
|
|
@ -70,7 +70,7 @@ static SpaceLink *console_new(const ScrArea *UNUSED(area), const Scene *UNUSED(s
|
|||
region->regiontype = RGN_TYPE_WINDOW;
|
||||
|
||||
/* keep in sync with info */
|
||||
region->v2d.scroll |= (V2D_SCROLL_RIGHT);
|
||||
region->v2d.scroll |= V2D_SCROLL_RIGHT;
|
||||
region->v2d.align |= V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y; /* align bottom left */
|
||||
region->v2d.keepofs |= V2D_LOCKOFS_X;
|
||||
region->v2d.keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT);
|
||||
|
|
|
@ -191,7 +191,7 @@ int ED_space_image_get_display_channel_mask(ImBuf *ibuf)
|
|||
result &= ~(SI_USE_ALPHA | SI_SHOW_ALPHA);
|
||||
}
|
||||
if (!zbuf) {
|
||||
result &= ~(SI_SHOW_ZBUF);
|
||||
result &= ~SI_SHOW_ZBUF;
|
||||
}
|
||||
if (!color) {
|
||||
result &= ~(SI_SHOW_R | SI_SHOW_G | SI_SHOW_B);
|
||||
|
|
|
@ -77,7 +77,7 @@ static SpaceLink *info_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
|
|||
region->regiontype = RGN_TYPE_WINDOW;
|
||||
|
||||
/* keep in sync with console */
|
||||
region->v2d.scroll |= (V2D_SCROLL_RIGHT);
|
||||
region->v2d.scroll |= V2D_SCROLL_RIGHT;
|
||||
region->v2d.align |= V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y; /* align bottom left */
|
||||
region->v2d.keepofs |= V2D_LOCKOFS_X;
|
||||
region->v2d.keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT);
|
||||
|
|
|
@ -120,7 +120,7 @@ static SpaceLink *nla_new(const ScrArea *area, const Scene *scene)
|
|||
region->v2d.minzoom = 0.01f;
|
||||
region->v2d.maxzoom = 50;
|
||||
region->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
|
||||
region->v2d.scroll |= (V2D_SCROLL_RIGHT);
|
||||
region->v2d.scroll |= V2D_SCROLL_RIGHT;
|
||||
region->v2d.keepzoom = V2D_LOCKZOOM_Y;
|
||||
region->v2d.keepofs = V2D_KEEPOFS_Y;
|
||||
region->v2d.align = V2D_ALIGN_NO_POS_Y;
|
||||
|
|
|
@ -1323,7 +1323,7 @@ static void node_draw_basis(const bContext *C,
|
|||
UI_BTYPE_LABEL,
|
||||
0,
|
||||
showname,
|
||||
(int)(rct->xmin + (NODE_MARGIN_X)),
|
||||
(int)(rct->xmin + NODE_MARGIN_X),
|
||||
(int)(rct->ymax - NODE_DY),
|
||||
(short)(iconofs - rct->xmin - 18.0f),
|
||||
(short)NODE_DY,
|
||||
|
|
|
@ -209,7 +209,7 @@ static void uiTemplatePaintModeSelection(uiLayout *layout, struct bContext *C)
|
|||
PointerRNA meshptr;
|
||||
|
||||
RNA_pointer_create(ob->data, &RNA_Mesh, ob->data, &meshptr);
|
||||
if (ob->mode & (OB_MODE_TEXTURE_PAINT)) {
|
||||
if (ob->mode & OB_MODE_TEXTURE_PAINT) {
|
||||
uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -3007,7 +3007,7 @@ static bool do_meta_box_select(ViewContext *vc, const rcti *rect, const eSelectO
|
|||
continue;
|
||||
}
|
||||
|
||||
if (metaelem_id != (hitresult & 0xFFFF0000 & ~(MBALLSEL_ANY))) {
|
||||
if (metaelem_id != (hitresult & 0xFFFF0000 & ~MBALLSEL_ANY)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject *
|
|||
BKE_curvemapping_initialize(cumap);
|
||||
/* disable extrapolation if enabled */
|
||||
if ((cumap->flag & CUMA_EXTEND_EXTRAPOLATE)) {
|
||||
cumap->flag &= ~(CUMA_EXTEND_EXTRAPOLATE);
|
||||
cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
|
||||
BKE_curvemapping_changed(cumap, 0);
|
||||
}
|
||||
return PyFloat_FromDouble(BKE_curvemapping_evaluateF(cumap, cur, value));
|
||||
|
|
|
@ -1384,7 +1384,7 @@ static void gpu_free_image_immediate(Image *ima)
|
|||
}
|
||||
}
|
||||
|
||||
ima->gpuflag &= ~(IMA_GPU_MIPMAP_COMPLETE);
|
||||
ima->gpuflag &= ~IMA_GPU_MIPMAP_COMPLETE;
|
||||
}
|
||||
|
||||
void GPU_free_image(Image *ima)
|
||||
|
|
|
@ -735,10 +735,10 @@ typedef enum eGP_DrawMode {
|
|||
#define GPENCIL_ANY_EDIT_MODE(gpd) \
|
||||
((gpd) && ((gpd)->flag & \
|
||||
(GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE | GP_DATA_STROKE_WEIGHTMODE)))
|
||||
#define GPENCIL_PAINT_MODE(gpd) ((gpd) && (gpd->flag & (GP_DATA_STROKE_PAINTMODE)))
|
||||
#define GPENCIL_PAINT_MODE(gpd) ((gpd) && (gpd->flag & GP_DATA_STROKE_PAINTMODE))
|
||||
#define GPENCIL_SCULPT_MODE(gpd) ((gpd) && (gpd->flag & GP_DATA_STROKE_SCULPTMODE))
|
||||
#define GPENCIL_WEIGHT_MODE(gpd) ((gpd) && (gpd->flag & GP_DATA_STROKE_WEIGHTMODE))
|
||||
#define GPENCIL_VERTEX_MODE(gpd) ((gpd) && (gpd->flag & (GP_DATA_STROKE_VERTEXMODE)))
|
||||
#define GPENCIL_VERTEX_MODE(gpd) ((gpd) && (gpd->flag & GP_DATA_STROKE_VERTEXMODE))
|
||||
#define GPENCIL_SCULPT_OR_WEIGHT_MODE(gpd) \
|
||||
((gpd) && ((gpd)->flag & (GP_DATA_STROKE_SCULPTMODE | GP_DATA_STROKE_WEIGHTMODE)))
|
||||
#define GPENCIL_NONE_EDIT_MODE(gpd) \
|
||||
|
|
|
@ -1324,7 +1324,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_,
|
|||
switch (type) {
|
||||
case PROP_BOOLEAN:
|
||||
if (DefRNA.preprocess) {
|
||||
if ((subtype & ~(PROP_LAYER_MEMBER)) != PROP_NONE) {
|
||||
if ((subtype & ~PROP_LAYER_MEMBER) != PROP_NONE) {
|
||||
CLOG_ERROR(&LOG,
|
||||
"subtype does not apply to 'PROP_BOOLEAN' \"%s.%s\"",
|
||||
CONTAINER_RNA_ID(cont),
|
||||
|
|
|
@ -1844,7 +1844,7 @@ static void validate_render_settings(Render *re)
|
|||
{
|
||||
if (RE_engine_is_external(re)) {
|
||||
/* not supported yet */
|
||||
re->r.scemode &= ~(R_FULL_SAMPLE);
|
||||
re->r.scemode &= ~R_FULL_SAMPLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1322,7 +1322,7 @@ static int multitex_nodes_intern(Tex *tex,
|
|||
texnode_preview,
|
||||
use_nodes);
|
||||
|
||||
if (mtex->mapto & (MAP_COL)) {
|
||||
if (mtex->mapto & MAP_COL) {
|
||||
ImBuf *ibuf = BKE_image_pool_acquire_ibuf(tex->ima, &tex->iuser, pool);
|
||||
|
||||
/* don't linearize float buffers, assumed to be linear */
|
||||
|
|
|
@ -1408,7 +1408,9 @@ static ImBuf *blend_file_thumb(const bContext *C,
|
|||
bool write_crash_blend(void)
|
||||
{
|
||||
char path[FILE_MAX];
|
||||
int fileflags = G.fileflags & ~(G_FILE_HISTORY); /* don't do file history on crash file */
|
||||
|
||||
/* Don't do file history on crash file. */
|
||||
const int fileflags = G.fileflags & ~G_FILE_HISTORY;
|
||||
|
||||
BLI_strncpy(path, BKE_main_blendfile_path_from_global(), sizeof(path));
|
||||
BLI_path_extension_replace(path, sizeof(path), "_crash.blend");
|
||||
|
|
Loading…
Reference in New Issue