[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [863] branches/ivygen/ivy_test.py: == ivy ==

Florian Meyer florianfelix at web.de
Wed Jul 28 15:08:23 CEST 2010


Revision: 863
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=863
Author:   testscreenings
Date:     2010-07-28 15:08:23 +0200 (Wed, 28 Jul 2010)

Log Message:
-----------
== ivy ==
- added a debug mesh for the sampling points.
- now i see what i did wrong.

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

Modified: branches/ivygen/ivy_test.py
===================================================================
--- branches/ivygen/ivy_test.py	2010-07-28 11:53:04 UTC (rev 862)
+++ branches/ivygen/ivy_test.py	2010-07-28 13:08:23 UTC (rev 863)
@@ -45,6 +45,17 @@
     #print('\nADHESION', adhesionVector)
     return adhesionVector
 
+def meshFromPoints(verts):
+    scene = bpy.context.scene
+    
+    DebugMesh = bpy.data.meshes.new('pointCloud')
+    DebugMesh.from_pydata(verts, [], [])
+    DebugMesh.update()
+    ob_new = bpy.data.objects.new('DEBUG', DebugMesh)
+    scene.objects.link(ob_new)
+    ob_new.select = True
+
+
 def positive(val):
     if val < 0:
         val *= -1
@@ -478,6 +489,8 @@
 
     sortetSample = sorted(samplePoints, key=lambda point: (NodePoint - point).length)
 
+    meshFromPoints(sortetSample)
+
     print('sortetSample - all: ', len(sortetSample))
 
     try:
@@ -534,7 +547,7 @@
     #create main IvyObject stores all the IvyRoots.IvyNodes
     IVY = Ivy()
 
-    adhesion3(seedPoint, obj.data)
+    adVec = adhesion3(seedPoint, obj.data)
 
     #print('preLoop collider is', IVY.ivyCollider)
 




More information about the Bf-extensions-cvs mailing list