clicking on the second point of the gradient outside the mesh should have blended...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 9 Jul 2006 14:54:47 +0000 (14:54 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 9 Jul 2006 14:54:47 +0000 (14:54 +0000)
release/scripts/bpymodules/BPyMesh.py
release/scripts/bpymodules/mesh_gradient.py

index b40dca924ed339f1dd2cdf94a60a3f81180a6d5a..68462e509204c60469295c7ae5267aca576fbb99 100644 (file)
@@ -355,6 +355,9 @@ def pickMeshRayFace(me, orig, dir):
 def pickMeshGroupWeight(me, act_group, orig, dir):
        f, side, w0, w1, w2= pickMeshRayFace(me, orig, dir)
        
+       if f==None:
+               return None
+               
        f_v= f.v
        if side==0:
                f_vi= (f_v[0].index, f_v[1].index, f_v[2].index)
@@ -372,6 +375,9 @@ def pickMeshGroupVCol(me, orig, dir):
        Vector= Blender.Mathutils.Vector
        f, side, w0, w1, w2= pickMeshRayFace(me, orig, dir)
        
+       if f==None:
+               return None
+       
        def col2vec(c):
                return Vector(c.r, c.g, c.b)
        
index 186adfa0591c92698835801be02152a1ad379dd6..da9bee2d325e3a999703ff0ac2a77af0eff60e1c 100755 (executable)
@@ -98,7 +98,6 @@ def vertexGradientPick(ob, MODE):
                pickValB= 0.0
                TOALPHA= True
        
-       
        # set up 2 lines so we can measure their distances and calc the gradient
        
        # make a line 90d to the grad in screenspace.