[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3788] trunk/py/scripts/addons/ light_field_tools: Make light field tools work again with 2.64

Aurel W aurel.w at gmail.com
Tue Sep 25 00:09:10 CEST 2012


Revision: 3788
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3788
Author:   aurel
Date:     2012-09-24 22:09:09 +0000 (Mon, 24 Sep 2012)
Log Message:
-----------
Make light field tools work again with 2.64

Modified Paths:
--------------
    trunk/py/scripts/addons/light_field_tools/__init__.py
    trunk/py/scripts/addons/light_field_tools/light_field_tools.py

Modified: trunk/py/scripts/addons/light_field_tools/__init__.py
===================================================================
--- trunk/py/scripts/addons/light_field_tools/__init__.py	2012-09-24 00:18:27 UTC (rev 3787)
+++ trunk/py/scripts/addons/light_field_tools/__init__.py	2012-09-24 22:09:09 UTC (rev 3788)
@@ -21,8 +21,8 @@
     'name': 'Light Field Tools',
     'author': 'Aurel Wildfellner',
     'description': 'Tools to create a light field camera and projector',
-    'version': (0, 2, 1),
-    'blender': (2, 5, 7),
+    'version': (0, 3, 0),
+    'blender': (2, 6, 4),
     'location': 'View3D > Tool Shelf > Light Field Tools',
     'url': 'http://www.jku.at/cg/',
     "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Render/Light_Field_Tools",

Modified: trunk/py/scripts/addons/light_field_tools/light_field_tools.py
===================================================================
--- trunk/py/scripts/addons/light_field_tools/light_field_tools.py	2012-09-24 00:18:27 UTC (rev 3787)
+++ trunk/py/scripts/addons/light_field_tools/light_field_tools.py	2012-09-24 22:09:09 UTC (rev 3788)
@@ -65,6 +65,7 @@
 
 
 Version history:
+v0.3.0 - Make compatible with 2.64
 v0.2.1 - Empty handler, multiple camera grid, r34843
 v0.2.0 - To be included in contrib, r34456
 v0.1.4 - To work with r34261
@@ -229,8 +230,7 @@
     def createSpot(self, index, textured=False):
         scene = bpy.context.scene
         bpy.ops.object.lamp_add(
-                type='SPOT', 
-                layers=self.layer0)
+                type='SPOT')
         spot = bpy.context.active_object
 
         # set object props
@@ -320,7 +320,7 @@
     def getCamVec(self, obj, angle):
         width = self.getWidth(obj)
         itmat = obj.matrix_local.inverted().transposed()
-        normal = itmat * obj.data.faces[0].normal.normalized()
+        normal = itmat * obj.data.polygons[0].normal.normalized()
         vl = (width/2) * (1/math.tan(math.radians(angle/2)))
         return normal*vl
 
@@ -349,7 +349,7 @@
             return 'CANCELLED'
 
         # check if it has one single face
-        if len(obj.data.faces) != 1:
+        if len(obj.data.polygons) != 1:
             self.report({'ERROR'}, "The selected mesh object has to have exactly one quad!")
             return 'CANCELLED'
 



More information about the Bf-extensions-cvs mailing list