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:
authorBastien Montagne <montagne29@wanadoo.fr>2013-03-29 18:01:00 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-03-29 18:01:00 +0400
commit4eb1a9bcb53d92c9ac47de16ae060b6a8db44473 (patch)
treef61113c05dd6d866303695a952b43e3484e0215d /io_import_images_as_planes.py
parenta54617ffb4efed7a120d12ed07cdfdd81058510c (diff)
Fix import image as plane addon, broken by recent pynodes changes (thx to Iggy B [rexxxus] for reporting the bug).
Diffstat (limited to 'io_import_images_as_planes.py')
-rw-r--r--io_import_images_as_planes.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 5f872e12..09bd0ddf 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -19,8 +19,8 @@
bl_info = {
"name": "Import Images as Planes",
"author": "Florian Meyer (tstscr), mont29, matali",
- "version": (1, 7),
- "blender": (2, 65, 0),
+ "version": (1, 8),
+ "blender": (2, 66, 4),
"location": "File > Import > Images as Planes or Add > Mesh > Images as Planes",
"description": "Imports images and creates planes with the appropriate aspect ratio. "
"The images are mapped to the planes.",
@@ -499,17 +499,17 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
out_node = clean_node_tree(node_tree)
if self.shader == 'BSDF_DIFFUSE':
- bsdf_diffuse = node_tree.nodes.new('BSDF_DIFFUSE')
- tex_image = node_tree.nodes.new('TEX_IMAGE')
+ bsdf_diffuse = node_tree.nodes.new('ShaderNodeBsdfDiffuse')
+ tex_image = node_tree.nodes.new('ShaderNodeTexImage')
tex_image.image = image
tex_image.show_texture = True
node_tree.links.new(out_node.inputs[0], bsdf_diffuse.outputs[0])
node_tree.links.new(bsdf_diffuse.inputs[0], tex_image.outputs[0])
elif self.shader == 'EMISSION':
- emission = node_tree.nodes.new('EMISSION')
- lightpath = node_tree.nodes.new('LIGHT_PATH')
- tex_image = node_tree.nodes.new('TEX_IMAGE')
+ emission = node_tree.nodes.new('ShaderNodeEmission')
+ lightpath = node_tree.nodes.new('ShaderNodeLightPath')
+ tex_image = node_tree.nodes.new('ShaderNodeTexImage')
tex_image.image = image
tex_image.show_texture = True
node_tree.links.new(out_node.inputs[0], emission.outputs[0])
@@ -517,10 +517,10 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
node_tree.links.new(emission.inputs[1], lightpath.outputs[0])
elif self.shader == 'BSDF_DIFFUSE_BSDF_TRANSPARENT':
- bsdf_diffuse = node_tree.nodes.new('BSDF_DIFFUSE')
- bsdf_transparent = node_tree.nodes.new('BSDF_TRANSPARENT')
- mix_shader = node_tree.nodes.new('MIX_SHADER')
- tex_image = node_tree.nodes.new('TEX_IMAGE')
+ bsdf_diffuse = node_tree.nodes.new('ShaderNodeBsdfDiffuse')
+ bsdf_transparent = node_tree.nodes.new('ShaderNodeBsdfTransparent')
+ mix_shader = node_tree.nodes.new('ShaderNodeMixShader')
+ tex_image = node_tree.nodes.new('ShaderNodeTexImage')
tex_image.image = image
tex_image.show_texture = True
node_tree.links.new(out_node.inputs[0], mix_shader.outputs[0])
@@ -530,11 +530,11 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
node_tree.links.new(bsdf_diffuse.inputs[0], tex_image.outputs[0])
elif self.shader == 'EMISSION_BSDF_TRANSPARENT':
- emission = node_tree.nodes.new('EMISSION')
- lightpath = node_tree.nodes.new('LIGHT_PATH')
- bsdf_transparent = node_tree.nodes.new('BSDF_TRANSPARENT')
- mix_shader = node_tree.nodes.new('MIX_SHADER')
- tex_image = node_tree.nodes.new('TEX_IMAGE')
+ emission = node_tree.nodes.new('ShaderNodeEmission')
+ lightpath = node_tree.nodes.new('ShaderNodeLightPath')
+ bsdf_transparent = node_tree.nodes.new('ShaderNodeBsdfTransparent')
+ mix_shader = node_tree.nodes.new('ShaderNodeMixShader')
+ tex_image = node_tree.nodes.new('ShaderNodeTexImage')
tex_image.image = image
tex_image.show_texture = True
node_tree.links.new(out_node.inputs[0], mix_shader.outputs[0])