[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52142] trunk/blender/source/blender/ editors/gpencil: More spelling errors, whitespace, and simplifying code with many side effects

Joshua Leung aligorith at gmail.com
Mon Nov 12 11:38:56 CET 2012


Revision: 52142
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52142
Author:   aligorith
Date:     2012-11-12 10:38:51 +0000 (Mon, 12 Nov 2012)
Log Message:
-----------
More spelling errors, whitespace, and simplifying code with many side effects

Modified Paths:
--------------
    trunk/blender/source/blender/editors/gpencil/gpencil_edit.c
    trunk/blender/source/blender/editors/gpencil/gpencil_paint.c

Modified: trunk/blender/source/blender/editors/gpencil/gpencil_edit.c
===================================================================
--- trunk/blender/source/blender/editors/gpencil/gpencil_edit.c	2012-11-12 10:16:50 UTC (rev 52141)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_edit.c	2012-11-12 10:38:51 UTC (rev 52142)
@@ -139,11 +139,11 @@
 				return &sseq->gpd;
 			}
 			break;
-
+			
 			case SPACE_IMAGE: /* Image/UV Editor */
 			{
 				SpaceImage *sima = (SpaceImage *)CTX_wm_space_data(C);
-
+				
 				/* for now, Grease Pencil data is associated with the space... */
 				/* XXX our convention for everything else is to link to data though... */
 				if (ptr) RNA_pointer_create(screen_id, &RNA_SpaceImageEditor, sima, ptr);
@@ -159,19 +159,19 @@
 				if (clip) {
 					if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) {
 						MovieTrackingTrack *track = BKE_tracking_track_get_active(&clip->tracking);
-
+						
 						if (!track)
 							return NULL;
-
+						
 						if (ptr)
 							RNA_pointer_create(&clip->id, &RNA_MovieTrackingTrack, track, ptr);
-
+						
 						return &track->gpd;
 					}
 					else {
 						if (ptr)
 							RNA_id_pointer_create(&clip->id, ptr);
-
+						
 						return &clip->gpd;
 					}
 				}
@@ -535,15 +535,19 @@
 {
 	if (time < 0.0f) {
 		/* This is a gap, negative value! */
-		gtd->tot_time = -(gtd->times[gtd->cur_point] = -(((float)(stroke_inittime - gtd->inittime)) + time));
+		gtd->times[gtd->cur_point] = -(((float)(stroke_inittime - gtd->inittime)) + time);
+		gtd->tot_time = -gtd->times[gtd->cur_point];
+		
 		gtd->gap_tot_time += gtd->times[gtd->cur_point] - gtd->times[gtd->cur_point - 1];
 	}
 	else {
-		gtd->tot_time = (gtd->times[gtd->cur_point] = (((float)(stroke_inittime - gtd->inittime)) + time));
+		gtd->times[gtd->cur_point] = (((float)(stroke_inittime - gtd->inittime)) + time);
+		gtd->tot_time = (gtd->times[gtd->cur_point]);
 	}
 	
 	gtd->tot_dist += delta_dist;
 	gtd->dists[gtd->cur_point] = gtd->tot_dist;
+	
 	gtd->cur_point++;
 }
 
@@ -569,13 +573,14 @@
 					/* We want gaps that are in gtd->gap_duration +/- gtd->gap_randomness range,
 					 * and which sum to exactly tot_gaps_time...
 					 */
-					int rem_gaps = nbr_gaps - *nbr_done_gaps;
+					int rem_gaps = nbr_gaps - (*nbr_done_gaps);
 					if (rem_gaps < 2) {
 						/* Last gap, just give remaining time! */
 						*next_delta_time = tot_gaps_time;
 					}
 					else {
 						float delta, min, max;
+						
 						/* This code ensures that if the first gaps have been shorter than average gap_duration,
 						 * next gaps will tend to be longer (i.e. try to recover the lateness), and vice-versa!
 						 */

Modified: trunk/blender/source/blender/editors/gpencil/gpencil_paint.c
===================================================================
--- trunk/blender/source/blender/editors/gpencil/gpencil_paint.c	2012-11-12 10:16:50 UTC (rev 52141)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_paint.c	2012-11-12 10:38:51 UTC (rev 52142)
@@ -771,7 +771,7 @@
 		
 		/* We must adjust timings!
 		 * Each point's timing data is a delta from stroke's inittime, so as we erase the first
-		 * point of the stroke, we have to offset this inittime and all remaing points' delta values.
+		 * point of the stroke, we have to offset this inittime and all remaining points' delta values.
 		 * This way we get a new stroke with exactly the same timing as if user had started drawing from
 		 * the second point...
 		 */




More information about the Bf-blender-cvs mailing list