Typos and formatting fixes
authorJoshua Leung <aligorith@gmail.com>
Thu, 27 Oct 2011 01:05:55 +0000 (01:05 +0000)
committerJoshua Leung <aligorith@gmail.com>
Thu, 27 Oct 2011 01:05:55 +0000 (01:05 +0000)
source/blender/editors/gpencil/gpencil_paint.c
source/blender/makesrna/intern/rna_action.c

index 1bab362..ff3b69c 100644 (file)
@@ -385,9 +385,10 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
                pt->y= mval[1];
                pt->pressure= pressure;
 
-               /* if there's stroke fir this poly line session add (or replace last) point
-                  to stroke. This allows to draw lines more interactively (see new segment
-                  during mouse slide, i.e.) */
+               /* if there's stroke for this poly line session add (or replace last) point
+                * to stroke. This allows to draw lines more interactively (see new segment
+                * during mouse slide, i.e.) 
+                */
                if (p->flags & GP_PAINTFLAG_STROKEADDED) {
                        bGPDstroke *gps= p->gpf->strokes.last;
                        bGPDspoint *pts;
@@ -401,7 +402,8 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
                        pts = &gps->points[gps->totpoints-1];
 
                        /* special case for poly lines: normally, depth is needed only when creating new stroke from buffer,
-                          but poly lines are converting to stroke instantly, so initialize depth buffer before converting coordinates */
+                        * but poly lines are converting to stroke instantly, so initialize depth buffer before converting coordinates 
+                        */
                        if (gpencil_project_check(p)) {
                                View3D *v3d= p->sa->spacedata.first;
 
@@ -1122,7 +1124,7 @@ static int gp_session_initdata (bContext *C, tGPsdata *p)
                p->gpd= *gpd_ptr;
        }
        
-       if(ED_gpencil_session_active()==0) {
+       if (ED_gpencil_session_active()==0) {
                /* initialize undo stack,
                   also, existing undo stack would make buffer drawn */
                gpencil_undo_init(p->gpd);
@@ -1693,9 +1695,11 @@ static int gpencil_area_exists(bContext *C, ScrArea *satest)
        bScreen *sc= CTX_wm_screen(C);
        ScrArea *sa;
        
-       for(sa= sc->areabase.first; sa; sa= sa->next)
-               if(sa==satest)
+       for (sa= sc->areabase.first; sa; sa= sa->next) {
+               if (sa==satest)
                        return 1;
+       }
+       
        return 0;
 }
 
@@ -1781,9 +1785,9 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
                        /* basically, this should be mouse-button up = end stroke 
                         * BUT what happens next depends on whether we 'painting sessions' is enabled
                         */
-                       sketch|= GPENCIL_SKETCH_SESSIONS_ON(p->scene);
-                       /* polyline drawig is also 'sketching' -- all knots should be added during one session */
-                       sketch|= p->paintmode == GP_PAINTMODE_DRAW_POLY;
+                       sketch |= GPENCIL_SKETCH_SESSIONS_ON(p->scene);
+                       /* polyline drawing is also 'sketching' -- all knots should be added during one session */
+                       sketch |= p->paintmode == GP_PAINTMODE_DRAW_POLY;
 
                        if (sketch) {
                                /* end stroke only, and then wait to resume painting soon */
@@ -1804,13 +1808,13 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
                }
                else if (event->val == KM_PRESS) {
                        /* not painting, so start stroke (this should be mouse-button down) */
-                       
                        p= gpencil_stroke_begin(C, op);
 
                        if (p->status == GP_STATUS_ERROR) {
                                estate = OPERATOR_CANCELLED;
                        }
-               } else {
+               } 
+               else {
                        p->status = GP_STATUS_IDLING;
                }
        }
@@ -1845,7 +1849,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
        }
        
        /* gpencil modal operator stores area, which can be removed while using it (like fullscreen) */
-       if(0==gpencil_area_exists(C, p->sa))
+       if (0==gpencil_area_exists(C, p->sa))
                estate= OPERATOR_CANCELLED;
        else
                /* update status indicators - cursor, header, etc. */
index f2d1578..82a7d27 100644 (file)
@@ -95,15 +95,15 @@ static void rna_Action_groups_remove(bAction *act, ReportList *reports, bActionG
 
 static FCurve *rna_Action_fcurve_new(bAction *act, ReportList *reports, const char *data_path, int index, const char *group)
 {
-       if(group && group[0]=='\0') group= NULL;
+       if (group && group[0]=='\0') group= NULL;
 
-       if(data_path[0] == '\0') {
+       if (data_path[0] == '\0') {
                BKE_report(reports, RPT_ERROR, "F-Curve data path empty, invalid argument");
                return NULL;
        }
 
        /* annoying, check if this exists */
-       if(verify_fcurve(act, group, data_path, index, 0)) {
+       if (verify_fcurve(act, group, data_path, index, 0)) {
                BKE_reportf(reports, RPT_ERROR, "F-Curve '%s[%d]' already exists in action '%s'", data_path, index, act->id.name+2);
                return NULL;
        }