[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [824] branches/ivygen/ivy_functions.py: fix syntax errors
Florian Meyer
florianfelix at web.de
Tue Jul 20 23:49:26 CEST 2010
Revision: 824
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=824
Author: testscreenings
Date: 2010-07-20 23:49:26 +0200 (Tue, 20 Jul 2010)
Log Message:
-----------
fix syntax errors
Modified Paths:
--------------
branches/ivygen/ivy_functions.py
Modified: branches/ivygen/ivy_functions.py
===================================================================
--- branches/ivygen/ivy_functions.py 2010-07-20 21:34:48 UTC (rev 823)
+++ branches/ivygen/ivy_functions.py 2010-07-20 21:49:26 UTC (rev 824)
@@ -1,4 +1,4 @@
-def printsomething(): #just abs test if it works
+def printsomething(): #just abs test if it works
print("something")
@@ -116,19 +116,19 @@
# still needs surrounding code
normal = mathutils.Vector((0,0,0))
- plane_eq = mathutils.Vector((0,0,0,0))
- minimum_dist = targetBoundingSphere[1] * max_adhesion_distance #set a maximum distance to minimum_distance
- for fcs in obj.data.faces
- N = fcs.normal #Normal to the face fcs
- vert = bpy.context.object.data.verts[fcs.verts[0]]
- point = vert.co #any point on the face
- plane_eq = mathutils.Vector((N[0],N[1],N[2],-(N[0]*point[0]+N[1]*point[1]+N[2]*point[2]))) #Equation of the face
- num = plane_eq[0]*old_pos[0]+plane_eq[1]*old_pos[1]+plane_eq[2]*old_pos[2]+plane_eq[3]
- den = (pow(plane_eq[0],2))+(pow(plane_eq[1],2))+((plane_eq[2]^2))
- den = pow(den,0.5)
- dist = num/den #distance of the face from the old_point
- if dist < minimum
- minimum = dist
+ plane_eq = mathutils.Vector((0,0,0,0))
+ minimum_dist = targetBoundingSphere[1] * max_adhesion_distance #set a maximum distance to minimum_distance
+ for fcs in obj.data.faces:
+ N = fcs.normal #Normal to the face fcs
+ vert = bpy.context.object.data.verts[fcs.verts[0]]
+ point = vert.co #any point on the face
+ plane_eq = mathutils.Vector((N[0],N[1],N[2],-(N[0]*point[0]+N[1]*point[1]+N[2]*point[2]))) #Equation of the face
+ num = plane_eq[0]*old_pos[0]+plane_eq[1]*old_pos[1]+plane_eq[2]*old_pos[2]+plane_eq[3]
+ den = (pow(plane_eq[0],2))+(pow(plane_eq[1],2))+((plane_eq[2]^2))
+ den = pow(den,0.5)
+ dist = num/den #distance of the face from the old_point
+ if dist < minimum:
+ minimum = dist
More information about the Bf-extensions-cvs
mailing list