cleanup: style/spelling

This commit is contained in:
Campbell Barton 2015-02-02 23:29:53 +11:00
parent 7b369080d0
commit 81f97692ae
12 changed files with 24 additions and 21 deletions

@ -994,7 +994,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
}
case eBoidRulesetType_Random:
{
/* use random rule for each particle (allways same for same particle though) */
/* use random rule for each particle (always same for same particle though) */
rule = BLI_findlink(&state->rules, rand % BLI_listbase_count(&state->rules));
apply_boid_rule(bbd, rule, &val, pa, -1.0);

@ -328,7 +328,7 @@ void BKE_mesh_normals_loop_split(
{
if (!use_split_normals) {
/* In this case, we simply fill lnors with vnors, quite simple!
* Note this is done here to keep some logic and consistancy in this quite complex code,
* Note this is done here to keep some logic and consistency in this quite complex code,
* since we may want to use lnors even when mesh's 'autosmooth' is disabled (see e.g. mesh mapping code).
* As usual, we could handle that on case-by-case basis, but simpler to keep it well confined here.
*/

@ -2447,7 +2447,7 @@ static int ptcache_write_needed(PTCacheID *pid, int cfra, int *overwrite)
PointCache *cache = pid->cache;
int ofra = 0, efra = cache->endframe;
/* allways start from scratch on the first frame */
/* always start from scratch on the first frame */
if (cfra && cfra == cache->startframe) {
BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, cfra);
cache->flag &= ~PTCACHE_REDO_NEEDED;

@ -62,8 +62,7 @@ static int bm_edge_length_cmp(const void *a_, const void *b_)
* are most likely to remain and be the main dividers */
if (e_a_concave < e_b_concave) return -1;
else if (e_a_concave > e_b_concave) return 1;
else
{
else {
/* otherwise shortest edges last */
const float e_a_len = BM_edge_calc_length_squared(e_a);
const float e_b_len = BM_edge_calc_length_squared(e_b);

@ -1057,7 +1057,7 @@ static void select_timeline_marker_frame(ListBase *markers, int frame, bool exte
}
BLI_LISTBASE_CIRCULAR_FORWARD_BEGIN (markers, marker, marker_first) {
/* this way a not-extend select will allways give 1 selected marker */
/* this way a not-extend select will always give 1 selected marker */
if (marker->frame == frame) {
marker->flag ^= SELECT;
break;

@ -3250,7 +3250,7 @@ static void brush_puff(PEData *data, int point_index)
static void BKE_brush_weight_get(PEData *data, float UNUSED(mat[4][4]), float UNUSED(imat[4][4]), int point_index, int key_index, PTCacheEditKey *UNUSED(key))
{
/* roots have full weight allways */
/* roots have full weight always */
if (key_index) {
PTCacheEdit *edit = data->edit;
ParticleSystem *psys = edit->psys;

@ -3367,8 +3367,9 @@ static bool project_paint_clone_face_skip(ProjPaintState *ps,
if (ps->do_material_slots) {
if (lc->slot_clone != lc->slot_last_clone) {
if (!slot->uvname ||
!(lc->tf_clone_base = CustomData_get_layer_named(&ps->dm->faceData, CD_MTFACE,
lc->slot_clone->uvname)))
!(lc->tf_clone_base = CustomData_get_layer_named(
&ps->dm->faceData, CD_MTFACE,
lc->slot_clone->uvname)))
{
lc->tf_clone_base = CustomData_get_layer(&ps->dm->faceData, CD_MTFACE);
}
@ -3413,7 +3414,10 @@ static bool project_paint_check_face_sel(const ProjPaintState *ps,
if (ps->do_face_sel) {
int orig_index;
if (face_lookup->index_mp_to_orig &&
((orig_index = DM_origindex_mface_mpoly(face_lookup->index_mf_to_mpoly, face_lookup->index_mp_to_orig, face_index))) != ORIGINDEX_NONE)
((orig_index = DM_origindex_mface_mpoly(
face_lookup->index_mf_to_mpoly,
face_lookup->index_mp_to_orig,
face_index))) != ORIGINDEX_NONE)
{
MPoly *mp = &face_lookup->mpoly_orig[orig_index];
return ((mp->flag & ME_FACE_SEL) != 0);
@ -3498,9 +3502,10 @@ static bool project_paint_backface_cull(const ProjPaintState *ps, const MFace *m
* sure all the verts are pointing away from the view,
* not just the face */
if ((ps->vertFlags[mf->v1] & PROJ_VERT_CULL) &&
(ps->vertFlags[mf->v2] & PROJ_VERT_CULL) &&
(ps->vertFlags[mf->v3] & PROJ_VERT_CULL) &&
(mf->v4 == 0 || ps->vertFlags[mf->v4] & PROJ_VERT_CULL)) {
(ps->vertFlags[mf->v2] & PROJ_VERT_CULL) &&
(ps->vertFlags[mf->v3] & PROJ_VERT_CULL) &&
(mf->v4 == 0 || ps->vertFlags[mf->v4] & PROJ_VERT_CULL))
{
return true;
}
}

@ -165,7 +165,7 @@ static void paint_draw_line_cursor(bContext *C, int x, int y, void *customdata)
glColor4ub(0, 0, 0, paint->paint_cursor_col[3]);
glLineWidth(3.0);
if (stroke->constrain_line){
if (stroke->constrain_line) {
sdrawline((int)stroke->last_mouse_position[0], (int)stroke->last_mouse_position[1],
stroke->constrained_pos[0], stroke->constrained_pos[1]);
}
@ -176,7 +176,7 @@ static void paint_draw_line_cursor(bContext *C, int x, int y, void *customdata)
glColor4ub(255, 255, 255, paint->paint_cursor_col[3]);
glLineWidth(1.0);
if (stroke->constrain_line){
if (stroke->constrain_line) {
sdrawline((int)stroke->last_mouse_position[0], (int)stroke->last_mouse_position[1],
stroke->constrained_pos[0], stroke->constrained_pos[1]);
}

@ -3426,8 +3426,7 @@ static int sequencer_enable_proxies_exec(bContext *C, wmOperator *op)
bool override = RNA_boolean_get(op->ptr, "override");
bool turnon = true;
if (ed == NULL ||
!(proxy_25 || proxy_50 || proxy_75 || proxy_100)) {
if (ed == NULL || !(proxy_25 || proxy_50 || proxy_75 || proxy_100)) {
turnon = false;
}

@ -70,7 +70,7 @@ bool IMB_metadata_get_field(struct ImBuf *img, const char *key, char *field, con
if (!img->metadata)
return false;
prop = IDP_GetPropertyFromGroup(img->metadata ,key);
prop = IDP_GetPropertyFromGroup(img->metadata, key);
if (prop && prop->type == IDP_STRING) {
BLI_strncpy(field, IDP_String(prop), len);

@ -539,7 +539,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
* called on startup, (context entirely filled with NULLs)
* or called for 'New File'
* both startup.blend and userpref.blend are checked
* the optional parameter custom_file points to an alterntive startup page
* the optional parameter custom_file points to an alternative startup page
* custom_file can be NULL
*/
int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const char *custom_file)

@ -1072,8 +1072,8 @@ static wmKeyMapItem *wm_keymap_item_find(
{
wmKeyMapItem *found;
/* XXX Hack! Macro operators in menu entrie have their whole props defined, which is not the case for
* relevant keymap entries. Could be good to check and harmonize this, but for now allways
/* XXX Hack! Macro operators in menu entry have their whole props defined, which is not the case for
* relevant keymap entries. Could be good to check and harmonize this, but for now always
* compare non-strict in this case.
*/
wmOperatorType *ot = WM_operatortype_find(opname, true);