diff options
author | Aurel W <aurel.w@gmail.com> | 2012-09-25 02:09:09 +0400 |
---|---|---|
committer | Aurel W <aurel.w@gmail.com> | 2012-09-25 02:09:09 +0400 |
commit | 25f56f2c9d5afee0a9b1996b7264b0ac474fb5f4 (patch) | |
tree | fea88f62aa60a9c1e9d36de93e9906cbeb46997e /light_field_tools/light_field_tools.py | |
parent | f9d25a262e78c7b021f349fcaf3a1e0af57e239b (diff) |
Make light field tools work again with 2.64
Diffstat (limited to 'light_field_tools/light_field_tools.py')
-rw-r--r-- | light_field_tools/light_field_tools.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/light_field_tools/light_field_tools.py b/light_field_tools/light_field_tools.py index 8e96513c..017b3466 100644 --- a/light_field_tools/light_field_tools.py +++ b/light_field_tools/light_field_tools.py @@ -65,6 +65,7 @@ plane. 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 @@ class OBJECT_OT_create_lightfield_rig(bpy.types.Operator): 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 @@ class OBJECT_OT_create_lightfield_basemesh(bpy.types.Operator): 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 @@ class OBJECT_OT_create_lightfield_basemesh(bpy.types.Operator): 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' |