[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [840] branches/ivygen/ivy_test.py: - introduced a global scale value to determine the scale of the ivy relative to the world

Florian Meyer florianfelix at web.de
Thu Jul 22 10:24:05 CEST 2010


Revision: 840
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=840
Author:   testscreenings
Date:     2010-07-22 10:24:04 +0200 (Thu, 22 Jul 2010)

Log Message:
-----------
- introduced a global scale value to determine the scale of the ivy relative to the world

Modified Paths:
--------------
    branches/ivygen/ivy_test.py

Modified: branches/ivygen/ivy_test.py
===================================================================
--- branches/ivygen/ivy_test.py	2010-07-22 07:45:56 UTC (rev 839)
+++ branches/ivygen/ivy_test.py	2010-07-22 08:24:04 UTC (rev 840)
@@ -176,7 +176,7 @@
 
             # GROW VECTOR
             growVector = (randomVector * props.ivyRandomWeight +
-                          primaryVector * props.ivyPrimaryWeight)
+                          primaryVector * props.ivyPrimaryWeight) * props.ivyGlobScale
 
             # GRAVITY VECTOR
             gravityVector = mathutils.Vector((0,0,-1)) * props.ivyGravityWeight
@@ -187,13 +187,16 @@
             ####################################################################################################
             ####################################################################################################
             ####### put in here for testing, until the error is fixed ##########################################
-            climbing, new_pos = collision(self.ivyCollider, root, prevIvy.position + growVector + gravityVector)
+            #climbing, new_pos = collision(self.ivyCollider, root, prevIvy.position + growVector + gravityVector)
             ####### delete, comment out when fixed #############################################################
             ####################################################################################################
             ####################################################################################################
             ####################################################################################################
             #print('\nold_grow', growVector)
-            growVector = new_pos - prevIvy.position - gravityVector
+            try:
+                growVector = new_pos - prevIvy.position - gravityVector
+            except:
+                pass
             #print('new_grow', growVector)
             '''
             try:
@@ -284,9 +287,6 @@
     
         new_pos += 2.0 * (projVec - new_pos)
 
-        #new_pos = 0.5 * (ray_result[0] - old_pos)
-
-
     else:
         print('not colliding\n')
     
@@ -357,7 +357,11 @@
                             min=0,soft_min=0,
                             max=1,soft_max=1,
                             default=0.5)
+    ivyGlobScale = FloatProperty(name='Globel Scale',
+                            min=0,soft_min=0,
+                            default=1)
 
+
     collider = None
 
     def poll(self, context):




More information about the Bf-extensions-cvs mailing list