forked from bartvdbraak/blender
cleanup: style/spelling
This commit is contained in:
parent
7b369080d0
commit
81f97692ae
@ -994,7 +994,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
|
|||||||
}
|
}
|
||||||
case eBoidRulesetType_Random:
|
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));
|
rule = BLI_findlink(&state->rules, rand % BLI_listbase_count(&state->rules));
|
||||||
|
|
||||||
apply_boid_rule(bbd, rule, &val, pa, -1.0);
|
apply_boid_rule(bbd, rule, &val, pa, -1.0);
|
||||||
|
@ -328,7 +328,7 @@ void BKE_mesh_normals_loop_split(
|
|||||||
{
|
{
|
||||||
if (!use_split_normals) {
|
if (!use_split_normals) {
|
||||||
/* In this case, we simply fill lnors with vnors, quite simple!
|
/* 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).
|
* 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.
|
* 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;
|
PointCache *cache = pid->cache;
|
||||||
int ofra = 0, efra = cache->endframe;
|
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) {
|
if (cfra && cfra == cache->startframe) {
|
||||||
BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, cfra);
|
BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, cfra);
|
||||||
cache->flag &= ~PTCACHE_REDO_NEEDED;
|
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 */
|
* are most likely to remain and be the main dividers */
|
||||||
if (e_a_concave < e_b_concave) return -1;
|
if (e_a_concave < e_b_concave) return -1;
|
||||||
else 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 */
|
/* otherwise shortest edges last */
|
||||||
const float e_a_len = BM_edge_calc_length_squared(e_a);
|
const float e_a_len = BM_edge_calc_length_squared(e_a);
|
||||||
const float e_b_len = BM_edge_calc_length_squared(e_b);
|
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) {
|
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) {
|
if (marker->frame == frame) {
|
||||||
marker->flag ^= SELECT;
|
marker->flag ^= SELECT;
|
||||||
break;
|
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))
|
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) {
|
if (key_index) {
|
||||||
PTCacheEdit *edit = data->edit;
|
PTCacheEdit *edit = data->edit;
|
||||||
ParticleSystem *psys = edit->psys;
|
ParticleSystem *psys = edit->psys;
|
||||||
|
@ -3367,8 +3367,9 @@ static bool project_paint_clone_face_skip(ProjPaintState *ps,
|
|||||||
if (ps->do_material_slots) {
|
if (ps->do_material_slots) {
|
||||||
if (lc->slot_clone != lc->slot_last_clone) {
|
if (lc->slot_clone != lc->slot_last_clone) {
|
||||||
if (!slot->uvname ||
|
if (!slot->uvname ||
|
||||||
!(lc->tf_clone_base = CustomData_get_layer_named(&ps->dm->faceData, CD_MTFACE,
|
!(lc->tf_clone_base = CustomData_get_layer_named(
|
||||||
lc->slot_clone->uvname)))
|
&ps->dm->faceData, CD_MTFACE,
|
||||||
|
lc->slot_clone->uvname)))
|
||||||
{
|
{
|
||||||
lc->tf_clone_base = CustomData_get_layer(&ps->dm->faceData, CD_MTFACE);
|
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) {
|
if (ps->do_face_sel) {
|
||||||
int orig_index;
|
int orig_index;
|
||||||
if (face_lookup->index_mp_to_orig &&
|
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];
|
MPoly *mp = &face_lookup->mpoly_orig[orig_index];
|
||||||
return ((mp->flag & ME_FACE_SEL) != 0);
|
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,
|
* sure all the verts are pointing away from the view,
|
||||||
* not just the face */
|
* not just the face */
|
||||||
if ((ps->vertFlags[mf->v1] & PROJ_VERT_CULL) &&
|
if ((ps->vertFlags[mf->v1] & PROJ_VERT_CULL) &&
|
||||||
(ps->vertFlags[mf->v2] & PROJ_VERT_CULL) &&
|
(ps->vertFlags[mf->v2] & PROJ_VERT_CULL) &&
|
||||||
(ps->vertFlags[mf->v3] & PROJ_VERT_CULL) &&
|
(ps->vertFlags[mf->v3] & PROJ_VERT_CULL) &&
|
||||||
(mf->v4 == 0 || ps->vertFlags[mf->v4] & PROJ_VERT_CULL)) {
|
(mf->v4 == 0 || ps->vertFlags[mf->v4] & PROJ_VERT_CULL))
|
||||||
|
{
|
||||||
return true;
|
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]);
|
glColor4ub(0, 0, 0, paint->paint_cursor_col[3]);
|
||||||
glLineWidth(3.0);
|
glLineWidth(3.0);
|
||||||
if (stroke->constrain_line){
|
if (stroke->constrain_line) {
|
||||||
sdrawline((int)stroke->last_mouse_position[0], (int)stroke->last_mouse_position[1],
|
sdrawline((int)stroke->last_mouse_position[0], (int)stroke->last_mouse_position[1],
|
||||||
stroke->constrained_pos[0], stroke->constrained_pos[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]);
|
glColor4ub(255, 255, 255, paint->paint_cursor_col[3]);
|
||||||
glLineWidth(1.0);
|
glLineWidth(1.0);
|
||||||
if (stroke->constrain_line){
|
if (stroke->constrain_line) {
|
||||||
sdrawline((int)stroke->last_mouse_position[0], (int)stroke->last_mouse_position[1],
|
sdrawline((int)stroke->last_mouse_position[0], (int)stroke->last_mouse_position[1],
|
||||||
stroke->constrained_pos[0], stroke->constrained_pos[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 override = RNA_boolean_get(op->ptr, "override");
|
||||||
bool turnon = true;
|
bool turnon = true;
|
||||||
|
|
||||||
if (ed == NULL ||
|
if (ed == NULL || !(proxy_25 || proxy_50 || proxy_75 || proxy_100)) {
|
||||||
!(proxy_25 || proxy_50 || proxy_75 || proxy_100)) {
|
|
||||||
turnon = false;
|
turnon = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ bool IMB_metadata_get_field(struct ImBuf *img, const char *key, char *field, con
|
|||||||
if (!img->metadata)
|
if (!img->metadata)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
prop = IDP_GetPropertyFromGroup(img->metadata ,key);
|
prop = IDP_GetPropertyFromGroup(img->metadata, key);
|
||||||
|
|
||||||
if (prop && prop->type == IDP_STRING) {
|
if (prop && prop->type == IDP_STRING) {
|
||||||
BLI_strncpy(field, IDP_String(prop), len);
|
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)
|
* called on startup, (context entirely filled with NULLs)
|
||||||
* or called for 'New File'
|
* or called for 'New File'
|
||||||
* both startup.blend and userpref.blend are checked
|
* 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
|
* custom_file can be NULL
|
||||||
*/
|
*/
|
||||||
int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const char *custom_file)
|
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;
|
wmKeyMapItem *found;
|
||||||
|
|
||||||
/* XXX Hack! Macro operators in menu entrie have their whole props defined, which is not the case for
|
/* 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 allways
|
* relevant keymap entries. Could be good to check and harmonize this, but for now always
|
||||||
* compare non-strict in this case.
|
* compare non-strict in this case.
|
||||||
*/
|
*/
|
||||||
wmOperatorType *ot = WM_operatortype_find(opname, true);
|
wmOperatorType *ot = WM_operatortype_find(opname, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user