[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3775] trunk/py/scripts/addons/ add_curve_sapling: The tree is now added at the cursor location instead of the world origin.

Jace Priester jacepriester at gmail.com
Thu Sep 20 12:45:56 CEST 2012


Revision: 3775
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3775
Author:   jacepriester
Date:     2012-09-20 10:45:55 +0000 (Thu, 20 Sep 2012)
Log Message:
-----------
The tree is now added at the cursor location instead of the world origin.

Modified Paths:
--------------
    trunk/py/scripts/addons/add_curve_sapling/__init__.py
    trunk/py/scripts/addons/add_curve_sapling/utils.py

Modified: trunk/py/scripts/addons/add_curve_sapling/__init__.py
===================================================================
--- trunk/py/scripts/addons/add_curve_sapling/__init__.py	2012-09-19 23:57:52 UTC (rev 3774)
+++ trunk/py/scripts/addons/add_curve_sapling/__init__.py	2012-09-20 10:45:55 UTC (rev 3775)
@@ -19,7 +19,7 @@
 bl_info = {
     "name": "Sapling",
     "author": "Andrew Hale (TrumanBlending)",
-    "version": (0, 2, 5),
+    "version": (0, 2, 6),
     "blender": (2, 6, 4),
     "location": "View3D > Add > Curve",
     "description": ("Adds a parametric tree. The method is presented by "

Modified: trunk/py/scripts/addons/add_curve_sapling/utils.py
===================================================================
--- trunk/py/scripts/addons/add_curve_sapling/utils.py	2012-09-19 23:57:52 UTC (rev 3774)
+++ trunk/py/scripts/addons/add_curve_sapling/utils.py	2012-09-20 10:45:55 UTC (rev 3775)
@@ -482,6 +482,8 @@
     cu = bpy.data.curves.new('tree','CURVE')
     treeOb = bpy.data.objects.new('tree',cu)
     bpy.context.scene.objects.link(treeOb)
+    
+    treeOb.location=bpy.context.scene.cursor_location
 
     cu.dimensions = '3D'
     cu.fill_mode = 'FULL'



More information about the Bf-extensions-cvs mailing list