[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2153] branches/ivygen/truman_ivy/ add_curve_ivygen.py: - Added a check to make sure the starting point was not further than the ivy could reach .

Andrew Hale TrumanBlending at gmail.com
Thu Jul 21 07:19:16 CEST 2011


Revision: 2153
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2153
Author:   trumanblending
Date:     2011-07-21 05:19:16 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
- Added a check to make sure the starting point was not further than the ivy could reach. Should fixing infinite loop issues.

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-21 05:03:34 UTC (rev 2152)
+++ branches/ivygen/truman_ivy/add_curve_ivygen.py	2011-07-21 05:19:16 UTC (rev 2153)
@@ -516,6 +516,11 @@
 
         # Get the seeding point
         seedPoint = context.scene.cursor_location
+        
+        if (ob.closest_point_on_mesh(seedPoint)[0] -
+                                     seedPoint).length > self.maxFloatLength/2:
+            print("Invalid Root Location")
+            return {'CANCELLED'}
 
         # Fix the random seed
         rand_seed(self.randomSeed)



More information about the Bf-extensions-cvs mailing list