[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29711] branches/soc-2010-kwk/release/ scripts/op/image.py: Fixed bug with image recasting from CloudTexture to ImageTexture.
Konrad Kleine
konrad at konradwilhelm.de
Sat Jun 26 17:07:43 CEST 2010
Revision: 29711
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29711
Author: kwk
Date: 2010-06-26 17:07:43 +0200 (Sat, 26 Jun 2010)
Log Message:
-----------
Fixed bug with image recasting from CloudTexture to ImageTexture.
When using image.recast_type() the result is the recasted object.
Modified Paths:
--------------
branches/soc-2010-kwk/release/scripts/op/image.py
Modified: branches/soc-2010-kwk/release/scripts/op/image.py
===================================================================
--- branches/soc-2010-kwk/release/scripts/op/image.py 2010-06-26 14:35:28 UTC (rev 29710)
+++ branches/soc-2010-kwk/release/scripts/op/image.py 2010-06-26 15:07:43 UTC (rev 29711)
@@ -225,7 +225,7 @@
if tex != None:
# Set texture type to be an bpy.types.ImageTexture object
tex.type = 'IMAGE'
- tex.recast_type()
+ tex = tex.recast_type()
# Decide which parts shall be influenced by the image texture
if ctype == 'DIFFUSE':
@@ -240,12 +240,12 @@
# # Diffuse maps are painted in color, so set the "stype" to color
# # (for bump/height map use 'GREYSCALE')
- if ctype == 'DIFFUSE':
- tex.stype = 'COLOR'
- elif ctype == 'BUMP':
- tex.stype = 'GREYSCALE'
- elif ctype == 'SPECULAR':
- tex.stype = 'GREYSCALE'
+# if ctype == 'DIFFUSE':
+# tex.stype = 'COLOR'
+# elif ctype == 'BUMP':
+# tex.stype = 'GREYSCALE'
+# elif ctype == 'SPECULAR':
+# tex.stype = 'GREYSCALE'
# Create a new image (named after
img = bpy.data.images.new(ctype)
More information about the Bf-blender-cvs
mailing list