Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurel W <aurel.w@gmail.com>2011-04-11 23:55:35 +0400
committerAurel W <aurel.w@gmail.com>2011-04-11 23:55:35 +0400
commit5c632c2610e56459832e58dc57eed75b9775b8e5 (patch)
treee7beff36d2e9c86bcbac6204b6ced82adb4331f7 /light_field_tools
parent8da041a311f52f0232010132c137218f9dda33f8 (diff)
light field tools, fixes for 2.57 release
Diffstat (limited to 'light_field_tools')
-rw-r--r--light_field_tools/__init__.py7
-rw-r--r--light_field_tools/light_field_tools.py28
2 files changed, 17 insertions, 18 deletions
diff --git a/light_field_tools/__init__.py b/light_field_tools/__init__.py
index 02f653fe..862c399b 100644
--- a/light_field_tools/__init__.py
+++ b/light_field_tools/__init__.py
@@ -20,11 +20,12 @@
bl_info = {
'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),
- "api": 35622,
+ 'blender': (2, 5, 7),
+ 'api': 36103,
'location': 'View3D > Tool Shelf > Light Field Tools',
- 'description': 'Tools to create a light field camera and projector',
+ 'url': 'http://www.jku.at/cg/',
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/Render/Light_Field_Tools",
"tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=25719",
'category': 'Render'
diff --git a/light_field_tools/light_field_tools.py b/light_field_tools/light_field_tools.py
index e8f81500..9179db8c 100644
--- a/light_field_tools/light_field_tools.py
+++ b/light_field_tools/light_field_tools.py
@@ -102,9 +102,9 @@ class OBJECT_OT_create_lightfield_rig(bpy.types.Operator):
def arrangeVerts(self):
"""Sorts the vertices as described in the usage part of the doc."""
- # get mesh with applied modifer stack
+ #FIXME get mesh with applied modifer stack
scene = bpy.context.scene
- mesh = self.baseObject.to_mesh(scene, True, "PREVIEW")
+ mesh = self.baseObject.data
verts = []
row_length = scene.lightfield.row_length
@@ -213,13 +213,11 @@ class OBJECT_OT_create_lightfield_rig(bpy.types.Operator):
def createTexture(self, index):
name = "light_field_spot_tex_" + str(index)
- tex = bpy.data.textures.new(name)
- # change type
- tex.type = 'IMAGE'
- tex = tex.recast_type()
+ tex = bpy.data.textures.new(name, type='IMAGE')
# load and set the image
- img = bpy.data.images.new("lfe_str_" + str(index))
+ #FIXME width, height. not necessary to set in the past.
+ img = bpy.data.images.new("lfe_str_" + str(index), width=5, height=5)
img.filepath = self.imagePaths[index]
img.source = 'FILE'
tex.image = img
@@ -252,7 +250,7 @@ class OBJECT_OT_create_lightfield_rig(bpy.types.Operator):
if textured:
spot.data.active_texture = self.createTexture(index)
# texture mapping
- spot.data.texture_slots[0].texture_coordinates = 'VIEW'
+ spot.data.texture_slots[0].texture_coords = 'VIEW'
# handler parent
if scene.lightfield.create_handler:
@@ -337,7 +335,7 @@ class OBJECT_OT_create_lightfield_basemesh(bpy.types.Operator):
scene.objects.link(nobj)
nobj.select = True
- if scene.objects.active is None or scene.objects.active.mode == 'OBJECT':
+ if scene.objects.active == None or scene.objects.active.mode == 'OBJECT':
scene.objects.active = nobj
@@ -417,12 +415,12 @@ class VIEW3D_OT_lightfield_tools(bpy.types.Panel):
col.prop(scene.lightfield, "animate_camera")
col.prop(scene.lightfield, "do_projection")
- if (scene.lightfield.do_projection):
- sub = layout.row()
- subcol = sub.column(align=True)
- subcol.prop(scene.lightfield, "texture_path")
- subcol.prop(scene.lightfield, "light_intensity")
- subcol.prop(scene.lightfield, "light_spot_blend")
+ sub = layout.row()
+ sub.enabled = scene.lightfield.do_projection
+ subcol = sub.column(align=True)
+ subcol.prop(scene.lightfield, "texture_path")
+ subcol.prop(scene.lightfield, "light_intensity")
+ subcol.prop(scene.lightfield, "light_spot_blend")
# create a basemesh
sub = layout.row()