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-05-18 22:01:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-18 22:01:01 +0400
commit7282f8cf98ac7d228b1ffb209fae081acf7d05a1 (patch)
treef72b1d0f1a73c6520e00837b33b8024ad3319907 /source/blender/editors/gpencil
parentf4d8be977fa657be8c3e9201fc39aebb6043e225 (diff)
window_to_3d() wasn't working at all (only used by grease pencil/path conversion), now works in ortho and perspective view, initgrabz() is no longer needs to be called first.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index c552657df96..4de40bc536c 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -377,7 +377,6 @@ static void gp_strokepoint_convertcoords (bContext *C, bGPDstroke *gps, bGPDspoi
}
else {
float *fp= give_cursor(scene, v3d);
- float dvec[3];
int mval[2];
int mx, my;
@@ -396,9 +395,7 @@ static void gp_strokepoint_convertcoords (bContext *C, bGPDstroke *gps, bGPDspoi
/* convert screen coordinate to 3d coordinates
* - method taken from editview.c - mouse_cursor()
*/
- project_int_noclip(ar, fp, mval);
- window_to_3d(ar, dvec, mval[0]-mx, mval[1]-my);
- sub_v3_v3v3(p3d, fp, dvec);
+ window_to_3d(ar, p3d, fp, mval[0], mval[1]);
}
}
@@ -564,8 +561,6 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op)
bGPdata *gpd= gpencil_data_get_active(C);
bGPDlayer *gpl= gpencil_layer_getactive(gpd);
Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
- float *fp= give_cursor(scene, v3d);
int mode= RNA_enum_get(op->ptr, "type");
/* check if there's data to work with */
@@ -574,9 +569,6 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- /* initialise 3d-cursor correction globals */
- initgrabz(CTX_wm_region_view3d(C), fp[0], fp[1], fp[2]);
-
/* handle conversion modes */
switch (mode) {
case GP_STROKECONVERT_PATH: