diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-21 09:46:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-21 09:46:41 +0400 |
commit | f3ece5a108db0bdbefb4663ef4ebd9a7e039e263 (patch) | |
tree | cb6329453be169ef1ec49ef8b8d50a6b14364880 /source/blender/editors | |
parent | a1a0c8da13a7b91b0264c7535752864379f3d852 (diff) |
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
Diffstat (limited to 'source/blender/editors')
135 files changed, 598 insertions, 598 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 1998dafb3cd..9e3ebfb41a2 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -1186,7 +1186,7 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type) if (ma->adt) return GET_ACF_FLAG_PTR(ma->adt->flag, type); else - return NULL; + return NULL; default: /* unsupported */ return NULL; @@ -1263,7 +1263,7 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type) if (la->adt) return GET_ACF_FLAG_PTR(la->adt->flag, type); else - return NULL; + return NULL; default: /* unsupported */ return NULL; @@ -1347,7 +1347,7 @@ static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type) if (tex->adt) return GET_ACF_FLAG_PTR(tex->adt->flag, type); else - return NULL; + return NULL; default: /* unsupported */ return NULL; diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index d35f39a48e0..f19dbe740bc 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -464,7 +464,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn /* store this level as the 'old' level now */ prevLevel = level; - } + } /* if the level is 'greater than' (i.e. less important) than the previous level... */ else if (level > prevLevel) { /* if previous level was a base-level (i.e. 0 offset / root of one hierarchy), @@ -600,7 +600,7 @@ static int animedit_poll_channels_nla_tweakmode_off(bContext *C) if (ELEM3(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0) return 0; - /* NLA TweakMode test */ + /* NLA TweakMode test */ if (sa->spacetype == SPACE_NLA) { if ((scene == NULL) || (scene->flag & SCE_NLA_EDIT_ON)) return 0; @@ -794,7 +794,7 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr FCurve *fcu = (FCurve *)channel; is_sel = SEL_FCU(fcu); - } + } break; case ANIMTYPE_NLATRACK: { @@ -910,7 +910,7 @@ static void rearrange_nla_channels(bAnimContext *UNUSED(ac), AnimData *adt, shor if (rearrange_func == NULL) return; - /* only consider NLA data if it's accessible */ + /* only consider NLA data if it's accessible */ //if (EXPANDED_DRVD(adt) == 0) // return; @@ -931,7 +931,7 @@ static void rearrange_driver_channels(bAnimContext *UNUSED(ac), AnimData *adt, s if (rearrange_func == NULL) return; - /* only consider drivers if they're accessible */ + /* only consider drivers if they're accessible */ if (EXPANDED_DRVD(adt) == 0) return; @@ -2206,7 +2206,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in } notifierFlags |= (ND_ANIMCHAN | NA_SELECTED); - } + } break; case ANIMTYPE_GROUP: @@ -2219,7 +2219,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in agrp->flag ^= AGRP_SELECTED; } else if (selectmode == -1) { - /* select all in group (and deselect everthing else) */ + /* select all in group (and deselect everthing else) */ FCurve *fcu; /* deselect all other channels */ @@ -2228,7 +2228,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in /* only select channels in group and group itself */ for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcu->next) fcu->flag |= FCURVE_SELECTED; - agrp->flag |= AGRP_SELECTED; + agrp->flag |= AGRP_SELECTED; } else { /* select group by itself */ @@ -2306,7 +2306,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in /* invert selection status of this layer only */ gpl->flag ^= GP_LAYER_SELECT; } - else { + else { /* select layer by itself */ ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); gpl->flag |= GP_LAYER_SELECT; diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 620f5de9db7..01c0a95e200 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -261,8 +261,8 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d) /* only draw two separate 'curtains' if there's no overlap between them */ if (PSFRA < PEFRA) { glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax); - glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); - } + glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); + } else { glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); } diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index d913779a883..721b3473792 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -682,7 +682,7 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne ale->datatype = ALE_ACT; ale->adt = BKE_animdata_from_id(data); - } + } break; case ANIMTYPE_DSSPK: { @@ -811,7 +811,7 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne } ale->datatype = (ale->key_data) ? ALE_FCURVE : ALE_NONE; } - } + } break; case ANIMTYPE_GPLAYER: @@ -1023,7 +1023,7 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads, FCurve *first, bActionGro if (skip_fcurve_selected_data(ads, fcu, owner_id, filter_mode)) continue; } - } + } /* only include if visible (Graph Editor check, not channels check) */ if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || (fcu->flag & FCURVE_VISIBLE)) { @@ -1211,7 +1211,7 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop */ if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) || (adt->action)) { /* there isn't really anything editable here, so skip if need editable */ - if ((filter_mode & ANIMFILTER_FOREDIT) == 0) { + if ((filter_mode & ANIMFILTER_FOREDIT) == 0) { /* just add the action track now (this MUST appear for drawing) * - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then * overwrite this with the real value - REVIEW THIS... diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 5295950546d..d8e3349e998 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -89,7 +89,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) * i.e. Bone1.Location.X, or Object.Location.X * 2) <array-index> <property-name> (<struct name>) * i.e. X Location (Bone1), or X Location (Object) - * + * * Currently, option 2 is in use, to try and make it easier to quickly identify F-Curves (it does have * problems with looking rather odd though). Option 1 is better in terms of revealing a consistent sense of * hierarchy though, which isn't so clear with option 2. diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 895aaec29da..0ae06e71b66 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -150,7 +150,7 @@ int ED_markers_post_apply_transform(ListBase *markers, Scene *scene, int mode, f break; case TFM_TIME_SCALE: - { + { /* rescale the distance between the marker and the current frame */ marker->frame = cfra + (int)floorf(((float)(marker->frame - cfra) * value) + 0.5f); changed++; @@ -249,7 +249,7 @@ void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *la min = (float)marker->frame; if (marker->frame > max) max = (float)marker->frame; - } + } } } @@ -278,7 +278,7 @@ static void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, short only return; } else if (ce->cfra > marker->frame) break; - } + } cen = MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem"); if (ce) BLI_insertlinkbefore(lb, ce, cen); @@ -360,7 +360,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag) glScalef(1.0f / xscale, 1.0f, 1.0f); glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* vertical line - dotted */ #ifdef DURIAN_CAMERA_SWITCH @@ -726,7 +726,7 @@ static int ed_marker_move_cancel(bContext *C, wmOperator *op) { RNA_int_set(op->ptr, "frames", 0); ed_marker_move_apply(op); - ed_marker_move_exit(C, op); + ed_marker_move_exit(C, op); WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL); WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL); @@ -821,7 +821,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) } else { /* we only print the offset */ - if (mm->slink->spacetype == SPACE_TIME) { + if (mm->slink->spacetype == SPACE_TIME) { SpaceTime *stime = (SpaceTime *)mm->slink; if (stime->flag & TIME_DRAWFRAMES) BLI_snprintf(str, sizeof(str), "Marker offset %d ", offs); @@ -1030,7 +1030,7 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera) x = evt->x - ar->winrct.xmin; y = evt->y - ar->winrct.ymin; - UI_view2d_region_to_view(v2d, x, y, &viewx, NULL); + UI_view2d_region_to_view(v2d, x, y, &viewx, NULL); cfra = ED_markers_find_nearest_marker_time(markers, viewx); diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 38f9119104b..25833c13925 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -91,7 +91,7 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde adt = BKE_animdata_from_id(id); if ((adt == NULL) && (add)) adt = BKE_id_add_animdata(id); - if (adt == NULL) { + if (adt == NULL) { /* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */ return NULL; } @@ -478,7 +478,7 @@ static int add_driver_button_exec(bContext *C, wmOperator *op) char *path = get_driver_path_hack(C, &ptr, prop); short flags = CREATEDRIVER_WITH_DEFAULT_DVAR; - if (path) { + if (path) { success += ANIM_add_driver(op->reports, ptr.id.data, path, index, flags, DRIVER_TYPE_PYTHON); MEM_freeN(path); diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 6c9105dde69..9e6301c91f5 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -345,7 +345,7 @@ static BezTriple *abk_get_bezt_with_value(ActBeztColumn *abk, float value) return NULL; /* look over each BezTriple in this container */ - for (i = 0; i < abk->numBezts; i++) { + for (i = 0; i < abk->numBezts; i++) { /* only do exact match for now... */ if (/*i >= MAX_ABK_BUFSIZE*/ 0) { // TODO: this case needs special handling @@ -960,7 +960,7 @@ void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, DLRBT_Tree if (fcu && fcu->totvert && fcu->bezt) { /* apply NLA-mapping (if applicable) */ - if (adt) + if (adt) ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 0); /* if getting long keyframes too, grab the BezTriples in a BST for diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index b277d0eccb5..015c2667a93 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -154,7 +154,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi if (fcu_cb) fcu_cb(fcu); - /* done */ + /* done */ return 0; } @@ -639,7 +639,7 @@ static short snap_bezier_horizontal(KeyframeEditData *UNUSED(ked), BezTriple *be if (ELEM3(bezt->h1, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h1 = HD_ALIGN; if (ELEM3(bezt->h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h2 = HD_ALIGN; } - return 0; + return 0; } /* value to snap to is stored in the custom data -> first float value slot */ @@ -880,7 +880,7 @@ KeyframeEditFunc ANIM_editkeyframes_ipo(short code) switch (code) { case BEZT_IPO_CONST: /* constant */ return set_bezt_constant; - case BEZT_IPO_LIN: /* linear */ + case BEZT_IPO_LIN: /* linear */ return set_bezt_linear; default: /* bezier */ return set_bezt_bezier; @@ -930,7 +930,7 @@ KeyframeEditFunc ANIM_editkeyframes_keytype(short code) case BEZT_KEYTYPE_JITTER: /* jitter keyframe */ return set_keytype_jitter; - case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */ + case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */ default: return set_keytype_keyframe; } diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index b5c0555bf63..9249b912da6 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -188,7 +188,7 @@ void clean_fcurve(FCurve *fcu, float thresh) /* make a copy of the old BezTriples, and clear F-Curve */ old_bezts = fcu->bezt; - totCount = fcu->totvert; + totCount = fcu->totvert; fcu->bezt = NULL; fcu->totvert = 0; @@ -256,7 +256,7 @@ void clean_fcurve(FCurve *fcu, float thresh) insert_vert_fcurve(fcu, cur[0], cur[1], 0); } } - else { + else { /* add if value doesn't equal that of previous */ if (IS_EQT(cur[1], prev[1], thresh) == 0) { /* add new keyframe */ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index f0c5f063e57..238dd9c68e4 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -108,7 +108,7 @@ short ANIM_get_keyframing_flags(Scene *scene, short incl_mode) } /* only if including settings from the autokeying mode... */ - if (incl_mode) { + if (incl_mode) { /* keyframing mode - only replace existing keyframes */ if (IS_AUTOKEY_MODE(scene, EDITKEYS)) flag |= INSERTKEY_REPLACE; @@ -131,7 +131,7 @@ bAction *verify_adt_action(ID *id, short add) adt = BKE_animdata_from_id(id); if ((adt == NULL) && (add)) adt = BKE_id_add_animdata(id); - if (adt == NULL) { + if (adt == NULL) { /* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */ printf("ERROR: Couldn't add AnimData (ID = %s)\n", (id) ? (id->name) : "<None>"); return NULL; @@ -240,7 +240,7 @@ int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag) i = binarysearch_bezt_index(fcu->bezt, bezt->vec[1][0], fcu->totvert, &replace); /* replace an existing keyframe? */ - if (replace) { + if (replace) { /* sanity check: 'i' may in rare cases exceed arraylen */ if ((i >= 0) && (i < fcu->totvert)) { /* just change the values when replacing, so as to not overwrite handles */ @@ -412,12 +412,12 @@ static short new_key_needed(FCurve *fcu, float cFrame, float nValue) float prevPosi = 0.0f, prevVal = 0.0f; float beztPosi = 0.0f, beztVal = 0.0f; - /* get current time+value */ + /* get current time+value */ beztPosi = bezt->vec[1][0]; beztVal = bezt->vec[1][1]; if (prev) { - /* there is a keyframe before the one currently being examined */ + /* there is a keyframe before the one currently being examined */ /* get previous time+value */ prevPosi = prev->vec[1][0]; @@ -940,7 +940,7 @@ short insert_keyframe(ReportList *reports, ID *id, bAction *act, const char grou } /* key entire array convenience method */ - if (array_index == -1) { + if (array_index == -1) { array_index = 0; array_index_max = RNA_property_array_length(&ptr, prop); @@ -1034,7 +1034,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou } /* key entire array convenience method */ - if (array_index == -1) { + if (array_index == -1) { array_index = 0; array_index_max = RNA_property_array_length(&ptr, prop); @@ -1064,7 +1064,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou /* try to find index of beztriple to get rid of */ i = binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &found); - if (found) { + if (found) { /* delete the key at the index (will sanity check + do recalc afterwards) */ delete_fcurve_key(fcu, i, 1); @@ -1863,7 +1863,7 @@ short fcurve_frame_has_keyframe(FCurve *fcu, float frame, short filter) /* binarysearch_bezt_index will set replace to be 0 or 1 * - obviously, 1 represents a match */ - if (replace) { + if (replace) { /* sanity check: 'i' may in rare cases exceed arraylen */ if ((i >= 0) && (i < fcu->totvert)) return 1; diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index c19904d39ac..7c5b75e56ae 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -88,7 +88,7 @@ void ED_operatortypes_armature(void) WM_operatortype_append(ARMATURE_OT_armature_layers); WM_operatortype_append(ARMATURE_OT_bone_layers); - /* SKETCH */ + /* SKETCH */ WM_operatortype_append(SKETCH_OT_gesture); WM_operatortype_append(SKETCH_OT_delete); WM_operatortype_append(SKETCH_OT_draw_stroke); @@ -221,7 +221,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf) /* Already part of view3d select */ //WM_keymap_add_item(keymap, "SKETCH_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - /* sketch poll checks mode */ + /* sketch poll checks mode */ WM_keymap_add_item(keymap, "SKETCH_OT_gesture", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 8a75d07a678..5d4609fcd7c 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -117,14 +117,14 @@ void ED_armature_sync_selection(ListBase *edbo) else ebo->flag &= ~BONE_SELECTED; } - } + } } void ED_armature_validate_active(struct bArmature *arm) { EditBone *ebone = arm->act_edbone; - if (ebone) { + if (ebone) { if (ebone->flag & BONE_HIDDEN_A) arm->act_edbone = NULL; } @@ -304,7 +304,7 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone eBone->ease2 = curBone->ease2; eBone->rad_head = curBone->rad_head; eBone->rad_tail = curBone->rad_tail; - eBone->segments = curBone->segments; + eBone->segments = curBone->segments; eBone->layer = curBone->layer; if (curBone->prop) @@ -897,7 +897,7 @@ static void joined_armature_fix_links(Object *tarArm, Object *srcArm, bPoseChann /* make tar armature be new parent */ ob->parent = tarArm; } - } + } } /* join armature exec is exported for use in object->join objects operator... */ @@ -1113,7 +1113,7 @@ static void separated_armature_fix_links(Object *origArm, Object *newArm) } } } - } + } } /* Helper function for armature separating - remove certain bones from the given armature @@ -1440,7 +1440,7 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, wmEvent *ev /* Select parents */ for (curBone = bone; curBone; curBone = next) { /* ignore bone if cannot be selected */ - if ((curBone->flag & BONE_UNSELECTABLE) == 0) { + if ((curBone->flag & BONE_UNSELECTABLE) == 0) { // XXX old cruft! use notifiers instead //select_actionchannel_by_name (ob->action, curBone->name, !(shift)); @@ -1493,7 +1493,7 @@ void POSE_OT_select_linked(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - /* props */ + /* props */ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); } @@ -1550,7 +1550,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e bone = curBone; break; } - else { + else { bone = NULL; break; } @@ -2687,7 +2687,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op)) updateDuplicateSubtarget(eBone, arm->edbo, obedit); } } - } + } /* correct the active bone */ if (arm->act_edbone) { @@ -2802,7 +2802,7 @@ static void fill_add_joint(EditBone *ebo, short eb_tail, ListBase *points) } for (ebp = points->first; ebp; ebp = ebp->next) { - if (equals_v3v3(ebp->vec, vec)) { + if (equals_v3v3(ebp->vec, vec)) { if (eb_tail) { if ((ebp->head_owner) && (ebp->head_owner->parent == ebo)) { /* so this bone's tail owner is this bone */ @@ -3150,7 +3150,7 @@ static int armature_merge_exec(bContext *C, wmOperator *op) /* put back link */ BLI_insertlinkbefore(&chains, nchain, chain); - } + } armature_tag_unselect(arm); @@ -3457,7 +3457,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) /* Deselect the old bone */ ebone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL); - } + } } /* if only one bone, make this one active */ if (totbone == 1 && first) arm->act_edbone = first; @@ -3681,7 +3681,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) parent = ebo->parent; /* only if selected and editable */ - if (EBONE_VISIBLE(arm, ebo) && EBONE_EDITABLE(ebo)) { + if (EBONE_VISIBLE(arm, ebo) && EBONE_EDITABLE(ebo)) { /* swap head and tail coordinates */ SWAP(float, ebo->head[0], ebo->tail[0]); SWAP(float, ebo->head[1], ebo->tail[1]); @@ -3721,7 +3721,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) } /* free chains */ - BLI_freelistN(&chains); + BLI_freelistN(&chains); armature_tag_unselect(arm); @@ -3778,7 +3778,7 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo } } - if (mode == ARM_PAR_CONNECT) { + if (mode == ARM_PAR_CONNECT) { /* Connected: Child bones will be moved to the parent tip */ selbone->flag |= BONE_CONNECTED; sub_v3_v3v3(offset, actbone->tail, selbone->head); @@ -3893,7 +3893,7 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEve { if (ebone != actbone) { if (ebone->parent != actbone) allchildbones = 1; - } + } } CTX_DATA_END; @@ -3901,7 +3901,7 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEve /* ob becomes parent, make the associated menus */ if (allchildbones) - uiItemEnumO(layout, "ARMATURE_OT_parent_set", NULL, 0, "type", ARM_PAR_OFFSET); + uiItemEnumO(layout, "ARMATURE_OT_parent_set", NULL, 0, "type", ARM_PAR_OFFSET); uiPupMenuEnd(C, pup); @@ -3994,7 +3994,7 @@ static int armature_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) ebone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); } } - CTX_DATA_END; + CTX_DATA_END; WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, NULL); @@ -4055,7 +4055,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op) } } } - CTX_DATA_END; + CTX_DATA_END; WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, NULL); @@ -4295,7 +4295,7 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op) break; } - } + } else { // BONE_SELECT_CHILD chbone = editbone_get_child(arm, curbone, 1); if (chbone == NULL) continue; @@ -4566,7 +4566,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor nearBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); arm->act_bone = nearBone; } - } + } } if (ob_act) { @@ -5118,7 +5118,7 @@ static void pchan_clear_rot(bPoseChannel *pchan) } } } /* Duplicated in source/blender/editors/object/object_transform.c */ - else { + else { if (pchan->rotmode == ROT_MODE_QUAT) { unit_qt(pchan->quat); } @@ -5544,7 +5544,7 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, char *oldnam if (cti->flush_constraint_targets) cti->flush_constraint_targets(curcon, &targets, 0); - } + } } } @@ -5631,7 +5631,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n } } - if (modifiers_usesArmature(ob, arm)) { + if (modifiers_usesArmature(ob, arm)) { bDeformGroup *dg = defgroup_find_name(ob, oldname); if (dg) { BLI_strncpy(dg->name, newname, MAXBONENAME); @@ -5959,7 +5959,7 @@ float arcLengthRatio(ReebArc *arc) embedLength = arcLength; } - return embedLength / arcLength; + return embedLength / arcLength; } EditBone *test_subdivideByLength(Scene *scene, Object *obedit, ReebArc *arc, ReebNode *head, ReebNode *tail) @@ -6060,7 +6060,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg) arc->flag = 1; /* mark arc direction */ } - /* Loop over subdivision methods */ + /* Loop over subdivision methods */ for (i = 0; lastBone == NULL && i < SKGEN_SUB_TOTAL; i++) { switch (scene->toolsettings->skgen_subdivisions[i]) { case SKGEN_SUB_LENGTH: diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c index 23dd3b15476..d9c7e78c01e 100644 --- a/source/blender/editors/armature/editarmature_generate.c +++ b/source/blender/editors/armature/editarmature_generate.c @@ -55,7 +55,7 @@ void setBoneRollFromNormal(EditBone *bone, const float no[3], float UNUSED(invma if (no != NULL && !is_zero_v3(no)) { float normal[3]; - copy_v3_v3(normal, no); + copy_v3_v3(normal, no); mul_m3_v3(tmat, normal); bone->roll = ED_rollBoneToVector(bone, normal, FALSE); diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 196d03020e7..e5372c3ea09 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -191,7 +191,7 @@ static float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4] if (previous->bone) { sub_v3_v3v3(vec_first, previous->bone->tail, previous->bone->head); - } + } else if (previous->prev->bone) { sub_v3_v3v3(vec_first, edge->bone->head, previous->prev->bone->tail); } @@ -653,7 +653,7 @@ static int RIG_parentControl(RigControl *ctrl, EditBone *link) sub_v3_v3v3(offset, ctrl->bone->head, link->head); - /* if root matches, check for direction too */ + /* if root matches, check for direction too */ if (dot_v3v3(offset, offset) < 0.0001f) { float vbone[3], vparent[3]; @@ -802,7 +802,7 @@ static void RIG_reconnectControlBones(RigGraph *rg) } } - /* if not found yet, check child */ + /* if not found yet, check child */ if (found == 0) { RigArc *arc; RigArc *best_arc = NULL; @@ -863,7 +863,7 @@ static void RIG_reconnectControlBones(RigGraph *rg) /* SET bone link to ctrl corresponding to pchan */ RigControl *link = BLI_ghash_lookup(rg->controls_map, pchan->name); - /* if owner is a control bone, link with it */ + /* if owner is a control bone, link with it */ if (link && link->link) { RIG_parentControl(ctrl, link->bone); found = 1; @@ -876,7 +876,7 @@ static void RIG_reconnectControlBones(RigGraph *rg) cti->flush_constraint_targets(con, &targets, 0); } } - } + } if (found == 0) { /* check if parent is already linked */ @@ -1324,7 +1324,7 @@ void RIG_printArc(RigGraph *rg, RigArc *arc) printf("\t\t%s\n", edge->bone->name); RIG_printLinkedCtrl(rg, edge->bone, 3); } - } + } printf("symmetry level: %i flag: %i group %i\n", arc->symmetry_level, arc->symmetry_flag, arc->symmetry_group); RIG_printNode((RigNode *)arc->tail, "tail"); @@ -1336,7 +1336,7 @@ void RIG_printGraph(RigGraph *rg) printf("---- ARCS ----\n"); for (arc = rg->arcs.first; arc; arc = arc->next) { - RIG_printArc(rg, arc); + RIG_printArc(rg, arc); printf("\n"); } @@ -1345,7 +1345,7 @@ void RIG_printGraph(RigGraph *rg) } else { printf("HEAD NODE: NONE\n"); - } + } } /*******************************************************************************************************/ @@ -1584,7 +1584,7 @@ static void finalizeControl(RigGraph *rigg, RigControl *ctrl, float resize) repositionTailControl(rigg, ctrl_child); } } - } + } } static void repositionTailControl(RigGraph *rigg, RigControl *ctrl) @@ -1840,7 +1840,7 @@ static float calcCostAngleLengthDistance(BArcIterator *iter, float **UNUSED(vec_ length2 = normalize_v3(vec_second); - /* Angle cost */ + /* Angle cost */ if (edge->prev) { sub_v3_v3v3(vec_first, vec1, vec0); normalize_v3(vec_first); @@ -2135,7 +2135,7 @@ static void retargetArctoArcLength(bContext *C, RigGraph *rigg, RigArc *iarc, Ri no = node_end->no; } - /* no need to move virtual edges (space between unconnected bones) */ + /* no need to move virtual edges (space between unconnected bones) */ if (edge->bone) { repositionBone(C, rigg, edge, vec0, vec1, no); } @@ -2173,7 +2173,7 @@ void *exec_retargetArctoArc(void *param) RetargetParam *p = (RetargetParam *)param; RigGraph *rigg = p->rigg; RigArc *iarc = p->iarc; - bContext *C = p->context; + bContext *C = p->context; RigNode *inode_start = p->inode_start; ReebArc *earc = iarc->link_mesh; @@ -2222,7 +2222,7 @@ static void matchMultiResolutionNode(RigGraph *rigg, RigNode *inode, ReebNode *t enode = enode->link_down; reebg = BIF_graphForMultiNode(rigg->link_mesh, enode); /* replace with call to link_down once that exists */ eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, NULL, 0) % SHAPE_LEVELS; - } + } } static void markMultiResolutionChildArc(ReebNode *end_enode, ReebNode *enode) @@ -2273,7 +2273,7 @@ static void matchMultiResolutionArc(RigGraph *rigg, RigNode *start_node, RigArc reebg = reebg->link_up; enode = next_earc->head; eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, (BArc *)next_earc, 1) % SHAPE_LEVELS; - } + } next_earc->flag = ARC_USED; next_iarc->link_mesh = next_earc; @@ -2303,7 +2303,7 @@ static void matchMultiResolutionStartingNode(RigGraph *rigg, ReebGraph *reebg, R enode = reebg->nodes.first; eshape = BLI_subtreeShape((BGraph *)reebg, (BNode *)enode, NULL, 0) % SHAPE_LEVELS; - } + } inode->link_mesh = enode; } @@ -2600,7 +2600,7 @@ void BIF_retargetArmature(bContext *C) ED_undo_push(C, "Retarget Skeleton"); - // XXX + // XXX // allqueue(REDRAWVIEW3D, 0); } diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c index e2e3c49e7e0..f3c32399ad6 100644 --- a/source/blender/editors/armature/poseUtils.c +++ b/source/blender/editors/armature/poseUtils.c @@ -274,7 +274,7 @@ LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, con /* check if paths match */ if (strcmp(path, fcu->rna_path) == 0) return ld; - } + } /* none found */ return NULL; diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index a05a98c58ca..ae3d496b641 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -871,7 +871,7 @@ static void poselib_apply_pose(tPoseLib_PreviewData *pld) if (pld->marker) frame = pld->marker->frame; else - return; + return; /* init settings for testing groups for keyframes */ @@ -887,7 +887,7 @@ static void poselib_apply_pose(tPoseLib_PreviewData *pld) /* has keyframe on this frame, so try to get a PoseChannel with this name */ pchan = BKE_pose_channel_find_name(pose, agrp->name); - if (pchan) { + if (pchan) { short ok = 0; /* check if this bone should get any animation applied */ @@ -1079,7 +1079,7 @@ static void poselib_preview_get_next(tPoseLib_PreviewData *pld, int step) } /* check if any matches */ - if (pld->searchp.first == NULL) { + if (pld->searchp.first == NULL) { pld->marker = NULL; return; } @@ -1152,7 +1152,7 @@ static void poselib_preview_handle_search(tPoseLib_PreviewData *pld, unsigned sh poselib_preview_get_next(pld, 1); pld->redraw = PL_PREVIEW_REDRAWALL; return; - } + } break; case DELKEY: @@ -1639,7 +1639,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; - /* properties */ + /* properties */ // TODO: make the pose_index into a proper enum instead of a cryptic int... ot->prop = RNA_def_int(ot->srna, "pose_index", -1, -2, INT_MAX, "Pose", "Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose)", 0, INT_MAX); diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 99de90bc9fa..576e5983d16 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -134,7 +134,7 @@ void ED_armature_exit_posemode(bContext *C, Base *base) ob->mode &= ~OB_MODE_POSE; WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, NULL); - } + } } /* if a selected or active bone is protected, throw error (oonly if warn == 1) and return 1 */ @@ -500,7 +500,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op) found = 1; break; } - } + } else { /* direction == BONE_SELECT_CHILD */ /* the child member is only assigned to connected bones, see [#30340] */ #if 0 @@ -992,7 +992,7 @@ static void pose_copy_menu(Scene *scene) } } } - } + } else { /* constraints, optional (note: max we can have is 24 constraints) */ bConstraint *con, *con_back; int const_toggle[24] = {0}; /* XXX, initialize as 0 to quiet errors */ @@ -1018,7 +1018,7 @@ static void pose_copy_menu(Scene *scene) con_back = con->next; BLI_freelinkN(&const_copy, con); con = con_back; - } + } else con = con->next; } @@ -1035,7 +1035,7 @@ static void pose_copy_menu(Scene *scene) * appending to list of constraints for this channel */ copy_constraints(&tmp_constraints, &const_copy, TRUE); - if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { + if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { /* add proxy-local tags */ for (con = tmp_constraints.first; con; con = con->next) con->flag |= CONSTRAINT_PROXY_LOCAL; @@ -1097,7 +1097,7 @@ static void set_pose_keys(Object *ob) for (chan = ob->pose->chanbase.first; chan; chan = chan->next) { Bone *bone = chan->bone; if ((bone) && (bone->flag & BONE_SELECTED) && (arm->layer & bone->layer)) - chan->flag |= POSE_KEY; + chan->flag |= POSE_KEY; else chan->flag &= ~POSE_KEY; } @@ -1916,7 +1916,7 @@ static int pose_bone_rotmode_exec(bContext *C, wmOperator *op) Object *ob = CTX_data_active_object(C); int mode = RNA_enum_get(op->ptr, "type"); - /* set rotation mode of selected bones */ + /* set rotation mode of selected bones */ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) { pchan->rotmode = mode; @@ -2100,7 +2100,7 @@ static int pose_bone_layers_invoke(bContext *C, wmOperator *op, wmEvent *evt) { int layers[32] = {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */ - /* get layers that are active already */ + /* get layers that are active already */ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) { short bit; @@ -2299,10 +2299,10 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op) * just pose values should change, so this should be fine */ bPose *dummyPose = NULL; - Object workob = {{0}}; + Object workob = {{0}}; bPoseChannel *pchan; - /* execute animation step for current frame using a dummy copy of the pose */ + /* execute animation step for current frame using a dummy copy of the pose */ BKE_pose_copy_data(&dummyPose, ob->pose, 0); BLI_strncpy(workob.id.name, "OB<ClearTfmWorkOb>", sizeof(workob.id.name)); diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 00f88a69fb6..b1bf13db69b 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -340,7 +340,7 @@ static ReebArc *copyArc(ReebGraph *rg, ReebArc *arc) cp_arc->edges.first = NULL; cp_arc->edges.last = NULL; - /* copy buckets */ + /* copy buckets */ cp_arc->buckets = MEM_callocN(sizeof(EmbedBucket) * cp_arc->bcount, "embed bucket"); memcpy(cp_arc->buckets, arc->buckets, sizeof(EmbedBucket) * cp_arc->bcount); @@ -377,7 +377,7 @@ static ReebGraph *copyReebGraph(ReebGraph *rg, int level) cp_rg->link_up = rg; cp_rg->multi_level = level; - /* Copy nodes */ + /* Copy nodes */ for (node = rg->nodes.first; node; node = node->next) { ReebNode *cp_node = copyNode(cp_rg, node); @@ -889,7 +889,7 @@ static void calculateArcLength(ReebArc *arc) vec0 = vec1; } - arc->length += len_v3v3(arc->tail->p, vec1); + arc->length += len_v3v3(arc->tail->p, vec1); } static void calculateGraphLength(ReebGraph *rg) @@ -948,7 +948,7 @@ void REEB_RadialSymmetry(BNode *root_node, RadialArc *ring, int count) bucket1 = IT_next(iter1); bucket2 = IT_next(iter2); - /* Make sure they both start at the same value */ + /* Make sure they both start at the same value */ while (bucket1 && bucket2 && bucket1->val < bucket2->val) { bucket1 = IT_next(iter1); } @@ -1005,7 +1005,7 @@ void REEB_RadialSymmetry(BNode *root_node, RadialArc *ring, int count) bucket1 = IT_next(iter1); bucket2 = IT_next(iter2); - /* Make sure they both start at the same value */ + /* Make sure they both start at the same value */ while (bucket1 && bucket1->val < bucket2->val) { bucket1 = IT_next(iter1); } @@ -1016,7 +1016,7 @@ void REEB_RadialSymmetry(BNode *root_node, RadialArc *ring, int count) for (; bucket1 && bucket2; bucket1 = IT_next(iter1), bucket2 = IT_next(iter2)) { - /* copy and mirror back to bucket2 */ + /* copy and mirror back to bucket2 */ bucket2->nv = bucket1->nv; copy_v3_v3(bucket2->p, bucket1->p); BLI_mirrorAlongAxis(bucket2->p, node->p, normal); @@ -1062,7 +1062,7 @@ void REEB_AxialSymmetry(BNode *root_node, BNode *node1, BNode *node2, struct BAr bucket1 = IT_next(iter1); bucket2 = IT_next(iter2); - /* Make sure they both start at the same value */ + /* Make sure they both start at the same value */ while (bucket1 && bucket1->val < bucket2->val) { bucket1 = IT_next(iter1); } @@ -1080,7 +1080,7 @@ void REEB_AxialSymmetry(BNode *root_node, BNode *node1, BNode *node2, struct BAr /* add bucket2 in bucket1 */ interp_v3_v3v3(bucket1->p, bucket1->p, bucket2->p, (float)bucket2->nv / (float)(bucket1->nv)); - /* copy and mirror back to bucket2 */ + /* copy and mirror back to bucket2 */ bucket2->nv = bucket1->nv; copy_v3_v3(bucket2->p, bucket1->p); BLI_mirrorAlongAxis(bucket2->p, root_node->p, nor); @@ -1212,7 +1212,7 @@ static void reweightArc(ReebGraph *rg, ReebArc *arc, ReebNode *start_node, float reweightArc(rg, next_arc, node, end_weight); } - /* update only if needed */ + /* update only if needed */ if (arc->head->weight != start_weight || arc->tail->weight != end_weight) { old_weight = arc->head->weight; /* backup head weight, other arcs need it intact, it will be fixed by the source arc */ @@ -1318,7 +1318,7 @@ static int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs) } joined = 1; - } + } } return joined; @@ -1450,7 +1450,7 @@ static void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, R arc->tail = newNode; } - // Remove looped arcs + // Remove looped arcs if (arc->head == arc->tail) { // v1 or v2 was already newNode, since we're removing an arc, decrement degree NodeDegreeDecrement(rg, newNode); @@ -1648,7 +1648,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) BLI_sortlist(&rg->arcs, compareArcs); #ifdef DEBUG_REEB - { + { EditFace *efa; for (efa = G.editMesh->faces.first; efa; efa = efa->next) { efa->tmp.fp = -1; @@ -1731,7 +1731,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) efa->tmp.fp = saacos(fabs(angle)); #endif #else - add_v3_v3(avg_vec, efa->n); + add_v3_v3(avg_vec, efa->n); #endif } @@ -1873,7 +1873,7 @@ static int compareVerts(const void *a, const void *b) value = 1; } - return value; + return value; } static void spreadWeight(EditMesh *em) @@ -1947,7 +1947,7 @@ void REEB_exportGraph(ReebGraph *rg, int count) fprintf(f, "angle %0.3f %0.3f %0.3f %0.3f %i\n", p[0], p[1], p[2], arc->angle, BLI_ghash_size(arc->faces)); exportNode(f, "v2", arc->tail); - } + } fclose(f); } @@ -1983,7 +1983,7 @@ void removeNormalNodes(ReebGraph *rg) /* If arcs are one after the other */ if (arc->head == connectedArc->tail) { - /* remove furthest arc */ + /* remove furthest arc */ if (arc->tail->weight < connectedArc->head->weight) { mergeConnectedArcs(rg, arc, connectedArc); nextArc = arc->next; @@ -2006,7 +2006,7 @@ void removeNormalNodes(ReebGraph *rg) /* If arcs are one after the other */ if (arc->tail == connectedArc->head) { - /* remove furthest arc */ + /* remove furthest arc */ if (arc->head->weight < connectedArc->tail->weight) { mergeConnectedArcs(rg, arc, connectedArc); nextArc = arc->next; @@ -2092,7 +2092,7 @@ void mergeArcEdges(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc, MergeDirection d newEdge->nextEdge = e; - // if edge was the first in the list, point the edit edge to the new reeb edge instead. + // if edge was the first in the list, point the edit edge to the new reeb edge instead. if (*p == e) { *p = (void *)newEdge; } @@ -2289,12 +2289,12 @@ static ReebEdge *createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2) arc->faces = BLI_ghash_ptr_new("createArc gh"); if (node1->weight <= node2->weight) { - v1 = node1; - v2 = node2; + v1 = node1; + v2 = node2; } else { - v1 = node2; - v2 = node1; + v1 = node2; + v2 = node1; } arc->head = v1; @@ -2857,7 +2857,7 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges) /* Apply dijkstra spf for each selected vert */ for (eve = em->verts.first; eve; eve = eve->next) { if (eve->f & SELECT) { - shortestPathsFromVert(em, eve, indexed_edges); + shortestPathsFromVert(em, eve, indexed_edges); } } @@ -2927,7 +2927,7 @@ static void initIteratorFct(ReebArcIterator *iter) iter->next = nextBucket; iter->nextN = nextNBucket; iter->previous = previousBucket; - iter->stopped = iteratorStopped; + iter->stopped = iteratorStopped; } static void setIteratorValues(ReebArcIterator *iter, EmbedBucket *bucket) @@ -3419,7 +3419,7 @@ void REEB_draw() if (G.scene->toolsettings->skgen_options & SKGEN_DISP_EMBED) { - glColor3f(1, 1, 1); + glColor3f(1, 1, 1); glBegin(GL_POINTS); glVertex3fv(arc->head->p); glVertex3fv(arc->tail->p); diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h index bb8b3003baf..b0e1fd3ae34 100644 --- a/source/blender/editors/armature/reeb.h +++ b/source/blender/editors/armature/reeb.h @@ -114,7 +114,7 @@ typedef struct ReebArc { int bcount; struct EmbedBucket *buckets; - struct GHash *faces; + struct GHash *faces; float angle; struct ReebArc *link_up; /* for multi resolution filtering, points to higher levels */ } ReebArc; diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 874b31dd1ca..336ff5e1023 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -162,9 +162,9 @@ static short select_beztriple(BezTriple *bezt, short selstatus, short flag, shor bezt->f1 |= flag; bezt->f2 |= flag; bezt->f3 |= flag; - return 1; + return 1; } - else { /* deselects */ + else { /* deselects */ bezt->f1 &= ~flag; bezt->f2 &= ~flag; bezt->f3 &= ~flag; @@ -2063,7 +2063,7 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op) bp->weight = weight; } } - } + } DAG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); @@ -2115,7 +2115,7 @@ static int set_radius_exec(bContext *C, wmOperator *op) bp->radius = radius; } } - } + } WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, 0); @@ -2408,7 +2408,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short for (nu = editnurb->first; nu; nu = nu->next) { lastsel = 0; - if (nu->type == CU_BEZIER) { + if (nu->type == CU_BEZIER) { a = nu->pntsu; bezt = nu->bezt; if (next < 0) bezt = &nu->bezt[a - 1]; @@ -2425,7 +2425,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short bezt += next; lastsel = 0; } - /* move around in zigzag way so that we go through each */ + /* move around in zigzag way so that we go through each */ bezt -= (next - next / abs(next)); } } @@ -2440,7 +2440,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short if (!(bp->f1 & SELECT) || (selstatus == 0)) { short sel = select_bpoint(bp, selstatus, 1, VISIBLE); if ((sel == 1) && (cont == 0)) lastsel = 1; - } + } } else { bp += next; @@ -2706,7 +2706,7 @@ static int hide_exec(bContext *C, wmOperator *op) DAG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } void CURVE_OT_hide(wmOperatorType *ot) @@ -2767,7 +2767,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) DAG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } void CURVE_OT_reveal(wmOperatorType *ot) @@ -3200,7 +3200,7 @@ static int subdivide_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, 0); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } void CURVE_OT_subdivide(wmOperatorType *ot) @@ -5252,10 +5252,10 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op)) tempbp = bp + 1; if (!(tempbp->f1 & SELECT)) sel = select_bpoint(tempbp, SELECT, 1, VISIBLE); if (sel) { - bp++; + bp++; a--; } - } + } } bp++; @@ -5313,8 +5313,8 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) if ((bp->hide == 0) && (bp->f1 & SELECT)) { sel = 0; - /* check if neighbors have been selected */ - /* edges of surface are an exception */ + /* check if neighbors have been selected */ + /* edges of surface are an exception */ if ((a + 1) % nu->pntsu == 0) sel++; else { bp--; @@ -5346,7 +5346,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) if (sel != 4) { select_bpoint(bp, DESELECT, 1, VISIBLE); selbpoints[a] = 1; - } + } } else lastsel = 0; @@ -5360,7 +5360,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) for (nu = editnurb->first; nu; nu = nu->next) { lastsel = 0; /* check what type of curve/nurb it is */ - if (nu->type == CU_BEZIER) { + if (nu->type == CU_BEZIER) { a = nu->pntsu; bezt = nu->bezt; while (a--) { @@ -5368,10 +5368,10 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) if (lastsel == 1) sel = 1; else sel = 0; - /* check if neighbors have been selected */ - /* first and last are exceptions */ + /* check if neighbors have been selected */ + /* first and last are exceptions */ if (a == nu->pntsu - 1) sel++; - else { + else { bezt--; if ((bezt->hide == 0) && (bezt->f2 & SELECT)) sel++; bezt++; @@ -5385,14 +5385,14 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) } if (sel != 2) { - select_beztriple(bezt, DESELECT, 1, VISIBLE); + select_beztriple(bezt, DESELECT, 1, VISIBLE); lastsel = 1; } else lastsel = 0; } else lastsel = 0; - bezt++; + bezt++; } } else { @@ -5403,9 +5403,9 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) if (lastsel != 0) sel = 1; else sel = 0; - /* first and last are exceptions */ + /* first and last are exceptions */ if (a == nu->pntsu * nu->pntsv - 1) sel++; - else { + else { bp--; if ((bp->hide == 0) && (bp->f1 & SELECT)) sel++; bp++; @@ -5419,9 +5419,9 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op)) } if (sel != 2) { - select_bpoint(bp, DESELECT, 1, VISIBLE); + select_bpoint(bp, DESELECT, 1, VISIBLE); lastsel = 1; - } + } else lastsel = 0; } else lastsel = 0; @@ -5482,7 +5482,7 @@ static void selectrandom_curve(ListBase *editnurb, float randfac) select_bpoint(bp, SELECT, 1, VISIBLE); bp++; } - } + } } } @@ -6627,7 +6627,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) if (obedit == NULL || obedit->type != OB_SURF) { obedit = ED_object_add_type(C, OB_SURF, loc, rot, TRUE, layer); newob = 1; - } + } else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); } diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index b379ce6e5cf..2d039cfaf7f 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -310,7 +310,7 @@ static int insert_lorem_exec(bContext *C, wmOperator *UNUSED(op)) lastlorem = ED_lorem; insert_into_textbuf(obedit, '\n'); - insert_into_textbuf(obedit, '\n'); + insert_into_textbuf(obedit, '\n'); DAG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); @@ -458,7 +458,7 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, float nchars += strlen(tmp->line) + 1; if (cu->str) MEM_freeN(cu->str); - if (cu->strinfo) MEM_freeN(cu->strinfo); + if (cu->strinfo) MEM_freeN(cu->strinfo); cu->str = MEM_callocN(nchars + 4, "str"); cu->strinfo = MEM_callocN((nchars + 4) * sizeof(CharInfo), "strinfo"); @@ -757,7 +757,7 @@ static int paste_selection(Object *obedit, ReportList *reports) /* Verify that the copy buffer => [copy buffer len] + cu->len < MAXTEXT */ if (cu->len + len <= MAXTEXT) { - if (len) { + if (len) { int size = (cu->len * sizeof(wchar_t)) - (cu->pos * sizeof(wchar_t)) + sizeof(wchar_t); memmove(ef->textbuf + cu->pos + len, ef->textbuf + cu->pos, size); memcpy(ef->textbuf + cu->pos, ef->copybuf, len * sizeof(wchar_t)); @@ -835,7 +835,7 @@ static int move_cursor(bContext *C, int type, int select) if (ef->textbuf[cu->pos - 1] == '\n') break; if (ef->textbufinfo[cu->pos - 1].flag & CU_CHINFO_WRAP) break; cu->pos--; - } + } cursmove = FO_CURS; break; @@ -868,7 +868,7 @@ static int move_cursor(bContext *C, int type, int select) cursmove = FO_CURS; break; - case NEXT_CHAR: + case NEXT_CHAR: if ((select) && (cu->selstart == 0)) cu->selstart = cu->selend = cu->pos + 1; cu->pos++; cursmove = FO_CURS; diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 725ffcee1ba..11e07584405 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -98,8 +98,8 @@ static void gp_draw_stroke_buffer(tGPspoint *points, int totpoints, short thickn if (dflag & (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_ONLYV2D)) return; - /* if drawing a single point, draw it larger */ - if (totpoints == 1) { + /* if drawing a single point, draw it larger */ + if (totpoints == 1) { /* draw point */ glBegin(GL_POINTS); glVertex2iv(&points->x); @@ -315,7 +315,7 @@ static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s, s0[1] = (pt1->y / 100 * winy) + offsy; s1[0] = (pt2->x / 100 * winx) + offsx; s1[1] = (pt2->y / 100 * winy) + offsy; - } + } /* calculate gradient and normal - 'angle'=(ny/nx) */ m1[1] = s1[1] - s0[1]; @@ -331,7 +331,7 @@ static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s, if (i == 0) { /* draw start cap first * - make points slightly closer to center (about halfway across) - */ + */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; sc[0] = s0[0] - (m1[0] * pthick * 0.75f); @@ -382,7 +382,7 @@ static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s, if (((athick * 2.0f) < pthick) && (IS_EQF(athick, pthick) == 0)) { mt[0] += (mb[0] * dfac); mt[1] += (mb[1] * dfac); - } + } /* calculate points for start of segment */ t0[0] = s0[0] - mt[0]; @@ -420,7 +420,7 @@ static void gp_draw_stroke(bGPDspoint *points, int totpoints, short thickness_s, /* draw end cap as last step * - make points slightly closer to center (about halfway across) - */ + */ mt[0] = m2[0] * pthick * 0.5f; mt[1] = m2[1] * pthick * 0.5f; sc[0] = s1[0] + (m1[0] * pthick * 0.75f); @@ -531,7 +531,7 @@ static void gp_draw_strokes(bGPDframe *gpf, int offsx, int offsy, int winx, int #endif } } - else if (gps->totpoints > 1) + else if (gps->totpoints > 1) gp_draw_stroke(gps->points, gps->totpoints, lthick, dflag, gps->flag, debug, offsx, offsy, winx, winy); } } @@ -611,7 +611,7 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy, } else break; - } + } /* restore alpha */ glColor4fv(color); diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index b69db0040b5..a1a39c1be1a 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -393,7 +393,7 @@ void paste_gpdata(Scene *scene) ScrArea *sa; /* get area that gp-data comes from */ - //sa= gpencil_data_findowner((bGPdata *)ale->owner); + //sa= gpencil_data_findowner((bGPdata *)ale->owner); sa = NULL; /* this should be the right frame... as it may be a pre-existing frame, diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index e5afbdba50b..cd6668e4d59 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -536,7 +536,7 @@ static void gp_stroke_simplify(tGPsdata *p) j += 2; } - } + } /* free old buffer */ MEM_freeN(old_points); @@ -860,7 +860,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, } } } - else { + else { /* loop over the points in the stroke, checking for intersections * - an intersection will require the stroke to be split */ @@ -1210,7 +1210,7 @@ static void gp_paint_initstroke(tGPsdata *p, short paintmode) /* make strokes be drawn in screen space */ p->gpd->sbuffer_sflag &= ~GP_STROKE_2DSPACE; p->gpd->flag &= ~GP_DATA_VIEWALIGN; - } + } else p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE; } @@ -1342,7 +1342,7 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op) gp_session_cleanup(p); /* finally, free the temp data */ - MEM_freeN(p); + MEM_freeN(p); } op->customdata = NULL; @@ -1790,7 +1790,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, wmEvent *event) if (p->status == GP_STATUS_ERROR) { estate = OPERATOR_CANCELLED; } - } + } else { p->status = GP_STATUS_IDLING; } diff --git a/source/blender/editors/include/ED_screen_types.h b/source/blender/editors/include/ED_screen_types.h index 527ebb6c3ef..9f42fd042c3 100644 --- a/source/blender/editors/include/ED_screen_types.h +++ b/source/blender/editors/include/ED_screen_types.h @@ -94,7 +94,7 @@ typedef struct AZone { /* for draw */ short x1, y1, x2, y2; /* for clip */ - rcti rect; + rcti rect; } AZone; /* actionzone type */ diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 8f50edd1240..b3efcf1cd54 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -94,7 +94,7 @@ DEF_ICON(LINK) DEF_ICON(INLINK) DEF_ICON(PLUGIN) - /* various ui */ + /* various ui */ DEF_ICON(HELP) DEF_ICON(GHOST_ENABLED) DEF_ICON(COLOR) diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index fcde4186778..1039453e93a 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -527,7 +527,7 @@ static void ui_draw_links(uiBlock *block) foundselectline = TRUE; } } - } + } /* Draw any active lines (lines with either button being hovered over). * Do this last so they appear on top of inactive lines. */ @@ -539,7 +539,7 @@ static void ui_draw_links(uiBlock *block) ui_draw_linkline(line, !foundselectline); } } - } + } } } @@ -581,7 +581,7 @@ static void ui_but_update_linklines(uiBlock *block, uiBut *oldbut, uiBut *newbut if (line->from == newbut) line->from = oldbut; } - } + } /* check all other button links */ for (but = block->buttons.first; but; but = but->next) { @@ -1270,7 +1270,7 @@ void ui_delete_linkline(uiLinkLine *line, uiBut *but) (*(link->ppoin))[b] = (*(link->ppoin))[a]; b++; } - } + } (*(link->totlink))--; } } @@ -1391,7 +1391,7 @@ int ui_is_but_unit(uiBut *but) return 0; #endif - /* for now disable time unit conversion */ + /* for now disable time unit conversion */ if (unit_type == PROP_UNIT_TIME) return 0; @@ -1464,16 +1464,16 @@ double ui_get_but_val(uiBut *but) case 'S': value = hsv[1]; break; case 'V': value = hsv[2]; break; } - } + } else if (but->pointype == UI_BUT_POIN_CHAR) { value = *(char *)but->poin; } else if (but->pointype == UI_BUT_POIN_SHORT) { value = *(short *)but->poin; - } + } else if (but->pointype == UI_BUT_POIN_INT) { value = *(int *)but->poin; - } + } else if (but->pointype == UI_BUT_POIN_FLOAT) { value = *(float *)but->poin; } @@ -2006,7 +2006,7 @@ void ui_set_but_soft_range(uiBut *but, double value) static void ui_free_link(uiLink *link) { - if (link) { + if (link) { BLI_freelistN(&link->lines); MEM_freeN(link); } @@ -2055,7 +2055,7 @@ void uiFreeBlock(const bContext *C, uiBlock *block) uiBut *but; while ( (but = block->buttons.first) ) { - BLI_remlink(&block->buttons, but); + BLI_remlink(&block->buttons, but); ui_free_but(C, but); } @@ -2398,7 +2398,7 @@ void uiBlockBeginAlign(uiBlock *block) /* if other align was active, end it */ if (block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block); - block->flag |= UI_BUT_ALIGN_DOWN; + block->flag |= UI_BUT_ALIGN_DOWN; block->alignnr++; /* buttons declared after this call will get this align nr */ // XXX flag? diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 010df0cbfbc..426daa69272 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -160,7 +160,7 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl /* get current color, needs to be outside of glBegin/End */ glGetFloatv(GL_CURRENT_COLOR, color); - /* 'shade' defines strength of shading */ + /* 'shade' defines strength of shading */ coltop[0] = minf(1.0f, color[0] + shadetop); coltop[1] = minf(1.0f, color[1] + shadetop); coltop[2] = minf(1.0f, color[2] + shadetop); @@ -269,7 +269,7 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float /* get current color, needs to be outside of glBegin/End */ glGetFloatv(GL_CURRENT_COLOR, color); - /* 'shade' defines strength of shading */ + /* 'shade' defines strength of shading */ colLeft[0] = minf(1.0f, color[0] + shadeLeft); colLeft[1] = minf(1.0f, color[1] + shadeLeft); colLeft[2] = minf(1.0f, color[2] + shadeLeft); @@ -510,7 +510,7 @@ static void ui_draw_but_CHARTAB(uiBut *but) if (G.selfont && BKE_vfont_is_builtin(G.selfont) == FALSE) { /* Is the font file packed, if so then use the packed file */ if (G.selfont->packedfile) { - pf = G.selfont->packedfile; + pf = G.selfont->packedfile; FTF_SetFont(pf->data, pf->size, 14.0); } else { @@ -608,7 +608,7 @@ static void ui_draw_but_CHARTAB(uiBut *but) ey -= buth; sx = rect->xmin; ex = rect->xmin + butw; - } + } glShadeModel(GL_FLAT); /* Return Font Settings to original */ @@ -1221,7 +1221,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect) glColor3ub(255, 255, 255); glVertex2fv(v2); glVertex2fv(v3); - } + } } glEnd(); @@ -1707,7 +1707,7 @@ static void ui_shadowbox(float minx, float miny, float maxx, float maxy, float s glVertex2f(maxx, miny - shadsize); glEnd(); - /* bottom quad */ + /* bottom quad */ glBegin(GL_POLYGON); glColor4ub(0, 0, 0, alpha); glVertex2f(minx + 0.3f * shadsize, miny); diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index c4440cf07ed..ed1a2caab05 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -704,7 +704,7 @@ static int ui_but_mouse_inside_icon(uiBut *but, ARegion *ar, wmEvent *event) BLI_rcti_rctf_copy(&rect, &but->rect); - if (but->imb) { + if (but->imb) { /* use button size itself */ } else if (but->flag & UI_ICON_LEFT) { @@ -774,7 +774,7 @@ static void ui_delete_active_linkline(uiBlock *block) (*(link->ppoin))[b] = (*(link->ppoin))[a]; b++; } - } + } (*(link->totlink))--; } } @@ -1063,7 +1063,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut break; case HSVSLI: break; - case TOG3: + case TOG3: ui_apply_but_TOG3(C, but, data); break; case MENU: @@ -1109,10 +1109,10 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut case INLINK: ui_apply_but_LINK(C, but, data); break; - case BUT_IMAGE: + case BUT_IMAGE: ui_apply_but_IMAGE(C, but, data); break; - case HISTOGRAM: + case HISTOGRAM: ui_apply_but_HISTOGRAM(C, but, data); break; case WAVEFORM: @@ -1343,7 +1343,7 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho } /* mouse dragged outside the widget to the left */ - if (x < startx && but->ofs > 0) { + if (x < startx && but->ofs > 0) { int i = but->ofs; origstr[but->ofs] = 0; @@ -1587,7 +1587,7 @@ static int ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int directio but->pos -= step; changed = 1; } - } + } } return changed; @@ -1676,7 +1676,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste if (cut) if ((but->selend - but->selsta) > 0) changed = ui_textedit_delete_selection(but, data); - } + } return changed; } @@ -2254,7 +2254,7 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data ED_region_tag_redraw(data->region); if (event->val == KM_PRESS) { - if (ISHOTKEY(event->type)) { + if (ISHOTKEY(event->type)) { if (WM_key_event_string(event->type)[0]) ui_set_but_val(but, event->type); @@ -2935,7 +2935,7 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton data->value = temp; else data->cancel = TRUE; - } + } else { if (f < tempf) tempf -= 0.01f; else tempf += 0.01f; @@ -3336,7 +3336,7 @@ static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOF case UI_GRAD_V: hsv[2] += ndof->ry * sensitivity; break; - case UI_GRAD_V_ALT: + case UI_GRAD_V_ALT: /* vertical 'value' strip */ /* exception only for value strip - use the range set in but->min/max */ @@ -3904,7 +3904,7 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt changed = 1; - /* reset cmp back to the curve points again, rather than drawing segments */ + /* reset cmp back to the curve points again, rather than drawing segments */ cmp = cuma->curve; /* find newly added point and make it 'sel' */ @@ -4508,11 +4508,11 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) int kmi_id; /* XXX this guess_opname can potentially return a different keymap than being found on adding later... */ - km = WM_keymap_guess_opname(C, but->optype->idname); + km = WM_keymap_guess_opname(C, but->optype->idname); kmi = WM_keymap_add_item(km, but->optype->idname, AKEY, KM_PRESS, 0, 0); kmi_id = kmi->id; - /* copy properties, prop can be NULL for reset */ + /* copy properties, prop can be NULL for reset */ if (prop) prop = IDP_CopyProperty(prop); WM_keymap_properties_reset(kmi, prop); @@ -4520,7 +4520,7 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) /* update and get pointers again */ WM_keyconfig_update(wm); - km = WM_keymap_guess_opname(C, but->optype->idname); + km = WM_keymap_guess_opname(C, but->optype->idname); kmi = WM_keymap_item_find_id(km, kmi_id); RNA_pointer_create(&wm->id, &RNA_KeyMapItem, kmi, &ptr); @@ -4954,7 +4954,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } - } + } else if (but->pointype && but->poin == NULL) { /* there's a pointer needed */ BKE_reportf(NULL, RPT_WARNING, "DoButton pointer error: %s", but->str); @@ -6380,7 +6380,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle break; /* opening sublevels of pulldowns */ - case RIGHTARROWKEY: + case RIGHTARROWKEY: if (event->val == KM_PRESS && (block->flag & UI_BLOCK_LOOP)) { PASS_EVENT_TO_PARENT_IF_NONACTIVE; diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 0921107b8e6..bb0cc1176d8 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -142,7 +142,7 @@ static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int new_icon = MEM_callocN(sizeof(Icon), "texicon"); new_icon->obj = NULL; /* icon is not for library object */ - new_icon->type = 0; + new_icon->type = 0; di = MEM_callocN(sizeof(DrawInfo), "drawinfo"); di->type = type; @@ -852,7 +852,7 @@ static void icon_set_image(bContext *C, ID *id, PreviewImage *prv_img, enum eIco if (G.debug & G_DEBUG) printf("%s: no preview image for this ID: %s\n", __func__, id->name); return; - } + } icon_create_rect(prv_img, size); @@ -982,8 +982,8 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al if (!di) { di = icon_create_drawinfo(); - icon->drawinfo = di; - icon->drawinfo_free = UI_icons_free_drawinfo; + icon->drawinfo = di; + icon->drawinfo_free = UI_icons_free_drawinfo; } /* scale width and height according to aspect */ @@ -994,13 +994,13 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al /* vector icons use the uiBlock transformation, they are not drawn * with untransformed coordinates like the other icons */ di->data.vector.func((int)x, (int)y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f); - } + } else if (di->type == ICON_TYPE_TEXTURE) { icon_draw_texture(x, y, (float)w, (float)h, di->data.texture.x, di->data.texture.y, di->data.texture.w, di->data.texture.h, alpha, rgb); } else if (di->type == ICON_TYPE_BUFFER) { - /* it is a builtin icon */ + /* it is a builtin icon */ iimg = di->data.buffer.image; if (!iimg->rect) return; /* something has gone wrong! */ @@ -1010,7 +1010,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al else if (di->type == ICON_TYPE_PREVIEW) { PreviewImage *pi = BKE_previewimg_get((ID *)icon->obj); - if (pi) { + if (pi) { /* no create icon on this level in code */ if (!pi->rect[size]) return; /* something has gone wrong! */ diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 8e30b31f3fe..cf5aed16263 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1313,7 +1313,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s BLI_addtail(items_list, cis); } MEM_freeN(name); - } + } i++; } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 49e96bea6c6..d1dee74c1b1 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -240,7 +240,7 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int } } } - } + } } } @@ -545,7 +545,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect) if (!(panel->flag & PNL_CLOSEDX)) { ui_draw_aligned_panel_header(style, block, &headrect, 'h'); - /* itemrect smaller */ + /* itemrect smaller */ itemrect.xmax = headrect.xmax - 5.0f / block->aspect; itemrect.xmin = itemrect.xmax - BLI_rcti_size_y(&headrect); itemrect.ymin = headrect.ymin; @@ -594,7 +594,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect) /* draw collapse icon */ UI_ThemeColor(TH_TEXT); - /* itemrect smaller */ + /* itemrect smaller */ itemrect.xmin = headrect.xmin + 5.0f / block->aspect; itemrect.xmax = itemrect.xmin + BLI_rcti_size_y(&headrect); itemrect.ymin = headrect.ymin; @@ -895,7 +895,7 @@ void uiEndPanels(const bContext *C, ARegion *ar, int *x, int *y) panew->paneltab = NULL; ED_region_tag_redraw(ar); /* the buttons panew were not made */ } - } + } } /* re-align, possibly with animation */ @@ -1200,7 +1200,7 @@ int ui_handler_panel_region(bContext *C, wmEvent *event) ED_region_tag_redraw(ar); retval = WM_UI_HANDLER_BREAK; - } + } } } #endif diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 14cb1cbe85a..b9036db74a1 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -213,7 +213,7 @@ static MenuData *decompose_menu_string(const char *str) else { menudata_add_item(md, nitem, nretval, nicon, 0); nretval = md->nitems + 1; - } + } nitem = NULL; nicon = 0; @@ -1950,7 +1950,7 @@ static void ui_update_block_buts_rgb(uiBlock *block, const float rgb[3]) else if (bt->str[0] == 'V') { ui_set_but_val(bt, hsv[2]); } - } + } ui_check_but(bt); } diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index acf7712f97b..7e7db6aeaaa 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -348,7 +348,7 @@ void uiStyleInit(void) #else font->blf_id = BLF_load_mem("default", (unsigned char *)datatoc_bfont_ttf, datatoc_bfont_ttf_size); #endif - } + } else { font->blf_id = BLF_load(font->filename); if (font->blf_id == -1) diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 5f9722d0ec0..8ba8d40c218 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -199,7 +199,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem) uiBoundsBlock(block, 6); - uiBlockSetDirection(block, UI_DOWN); + uiBlockSetDirection(block, UI_DOWN); uiEndBlock(C, block); /* give search-field focus */ @@ -580,7 +580,7 @@ void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, co RNA_warning("pointer property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); return; } - if (!propType || RNA_property_type(propType) != PROP_ENUM) { + if (!propType || RNA_property_type(propType) != PROP_ENUM) { RNA_warning("pointer-type property not found: %s.%s", RNA_struct_identifier(ptr->type), proptypename); return; } @@ -1281,7 +1281,7 @@ static void colorband_add_cb(bContext *C, void *cb_v, void *coba_v) if (colorband_element_add(coba, pos)) { rna_update_cb(C, cb_v, NULL); - ED_undo_push(C, "Add colorband"); + ED_undo_push(C, "Add colorband"); } } diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 3203237496f..f793d71458e 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -501,16 +501,16 @@ static void widget_num_tria(uiWidgetTrias *tria, rcti *rect, float triasize, cha if (where == 'r') { centx = (float)rect->xmax - 0.5f * minsize; sizex = -sizex; - } + } else if (where == 't') { centy = (float)rect->ymax - 0.5f * minsize; sizey = -sizey; i2 = 0; i1 = 1; - } + } else if (where == 'b') { sizex = -sizex; i2 = 0; i1 = 1; - } + } for (a = 0; a < 3; a++) { tria->vec[a][0] = sizex * num_tria_vert[a][i1] + centx; @@ -536,16 +536,16 @@ static void widget_scroll_circle(uiWidgetTrias *tria, rcti *rect, float triasize if (where == 'r') { centx = (float)rect->xmax - 0.5f * minsize; sizex = -sizex; - } + } else if (where == 't') { centy = (float)rect->ymax - 0.5f * minsize; sizey = -sizey; i2 = 0; i1 = 1; - } + } else if (where == 'b') { sizex = -sizex; i2 = 0; i1 = 1; - } + } for (a = 0; a < 16; a++) { tria->vec[a][0] = sizex * scroll_circle_vert[a][i1] + centx; @@ -878,7 +878,7 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect aspect = but->block->aspect; if (aspect != but->aspect) { /* prevent scaling up icon in pupmenu */ - if (aspect < 1.0f) { + if (aspect < 1.0f) { height = UI_DPI_ICON_SIZE; aspect = 1.0f; @@ -1852,7 +1852,7 @@ static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int dir else if (direction == UI_DOWN) { roundboxalign = (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT); rect->ymin -= 4.0; - } + } else if (direction == UI_TOP) { roundboxalign = UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT; rect->ymax += 4.0; @@ -2364,7 +2364,7 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat wtb.emboss = 0; /* only emboss once */ /* exception for progress bar */ - if (state & UI_SCROLL_NO_OUTLINE) + if (state & UI_SCROLL_NO_OUTLINE) SWAP(short, outline, wtb.outline); round_box_edges(&wtb, UI_CNR_ALL, slider, rad); @@ -2388,7 +2388,7 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat if (state & UI_SCROLL_NO_OUTLINE) SWAP(short, outline, wtb.outline); - } + } } static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign)) @@ -2627,7 +2627,7 @@ static void widget_icon_has_anim(uiBut *UNUSED(but), uiWidgetColors *wcol, rcti /* rounded */ round_box_edges(&wtb, UI_CNR_ALL, rect, 10.0f); widgetbase_draw(&wtb, wcol); - } + } } @@ -3346,7 +3346,7 @@ void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect) glColor3ubv((unsigned char *)wt->wcol.text); UI_DrawTriIcon(BLI_rcti_cent_x(rect), rect->ymin + 10, 'v'); } - } + } } uiWidgetColors *ui_tooltip_get_theme(void) diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 47bee92be62..559602b04c0 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -299,7 +299,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) /* other view types are completely defined using their own settings already */ default: /* we don't do anything here, as settings should be fine, but just make sure that rect */ - break; + break; } } @@ -1089,7 +1089,7 @@ static void step_to_grid(float *step, int *power, int unit) } /* prevents printing 1.0 2.0 3.0 etc */ - if (rem == 1.0f) (*power)++; + if (rem == 1.0f) (*power)++; } else { if (rem < 2.0f) rem = 2.0f; @@ -1100,7 +1100,7 @@ static void step_to_grid(float *step, int *power, int unit) (*power)++; /* prevents printing 1.0, 2.0, 3.0, etc. */ - if (rem == 10.0f) (*power)++; + if (rem == 10.0f) (*power)++; } } @@ -1256,7 +1256,7 @@ void UI_view2d_grid_draw(View2D *v2d, View2DGrid *grid, int flag) vec2[1] = vec1[1] -= 0.5f * grid->dy; step++; - if (flag & V2D_HORIZONTAL_FINELINES) { + if (flag & V2D_HORIZONTAL_FINELINES) { UI_ThemeColorShade(TH_GRID, 16); for (a = 0; a < step; a++) { glBegin(GL_LINE_STRIP); @@ -1487,7 +1487,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, /* check whether sliders can disappear due to the full-range being used */ if (v2d->keeptot) { - if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { + if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { v2d->scroll |= V2D_SCROLL_HORIZONTAL_FULLR; scrollers->horfull = 1; } @@ -1529,7 +1529,7 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, /* check whether sliders can disappear due to the full-range being used */ if (v2d->keeptot) { - if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { + if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { v2d->scroll |= V2D_SCROLL_VERTICAL_FULLR; scrollers->vertfull = 1; } @@ -1682,7 +1682,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v if (fac < hor.xmin + 10) continue; - switch (vs->xunits) { + switch (vs->xunits) { case V2D_UNIT_FRAMES: /* frames (as whole numbers)*/ scroll_printstr(scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMES, 'h'); break; @@ -1797,7 +1797,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v BLF_disable_default(BLF_ROTATION); } - } + } } } @@ -2066,7 +2066,7 @@ short UI_view2d_mouse_in_scrollers(const bContext *C, View2D *v2d, int x, int y) } if (scroll & V2D_SCROLL_VERTICAL) { if (IN_2D_VERT_SCROLL(v2d, co)) return 'v'; - } + } /* not found */ return 0; diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 12e04d392b4..87da31ceaee 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -642,7 +642,7 @@ static void view_zoomstep_apply(bContext *C, wmOperator *op) v2d->cur.ymin += ofs + dy; v2d->cur.ymax += ofs - dy; - } + } else { v2d->cur.ymin += dy; v2d->cur.ymax -= dy; @@ -956,7 +956,7 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event) view_zoomdrag_apply(C, op); view_zoomdrag_exit(C, op); return OPERATOR_FINISHED; - } + } /* set initial settings */ vzd->lastx = event->x; @@ -1065,7 +1065,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event) /* apply zooming */ view_zoomdrag_apply(C, op); - } + } else if (event->type == vzd->invoke_event || event->type == ESCKEY) { if (event->val == KM_RELEASE) { @@ -1469,7 +1469,7 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_ else if (in_min) return SCROLLHANDLE_MIN; else if (out_min) - return SCROLLHANDLE_MIN_OUTSIDE; + return SCROLLHANDLE_MIN_OUTSIDE; else if (out_max) return SCROLLHANDLE_MAX_OUTSIDE; @@ -1751,7 +1751,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) /* can't catch this event for ourselves, so let it go to someone else? */ return OPERATOR_PASS_THROUGH; - } + } } /* zone is also inappropriate if scroller is not visible... */ diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 99ed86d7a06..70b359d3e28 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -476,7 +476,7 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op) make_prim_finish(C, obedit, &state, enter_editmode); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot) diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 98fae2cc701..fa1b04df05f 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -527,7 +527,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, wmEvent *event) ED_region_tag_redraw(lcd->ar); break; - } + } } /* using the keyboard to input the number of cuts */ diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 40132c697e6..65cd9c7d709 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1437,7 +1437,7 @@ static int mouse_mesh_shortest_path(bContext *C, int mval[2]) case EDGE_MODE_TAG_SHARP: me->drawflag |= ME_DRAWSHARP; break; - case EDGE_MODE_TAG_CREASE: + case EDGE_MODE_TAG_CREASE: me->drawflag |= ME_DRAWCREASES; break; case EDGE_MODE_TAG_BEVEL: @@ -1707,7 +1707,7 @@ void EDBM_selectmode_convert(BMEditMesh *em, const short selectmode_old, const s BM_edge_select_set(em->bm, eed, TRUE); } } - } + } else if (selectmode_new == SCE_SELECT_FACE) { BMIter liter; BMLoop *l; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 1df37859501..484faf0d1e5 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2766,7 +2766,7 @@ static float bm_edge_seg_isect(const float sco_a[2], const float sco_b[2], break; } - } + } lastdist = dist; } return perc; diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index d8793505608..c2580b4da55 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -264,7 +264,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) /* adjust settings to fit (allocate a new data-array) */ kbn->data = MEM_callocN(sizeof(float) * 3 * totvert, "joined_shapekey"); - kbn->totelem = totvert; + kbn->totelem = totvert; /* XXX 2.5 Animato */ #if 0 @@ -843,7 +843,7 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, const float co[3], char m minmax_v3v3_v3(min, max, eve->co); } } - else { + else { MVert *mvert; int a; @@ -878,7 +878,7 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, const float co[3], char m mesh_octree_add_nodes(MeshOctree.table, eve->co, MeshOctree.offs, MeshOctree.div, (intptr_t)(eve)); } } - else { + else { MVert *mvert; int a; diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 9a2915a5d55..029b27c0400 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1124,13 +1124,13 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, basen->object = ob; /* make sure apply works */ - BKE_free_animdata(&ob->id); + BKE_free_animdata(&ob->id); ob->adt = NULL; ob->parent = NULL; ob->constraints.first = ob->constraints.last = NULL; ob->disp.first = ob->disp.last = NULL; - ob->transflag &= ~OB_DUPLI; + ob->transflag &= ~OB_DUPLI; ob->lay = base->lay; copy_m4_m4(ob->obmat, dob->mat); @@ -1576,7 +1576,7 @@ static int convert_exec(bContext *C, wmOperator *op) /* delete original if needed */ if (basedel) { if (!keep_original) - ED_base_object_free_and_unlink(bmain, scene, basedel); + ED_base_object_free_and_unlink(bmain, scene, basedel); basedel = NULL; } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 80993d6cca7..1b486f589ae 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -494,9 +494,9 @@ static void test_constraints(Object *owner, bPoseChannel *pchan) /* auto-set 'Path' setting on curve so this works */ cu->flag |= CU_PATH; } - } + } } - } + } /* free any temporary targets */ if (cti->flush_constraint_targets) @@ -593,7 +593,7 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int if (owner == EDIT_CONSTRAINT_OWNER_OBJECT) { list = &ob->constraints; - } + } else if (owner == EDIT_CONSTRAINT_OWNER_BONE) { bPoseChannel *pchan = BKE_pose_channel_active(ob); if (pchan) diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 43c6c332791..c0c2195592b 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -201,7 +201,7 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op) ED_base_object_activate(C, NULL); } } - } + } } CTX_DATA_END; @@ -684,7 +684,7 @@ static void copymenu_logicbricks(Scene *scene, View3D *v3d, Object *ob) if (TESTBASELIB(v3d, base)) { /* first: free all logic */ - free_sensors(&base->object->sensors); + free_sensors(&base->object->sensors); unlink_controllers(&base->object->controllers); free_controllers(&base->object->controllers); unlink_actuators(&base->object->actuators); @@ -885,7 +885,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) id_us_plus((ID *)cu1->vfonti); if (cu1->vfontbi) cu1->vfontbi->id.us--; cu1->vfontbi = cu->vfontbi; - id_us_plus((ID *)cu1->vfontbi); + id_us_plus((ID *)cu1->vfontbi); BKE_vfont_to_curve(bmain, scene, base->object, 0); /* needed? */ @@ -988,7 +988,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) cu1->flag |= CU_UV_ORCO; else cu1->flag &= ~CU_UV_ORCO; - } + } } else if (event == 29) { /* protected bits */ base->object->protectflag = ob->protectflag; @@ -1401,7 +1401,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene * scene, View3D * v3d) else ob->size[1] = ob->size[0] * y / x; done = TRUE; - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); } } if (done) break; @@ -1795,7 +1795,7 @@ static int logicbricks_copy_exec(bContext *C, wmOperator *UNUSED(op)) { if (ob != ob_iter) { /* first: free all logic */ - free_sensors(&ob_iter->sensors); + free_sensors(&ob_iter->sensors); unlink_controllers(&ob_iter->controllers); free_controllers(&ob_iter->controllers); unlink_actuators(&ob_iter->actuators); @@ -1864,7 +1864,7 @@ static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op)) ob_iter->anisotropicFriction[0] = ob->anisotropicFriction[0]; ob_iter->anisotropicFriction[1] = ob->anisotropicFriction[1]; ob_iter->anisotropicFriction[2] = ob->anisotropicFriction[2]; - ob_iter->collision_boundtype = ob->collision_boundtype; + ob_iter->collision_boundtype = ob->collision_boundtype; ob_iter->margin = ob->margin; ob_iter->bsoft = copy_bulletsoftbody(ob->bsoft); if (ob->restrictflag & OB_RESTRICT_RENDER) diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index cca37cf3a44..e8d388bb812 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -211,7 +211,7 @@ void GROUP_OT_objects_remove_active(wmOperatorType *ot) ot->idname = "GROUP_OT_objects_remove_active"; /* api callbacks */ - ot->exec = objects_remove_active_exec; + ot->exec = objects_remove_active_exec; ot->poll = ED_operator_objectmode; /* flags */ @@ -333,7 +333,7 @@ void GROUP_OT_create(wmOperatorType *ot) ot->idname = "GROUP_OT_create"; /* api callbacks */ - ot->exec = group_create_exec; + ot->exec = group_create_exec; ot->poll = ED_operator_objectmode; /* flags */ diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 8bc249974f2..1332d9b19a3 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -667,7 +667,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op) if (ptr.data) { /* if modifier context is available, use that */ ob = ptr.id.data; hmd = ptr.data; - } + } else { /* use the provided property */ ob = CTX_data_edit_object(C); hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); @@ -735,7 +735,7 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op) if (ptr.data) { /* if modifier context is available, use that */ ob = ptr.id.data; hmd = ptr.data; - } + } else { /* use the provided property */ ob = CTX_data_edit_object(C); hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); @@ -793,7 +793,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op) if (ptr.data) { /* if modifier context is available, use that */ ob = ptr.id.data; hmd = ptr.data; - } + } else { /* use the provided property */ ob = CTX_data_edit_object(C); hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); @@ -855,7 +855,7 @@ static int object_hook_select_exec(bContext *C, wmOperator *op) if (ptr.data) { /* if modifier context is available, use that */ ob = ptr.id.data; hmd = ptr.data; - } + } else { /* use the provided property */ ob = CTX_data_edit_object(C); hmd = (HookModifierData *)BLI_findlink(&ob->modifiers, num); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 447ba29e203..a52f526448f 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -622,7 +622,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object /* fall back on regular parenting now (for follow only) */ if (partype == PAR_FOLLOW) partype = PAR_OBJECT; - } + } } else if (partype == PAR_BONE) { pchan = BKE_pose_channel_active(par); diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 9bf1bbfa102..457a77528ce 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -171,7 +171,7 @@ static void object_clear_rot(Object *ob) } } } // Duplicated in source/blender/editors/armature/editarmature.c - else { + else { if (ob->rotmode == ROT_MODE_QUAT) { unit_qt(ob->quat); unit_qt(ob->dquat); diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c index aff66b272fe..dc309ec3c31 100644 --- a/source/blender/editors/physics/particle_boids.c +++ b/source/blender/editors/physics/particle_boids.c @@ -273,7 +273,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op)) /* there must be at least one state */ if (!part->boids->states.first) { state = boid_new_state(part->boids); - BLI_addtail(&part->boids->states, state); + BLI_addtail(&part->boids->states, state); } else state = part->boids->states.first; diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 7343a44470a..e8846b3236c 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -673,7 +673,7 @@ static void foreach_point(PEData *data, ForPointFunc func) PTCacheEdit *edit = data->edit; POINT_P; - LOOP_POINTS { + LOOP_POINTS { func(data, p); } } @@ -4109,7 +4109,7 @@ int PE_minmax(Scene *scene, float min[3], float max[3]) LOOP_SELECTED_KEYS { copy_v3_v3(co, key->co); mul_m4_v3(mat, co); - DO_MINMAX(co, min, max); + DO_MINMAX(co, min, max); ok= 1; } } diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 315386a947e..9306ec79966 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -212,9 +212,9 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char for (j=0;j <= entries;j++) { // also print time value fprintf(file, " %f ", channel[i*(entries + 1) + j]); if (j==entries-1) { fprintf(file, " "); } - } + } fprintf(file, "\n"); - } + } fprintf(file, " ;\n"); } @@ -527,7 +527,7 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length) if ( ELEM(fsmesh.type, OB_FLUIDSIM_FLUID, OB_FLUIDSIM_INFLOW)) { fsmesh.channelInitialVel = fobj->InitialVelocity; fsmesh.localInivelCoords = ((fluidmd->fss->typeFlags & OB_FSINFLOW_LOCALCOORD)?1:0); - } + } if (fluidmd->fss->typeFlags & OB_FSBND_NOSLIP) fsmesh.obstacleType = FLUIDSIM_OBSTACLE_NOSLIP; @@ -593,7 +593,7 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom for (base=scene->base.first; base; base= base->next) { Object *ob = base->object; - FluidsimModifierData *fluidmdtmp = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim); + FluidsimModifierData *fluidmdtmp = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim); /* only find objects with fluid modifiers */ if (!fluidmdtmp || ob->type != OB_MESH) continue; @@ -648,7 +648,7 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetFile, char *debugStrBuffer) { FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(fsDomain, eModifierType_Fluidsim); - FluidsimSettings *domainSettings= fluidmd->fss; + FluidsimSettings *domainSettings= fluidmd->fss; FILE *fileCfg; int dirExist = 0; char newSurfdataPath[FILE_MAX]; /* modified output settings */ @@ -673,7 +673,7 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF // check selected directory // simply try to open cfg file for writing to test validity of settings fileCfg = BLI_fopen(targetFile, "w"); - if (fileCfg) { + if (fileCfg) { dirExist = 1; fclose(fileCfg); // remove cfg dummy from directory test BLI_delete(targetFile, 0, 0); @@ -1050,7 +1050,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor fsset->generateVertexVectors = (domainSettings->domainNovecgen==0); // init blender domain transform matrix - { int j; + { int j; for (i=0; i<4; i++) { for (j=0; j<4; j++) { fsset->surfaceTrafo[i*4+j] = invDomMat[j][i]; diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c index 89ddfe02208..fb99d296a54 100644 --- a/source/blender/editors/physics/physics_ops.c +++ b/source/blender/editors/physics/physics_ops.c @@ -61,7 +61,7 @@ static void operatortypes_particle(void) WM_operatortype_append(PARTICLE_OT_rekey); WM_operatortype_append(PARTICLE_OT_subdivide); WM_operatortype_append(PARTICLE_OT_remove_doubles); - WM_operatortype_append(PARTICLE_OT_weight_set); + WM_operatortype_append(PARTICLE_OT_weight_set); WM_operatortype_append(PARTICLE_OT_delete); WM_operatortype_append(PARTICLE_OT_mirror); diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index b61280f14ce..38084773e78 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -495,7 +495,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) if (!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) { BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected"); return OPERATOR_CANCELLED; - } + } /* stop all running jobs, currently previews frustrate Render */ WM_jobs_stop_all(CTX_wm_manager(C)); diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 97c8e14bf5d..ad93859b84d 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -189,7 +189,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender) else perspective_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, clipsta, clipend); } - if ((scene->r.mode & R_OSA) == 0) { + if ((scene->r.mode & R_OSA) == 0) { ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat, TRUE, FALSE); GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, rr->rectf); } diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 694d2302fbd..5cfe7179f5a 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -341,7 +341,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre if (sp->pr_method == PR_ICON_RENDER) { if (mat->material_type == MA_TYPE_HALO) { sce->lay = 1 << MA_FLAT; - } + } else { sce->lay = 1 << MA_SPHERE_A; } @@ -386,7 +386,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre tex = localize_texture(origtex); sp->texcopy = tex; BLI_addtail(&pr_main->tex, tex); - } + } sce->lay = 1 << MA_TEXTURE; for (base = sce->base.first; base; base = base->next) { @@ -597,7 +597,7 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r if (ok == 0) { ED_preview_shader_job(C, sa, id, parent, slot, newx, newy, PR_BUTS_RENDER); } - } + } } /* **************************** new shader preview system ****************** */ @@ -649,7 +649,7 @@ static void shader_preview_updatejob(void *spv) if (sp->lampcopy && la->nodetree && sp->lampcopy->nodetree) ntreeLocalSync(sp->lampcopy->nodetree, la->nodetree); } - } + } } } @@ -861,7 +861,7 @@ static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned scaledx = (float)w; scaledy = ( (float)ima->y / (float)ima->x) * (float)w; } - else { + else { scaledx = ( (float)ima->x / (float)ima->y) * (float)h; scaledy = (float)h; } diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index 01c0169eb50..0d33c44db8f 100644 --- a/source/blender/editors/render/render_view.c +++ b/source/blender/editors/render/render_view.c @@ -282,7 +282,7 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent if (wincur->screen->temp) { wm_window_lower(wincur); } - else { + else { wmWindow *win, *winshow; ScrArea *sa = find_area_showing_r_result(C, &winshow); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index ad9b0f61eb1..1cdeeb174f6 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -390,7 +390,7 @@ void ED_area_overdraw(bContext *C) az->do_draw = FALSE; } } - } + } glDisable(GL_BLEND); } @@ -1260,7 +1260,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa) } else { /* prevent uiblocks to run */ - uiFreeBlocks(NULL, &ar->uiblocks); + uiFreeBlocks(NULL, &ar->uiblocks); } /* rechecks 2d matrix for header on dpi changing, do not do for other regions, it resets view && blocks view2d operator polls (ton) */ @@ -1414,7 +1414,7 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type) /* put in front of list */ BLI_remlink(&sa->spacedata, sl); BLI_addhead(&sa->spacedata, sl); - } + } else { /* new space */ if (st) { @@ -1741,7 +1741,7 @@ void ED_region_header(const bContext *C, ARegion *ar) int maxco, xco, yco; int headery = ED_area_headersize(); - /* clear */ + /* clear */ UI_ThemeClearColor((ED_screen_area_active(C)) ? TH_HEADER : TH_HEADERDESEL); glClear(GL_COLOR_BUFFER_BIT); diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 352039c5a61..a516603cfd4 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -194,7 +194,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); } } - } + } CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } @@ -236,7 +236,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone); } } - } + } CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 2e1723027b8..7a349e4a581 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -271,7 +271,7 @@ ScrEdge *screen_find_active_scredge(bScreen *sc, int mx, int my) if (abs(my - se->v1->vec.y) <= 2 && mx >= min && mx <= max) return se; - } + } else { short min, max; min = MIN2(se->v1->vec.y, se->v2->vec.y); @@ -875,7 +875,7 @@ static void scrarea_draw_shape_light(ScrArea *sa, char UNUSED(dir)) glBlendFunc(GL_DST_COLOR, GL_SRC_ALPHA); glEnable(GL_BLEND); /* value 181 was hardly computed: 181~105 */ - glColor4ub(255, 255, 255, 50); + glColor4ub(255, 255, 255, 50); /* draw_join_shape(sa, dir); */ glRecti(sa->v1->vec.x, sa->v1->vec.y, sa->v3->vec.x, sa->v3->vec.y); glDisable(GL_BLEND); @@ -1066,7 +1066,7 @@ static void screen_refresh_headersizes(void) for (st = lb->first; st; st = st->next) { ARegionType *art = BKE_regiontype_from_id(st, RGN_TYPE_HEADER); if (art) art->prefsizey = ED_area_headersize(); - } + } } /* make this screen usable */ @@ -1320,7 +1320,7 @@ int ED_screen_area_active(const bContext *C) for (ar = sa->regionbase.first; ar; ar = ar->next) if (ar->swinid == sc->subwinactive) return 1; - } + } return 0; } @@ -1733,7 +1733,7 @@ void ED_refresh_viewport_fps(bContext *C) fpsi->redrawtime = fpsi->lredrawtime; fpsi->lredrawtime = animtimer->ltime; } - else { + else { /* playback stopped or shouldn't be running */ if (scene->fps_info) MEM_freeN(scene->fps_info); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 7dbae6ece8d..cdf68d97e4d 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -192,7 +192,7 @@ int ED_operator_region_view3d_active(bContext *C) return TRUE; CTX_wm_operator_poll_msg_set(C, "expected a view3d region"); - return FALSE; + return FALSE; } /* generic for any view2d which uses anim_ops */ @@ -580,7 +580,7 @@ static int actionzone_area_poll(bContext *C) for (az = sa->actionzones.first; az; az = az->next) if (BLI_rcti_isect_pt(&az->rect, x, y)) return 1; - } + } return 0; } @@ -701,7 +701,7 @@ static int actionzone_modal(bContext *C, wmOperator *op, wmEvent *event) case ESCKEY: actionzone_exit(op); return OPERATOR_CANCELLED; - case LEFTMOUSE: + case LEFTMOUSE: actionzone_exit(op); return OPERATOR_CANCELLED; @@ -1341,7 +1341,7 @@ static int area_split_apply(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); return 1; - } + } return 0; } @@ -1691,7 +1691,7 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event) AZone *az; if (event->type != EVT_ACTIONZONE_REGION) { - BKE_report(op->reports, RPT_ERROR, "Can only scale region size from an action zone"); + BKE_report(op->reports, RPT_ERROR, "Can only scale region size from an action zone"); return OPERATOR_CANCELLED; } @@ -2359,14 +2359,14 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) ScrArea *sa = screen_areahascursor(sc, event->x, event->y); int dir; - if (sa) { + if (sa) { if (jd->sa1 != sa) { dir = area_getorientation(jd->sa1, sa); if (dir >= 0) { if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO; jd->sa2 = sa; jd->sa2->flag |= AREA_FLAG_DRAWJOINTO; - } + } else { /* we are not bordering on the previously selected area * we check if area has common border with the one marked for removal @@ -2380,14 +2380,14 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) jd->sa2 = sa; if (jd->sa1) jd->sa1->flag |= AREA_FLAG_DRAWJOINFROM; if (jd->sa2) jd->sa2->flag |= AREA_FLAG_DRAWJOINTO; - } + } else { if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO; jd->sa2 = NULL; } } WM_event_add_notifier(C, NC_WINDOW, NULL); - } + } else { /* we are back in the area previously selected for keeping * we swap the areas if possible to allow user to choose */ @@ -2402,7 +2402,7 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) if (dir < 0) { printf("oops, didn't expect that!\n"); } - } + } else { dir = area_getorientation(jd->sa1, sa); if (dir >= 0) { @@ -2837,7 +2837,7 @@ static int header_flip_exec(bContext *C, wmOperator *UNUSED(op)) /* don't do anything if no region */ if (ar == NULL) return OPERATOR_CANCELLED; - } + } /* copied from SCREEN_OT_region_flip */ if (ar->alignment == RGN_ALIGN_TOP) @@ -3574,7 +3574,7 @@ void ED_operatortypes_screen(void) /* tools shared by more space types */ WM_operatortype_append(ED_OT_undo); WM_operatortype_append(ED_OT_undo_push); - WM_operatortype_append(ED_OT_redo); + WM_operatortype_append(ED_OT_redo); WM_operatortype_append(ED_OT_undo_history); } diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index aeae79aa9d0..7af0fc27ed7 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -214,7 +214,7 @@ static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; - } + } return OPERATOR_CANCELLED; } @@ -374,7 +374,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float } /* imbuf knows which rects are not part of ibuf */ - IMB_freeImBuf(ibuf); + IMB_freeImBuf(ibuf); } MEM_freeN(sj->dumprect); @@ -408,7 +408,7 @@ static int screencast_exec(bContext *C, wmOperator *op) sj->y = 0; sj->dumpsx = win->sizex; sj->dumpsy = win->sizey; - } + } else { ScrArea *curarea = CTX_wm_area(C); sj->x = curarea->totrct.xmin; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 34ff5efacc9..a318837b585 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -942,7 +942,7 @@ static int line_isect_y(const float p1[2], const float p2[2], const float y_leve if (y_diff < 0.000001f) { *x_isect = (p1[0] + p2[0]) * 0.5f; - return ISECT_TRUE; + return ISECT_TRUE; } if (p1[1] > y_level && p2[1] < y_level) { @@ -975,7 +975,7 @@ static int line_isect_x(const float p1[2], const float p2[2], const float x_leve if (x_diff < 0.000001f) { /* yuck, vertical line, we cant do much here */ *y_isect = (p1[0] + p2[0]) * 0.5f; - return ISECT_TRUE; + return ISECT_TRUE; } if (p1[0] > x_level && p2[0] < x_level) { @@ -1003,7 +1003,7 @@ static int cmp_uv(const float vec2a[2], const float vec2b[2]) float ya = (float)fmodf(vec2a[1], 1.0f); float xb = (float)fmodf(vec2b[0], 1.0f); - float yb = (float)fmodf(vec2b[1], 1.0f); + float yb = (float)fmodf(vec2b[1], 1.0f); if (xa < 0.0f) xa += 1.0f; if (ya < 0.0f) ya += 1.0f; @@ -1860,7 +1860,7 @@ static int project_bucket_isect_circle(const float cent[2], const float radius_s /* lower left out of radius test */ if (cent[1] < bucket_bounds->ymin) { return (len_squared_v2v2_alt(cent, bucket_bounds->xmin, bucket_bounds->ymin) < radius_squared) ? 1 : 0; - } + } /* top left test */ else if (cent[1] > bucket_bounds->ymax) { return (len_squared_v2v2_alt(cent, bucket_bounds->xmin, bucket_bounds->ymax) < radius_squared) ? 1 : 0; @@ -1870,7 +1870,7 @@ static int project_bucket_isect_circle(const float cent[2], const float radius_s /* lower right out of radius test */ if (cent[1] < bucket_bounds->ymin) { return (len_squared_v2v2_alt(cent, bucket_bounds->xmax, bucket_bounds->ymin) < radius_squared) ? 1 : 0; - } + } /* top right test */ else if (cent[1] > bucket_bounds->ymax) { return (len_squared_v2v2_alt(cent, bucket_bounds->xmax, bucket_bounds->ymax) < radius_squared) ? 1 : 0; @@ -2111,7 +2111,7 @@ static void project_bucket_clip_face( if ((inside_bucket_flag & ISECT_2) == 0) { copy_v2_v2(isectVCosSS[*tot], v1_clipSS); (*tot)++; } if ((inside_bucket_flag & ISECT_3) == 0) { copy_v2_v2(isectVCosSS[*tot], v2_clipSS); (*tot)++; } } - } + } if ((inside_bucket_flag & (ISECT_3 | ISECT_1)) != (ISECT_3 | ISECT_1)) { if (line_clip_rect2f(bucket_bounds, v3coSS, v1coSS, v1_clipSS, v2_clipSS)) { @@ -2394,7 +2394,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i tf_uv_pxoffset[1][1] = tf->uv[1][1] - yhalfpx; tf_uv_pxoffset[2][0] = tf->uv[2][0] - xhalfpx; - tf_uv_pxoffset[2][1] = tf->uv[2][1] - yhalfpx; + tf_uv_pxoffset[2][1] = tf->uv[2][1] - yhalfpx; if (mf->v4) { vCo[3] = ps->dm_mvert[mf->v4].co; @@ -3432,7 +3432,7 @@ static void project_paint_begin_clone(ProjPaintState *ps, int mouse[2]) mul_m4_v4(ps->projectMat, projCo); ps->cloneOffset[0] = mouse[0] - ((float)(ps->winx / 2.0f) + (ps->winx / 2.0f) * projCo[0] / projCo[3]); ps->cloneOffset[1] = mouse[1] - ((float)(ps->winy / 2.0f) + (ps->winy / 2.0f) * projCo[1] / projCo[3]); - } + } } static void project_paint_end(ProjPaintState *ps) @@ -4100,7 +4100,7 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp { /* First unpack args from the struct */ ProjPaintState *ps = (ProjPaintState *)state; - int touch_any = 0; + int touch_any = 0; ProjectHandle handles[BLENDER_MAX_THREADS]; ListBase threads; @@ -4133,7 +4133,7 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp /* image bounds */ for (i = 0; i < ps->image_tot; i++) { handles[a].projImages[i].partRedrawRect = (ImagePaintPartialRedraw *)BLI_memarena_alloc(ps->arena_mt[a], sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); - memcpy(handles[a].projImages[i].partRedrawRect, ps->projImages[i].partRedrawRect, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); + memcpy(handles[a].projImages[i].partRedrawRect, ps->projImages[i].partRedrawRect, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); } if (ps->thread_tot > 1) @@ -4554,7 +4554,7 @@ static int imapaint_canvas_set(ImagePaintState *s, Image *ima) else if (ima->packedfile && ima->rr) { s->warnpackedfile = ima->id.name + 2; return 0; - } + } else if (ibuf && ibuf->channels != 4) { s->warnmultifile = ima->id.name + 2; return 0; @@ -5048,7 +5048,7 @@ static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) pop->prevmouse[1] = mouse[1]; } - else { + else { redraw = imapaint_paint_stroke(&pop->vc, &pop->s, pop->painter, pop->mode == PAINT_MODE_3D, pop->prevmouse, mouse, time, pressure); pop->prevmouse[0] = mouse[0]; pop->prevmouse[1] = mouse[1]; @@ -5066,7 +5066,7 @@ static void paint_brush_exit_tex(Brush *brush) MTex *mtex = &brush->mtex; if (mtex->tex && mtex->tex->nodetree) ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1); - } + } } static void paint_exit(bContext *C, wmOperator *op) diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index bb931dd1ff2..b8ac88f4d65 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -326,7 +326,7 @@ static void make_vertexcol(Object *ob) /* single ob */ CustomData_add_layer(&me->fdata, CD_MCOL, CD_DEFAULT, NULL, me->totface); } if (!me->mloopcol) { - CustomData_add_layer(&me->ldata, CD_MLOOPCOL, CD_DEFAULT, NULL, me->totloop); + CustomData_add_layer(&me->ldata, CD_MLOOPCOL, CD_DEFAULT, NULL, me->totloop); } mesh_update_customdata_pointers(me, TRUE); } @@ -1526,7 +1526,7 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv, if (total_changed > 1 && do_multipaint) { float undo_change = get_mp_change(ndv, defbase_tot, defbase_sel, left_over); multipaint_selection(ndv, defbase_tot, undo_change, defbase_sel); - } + } /* or designatedw is still -1 put weight back as evenly as possible */ else { redistribute_change(ndv, defbase_tot, change_status, 2, -2, left_over, total_changed, do_auto_normalize); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 092ec32e724..07bd6a66bdf 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3513,7 +3513,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) if (tool == SCULPT_TOOL_GRAB) copy_v3_v3(sd->anchored_location, cache->true_location); else if (tool == SCULPT_TOOL_THUMB) - copy_v3_v3(sd->anchored_location, cache->orig_grab_location); + copy_v3_v3(sd->anchored_location, cache->orig_grab_location); if (ELEM(tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB)) { /* location stays the same for finding vertices in brush radius */ diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index b204fc75255..1b3fd24ae22 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -99,7 +99,7 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; MVert *mvert; - int *index, i, j; + int *index, i, j; if (unode->maxvert) { /* regular mesh restore */ @@ -224,7 +224,7 @@ static int sculpt_undo_restore_mask(bContext *C, DerivedMesh *dm, SculptUndoNode SculptSession *ss = ob->sculpt; MVert *mvert; float *vmask; - int *index, i, j; + int *index, i, j; if (unode->maxvert) { /* regular mesh restore */ diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index 10adeb3e721..91bc52f7053 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -98,7 +98,7 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar) /* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */ UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY); - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ { /* first pass: just the standard GL-drawing for backdrop + text */ y = (float)ACHANNEL_FIRST; @@ -307,7 +307,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar) /* Increment the step */ y -= ACHANNEL_STEP; - } + } glDisable(GL_BLEND); /* Draw keyframes diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 4342dd52b1c..1f0711cc4ad 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -502,7 +502,7 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } else { - if (copy_action_keys(&ac)) { + if (copy_action_keys(&ac)) { BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer"); return OPERATOR_CANCELLED; } @@ -1319,7 +1319,7 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op)) if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; - /* init edit data */ + /* init edit data */ /* loop over action data, averaging values */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY */ | ANIMFILTER_NODUPLIS); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); @@ -1369,13 +1369,13 @@ void ACTION_OT_frame_jump(wmOperatorType *ot) /* defines for snap keyframes tool */ static EnumPropertyItem prop_actkeys_snap_types[] = { - {ACTKEYS_SNAP_CFRA, "CFRA", 0, "Current frame", + {ACTKEYS_SNAP_CFRA, "CFRA", 0, "Current frame", "Snap selected keyframes to the current frame"}, - {ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", + {ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", "Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame offsets)"}, - {ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", + {ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", "Snap selected keyframes to the nearest second"}, - {ACTKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", + {ACTKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", "Snap selected keyframes to the nearest marker"}, {0, NULL, 0, NULL, NULL} }; @@ -1477,11 +1477,11 @@ void ACTION_OT_snap(wmOperatorType *ot) /* defines for mirror keyframes tool */ static EnumPropertyItem prop_actkeys_mirror_types[] = { - {ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", + {ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", "Flip times of selected keyframes using the current frame as the mirror line"}, - {ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", + {ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", "Flip values of selected keyframes (i.e. negative values become positive, and vice versa)"}, - {ACTKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", + {ACTKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", "Flip times of selected keyframes using the first selected marker as the reference point"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h index c684ae1de51..10085d8a149 100644 --- a/source/blender/editors/space_action/action_intern.h +++ b/source/blender/editors/space_action/action_intern.h @@ -111,7 +111,7 @@ enum { ACTKEYS_SNAP_CFRA = 1, ACTKEYS_SNAP_NEAREST_FRAME, ACTKEYS_SNAP_NEAREST_SECOND, - ACTKEYS_SNAP_NEAREST_MARKER, + ACTKEYS_SNAP_NEAREST_MARKER, } eActKeys_Snap_Mode; /* defines for mirror keyframes @@ -121,7 +121,7 @@ enum { ACTKEYS_MIRROR_CFRA = 1, ACTKEYS_MIRROR_YAXIS, ACTKEYS_MIRROR_XAXIS, - ACTKEYS_MIRROR_MARKER, + ACTKEYS_MIRROR_MARKER, } eActKeys_Mirror_Mode; /* ***************************************** */ diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 5da348b2a84..1602d3b6591 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -763,7 +763,7 @@ static void actkeys_select_leftright(bAnimContext *ac, short leftright, short se if (leftright == ACTKEYS_LRSEL_LEFT) { ked.f1 = MINAFRAMEF; ked.f2 = (float)(CFRA + 0.1f); - } + } else { ked.f1 = (float)(CFRA - 0.1f); ked.f2 = MAXFRAMEF; @@ -785,7 +785,7 @@ static void actkeys_select_leftright(bAnimContext *ac, short leftright, short se ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL); ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } - else if (ale->type == ANIMTYPE_GPLAYER) + else if (ale->type == ANIMTYPE_GPLAYER) ED_gplayer_frames_select_border(ale->data, ked.f1, ked.f2, select_mode); else if (ale->type == ANIMTYPE_MASKLAYER) ED_masklayer_frames_select_border(ale->data, ked.f1, ked.f2, select_mode); @@ -869,7 +869,7 @@ static int actkeys_select_leftright_invoke(bContext *C, wmOperator *op, wmEvent UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL); if (x < CFRA) RNA_enum_set(op->ptr, "mode", ACTKEYS_LRSEL_LEFT); - else + else RNA_enum_set(op->ptr, "mode", ACTKEYS_LRSEL_RIGHT); } @@ -1081,7 +1081,7 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_ /* dopesheet summary covers everything */ summary_to_keylist(ac, &anim_keys, NULL); } - else if (ale->type == ANIMTYPE_GROUP) { + else if (ale->type == ANIMTYPE_GROUP) { // TODO: why don't we just give groups key_data too? bActionGroup *agrp = (bActionGroup *)ale->data; agroup_to_keylist(adt, agrp, &anim_keys, NULL); @@ -1144,7 +1144,7 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_ agrp->flag |= AGRP_SELECTED; ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP); - } + } else if (ale->type == ANIMTYPE_FCURVE) { FCurve *fcu = ale->data; diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 2e92b1eea6f..7ae668bc0bb 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -377,7 +377,7 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_refresh(sa); break; case NC_SCENE: - switch (wmn->data) { + switch (wmn->data) { case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */ case ND_OB_SELECT: saction->flag |= SACTION_TEMP_NEEDCHANSYNC; @@ -433,7 +433,7 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn) saction->flag |= SACTION_TEMP_NEEDCHANSYNC; ED_area_tag_refresh(sa); break; - } + } break; case NC_WINDOW: if (saction->flag & SACTION_TEMP_NEEDCHANSYNC) { diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 2cbcbcdbc9a..35344f2c5a4 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -193,7 +193,7 @@ void ED_spacetypes_keymap(wmKeyConfig *keyconf) typedef struct RegionDrawCB { struct RegionDrawCB *next, *prev; - void (*draw)(const struct bContext *, struct ARegion *, void *); + void (*draw)(const struct bContext *, struct ARegion *, void *); void *customdata; int type; @@ -239,7 +239,7 @@ void ED_region_draw_cb_draw(const bContext *C, ARegion *ar, int type) for (rdc = ar->type->drawcalls.first; rdc; rdc = rdc->next) { if (rdc->type == type) rdc->draw(C, ar, rdc->customdata); - } + } } diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 7e232a02536..9c47c407bd9 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -236,7 +236,7 @@ static int buttons_context_path_material(ButsContextPath *path, int for_texture) if (ma) { RNA_id_pointer_create(&ma->id, &path->ptr[path->len]); path->len++; - } + } return 1; } } @@ -889,7 +889,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r else CTX_data_pointer_set(result, NULL, &RNA_ParticleSystem, NULL); return 1; - } + } else if (CTX_data_equals(member, "particle_settings")) { /* only available when pinned */ PointerRNA *ptr = get_pointer_type(path, &RNA_ParticleSettings); diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 33229496d0b..09ad7312123 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -323,7 +323,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) /* currently works by redraws... if preview is set, it (re)starts job */ sbuts->preview = 1; break; - } + } break; case NC_WORLD: buttons_area_redraw(sa, BCONTEXT_WORLD); diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index ecd9e316cef..68de184f008 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -803,7 +803,7 @@ void CONSOLE_OT_history_append(wmOperatorType *ot) ot->poll = ED_operator_console_active; /* properties */ - RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position"); + RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position"); RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, "Cursor", "The index of the cursor", 0, 10000); RNA_def_boolean(ot->srna, "remove_duplicates", 0, "Remove Duplicates", "Remove duplicate items in the history"); } diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 55e75992b89..2ea1b5d563b 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -494,7 +494,7 @@ void file_draw_list(const bContext *C, ARegion *ar) sx += (int)(v2d->tot.xmin + 2.0f); sy = (int)(v2d->tot.ymax - sy); - file = filelist_file(files, i); + file = filelist_file(files, i); UI_ThemeColor4(TH_TEXT); @@ -544,7 +544,7 @@ void file_draw_list(const bContext *C, ARegion *ar) if (params->display == FILE_SHORTDISPLAY) { sx += (int)layout->column_widths[COLUMN_NAME] + 12; if (!(file->type & S_IFDIR)) { - file_draw_string(sx, sy, file->size, layout->column_widths[COLUMN_SIZE], layout->tile_h, align); + file_draw_string(sx, sy, file->size, layout->column_widths[COLUMN_SIZE], layout->tile_h, align); sx += (int)layout->column_widths[COLUMN_SIZE] + 12; } } diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 7a364eb8685..52d4a6a86c1 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -554,7 +554,7 @@ int file_highlight_set(SpaceFile *sfile, ARegion *ar, int mx, int my) { View2D *v2d = &ar->v2d; FileSelectParams *params; - int numfiles, origfile; + int numfiles, origfile; if (sfile == NULL || sfile->files == NULL) return 0; @@ -849,7 +849,7 @@ int file_parent_exec(bContext *C, wmOperator *UNUSED(unused)) file_change_dir(C, 0); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL); } - } + } return OPERATOR_FINISHED; @@ -942,7 +942,7 @@ int file_next_exec(bContext *C, wmOperator *UNUSED(unused)) folderlist_pushdir(sfile->folders_prev, sfile->params->dir); file_change_dir(C, 1); - } + } WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL); return OPERATOR_FINISHED; @@ -1116,7 +1116,7 @@ int file_directory_new_exec(bContext *C, wmOperator *op) if (!BLI_exists(path)) { BKE_report(op->reports, RPT_ERROR, "Couldn't create new folder"); return OPERATOR_CANCELLED; - } + } /* now remember file to jump into editing */ BLI_strncpy(sfile->params->renamefile, name, FILE_MAXFILE); @@ -1427,11 +1427,11 @@ static int file_rename_poll(bContext *C) SpaceFile *sfile = CTX_wm_space_file(C); if (sfile && sfile->params) { - if (sfile->params->active_file < 0) { + if (sfile->params->active_file < 0) { poll = 0; } else { - char dir[FILE_MAX], group[FILE_MAX]; + char dir[FILE_MAX], group[FILE_MAX]; if (filelist_islibrary(sfile->files, dir, group)) poll = 0; } } @@ -1460,11 +1460,11 @@ static int file_delete_poll(bContext *C) struct direntry *file; if (sfile && sfile->params) { - if (sfile->params->active_file < 0) { + if (sfile->params->active_file < 0) { poll = 0; } else { - char dir[FILE_MAX], group[FILE_MAX]; + char dir[FILE_MAX], group[FILE_MAX]; if (filelist_islibrary(sfile->files, dir, group)) poll = 0; file = filelist_file(sfile->files, sfile->params->active_file); if (file && S_ISDIR(file->type)) poll = 0; @@ -1485,7 +1485,7 @@ int file_delete_exec(bContext *C, wmOperator *UNUSED(op)) file = filelist_file(sfile->files, sfile->params->active_file); BLI_make_file_string(G.main->name, str, sfile->params->dir, file->relname); - BLI_delete(str, 0, 0); + BLI_delete(str, 0, 0); ED_fileselect_clear(C, sfile); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 9d5f7fdd982..6afc0305115 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -300,7 +300,7 @@ static int is_hidden_file(const char *filename, short hide_dot) if ( (len > 0) && (filename[len - 1] == '~') ) { is_hidden = 1; /* ignore file~ */ } - } + } } else { if (((filename[0] == '.') && (filename[1] == 0) )) { @@ -360,7 +360,7 @@ void filelist_filter(FileList *filelist) struct direntry *file = &filelist->filelist[i]; if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot) ) { num_filtered++; - } + } } if (filelist->fidx) { @@ -557,7 +557,7 @@ void filelist_free(struct FileList *filelist) } for (i = 0; i < filelist->numfiles; ++i) { - if (filelist->filelist[i].image) { + if (filelist->filelist[i].image) { IMB_freeImBuf(filelist->filelist[i].image); } filelist->filelist[i].image = NULL; @@ -573,7 +573,7 @@ void filelist_free(struct FileList *filelist) filelist->numfiles = 0; free(filelist->filelist); - filelist->filelist = NULL; + filelist->filelist = NULL; filelist->filter = 0; filelist->filter_glob[0] = '\0'; filelist->numfiltered = 0; @@ -791,7 +791,7 @@ static int file_extension_type(const char *relname) BLI_testextensie(relname, ".otf") || BLI_testextensie(relname, ".otc")) { - return FTFONTFILE; + return FTFONTFILE; } else if (BLI_testextensie(relname, ".btx")) { return BTXFILE; @@ -802,14 +802,14 @@ static int file_extension_type(const char *relname) else if (BLI_testextensie_array(relname, imb_ext_image) || (G.have_quicktime && BLI_testextensie_array(relname, imb_ext_image_qt))) { - return IMAGEFILE; + return IMAGEFILE; } else if (BLI_testextensie_array(relname, imb_ext_movie)) { - return MOVIEFILE; + return MOVIEFILE; } else if (BLI_testextensie_array(relname, imb_ext_audio)) { return SOUNDFILE; - } + } return 0; } @@ -934,7 +934,7 @@ void filelist_parent(struct FileList *filelist) void filelist_select_file(struct FileList *filelist, int index, FileSelType select, unsigned int flag, FileCheckType check) { struct direntry *file = filelist_file(filelist, index); - if (file != NULL) { + if (file != NULL) { int check_ok = 0; switch (check) { case CHECK_DIRS: @@ -969,7 +969,7 @@ void filelist_select(struct FileList *filelist, FileSelection *sel, FileSelType /* select all valid files between first and last indicated */ if ( (sel->first >= 0) && (sel->first < filelist->numfiltered) && (sel->last >= 0) && (sel->last < filelist->numfiltered) ) { int current_file; - for (current_file = sel->first; current_file <= sel->last; current_file++) { + for (current_file = sel->first; current_file <= sel->last; current_file++) { filelist_select_file(filelist, current_file, select, flag, check); } } @@ -1036,7 +1036,7 @@ void filelist_from_library(struct FileList *filelist) struct ImBuf *ima; int ok, i, nprevs, nnames, idcode; char filename[FILE_MAX]; - char dir[FILE_MAX], group[GROUP_MAX]; + char dir[FILE_MAX], group[GROUP_MAX]; /* name test */ ok = filelist_islibrary(filelist, dir, group); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 1fa89e5db9a..746f5f22df9 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -307,7 +307,7 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const rcti *r CLAMP(rowmin, 0, layout->rows - 1); CLAMP(colmax, 0, layout->columns - 1); CLAMP(rowmax, 0, layout->rows - 1); - } + } if ((colmin > layout->columns - 1) || (rowmin > layout->rows - 1)) { sel.first = -1; diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 4fe4ad133a9..fc2b6de08a6 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -198,7 +198,7 @@ static void file_refresh(const bContext *C, ScrArea *UNUSED(sa)) params->active_file = -1; // added this so it opens nicer (ton) } filelist_hidedot(sfile->files, params->flag & FILE_HIDE_DOT); - filelist_setfilter(sfile->files, params->flag & FILE_FILTER ? params->filter : 0); + filelist_setfilter(sfile->files, params->flag & FILE_FILTER ? params->filter : 0); filelist_setfilter_types(sfile->files, params->filter_glob); if (filelist_empty(sfile->files)) { @@ -481,7 +481,7 @@ static void file_channel_area_init(wmWindowManager *wm, ARegion *ar) ED_region_panels_init(wm, ar); /* own keymaps */ - keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); + keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -505,7 +505,7 @@ static void file_header_area_init(wmWindowManager *wm, ARegion *ar) ED_region_header_init(ar); - keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); + keymap = WM_keymap_find(wm->defaultconf, "File Browser", SPACE_FILE, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 3e8f6f1c7fc..551ef953538 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -299,7 +299,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa) if (RNA_path_resolve(&id_ptr, fcu->rna_path, &fcu_prop_ptr, &fcu_prop) && fcu_prop) { /* determine the unit for this property */ unit = RNA_SUBTYPE_UNIT(RNA_property_subtype(fcu_prop)); - } + } /* interpolation */ col = uiLayoutColumn(layout, FALSE); @@ -407,7 +407,7 @@ static void driver_remove_cb(bContext *C, void *ale_v, void *UNUSED(arg)) if (ELEM(NULL, id, fcu)) return; - /* call API method to remove this driver */ + /* call API method to remove this driver */ ANIM_remove_driver(reports, id, fcu->rna_path, fcu->array_index, 0); } diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index c9864df393a..f665b979559 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -262,7 +262,7 @@ static void set_fcurve_vertex_color(FCurve *fcu, short sel) /* Curve's points ARE BEING edited */ if (sel) UI_ThemeColorShadeAlpha(TH_VERTEX_SELECT, 0, alphaOffset); else UI_ThemeColorShadeAlpha(TH_VERTEX, 0, alphaOffset); - } + } else { /* Curve's points CANNOT BE edited */ if (sel) UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, alphaOffset); @@ -318,7 +318,7 @@ static int draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu) ) { return 0; - } + } else { return 1; } @@ -561,7 +561,7 @@ static void draw_fcurve_curve_samples(bAnimContext *ac, ID *id, FCurve *fcu, Vie if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert == 1)) { /* just extend across the first keyframe's value */ v[1] = prevfpt->vec[1]; - } + } else { /* extrapolate linear dosnt use the handle, use the next points center instead */ fac = (prevfpt->vec[0] - fpt->vec[0]) / (prevfpt->vec[0] - v[0]); @@ -599,7 +599,7 @@ static void draw_fcurve_curve_samples(bAnimContext *ac, ID *id, FCurve *fcu, Vie if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert == 1)) { /* based on last keyframe's value */ v[1] = prevfpt->vec[1]; - } + } else { /* extrapolate linear dosnt use the handle, use the previous points center instead */ fpt = prevfpt - 1; @@ -642,13 +642,13 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2 if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (prevbezt->ipo == BEZT_IPO_CONST) || (fcu->totvert == 1)) { /* just extend across the first keyframe's value */ v1[1] = prevbezt->vec[1][1]; - } + } else if (prevbezt->ipo == BEZT_IPO_LIN) { /* extrapolate linear dosnt use the handle, use the next points center instead */ fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); if (fac) fac = 1.0f / fac; v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[1][1] - bezt->vec[1][1]); - } + } else { /* based on angle of handle 1 (relative to keyframe) */ fac = (prevbezt->vec[0][0] - prevbezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); @@ -748,14 +748,14 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2 if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (prevbezt->ipo == BEZT_IPO_CONST) || (fcu->totvert == 1)) { /* based on last keyframe's value */ v1[1] = prevbezt->vec[1][1]; - } + } else if (prevbezt->ipo == BEZT_IPO_LIN) { /* extrapolate linear dosnt use the handle, use the previous points center instead */ bezt = prevbezt - 1; fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); if (fac) fac = 1.0f / fac; v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[1][1] - bezt->vec[1][1]); - } + } else { /* based on angle of handle 1 (relative to keyframe) */ fac = (prevbezt->vec[2][0] - prevbezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); @@ -971,7 +971,7 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar) height = (float)((items * ACHANNEL_STEP) + (ACHANNEL_HEIGHT * 2)); UI_view2d_totRect_set(v2d, ar->winx, height); - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ { /* first pass: just the standard GL-drawing for backdrop + text */ y = (float)ACHANNEL_FIRST; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 30ec32ec0aa..56ebde6e316 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -332,7 +332,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end) ChannelDriver *driver = fcu->driver; FPoint *fpt; float unitFac; - int cfra; + int cfra; /* disable driver so that it don't muck up the sampling process */ fcu->driver = NULL; @@ -724,7 +724,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* copy keyframes */ - if (copy_graph_keys(&ac)) { + if (copy_graph_keys(&ac)) { BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer"); return OPERATOR_CANCELLED; } @@ -1824,17 +1824,17 @@ void GRAPH_OT_frame_jump(wmOperatorType *ot) /* defines for snap keyframes tool */ static EnumPropertyItem prop_graphkeys_snap_types[] = { - {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", + {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", "Snap selected keyframes to the current frame"}, - {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", + {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", "Set values of selected keyframes to the cursor value (Y/Horizontal component)"}, - {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", + {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", "Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame offsets)"}, - {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", + {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", "Snap selected keyframes to the nearest second"}, - {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", + {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", "Snap selected keyframes to the nearest marker"}, - {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", + {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", "Flatten handles for a smoother transition"}, {0, NULL, 0, NULL, NULL} }; @@ -1938,15 +1938,15 @@ void GRAPH_OT_snap(wmOperatorType *ot) /* defines for mirror keyframes tool */ static EnumPropertyItem prop_graphkeys_mirror_types[] = { - {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", + {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", "Flip times of selected keyframes using the current frame as the mirror line"}, - {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", + {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", "Flip values of selected keyframes using the cursor value (Y/Horizontal component) as the mirror line"}, - {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", + {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", "Flip times of selected keyframes, effectively reversing the order they appear in"}, - {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", + {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", "Flip values of selected keyframes (i.e. negative values become positive, and vice versa)"}, - {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", + {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", "Flip times of selected keyframes using the first selected marker as the reference point"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index eb657169970..b2dbf764c1d 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -123,7 +123,7 @@ enum { GRAPHKEYS_SNAP_CFRA = 1, GRAPHKEYS_SNAP_NEAREST_FRAME, GRAPHKEYS_SNAP_NEAREST_SECOND, - GRAPHKEYS_SNAP_NEAREST_MARKER, + GRAPHKEYS_SNAP_NEAREST_MARKER, GRAPHKEYS_SNAP_HORIZONTAL, GRAPHKEYS_SNAP_VALUE, } eGraphKeys_Snap_Mode; diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index e2fc1657379..978b3224850 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -757,7 +757,7 @@ static void graphkeys_select_leftright(bAnimContext *ac, short leftright, short if (leftright == GRAPHKEYS_LRSEL_LEFT) { ked.f1 = MINAFRAMEF; ked.f2 = (float)(CFRA + 0.1f); - } + } else { ked.f1 = (float)(CFRA - 0.1f); ked.f2 = MAXFRAMEF; @@ -835,7 +835,7 @@ static int graphkeys_select_leftright_invoke(bContext *C, wmOperator *op, wmEven UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL); if (x < CFRA) RNA_enum_set(op->ptr, "mode", GRAPHKEYS_LRSEL_LEFT); - else + else RNA_enum_set(op->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT); } @@ -1113,7 +1113,7 @@ static void mouse_graph_keys(bAnimContext *ac, const int mval[2], short select_m nvi = find_nearest_fcurve_vert(ac, mval); /* check if anything to select */ - if (nvi == NULL) + if (nvi == NULL) return; /* deselect all other curves? */ @@ -1241,7 +1241,7 @@ static void graphkeys_mselect_column(bAnimContext *ac, const int mval[2], short nvi = find_nearest_fcurve_vert(ac, mval); /* check if anything to select */ - if (nvi == NULL) + if (nvi == NULL) return; /* get frame number on which elements should be selected */ diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index a4611cf1453..f41169b6c39 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -441,7 +441,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_refresh(sa); break; case NC_SCENE: - switch (wmn->data) { + switch (wmn->data) { case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */ case ND_OB_SELECT: sipo->flag |= SIPO_TEMP_NEEDCHANSYNC; @@ -461,7 +461,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_refresh(sa); break; case ND_TRANSFORM: - break; /*do nothing*/ + break; /*do nothing*/ default: /* just redrawing the view will do */ ED_area_tag_redraw(sa); diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 59416dcf0c3..e406b65b53c 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -191,7 +191,7 @@ void image_preview_event(int event) waitcursor(0); WM_event_add_notifier(C, NC_IMAGE, ima_v); - } + } } diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 04566af2b3b..96646ae00bd 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -791,7 +791,7 @@ void draw_image_main(const bContext *C, ARegion *ar) xoffs = scene->r.disprect.xmin; yoffs = scene->r.disprect.ymin; glColor3ub(0, 0, 0); - calc_image_view(sima, 'f'); + calc_image_view(sima, 'f'); myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); glRectf(0.0f, 0.0f, 1.0f, 1.0f); glLoadIdentity(); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 4793f995d98..e84db87c5eb 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -551,7 +551,7 @@ static int image_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent * sima->xof += pan_x; sima->yof += pan_y; - ED_region_tag_redraw(ar); + ED_region_tag_redraw(ar); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 7f53f378042..876c2f9985b 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -457,7 +457,7 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_redraw(sa); } break; - case NC_SPACE: + case NC_SPACE: if (wmn->data == ND_SPACE_IMAGE) { image_scopes_tag_refresh(sa); ED_area_tag_redraw(sa); diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 034c382cfd2..076c648b496 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -249,7 +249,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn) if (ELEM(wmn->data, ND_SCREENCAST, ND_ANIMPLAY)) ED_region_tag_redraw(ar); break; - case NC_WM: + case NC_WM: if (wmn->data == ND_JOB) ED_region_tag_redraw(ar); break; @@ -257,7 +257,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn) if (wmn->data == ND_RENDER_RESULT) ED_region_tag_redraw(ar); break; - case NC_SPACE: + case NC_SPACE: if (wmn->data == ND_SPACE_INFO) ED_region_tag_redraw(ar); break; diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c index abdfa0ef4dd..d37306f9bc5 100644 --- a/source/blender/editors/space_logic/logic_buttons.c +++ b/source/blender/editors/space_logic/logic_buttons.c @@ -137,7 +137,7 @@ static int cut_links_exec(bContext *C, wmOperator *op) } } return OPERATOR_FINISHED; - } + } return OPERATOR_CANCELLED|OPERATOR_PASS_THROUGH; } diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index f2013e405e2..74be7c46d26 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -138,7 +138,7 @@ static bSensor *edit_sensor_property_get(bContext *C, wmOperator *op, Object **o *ob = edit_object_property_get(C, op); if (!*ob) return NULL; - sens = BLI_findstring(&((*ob)->sensors), sensor_name, offsetof(bSensor, name)); + sens = BLI_findstring(&((*ob)->sensors), sensor_name, offsetof(bSensor, name)); return sens; } @@ -177,7 +177,7 @@ static bController *edit_controller_property_get(bContext *C, wmOperator *op, Ob *ob = edit_object_property_get(C, op); if (!*ob) return NULL; - cont = BLI_findstring(&((*ob)->controllers), controller_name, offsetof(bController, name)); + cont = BLI_findstring(&((*ob)->controllers), controller_name, offsetof(bController, name)); return cont; } @@ -216,7 +216,7 @@ static bActuator *edit_actuator_property_get(bContext *C, wmOperator *op, Object *ob = edit_object_property_get(C, op); if (!*ob) return NULL; - act = BLI_findstring(&((*ob)->actuators), actuator_name, offsetof(bActuator, name)); + act = BLI_findstring(&((*ob)->actuators), actuator_name, offsetof(bActuator, name)); return act; } diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 5d7ff77e032..4adbce8f19c 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -134,7 +134,7 @@ void make_unique_prop_names(bContext *C, char *str) propcount+= BLI_countlist(&ob->sensors); propcount+= BLI_countlist(&ob->controllers); propcount+= BLI_countlist(&ob->actuators); - } + } if (propcount==0) { if (idar) MEM_freeN(idar); return; @@ -524,7 +524,7 @@ static const char *actuator_name(int type) case ACT_ARMATURE: return "Armature"; case ACT_STEERING: - return "Steering"; + return "Steering"; } return "unknown"; } @@ -678,7 +678,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf ob= ob->id.next; } } - } + } /* now we count */ ob= bmain->object.first; @@ -1772,7 +1772,7 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr) uiLayout *split, *row, *col, *sub; int physics_type; - ob = (Object *)ptr->id.data; + ob = (Object *)ptr->id.data; RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr); physics_type = RNA_enum_get(&settings_ptr, "physics_type"); @@ -1790,7 +1790,7 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr) uiItemR(row, ptr, "offset_rotation", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_rotation", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - if (ELEM3(physics_type, OB_BODY_TYPE_DYNAMIC, OB_BODY_TYPE_RIGID, OB_BODY_TYPE_SOFT)) { + if (ELEM3(physics_type, OB_BODY_TYPE_DYNAMIC, OB_BODY_TYPE_RIGID, OB_BODY_TYPE_SOFT)) { uiItemL(layout, "Dynamic Object Settings:", ICON_NONE); split = uiLayoutSplit(layout, 0.9, FALSE); row = uiLayoutRow(split, FALSE); diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 18e983047cd..444af307490 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -156,7 +156,7 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA found = -1; } } - } + } break; } @@ -405,7 +405,7 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa) uiItemR(col, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NONE); sub = uiLayoutColumn(col, TRUE); - uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence")); + uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence")); uiItemR(sub, &strip_ptr, "influence", 0, NULL, ICON_NONE); col = uiLayoutColumn(layout, TRUE); diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index b3a869ed57d..95e75d0e4fc 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -199,7 +199,7 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor } notifierFlags |= (ND_ANIMCHAN | NA_SELECTED); - } + } break; case ANIMTYPE_NLATRACK: diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 5c8e7e99a8c..9091699bd4b 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -163,7 +163,7 @@ static void nla_strip_get_color_inside(AnimData *adt, NlaStrip *strip, float col /* normal, unselected strip - use (hardly noticeable) blue tinge */ UI_GetThemeColor3fv(TH_NLA_TRANSITION, color); } - } + } else if (strip->type == NLASTRIP_TYPE_META) { /* Meta Clip */ // TODO: should temporary metas get different colors too? @@ -528,7 +528,7 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar) */ v2d->tot.ymin = (float)(-height); - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ y = (float)(-NLACHANNEL_HEIGHT(snla)); for (ale = anim_data.first; ale; ale = ale->next) { @@ -628,7 +628,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View bAnimListElem *ale; float x = 0.0f; - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ for (ale = anim_data->first; ale; ale = ale->next) { const float yminc = (float)(y - NLACHANNEL_HEIGHT_HALF(snla)); const float ymaxc = (float)(y + NLACHANNEL_HEIGHT_HALF(snla)); @@ -709,7 +709,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View // draw backdrops only... ANIM_channel_draw(ac, ale, yminc, ymaxc); break; - } + } /* if special types, draw manually for now... */ if (do_draw) { @@ -737,7 +737,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View /* even more */ offset = 21; indent = 1; - } + } break; default: @@ -936,7 +936,7 @@ void draw_nla_channel_list(bContext *C, bAnimContext *ac, ARegion *ar) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ for (ale = anim_data.first; ale; ale = ale->next) { const float yminc = (float)(y - NLACHANNEL_HEIGHT_HALF(snla)); const float ymaxc = (float)(y + NLACHANNEL_HEIGHT_HALF(snla)); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index e0e5007aff0..945ec1d4a1b 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -123,7 +123,7 @@ static int nlaedit_enable_tweakmode_exec(bContext *C, wmOperator *op) if (anim_data.first == NULL) { BKE_report(op->reports, RPT_ERROR, "No AnimData blocks to enter tweak mode for"); return OPERATOR_CANCELLED; - } + } /* for each AnimData block with NLA-data, try setting it in tweak-mode */ for (ale = anim_data.first; ale; ale = ale->next) { @@ -192,7 +192,7 @@ static int nlaedit_disable_tweakmode_exec(bContext *C, wmOperator *op) if (anim_data.first == NULL) { BKE_report(op->reports, RPT_ERROR, "No AnimData blocks to enter tweak mode for"); return OPERATOR_CANCELLED; - } + } /* for each AnimData block with NLA-data, try exitting tweak-mode */ for (ale = anim_data.first; ale; ale = ale->next) { @@ -1364,7 +1364,7 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op) "Cannot swap selected strips as they will not be able to fit in their new places"); } else { - BKE_reportf(op->reports, RPT_WARNING, + BKE_reportf(op->reports, RPT_WARNING, "Cannot swap '%s' and '%s' as one or both will not be able to fit in their new places", sa->name, sb->name); } diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index 3a74d0b4c9c..54ade829c0d 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -256,7 +256,7 @@ static void nla_keymap_main(wmKeyConfig *keyconf, wmKeyMap *keymap) WM_keymap_add_item(keymap, "NLA_OT_meta_remove", GKEY, KM_PRESS, KM_ALT, 0); /* duplicate */ - WM_keymap_add_item(keymap, "NLA_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, "NLA_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); /* delete */ WM_keymap_add_item(keymap, "NLA_OT_delete", XKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 79be0d0a194..97553b7aa56 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -390,7 +390,7 @@ static void nlaedit_select_leftright(bContext *C, bAnimContext *ac, short leftri if (leftright == NLAEDIT_LRSEL_LEFT) { xmin = MINAFRAMEF; xmax = (float)(CFRA + 0.1f); - } + } else { xmin = (float)(CFRA - 0.1f); xmax = MAXFRAMEF; @@ -471,7 +471,7 @@ static int nlaedit_select_leftright_invoke(bContext *C, wmOperator *op, wmEvent UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL); if (x < CFRA) RNA_int_set(op->ptr, "mode", NLAEDIT_LRSEL_LEFT); - else + else RNA_int_set(op->ptr, "mode", NLAEDIT_LRSEL_RIGHT); } @@ -582,7 +582,7 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); /* Highlight NLA-Track */ - if (ale->type == ANIMTYPE_NLATRACK) { + if (ale->type == ANIMTYPE_NLATRACK) { NlaTrack *nlt = (NlaTrack *)ale->data; nlt->flag |= NLATRACK_SELECTED; diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 67508f2087a..074e9c29152 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3557,7 +3557,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) } do_shaded = TRUE; do_triple = TRUE; - } + } else { th_col1 = TH_REDALERT; } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 379e9987c4c..6b201e94c35 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -101,7 +101,7 @@ void ED_node_changed_update(ID *id, bNode *node) nodeUpdateID(nodetree, node->id); WM_main_add_notifier(NC_SCENE | ND_NODES, id); - } + } else if (treetype == NTREE_TEXTURE) { DAG_id_tag_update(id, 0); WM_main_add_notifier(NC_TEXTURE | ND_NODES, id); @@ -915,7 +915,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b /* disable lines */ if (node->flag & NODE_MUTED) - node_draw_mute_line(&ar->v2d, snode, node); + node_draw_mute_line(&ar->v2d, snode, node); if (node->flag & SELECT) UI_ThemeColor(TH_SELECT); @@ -932,7 +932,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b (int)(rct->xmin + (NODE_MARGIN_X / snode->aspect_sqrt)), (int)(centy - 10), (short)(BLI_rctf_size_x(rct) - 18.0f - 12.0f), (short)NODE_DY, NULL, 0, 0, 0, 0, ""); - } + } /* scale widget thing */ UI_ThemeColorShade(color_id, -10); @@ -1138,7 +1138,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) #ifdef WITH_COMPOSITOR if (snode->nodetree->type == NTREE_COMPOSIT) { COM_startReadHighlights(); - } + } #endif node_draw_nodetree(C, ar, snode, snode->nodetree); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index f0afc647ed5..3635c1d0f03 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1972,7 +1972,7 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator *UNUSED(op)) } /* transform to basic view space. child node location is relative to parent */ - if (!new_node->parent) { + if (!new_node->parent) { new_node->locx += gnode_x; new_node->locy += gnode_y; } diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index d2e47427b94..51935b24de3 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -238,9 +238,9 @@ static int group_select_flag(Group *gr) void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag) { - Scene *scene = (Scene *)poin; + Scene *scene = (Scene *)poin; GroupObject *gob; - Group *gr = (Group *)poin2; + Group *gr = (Group *)poin2; if (group_restrict_flag(gr, flag)) { for (gob = gr->gobject.first; gob; gob = gob->next) { @@ -309,7 +309,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) WM_event_add_notifier(C, NC_SCENE, NULL); break; default: WM_event_add_notifier(C, NC_ID | NA_RENAME, NULL); break; - } + } /* Check the library target exists */ if (te->idcode == ID_LI) { Library *lib = (Library *)tselem->id; @@ -636,7 +636,7 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi) uiButSetSearchFunc(but, operator_search_cb, arg_kmi, operator_call_cb, ot); uiBoundsBlock(block, 6); - uiBlockSetDirection(block, UI_DOWN); + uiBlockSetDirection(block, UI_DOWN); uiEndBlock(C, block); event = *(win->eventstate); /* XXX huh huh? make api call */ @@ -1251,7 +1251,7 @@ static void outliner_set_coord_tree_element(SpaceOops *soops, TreeElement *te, i for (ten = te->subtree.first; ten; ten = ten->next) { outliner_set_coord_tree_element(soops, ten, startx + UI_UNIT_X, starty); - } + } } @@ -1396,7 +1396,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene UI_icon_draw((float)startx + offsx, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_DIRECT); glPixelTransferf(GL_ALPHA_SCALE, 1.0f); offsx += UI_UNIT_X; - } + } glDisable(GL_BLEND); /* name */ @@ -1433,7 +1433,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene } } } - } + } /* store coord and continue, we need coordinates for elements outside view too */ te->xs = (float)startx; te->ys = (float)*starty; @@ -1444,7 +1444,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene for (ten = te->subtree.first; ten; ten = ten->next) outliner_draw_tree_element(C, block, scene, ar, soops, ten, startx + UI_UNIT_X, starty); - } + } else { for (ten = te->subtree.first; ten; ten = ten->next) outliner_set_coord_tree_element(soops, te, startx, starty); @@ -1701,7 +1701,7 @@ void draw_outliner(const bContext *C) } /* draw edit buttons if nessecery */ - outliner_buttons(C, block, ar, soops, &soops->tree); + outliner_buttons(C, block, ar, soops, &soops->tree); uiEndBlock(C, block); uiDrawBlock(C, block); diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 8f059b0a735..b3e2a2c529e 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -81,7 +81,7 @@ static int outliner_open_back(SpaceOops *soops, TreeElement *te) for (te = te->parent; te; te = te->parent) { tselem = TREESTORE(te); - if (tselem->flag & TSE_CLOSED) { + if (tselem->flag & TSE_CLOSED) { tselem->flag &= ~TSE_CLOSED; retval = 1; } @@ -197,10 +197,10 @@ static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem, } else if (tselem->id->lib) { // XXX error_libdata(); - } + } else if (te->idcode == ID_LI && te->parent) { BKE_report(reports, RPT_WARNING, "Cannot edit the path of an indirectly linked library"); - } + } else { tselem->flag |= TSE_TEXTBUT; ED_region_tag_redraw(ar); @@ -730,7 +730,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so /* determine which type of search to do */ if (again && last_find) { - /* no popup panel - previous + user wanted to search for next after previous */ + /* no popup panel - previous + user wanted to search for next after previous */ BLI_strncpy(name, soops->search_string, sizeof(name)); flags = soops->search_flags; @@ -1858,7 +1858,7 @@ static int material_drop_invoke(bContext *C, wmOperator *op, wmEvent *event) assign_material(ob, ma, ob->totcol + 1, BKE_MAT_ASSIGN_USERPREF); DAG_ids_flush_update(bmain, 0); - WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING, ma); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index ef0542130ea..25cc273d5dc 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -553,16 +553,16 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree if (md->type == eModifierType_Lattice) { outliner_add_element(soops, &te->subtree, ((LatticeModifierData *) md)->object, te, TSE_LINKED_OB, 0); - } + } else if (md->type == eModifierType_Curve) { outliner_add_element(soops, &te->subtree, ((CurveModifierData *) md)->object, te, TSE_LINKED_OB, 0); - } + } else if (md->type == eModifierType_Armature) { outliner_add_element(soops, &te->subtree, ((ArmatureModifierData *) md)->object, te, TSE_LINKED_OB, 0); - } + } else if (md->type == eModifierType_Hook) { outliner_add_element(soops, &te->subtree, ((HookModifierData *) md)->object, te, TSE_LINKED_OB, 0); - } + } else if (md->type == eModifierType_ParticleSystem) { TreeElement *ten; ParticleSystem *psys = ((ParticleSystemModifierData *) md)->psys; @@ -590,7 +590,7 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree /* duplicated group */ if (ob->dup_group) - outliner_add_element(soops, &te->subtree, ob->dup_group, te, 0, 0); + outliner_add_element(soops, &te->subtree, ob->dup_group, te, 0, 0); } // can be inlined if necessary diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 7bec530fae9..adfc3d07af2 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -355,7 +355,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, const float handsize_cla y2 = seq->machine + SEQ_STRIP_OFSTOP; /* set up co-ordinates/dimensions for either left or right handle */ - if (direction == SEQ_LEFTHANDLE) { + if (direction == SEQ_LEFTHANDLE) { rx1 = x1; rx2 = x1 + handsize_clamped * 0.75f; @@ -415,7 +415,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, const float handsize_cla y1 = y2 + 0.05f; } UI_view2d_text_cache_add(v2d, x1, y1, numstr, col); - } + } } static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 82d08be4da2..9de91322714 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -680,7 +680,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe) seqn = BKE_sequence_dupli_recursive(scene, NULL, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM); } - if (seqn) { + if (seqn) { seqn->flag |= SELECT; /* Second Strip! */ @@ -701,7 +701,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe) seqn->anim_startofs += cutframe - ts.start; seqn->anim_endofs = ts.anim_endofs; seqn->endstill = ts.endstill; - } + } /* strips with extended stillframes after */ else if (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)) { @@ -773,7 +773,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe) seqn = BKE_sequence_dupli_recursive(scene, NULL, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM); } - if (seqn) { + if (seqn) { seqn->flag |= SELECT; /* Second Strip! */ @@ -791,7 +791,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe) seqn->startofs = cutframe - ts.start; seqn->endofs = ts.endofs; seqn->endstill = ts.endstill; - } + } /* strips with extended stillframes after */ else if (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)) { diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index be33b782fdf..b4d6662b68c 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -353,7 +353,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) } else { /* deselect_markers(0, 0); */ /* XXX, in 2.4x, seq selection used to deselect all, need to re-thnik this for 2.5 */ - marker->flag |= SELECT; + marker->flag |= SELECT; } } diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index a68524fcdd6..2296b27916e 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1139,7 +1139,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) barheight = (ltexth > 0) ? (st->viewlines * pix_available) / ltexth : 0; pix_bardiff = 0; if (barheight < 20) { - pix_bardiff = 20 - barheight; /* take into account the now non-linear sizing of the bar */ + pix_bardiff = 20 - barheight; /* take into account the now non-linear sizing of the bar */ barheight = 20; } barstart = (ltexth > 0) ? ((pix_available - pix_bardiff) * st->top) / ltexth : 0; @@ -1166,9 +1166,9 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) /* the scrollbar is non-linear sized */ if (pix_bardiff > 0) { /* the start of the highlight is in the current viewport */ - if (ltexth && st->viewlines && lhlstart >= st->top && lhlstart <= st->top + st->viewlines) { + if (ltexth && st->viewlines && lhlstart >= st->top && lhlstart <= st->top + st->viewlines) { /* speed the progresion of the start of the highlight through the scrollbar */ - hlstart = ( ( (pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->viewlines); + hlstart = ( ( (pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->viewlines); } else if (lhlstart > st->top + st->viewlines && hlstart < barstart + barheight && hlstart > barstart) { /* push hl start down */ @@ -1179,35 +1179,35 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) hlstart = barstart; } - if (hlend <= hlstart) { + if (hlend <= hlstart) { hlend = hlstart + 2; } /* the end of the highlight is in the current viewport */ - if (ltexth && st->viewlines && lhlend >= st->top && lhlend <= st->top + st->viewlines) { + if (ltexth && st->viewlines && lhlend >= st->top && lhlend <= st->top + st->viewlines) { /* speed the progresion of the end of the highlight through the scrollbar */ hlend = (((pix_available - pix_bardiff) * lhlend) / ltexth) + (pix_bardiff * (lhlend - st->top) / st->viewlines); } else if (lhlend < st->top && hlend >= barstart - 2 && hlend < barstart + barheight) { /* push hl end up */ hlend = barstart; - } + } else if (lhlend > st->top + st->viewlines && lhlstart < st->top + st->viewlines && hlend < barstart + barheight) { /* fill out end */ hlend = barstart + barheight; } - if (hlend <= hlstart) { + if (hlend <= hlstart) { hlstart = hlend - 2; - } - } + } + } } else { hlstart = 0; hlend = 0; } - if (hlend - hlstart < 2) { + if (hlend - hlstart < 2) { hlend = hlstart + 2; } @@ -1702,7 +1702,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar) if (!endl || endc == -1) return; - UI_ThemeColor(TH_HILITE); + UI_ThemeColor(TH_HILITE); x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; y = ar->winy - st->lheight; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index b2fb16ff7fe..f9911fdddbf 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -1948,7 +1948,7 @@ static int text_move_cursor(bContext *C, int type, int select) txt_move_left(text, select); break; - case NEXT_CHAR: + case NEXT_CHAR: txt_move_right(text, select); break; @@ -2669,7 +2669,7 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event) text_update_cursor_moved(C); WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); - } + } else if (!st->wordwrap && (event->mval[0] < 0 || event->mval[0] > ar->winx)) { if (event->mval[0] > ar->winx) st->left++; else if (event->mval[0] < 0 && st->left > 0) st->left--; @@ -2679,7 +2679,7 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event) text_update_cursor_moved(C); WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); // XXX PIL_sleep_ms(10); - } + } else { text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1); @@ -2688,7 +2688,7 @@ static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event) ssel->old[0] = event->mval[0]; ssel->old[1] = event->mval[1]; - } + } } static void text_cursor_set_exit(bContext *C, wmOperator *op) diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c index 135e9b891bb..c32d37a25fc 100644 --- a/source/blender/editors/space_view3d/drawanimviz.c +++ b/source/blender/editors/space_view3d/drawanimviz.c @@ -178,7 +178,7 @@ void draw_motion_path_instance(Scene *scene, intensity = 0.99f; } UI_ThemeColorBlendShade(TH_CFRAME, TH_BACK, intensity, 10); - } + } /* draw a vertex with this color */ glVertex3fv(mpv->co); diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 31df13343ce..8f504230065 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -100,7 +100,7 @@ static void set_pchan_colorset(Object *ob, bPoseChannel *pchan) } /* only try to set custom color if enabled for armature */ - if (arm->flag & ARM_COL_CUSTOM) { + if (arm->flag & ARM_COL_CUSTOM) { /* currently, a bone can only use a custom color set if it's group (if it has one), * has been set to use one */ @@ -969,7 +969,7 @@ static void draw_sphere_bone(const short dt, int armflag, int boneflag, short co glTranslatef(0.0f, 0.0f, head); gluSphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10); } - else { + else { /* 1 sphere in center */ glTranslatef(0.0f, 0.0f, (head + length - tail) / 2.0f); gluSphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10); @@ -1040,7 +1040,7 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned glEnd(); /* tip */ - if (G.f & G_PICKSEL) { + if (G.f & G_PICKSEL) { /* no bitmap in selection mode, crashes 3d cards... */ glLoadName(id | BONESEL_TIP); glBegin(GL_POINTS); @@ -1189,7 +1189,7 @@ static void draw_b_bone(const short dt, int armflag, int boneflag, short constfl glDisable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); } - else { + else { /* wire */ if (armflag & ARM_POSEMODE) { if (constflag) { @@ -1205,9 +1205,9 @@ static void draw_b_bone(const short dt, int armflag, int boneflag, short constfl /* restore colors */ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag); } - } + } - draw_b_bone_boxes(OB_WIRE, pchan, xwidth, length, zwidth); + draw_b_bone_boxes(OB_WIRE, pchan, xwidth, length, zwidth); } } @@ -1333,7 +1333,7 @@ static void draw_bone(const short dt, int armflag, int boneflag, short constflag else if (armflag & ARM_POSEMODE) { if (constflag) { /* draw constraint colors */ - if (set_pchan_glColor(PCHAN_COLOR_CONSTS, boneflag, constflag)) { + if (set_pchan_glColor(PCHAN_COLOR_CONSTS, boneflag, constflag)) { glEnable(GL_BLEND); draw_bone_solid_octahedral(); @@ -1344,10 +1344,10 @@ static void draw_bone(const short dt, int armflag, int boneflag, short constflag /* restore colors */ set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag); } - } + } draw_bone_octahedral(); } - else { + else { /* solid */ if (armflag & ARM_POSEMODE) set_pchan_glColor(PCHAN_COLOR_SOLID, boneflag, constflag); @@ -1741,7 +1741,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (use_custom && pchan->custom_tx) { glMultMatrixf(pchan->custom_tx->pose_mat); - } + } else { glMultMatrixf(pchan->pose_mat); } @@ -1803,7 +1803,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, */ if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) == 0 && (draw_wire == 0)) { /* object tag, for bordersel optim */ - glLoadName(index & 0xFFFF); + glLoadName(index & 0xFFFF); index = -1; } } @@ -1830,7 +1830,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (pchan->custom_tx) { glMultMatrixf(pchan->custom_tx->pose_mat); - } + } else { glMultMatrixf(pchan->pose_mat); } @@ -1869,7 +1869,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, /* stick or wire bones have not been drawn yet so don't clear object selection in this case */ if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) == 0 && draw_wire) { /* object tag, for bordersel optim */ - glLoadName(index & 0xFFFF); + glLoadName(index & 0xFFFF); index = -1; } } @@ -1938,7 +1938,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, glLoadName(index & 0xFFFF); pchan_draw_IK_root_lines(pchan, !(do_dashed & 2)); } - } + } } } @@ -1992,7 +1992,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, /* restore things */ if (!ELEM(arm->drawtype, ARM_WIRE, ARM_LINE) && (dt > OB_WIRE) && (arm->flag & ARM_POSEMODE)) bglPolygonOffset(rv3d->dist, 0.0); - } + } /* restore */ glDisable(GL_CULL_FACE); @@ -2045,7 +2045,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (arm->flag & ARM_DRAWNAMES) { mid_v3_v3v3(vec, pchan->pose_head, pchan->pose_tail); view3d_cached_text_draw_add(vec, pchan->name, 10, 0, col); - } + } /* Draw additional axes on the bone tail */ if ((arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE)) { @@ -2075,7 +2075,7 @@ static void get_matrix_editbone(EditBone *eBone, float bmat[][4]) float mat[3][3]; /* Compose the parent transforms (i.e. their translations) */ - sub_v3_v3v3(delta, eBone->tail, eBone->head); + sub_v3_v3v3(delta, eBone->tail, eBone->head); eBone->length = (float)sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2]); @@ -2258,7 +2258,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, const short dt) mid_v3_v3v3(vec, eBone->head, eBone->tail); glRasterPos3fv(vec); view3d_cached_text_draw_add(vec, eBone->name, 10, 0, col); - } + } /* Draw additional axes */ if (arm->flag & ARM_DRAWAXES) { glPushMatrix(); @@ -2643,7 +2643,7 @@ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, } draw_pose_paths(scene, v3d, ar, ob); } - } + } } draw_pose_bones(scene, v3d, ar, base, dt, ob_wire_col, (dflag & DRAW_CONSTCOLOR), is_outline); arm->flag &= ~ARM_POSEMODE; diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index cded7bbbdfc..c603605aa0e 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -382,7 +382,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O glEnable(GL_CULL_FACE); glCullFace(GL_BACK); } - else { + else { glDisable(GL_CULL_FACE); } glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, (me->flag & ME_TWOSIDED) ? GL_TRUE : GL_FALSE); @@ -406,7 +406,7 @@ static void draw_textured_end(void) * - zr */ glPushMatrix(); - glLoadIdentity(); + glLoadIdentity(); GPU_default_lights(); glPopMatrix(); } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 236cbb86724..6818c78bbd6 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -185,7 +185,7 @@ int ED_view3d_context_user_region(bContext *C, View3D **v3d_r, ARegion **ar_r) ar_unlock_user = ar; break; } - } + } } } @@ -719,7 +719,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) case NC_BRUSH: if (wmn->action == NA_EDITED) ED_region_tag_redraw_overlay(ar); - break; + break; case NC_MATERIAL: switch (wmn->data) { case ND_SHADING_DRAW: @@ -748,12 +748,12 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) break; } break; - case NC_IMAGE: + case NC_IMAGE: /* this could be more fine grained checks if we had * more context than just the region */ ED_region_tag_redraw(ar); break; - case NC_TEXTURE: + case NC_TEXTURE: /* same as above */ ED_region_tag_redraw(ar); break; @@ -882,7 +882,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) case ND_KEYFRAME: if (wmn->action == NA_EDITED) ED_region_tag_redraw(ar); - break; + break; } break; case NC_SCENE: diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 8e1b0716136..062400ef79e 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -523,7 +523,7 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit) GPU_print_error("sdsd"); } - /* draw the Z axis line */ + /* draw the Z axis line */ /* check for the 'show Z axis' preference */ if (v3d->gridflag & (V3D_SHOW_X | V3D_SHOW_Y | V3D_SHOW_Z)) { int axis; @@ -1115,7 +1115,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) } /* edge */ - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); setlinestyle(0); @@ -1429,7 +1429,7 @@ ImBuf *view3d_read_backbuf(ViewContext *vc, short xmin, short ymin, short xmax, (ymaxc - yminc + 1), GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); - glReadBuffer(GL_BACK); + glReadBuffer(GL_BACK); if (ENDIAN_ORDER == B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); @@ -1471,7 +1471,7 @@ unsigned int view3d_sample_backbuf_rect(ViewContext *vc, const int mval[2], int int a, b, rc, nr, amount, dirvec[4][2]; int distance = 0; unsigned int index = 0; - short indexok = 0; + short indexok = 0; amount = (size - 1) / 2; @@ -2024,7 +2024,7 @@ static void draw_dupli_objects(Scene *scene, ARegion *ar, View3D *v3d, Base *bas void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect) { - int x, y, w, h; + int x, y, w, h; rcti r; /* clamp rect by area */ @@ -2122,7 +2122,7 @@ float view3d_depth_near(ViewDepths *d) int i = (int)d->w * (int)d->h; /* cast to avoid short overflow */ /* far is both the starting 'far' value - * and the closest value found. */ + * and the closest value found. */ while (i--) { depth = *depths++; if ((depth < far) && (depth > near)) { @@ -2815,7 +2815,7 @@ static void draw_viewport_fps(Scene *scene, ARegion *ar) if (fps + 0.5f < (float)(FPS)) { UI_ThemeColor(TH_REDALERT); BLI_snprintf(printable, sizeof(printable), "fps: %.2f", fps); - } + } else { UI_ThemeColor(TH_TEXT_HI); BLI_snprintf(printable, sizeof(printable), "fps: %i", (int)(fps + 0.5f)); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 96264081f10..21717cdcf82 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -921,7 +921,7 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_FINISHED; } - else { + else { /* add temp handler */ WM_event_add_modal_handler(C, op); @@ -1354,7 +1354,7 @@ static int ndof_all_invoke(bContext *C, wmOperator *op, wmEvent *event) ED_view3d_camera_lock_sync(v3d, rv3d); ED_region_tag_redraw(CTX_wm_region(C)); - viewops_data_free(C, op); + viewops_data_free(C, op); return OPERATOR_FINISHED; } } @@ -1501,7 +1501,7 @@ static int viewmove_invoke(bContext *C, wmOperator *op, wmEvent *event) viewmove_apply(vod, event->prevx, event->prevy); ED_view3d_depth_tag_update(vod->rv3d); - viewops_data_free(C, op); + viewops_data_free(C, op); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index b2ae63df662..d8fcc7e12e7 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -167,7 +167,7 @@ static int view3d_layers_exec(bContext *C, wmOperator *op) } else { v3d->lay |= (1 << 20) - 1; - } + } } else { int bit; @@ -452,7 +452,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) const float dpi_fac = UI_DPI_FAC; int is_paint = 0; - RNA_pointer_create(&screen->id, &RNA_SpaceView3D, v3d, &v3dptr); + RNA_pointer_create(&screen->id, &RNA_SpaceView3D, v3d, &v3dptr); RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &toolsptr); RNA_pointer_create(&scene->id, &RNA_Scene, scene, &sceneptr); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index c30adf844a8..37f682b4827 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -165,7 +165,7 @@ void view3d_get_transformation(const ARegion *ar, RegionView3D *rv3d, Object *ob mats->viewport[0] = ar->winrct.xmin; mats->viewport[1] = ar->winrct.ymin; mats->viewport[2] = ar->winx; - mats->viewport[3] = ar->winy; + mats->viewport[3] = ar->winy; } /* ********************** view3d_select: selection manipulations ********************* */ diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index e55e97e501b..9dd38003656 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -349,7 +349,7 @@ static void make_trans_verts(Object *obedit, float min[3], float max[3], int mod tv->flag = 1; tv++; tottrans++; - } + } if ((mode & TM_ALL_JOINTS) && (tipsel)) { copy_v3_v3(tv->oldloc, ebo->tail); diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index b40e880591a..e3ce163dbc1 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -182,7 +182,7 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase) uiButSetSearchFunc(but, operator_search_cb, arg_listbase, operator_call_cb, NULL); uiBoundsBlock(block, 6); - uiBlockSetDirection(block, UI_DOWN); + uiBlockSetDirection(block, UI_DOWN); uiEndBlock(C, block); event = *(win->eventstate); /* XXX huh huh? make api call */ diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index de8cbd856e8..511f2f37de3 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -786,7 +786,7 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d) { if (rv3d->persp == RV3D_CAMOB) { /* obs/camera */ if (v3d->camera) { - BKE_object_where_is_calc(scene, v3d->camera); + BKE_object_where_is_calc(scene, v3d->camera); obmat_to_viewmat(v3d, rv3d, v3d->camera, 0); } else { @@ -919,7 +919,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b free_object_duplilist(lb); } code++; - } + } } } v3d->xray = FALSE; /* restore */ @@ -1192,7 +1192,7 @@ static int view3d_localview_exit(Main *bmain, Scene *scene, ScrArea *sa) DAG_on_visible_update(bmain, FALSE); return TRUE; - } + } else { return FALSE; } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 1ce99534181..1a218c1b49d 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -277,7 +277,7 @@ void projectIntView(TransInfo *t, const float vec[3], int adr[2]) //vec[0] = vec[0]/((t->scene->r.frs_sec / t->scene->r.frs_sec_base)); /* same as below */ UI_view2d_to_region_no_clip((View2D *)t->view, vec[0], vec[1], out, out + 1); - } + } else #endif { @@ -3383,7 +3383,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short /* this function works on end result */ protectedAxisAngleBits(td->protectflag, td->ext->rotAxis, td->ext->rotAngle, td->ext->irotAxis, td->ext->irotAngle); } - else { + else { float eulmat[3][3]; mul_m3_m3m3(totmat, mat, td->ext->r_mtx); @@ -4811,7 +4811,7 @@ static BMLoop *get_next_loop(BMVert *v, BMLoop *l, } l = l->radial_next; - } while (l != firstl); + } while (l != firstl); if (i) mul_v3_fl(a, 1.0f / (float)i); @@ -6108,7 +6108,7 @@ static short getAnimEdit_DrawTime(TransInfo *t) SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first; drawtime = (sipo->flag & SIPO_DRAWTIME) ? 1 : 0; - } + } else { drawtime = 0; } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 2e9d1ee670f..0c9a29ce666 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -332,7 +332,7 @@ static void createTransEdge(TransInfo *t) invert_m3_m3(smtx, mtx); BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { - if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && (BM_elem_flag_test(eed, BM_ELEM_SELECT) || propmode)) { + if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && (BM_elem_flag_test(eed, BM_ELEM_SELECT) || propmode)) { float *bweight = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_BWEIGHT); float *crease = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_CREASE); @@ -850,7 +850,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan) con = add_pose_constraint(NULL, pchan, "TempConstraint", CONSTRAINT_TYPE_KINEMATIC); pchan->constflag |= (PCHAN_HAS_IK | PCHAN_HAS_TARGET); /* for draw, but also for detecting while pose solving */ data = con->data; - if (targetless) { + if (targetless) { /* if exists, use values from last targetless (but disabled) IK-constraint as base */ *data = *targetless; } @@ -3416,14 +3416,14 @@ static void bezt_to_transdata(TransData *td, TransData2D *td2d, AnimData *adt, B if (td->flag & TD_MOVEHANDLE1) { td2d->h1 = bezt->vec[0]; copy_v2_v2(td2d->ih1, td2d->h1); - } - else + } + else td2d->h1 = NULL; if (td->flag & TD_MOVEHANDLE2) { td2d->h2 = bezt->vec[2]; copy_v2_v2(td2d->ih2, td2d->h2); - } + } else td2d->h2 = NULL; @@ -3527,7 +3527,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) if (sel1) count++; if (sel3) count++; } - } + } else if (sipo->around == V3D_LOCAL) { /* for local-pivot we only need to count the number of selected handles only, so that centerpoints don't * don't get moved wrong @@ -3622,7 +3622,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) if (sel1) { hdata = initTransDataCurveHandles(td, bezt); bezt_to_transdata(td++, td2d++, adt, bezt, 0, 1, 1, intvals, mtx, smtx); - } + } else { /* h1= 0; */ /* UNUSED */ } @@ -3631,7 +3631,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) if (hdata == NULL) hdata = initTransDataCurveHandles(td, bezt); bezt_to_transdata(td++, td2d++, adt, bezt, 2, 1, 1, intvals, mtx, smtx); - } + } else { /* h2= 0; */ /* UNUSED */ } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 39d9b97ef65..01586d1f4a0 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -705,7 +705,7 @@ static void recalcData_view3d(TransInfo *t) BKE_nurb_handles_calc(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */ nu = nu->next; } - } + } else { /* Normal updating */ while (nu) { diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 845d5b73f0c..70e4d4cd027 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -142,7 +142,7 @@ TransformOrientation *createObjectSpace(bContext *C, ReportList *UNUSED(reports) strncpy(name, ob->id.name + 2, MAX_ID_NAME - 2); } - return addMatrixSpace(C, mat, name, overwrite); + return addMatrixSpace(C, mat, name, overwrite); } TransformOrientation *createBoneSpace(bContext *C, ReportList *reports, char *name, int overwrite) diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 94b8abb8850..baca4629883 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -723,14 +723,14 @@ static float RotationBetween(TransInfo *t, float p1[3], float p2[3]) { float angle, start[3], end[3], center[3]; - copy_v3_v3(center, t->center); + copy_v3_v3(center, t->center); if (t->flag & (T_EDIT | T_POSE)) { Object *ob = t->obedit ? t->obedit : t->poseobj; mul_m4_v3(ob->obmat, center); } sub_v3_v3v3(start, p1, center); - sub_v3_v3v3(end, p2, center); + sub_v3_v3v3(end, p2, center); // Angle around a constraint axis (error prone, will need debug) if (t->con.applyRot != NULL && (t->con.mode & CON_APPLY)) { @@ -779,7 +779,7 @@ static float ResizeBetween(TransInfo *t, float p1[3], float p2[3]) { float d1[3], d2[3], center[3], len_d1; - copy_v3_v3(center, t->center); + copy_v3_v3(center, t->center); if (t->flag & (T_EDIT | T_POSE)) { Object *ob = t->obedit ? t->obedit : t->poseobj; mul_m4_v3(ob->obmat, center); @@ -846,7 +846,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) p2 = NULL; p1->flag = 1; - /* if peeling objects, take the first and last from each object */ + /* if peeling objects, take the first and last from each object */ if (t->settings->snap_flag & SCE_SNAP_PEEL_OBJECT) { DepthPeel *peel; for (peel = p1->next; peel; peel = peel->next) { @@ -982,7 +982,7 @@ static void TargetSnapCenter(TransInfo *t) { /* Only need to calculate once */ if ((t->tsnap.status & TARGET_INIT) == 0) { - copy_v3_v3(t->tsnap.snapTarget, t->center); + copy_v3_v3(t->tsnap.snapTarget, t->center); if (t->flag & (T_EDIT | T_POSE)) { Object *ob = t->obedit ? t->obedit : t->poseobj; @@ -991,7 +991,7 @@ static void TargetSnapCenter(TransInfo *t) TargetSnapOffset(t, NULL); - t->tsnap.status |= TARGET_INIT; + t->tsnap.status |= TARGET_INIT; } } @@ -1027,7 +1027,7 @@ static void TargetSnapActive(TransInfo *t) t->tsnap.target = SCE_SNAP_TARGET_MEDIAN; t->tsnap.targetSnap = TargetSnapMedian; TargetSnapMedian(t); - } + } } } @@ -1055,7 +1055,7 @@ static void TargetSnapMedian(TransInfo *t) TargetSnapOffset(t, NULL); - t->tsnap.status |= TARGET_INIT; + t->tsnap.status |= TARGET_INIT; } } @@ -1166,7 +1166,7 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl mul_m4_v3(obmat, location); - new_depth = len_v3v3(location, ray_start); + new_depth = len_v3v3(location, ray_start); ED_view3d_project_int(ar, location, screen_loc); new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]); @@ -1182,7 +1182,7 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl normalize_v3(no); *dist = new_dist; - } + } } return retval; @@ -1234,7 +1234,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh mul_m4_v3(obmat, location); - new_depth = len_v3v3(location, ray_start); + new_depth = len_v3v3(location, ray_start); if (ED_view3d_project_int_global(ar, location, screen_loc, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK) { new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]); @@ -1259,17 +1259,17 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh mul = dot_v3v3(vec, edge_loc) / dot_v3v3(edge_loc, edge_loc); if (r_no) { - normal_short_to_float_v3(n1, v1no); + normal_short_to_float_v3(n1, v1no); normal_short_to_float_v3(n2, v2no); interp_v3_v3v3(r_no, n2, n1, mul); mul_m3_v3(timat, r_no); normalize_v3(r_no); - } + } copy_v3_v3(r_loc, location); *r_dist = new_dist; - } + } } } @@ -1318,7 +1318,7 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float obmat[][4], } *r_dist = new_dist; - } + } } return retval; @@ -1425,7 +1425,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh switch (snap_mode) { case SCE_SNAP_MODE_FACE: - { + { #ifdef USE_BVH_FACE_SNAP // Added for durian BVHTreeRayHit hit; BVHTreeFromMesh treeData; @@ -1858,7 +1858,7 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], mul_m4_v3(obmat, location); - new_depth = len_v3v3(location, ray_start); + new_depth = len_v3v3(location, ray_start); mul_m3_v3(timat, normal); normalize_v3(normal); @@ -1893,7 +1893,7 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], normalize_v3(normal); addDepthPeel(depth_peels, new_depth, location, normal, ob); - } + } } } } diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index 9a3b0476205..b645b983ae5 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -104,7 +104,7 @@ static UndoElem *curundo = NULL; static void undo_restore(UndoElem *undo, void *editdata, void *obdata) { if (undo) { - undo->to_editmode(undo->undodata, editdata, obdata); + undo->to_editmode(undo->undodata, editdata, obdata); } } diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 5eafc3e65a9..1753a564a3c 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -505,7 +505,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even MEM_freeN(item); uiPupMenuEnd(C, pup); - } + } } return OPERATOR_CANCELLED; diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 7aaae404d15..9c2c300c530 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -534,7 +534,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { tf = CustomData_bmesh_get(&bm->pdata, efa->head.data, CD_MTEXPOLY); - if (uvedit_face_visible_test(scene, ima, efa, tf)) { + if (uvedit_face_visible_test(scene, ima, efa, tf)) { BM_elem_flag_enable(efa, BM_ELEM_TAG); } else { @@ -818,7 +818,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) bglVertex2fv(luv->uv); } } - bglEnd(); + bglEnd(); } glPointSize(1.0); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index acc69309a8c..0d7a31eb8da 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1953,7 +1953,7 @@ static int mouse_select(bContext *C, const float co[2], int extend, int loop) } flush = 1; - } + } } } else { diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index f017394356e..83817e758af 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -1566,7 +1566,7 @@ static void p_vert_harmonic_insert(PVert *v) e = v->edge; do { - npoints++; + npoints++; e = p_wheel_edge_next(e); } while (e && (e != v->edge)); @@ -4400,7 +4400,7 @@ void param_pack(ParamHandle *handle, float margin) if (margin > 0.0f) area += sqrt(box->w * box->h); - } + } if (margin > 0.0f) { /* multiply the margin by the area to give predictable results not dependent on UV scale, diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 19a1c4339ad..926b6cfe59e 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -1436,8 +1436,8 @@ static void uv_map_mirror(BMEditMesh *em, BMFace *efa, MTexPoly *UNUSED(tf)) if (i != mi) { dx = uvs[mi][0] - uvs[i][0]; if (dx > 0.5f) uvs[i][0] += 1.0f; - } - } + } + } BLI_array_fixedstack_free(uvs); } |