Page Menu
Home
Search
Configure Global Search
Log In
Files
F15469
transparency-panel-addons.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Ervin Weber (lusque)
Nov 13 2013, 3:11 PM
Size
5 KB
Subscribers
None
transparency-panel-addons.patch
View Options
Index: io_import_gimp_image_to_scene.py
===================================================================
--- io_import_gimp_image_to_scene.py (revision 1343)
+++ io_import_gimp_image_to_scene.py (working copy)
@@ -327,7 +327,7 @@
Mat.use_cast_buffer_shadows = False
Mat.use_cast_approximate = False
if HasAlpha:
- Mat.use_transparency = True
+ Mat.transparency_method = 'Z_TRANSPARENCY'
if OpacityMode == 'MAT': Mat.alpha = LayerOpacity
else: Mat.alpha = 0
if ShadelessMats: Mat.use_shadeless = True
@@ -667,4 +667,4 @@
if __name__ == "__main__":
- register()
+ register()
\ No newline at end of file
Index: io_import_images_as_planes.py
===================================================================
--- io_import_images_as_planes.py (revision 1343)
+++ io_import_images_as_planes.py (working copy)
@@ -68,7 +68,7 @@
if texture.type == 'IMAGE'\
and texture.image\
and texture.image.filepath == image.filepath:
- if self.use_transparency:
+ if self.transparency_method != 'NONE':
texture.use_alpha = True
else:
texture.use_alpha = False
@@ -78,7 +78,7 @@
texture = bpy.data.textures.new(name=os.path.split(image.filepath)[1],
type='IMAGE')
texture.image = image
- if self.use_transparency:
+ if self.transparency_method != 'NONE':
texture.use_alpha = True
else:
texture.use_alpha = False
@@ -89,7 +89,7 @@
for material in bpy.data.materials:
if material.texture_slots[0]\
and material.texture_slots[0].texture == texture:
- if self.use_transparency:
+ if self.transparency_method != 'NONE':
material.alpha = 0
material.specular_alpha = 0
material.texture_slots[0].use_map_alpha = True
@@ -97,7 +97,6 @@
material.alpha = 1
material.specular_alpha = 1
material.texture_slots[0].use_map_alpha = False
- material.use_transparency = self.use_transparency
material.transparency_method = self.transparency_method
material.use_shadeless = self.use_shadeless
return material
@@ -107,7 +106,7 @@
slot = material.texture_slots.add()
slot.texture = texture
slot.texture_coords = 'UV'
- if self.use_transparency:
+ if self.transparency_method != 'NONE':
slot.use_map_alpha = True
material.alpha = 0
material.specular_alpha = 0
@@ -115,7 +114,6 @@
material.alpha = 1
material.specular_alpha = 1
slot.use_map_alpha = False
- material.use_transparency = self.use_transparency
material.transparency_method = self.transparency_method
material.use_shadeless = self.use_shadeless
@@ -275,10 +273,10 @@
use_shadeless = BoolProperty(name="Shadeless",
description="Set material to shadeless",
default=False)
- use_transparency = BoolProperty(name="Use alpha",
- description="Use alphachannel for transparency.",
- default=False)
tEnum = [
+ ('NONE',
+ 'None',
+ 'Transparency rendering disabled'),
('Z_TRANSPARENCY',
'Z Transparency',
'Use alpha buffer for transparent faces'),
@@ -306,7 +304,6 @@
box = layout.box()
box.label('Material mappings:', icon='MATERIAL')
box.prop(self, 'use_shadeless')
- box.prop(self, 'use_transparency')
box.prop(self, 'use_premultiply')
box.prop(self, 'transparency_method', expand=True)
box = layout.box()
@@ -344,4 +341,4 @@
def unregister():
bpy.types.INFO_MT_file_import.remove(import_images_button)
if __name__ == '__main__':
- register()
+ register()
\ No newline at end of file
Index: io_import_scene_lwo.py
===================================================================
--- io_import_scene_lwo.py (revision 1343)
+++ io_import_scene_lwo.py (working copy)
@@ -1003,7 +1003,6 @@
surf_data.bl_mat.raytrace_mirror.reflect_factor= surf_data.refl
surf_data.bl_mat.raytrace_mirror.gloss_factor= 1.0-surf_data.rblr
if surf_data.tran != 0.0:
- surf_data.bl_mat.use_transparency= True
surf_data.bl_mat.transparency_method= 'RAYTRACE'
surf_data.bl_mat.alpha= 1.0 - surf_data.tran
surf_data.bl_mat.raytrace_transparency.ior= surf_data.rind
@@ -1251,4 +1250,4 @@
bpy.types.INFO_MT_file_import.remove(menu_func)
if __name__ == "__main__":
- register()
+ register()
\ No newline at end of file
Index: render_povray/render.py
===================================================================
--- render_povray/render.py (revision 1343)
+++ render_povray/render.py (working copy)
@@ -579,7 +579,7 @@
if material:
diffuse_color = material.diffuse_color
- if material.use_transparency and material.transparency_method == 'RAYTRACE':
+ if material.transparency_method == 'RAYTRACE':
trans = 1.0 - material.raytrace_transparency.filter
else:
trans = 0.0
@@ -761,7 +761,8 @@
material = me_materials[col[3]]
material_finish = materialNames[material.name]
- if material.use_transparency:
+ #LUSUQE: if material.use_transparency:
+ if material.transparency_method != 'NONE':
trans = 1.0 - material.alpha
else:
trans = 0.0
@@ -1443,5 +1444,3 @@
print("***POV FINISHED***")
self._cleanup()
-
-
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
de/3d/9f1eb0334ccb210d6d42e678b2eb
Event Timeline
Log In to Comment