diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-24 06:37:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-24 06:37:42 +0400 |
commit | b21a0f4fa1c4c5f2ad20e8ddd48ae3657ad941ef (patch) | |
tree | 09823455bcfd9c3853874bdeee8c38625d784679 /source/blender | |
parent | 27074062ab51a26adf8794732142a36c98eb5204 (diff) |
formatting edits 120 line length
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/writeavi.c | 3 | ||||
-rw-r--r-- | source/blender/editors/interface/view2d.c | 3 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 34 | ||||
-rw-r--r-- | source/blender/python/generic/bpy_internal_import.c | 7 |
4 files changed, 25 insertions, 22 deletions
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index 8cd30912840..da64c464dce 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -159,9 +159,6 @@ static int start_avi(Scene *scene, RenderData *rd, int rectx, int recty, ReportL avi = MEM_mallocN (sizeof(AviMovie), "avimovie"); - /* RPW 11-21-2002 - if (rd->imtype != AVI_FORMAT_MJPEG) format = AVI_FORMAT_AVI_RGB; - */ if (rd->im_format.imtype != R_IMF_IMTYPE_AVIJPEG ) format = AVI_FORMAT_AVI_RGB; else format = AVI_FORMAT_MJPEG; diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index c2c482b0a2c..57d46de9cb7 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -177,7 +177,8 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) /* see eView2D_CommonViewTypes in UI_view2d.h for available view presets */ switch (type) { - /* 'standard view' - optimum setup for 'standard' view behaviour, that should be used new views as basis for their + /* 'standard view' - optimum setup for 'standard' view behaviour, + * that should be used new views as basis for their * own unique View2D settings, which should be used instead of this in most cases... */ case V2D_COMMONVIEW_STANDARD: diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 0e65383861b..7cff37e8814 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -123,19 +123,19 @@ static int same_snap(Snapshot* snap, Brush* brush, ViewContext* vc) { MTex* mtex = &brush->mtex; - return - (mtex->tex && - mtex->ofs[0] == snap->ofs[0] && - mtex->ofs[1] == snap->ofs[1] && - mtex->ofs[2] == snap->ofs[2] && - mtex->size[0] == snap->size[0] && - mtex->size[1] == snap->size[1] && - mtex->size[2] == snap->size[2] && - mtex->rot == snap->rot) && - ((mtex->brush_map_mode == MTEX_MAP_MODE_FIXED && brush_size(brush) <= snap->brush_size) || (brush_size(brush) == snap->brush_size)) && // make brush smaller shouldn't cause a resample - mtex->brush_map_mode == snap->brush_map_mode && - vc->ar->winx == snap->winx && - vc->ar->winy == snap->winy; + return ( (mtex->tex) && + equals_v3v3(mtex->ofs, snap->ofs) && + equals_v3v3(mtex->size, snap->size) && + mtex->rot == snap->rot + ) && + + /* make brush smaller shouldn't cause a resample */ + ( (mtex->brush_map_mode == MTEX_MAP_MODE_FIXED && (brush_size(brush) <= snap->brush_size)) || + (brush_size(brush) == snap->brush_size)) && + + (mtex->brush_map_mode == snap->brush_map_mode) && + (vc->ar->winx == snap->winx) && + (vc->ar->winy == snap->winy); } static void make_snap(Snapshot* snap, Brush* brush, ViewContext* vc) @@ -869,7 +869,10 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) MEM_freeN(stroke); return OPERATOR_FINISHED; } - else if(first || ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) || (event->type == TIMER && (event->customdata == stroke->timer))) { + else if( (first) || + (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) || + (event->type == TIMER && (event->customdata == stroke->timer)) ) + { if(stroke->stroke_started) { if(paint_smooth_stroke(stroke, mouse, event)) { if(paint_space_stroke_enabled(stroke->brush)) { @@ -887,7 +890,8 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) } } - /* we want the stroke to have the first daub at the start location instead of waiting till we have moved the space distance */ + /* we want the stroke to have the first daub at the start location + * instead of waiting till we have moved the space distance */ if(first && stroke->stroke_started && paint_space_stroke_enabled(stroke->brush) && diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c index 88e2da16eb5..d9183261329 100644 --- a/source/blender/python/generic/bpy_internal_import.c +++ b/source/blender/python/generic/bpy_internal_import.c @@ -141,9 +141,10 @@ PyObject *bpy_text_import_name(const char *name, int *found) printf("ERROR: bpy_import_main_set() was not called before running python. this is a bug.\n"); return NULL; } - - if (namelen >= (MAX_ID_NAME-2) - 3) return NULL; /* we know this cant be importable, the name is too long for blender! */ - + + /* we know this cant be importable, the name is too long for blender! */ + if (namelen >= (MAX_ID_NAME-2) - 3) return NULL; + memcpy(txtname, name, namelen); memcpy(&txtname[namelen], ".py", 4); |