diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-04-28 03:54:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-04-28 03:54:30 +0400 |
commit | 3bd0d2e227276f7350dc72e06a43f23001429047 (patch) | |
tree | 7660a384387aafa8fd7b09d659d490f535f53b5a /release/scripts/bpymodules/BPyMesh.py | |
parent | a2000b53cd2a8c8b3945c8f457f1189f750c8c98 (diff) |
Draw.c - error setting the callback button values when using UIBlock (was not offset)
BPyMesh.py - own dumb error, was using dir as an arg (which is a py keyword)
object_drop.py - new script, the first to use UIBlock, it drops objects into terrain, either a group or the active object. on teh Z axis or view axis.
Diffstat (limited to 'release/scripts/bpymodules/BPyMesh.py')
-rw-r--r-- | release/scripts/bpymodules/BPyMesh.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/release/scripts/bpymodules/BPyMesh.py b/release/scripts/bpymodules/BPyMesh.py index f04c3531f3e..70fc1a87a52 100644 --- a/release/scripts/bpymodules/BPyMesh.py +++ b/release/scripts/bpymodules/BPyMesh.py @@ -427,7 +427,7 @@ def getMeshFromObject(ob, container_mesh=None, apply_modifiers=True, vgroups=Tru return mesh -def faceRayIntersect(f, orig, dir): +def faceRayIntersect(f, orig, rdir): ''' Returns face, side Side is the side of a quad we intersect. @@ -435,23 +435,23 @@ def faceRayIntersect(f, orig, dir): side 1 == 0,2,3 ''' f_v= f.v - isect= Blender.Mathutils.Intersect(f_v[0].co, f_v[1].co, f_v[2].co, dir, orig, 1) # 1==clip + isect= Blender.Mathutils.Intersect(f_v[0].co, f_v[1].co, f_v[2].co, rdir, orig, 1) # 1==clip if isect: return isect, 0 if len(f_v)==4: - isect= Blender.Mathutils.Intersect(f_v[0].co, f_v[2].co, f_v[3].co, dir, orig, 1) # 1==clip + isect= Blender.Mathutils.Intersect(f_v[0].co, f_v[2].co, f_v[3].co, rdir, orig, 1) # 1==clip if isect: return isect, 1 return False, 0 -def pickMeshRayFace(me, orig, dir): +def pickMeshRayFace(me, orig, rdir): best_dist= 1000000 best_isect= best_side= best_face= None for f in me.faces: - isect, side= faceRayIntersect(f, orig, dir) + isect, side= faceRayIntersect(f, orig, rdir) if isect: dist= (isect-orig).length if dist<best_dist: @@ -463,8 +463,8 @@ def pickMeshRayFace(me, orig, dir): return best_face, best_isect, best_side -def pickMeshRayFaceWeight(me, orig, dir): - f, isect, side = pickMeshRayFace(me, orig, dir) +def pickMeshRayFaceWeight(me, orig, rdir): + f, isect, side = pickMeshRayFace(me, orig, rdir) if f==None: return None, None, None, None, None @@ -490,8 +490,8 @@ def pickMeshRayFaceWeight(me, orig, dir): -def pickMeshGroupWeight(me, act_group, orig, dir): - f, side, w0, w1, w2= pickMeshRayFaceWeight(me, orig, dir) +def pickMeshGroupWeight(me, act_group, orig, rdir): + f, side, w0, w1, w2= pickMeshRayFaceWeight(me, orig, rdir) if f==None: return None @@ -509,9 +509,9 @@ def pickMeshGroupWeight(me, act_group, orig, dir): return w0*vws[0] + w1*vws[1] + w2*vws[2] -def pickMeshGroupVCol(me, orig, dir): +def pickMeshGroupVCol(me, orig, rdir): Vector= Blender.Mathutils.Vector - f, side, w0, w1, w2= pickMeshRayFaceWeight(me, orig, dir) + f, side, w0, w1, w2= pickMeshRayFaceWeight(me, orig, rdir) if f==None: return None |