From 4063c230af188167d0b8471d5700fe060c8420f6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 13 Oct 2009 07:39:08 +0000 Subject: fix for warnings, wkey menu wasnt registered --- source/blender/editors/armature/editarmature_sketch.c | 13 ++++++++----- source/blender/editors/include/ED_mesh.h | 2 ++ source/blender/editors/sculpt_paint/sculpt.c | 7 +++++-- source/blender/editors/transform/transform_generics.c | 1 + 4 files changed, 16 insertions(+), 7 deletions(-) (limited to 'source') diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 989070c1147..ce328ea8a82 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -1006,9 +1006,9 @@ void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float { float ray_start[3], ray_normal[3]; float delta = VecLenf(stk->points[i].p, stk->points[i + 1].p); - short pval[2]; + float pval[2]; - project_short_noclip(ar, stk->points[i].p, pval); + project_float(ar, stk->points[i].p, pval); viewray(ar, v3d, pval, ray_start, ray_normal); VecMulf(ray_normal, distance * progress / length); @@ -1076,10 +1076,13 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok float dist = FLT_MAX; float p[3]; float size = 0; + float mvalf[2]; BLI_freelistN(&sketch->depth_peels); sketch->depth_peels.first = sketch->depth_peels.last = NULL; + mvalf[0]= dd->mval[0]; + mvalf[1]= dd->mval[1]; peelObjectsContext(C, &sketch->depth_peels, dd->mval); if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS) @@ -1712,7 +1715,7 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok { SK_Intersection *isect = MEM_callocN(sizeof(SK_Intersection), "Intersection"); float ray_start[3], ray_end[3]; - short mval[2]; + float mval[2]; isect->gesture_index = g_i; isect->before = s_i; @@ -1720,8 +1723,8 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok isect->stroke = stk; isect->lambda = lambda; - mval[0] = (short)(vi[0]); - mval[1] = (short)(vi[1]); + mval[0] = vi[0]; + mval[1] = vi[1]; viewline(ar, v3d, mval, ray_start, ray_end); LineIntersectLine( stk->points[s_i].p, diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 144d29a4405..ed8d366ab8b 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -160,6 +160,8 @@ void EM_reveal_mesh(struct EditMesh *em); void EM_select_by_material(struct EditMesh *em, int index); void EM_deselect_by_material(struct EditMesh *em, int index); +void EM_automerge(struct Scene *scene, struct Object *obedit, int update); + /* editface.c */ struct MTFace *EM_get_active_mtface(struct EditMesh *em, struct EditFace **act_efa, struct MCol **mcol, int sloppy); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index b88fe5a9d7a..fc0aa28a2c3 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1469,12 +1469,15 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss) { StrokeCache *cache = ss->cache; Brush *brush = paint_brush(&sd->paint); - float *buffer; + float *buffer= NULL; int i; /* Restore the mesh before continuing with anchored stroke */ if((brush->flag & BRUSH_ANCHORED) && ss->mesh_co_orig) { - buffer = buffer = ss->drawobject!=0?(float *)GPU_buffer_lock( ss->drawobject->normals ):0; + + if(ss->drawobject) + buffer= (float *)GPU_buffer_lock(ss->drawobject->normals); + for(i = 0; i < ss->totvert; ++i) { VecCopyf(ss->mvert[i].co, ss->mesh_co_orig[i]); ss->mvert[i].no[0] = cache->orig_norms[i][0]; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 20d136e4790..c8066f03abf 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -59,6 +59,7 @@ //#include "BIF_screen.h" //#include "BIF_mywindow.h" #include "BIF_gl.h" +#include "BIF_glutil.h" //#include "BIF_editmesh.h" //#include "BIF_editsima.h" //#include "BIF_editparticle.h" -- cgit v1.2.3