[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2183] branches/ivygen/truman_ivy/ add_curve_ivygen.py: - Fixed incorrect distance check due to last commit
Andrew Hale
TrumanBlending at gmail.com
Tue Jul 26 05:46:40 CEST 2011
Revision: 2183
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2183
Author: trumanblending
Date: 2011-07-26 03:46:38 +0000 (Tue, 26 Jul 2011)
Log Message:
-----------
- Fixed incorrect distance check due to last commit
- Fixed pep8-80 non-compliance
Modified Paths:
--------------
branches/ivygen/truman_ivy/add_curve_ivygen.py
Modified: branches/ivygen/truman_ivy/add_curve_ivygen.py
===================================================================
--- branches/ivygen/truman_ivy/add_curve_ivygen.py 2011-07-26 02:45:29 UTC (rev 2182)
+++ branches/ivygen/truman_ivy/add_curve_ivygen.py 2011-07-26 03:46:38 UTC (rev 2183)
@@ -409,7 +409,7 @@
adhesion_vector = Vector((0, 0, 0))
if nearest_result[2] != -1:
# Compute the distance to the nearest point
- distance = (nearest_result[0] - tran_loc).length
+ distance = (ob.matrix_world * nearest_result[0] - loc).length
# If it's less than the maximum allowed and not 0, continue
if (distance < max_l) and distance:
# Compute the direction vector between the closest point and loc
@@ -435,7 +435,8 @@
# Check whether the collision is going into the object
if (tran_new_pos - tran_pos).dot(ray_result[1]) < 0.0:
# Find projection of the piont onto the plane
- p0 = tran_new_pos - (tran_new_pos - ray_result[0]).project(ray_result[1])
+ p0 = tran_new_pos - (tran_new_pos -
+ ray_result[0]).project(ray_result[1])
# Reflect in the plane
tran_new_pos += 2 * (p0 - tran_new_pos)
new_pos *= 0
@@ -690,4 +691,4 @@
if __name__ == "__main__":
- register()
\ No newline at end of file
+ register()
More information about the Bf-extensions-cvs
mailing list