Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-07 11:01:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-07 11:01:24 +0400
commit7508540c53222c289a665cb0528e2a5c984b9b99 (patch)
tree1fd3f92c4fd7ea74d23288468a1ce494350c33a7 /source/blender/editors/gpencil
parent261c1679b484884973d485c3f21bed9e87fa5260 (diff)
parent4b3cc63f73cfe519689bdbd8482e655b72423038 (diff)
svn merge -r41575:41602 ^/trunk/blender
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c19
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
2 files changed, 7 insertions, 14 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index d481be94bcc..7b79384fbb4 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -555,8 +555,8 @@ static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short
* - must clear transforms set on object, as those skew our results
*/
ob= add_object(scene, OB_CURVE);
- ob->loc[0]= ob->loc[1]= ob->loc[2]= 0;
- ob->rot[0]= ob->rot[1]= ob->rot[2]= 0;
+ zero_v3(ob->loc);
+ zero_v3(ob->rot);
cu= ob->data;
cu->flag |= CU_3D;
@@ -573,6 +573,9 @@ static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short
case GP_STROKECONVERT_CURVE:
gp_stroke_to_bezier(C, gpl, gps, cu, subrect_ptr);
break;
+ default:
+ BLI_assert(!"invalid mode");
+ break;
}
}
}
@@ -602,17 +605,7 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- /* handle conversion modes */
- switch (mode) {
- case GP_STROKECONVERT_PATH:
- case GP_STROKECONVERT_CURVE:
- gp_layer_to_curve(C, gpd, gpl, mode);
- break;
-
- default: /* unsupoorted */
- BKE_report(op->reports, RPT_ERROR, "Unknown conversion option");
- return OPERATOR_CANCELLED;
- }
+ gp_layer_to_curve(C, gpd, gpl, mode);
/* notifiers */
WM_event_add_notifier(C, NC_OBJECT|NA_ADDED, NULL);
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index ff3b69c2bf6..12f03f7341c 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -658,7 +658,7 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
found_depth= TRUE;
}
- VECCOPY2D(mval_prev, mval);
+ copy_v2_v2_int(mval_prev, mval);
}
if (found_depth == FALSE) {