Skip to content

Commit eda5d09

Browse files
committed
1_8_0
Added Alpha/Opacity
1 parent 34d7a68 commit eda5d09

4 files changed

Lines changed: 19 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ Installing an Addon in Blender
5757

5858
![alt](/screenshots/sp_2_8_0_rc_1.png)
5959

60+
## Opacity
61+
62+
![alt](/screenshots/sp_opacity.png)
63+
6064
## UE4 Nodes
6165

6266
![alt](/screenshots/sp_unreal.png)

__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"name": "DKS Substance Painter",
2121
"description": "Substance Painter Pipeline",
2222
"author": "DigiKrafting.Studio",
23-
"version": (1, 7, 5),
23+
"version": (1, 8, 0),
2424
"blender": (2, 80, 0),
2525
"location": "Info Toolbar, File -> Import, File -> Export, Menu",
2626
"wiki_url": "https://github.com/DigiKrafting/blender_addon_substance_painter/wiki",

dks_sp.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def execute(self, context):
116116
_file_Glossiness = dks_sp_get_texture_file(_textures_path,_obj_name,_material_name,'Glossiness',_texture_ext)
117117
_file_Roughness = dks_sp_get_texture_file(_textures_path,_obj_name,_material_name,'Roughness',_texture_ext)
118118
_file_ORM = dks_sp_get_texture_file(_textures_path,_obj_name,_material_name,'OcclusionRoughnessMetallic',_texture_ext)
119+
_file_Opacity = dks_sp_get_texture_file(_textures_path,_obj_name,_material_name,'Opacity',_texture_ext)
119120

120121
_file_Height = dks_sp_get_texture_file(_textures_path,_obj_name,_material_name,'Height',_texture_ext)
121122
_file_Normal = dks_sp_get_texture_file(_textures_path,_obj_name,_material_name,'Normal_OpenGL',_texture_ext)
@@ -331,6 +332,19 @@ def execute(self, context):
331332
node.image = bpy.data.images.load(_file_Roughness)
332333
node.image.colorspace_settings.name = 'Non-Color'
333334

335+
# Opacity
336+
337+
if _file_Opacity:
338+
339+
node=_nodes.new('ShaderNodeTexImage')
340+
node.location = 0,-600
341+
node.name='dks_pbr_texture_opacity'
342+
_material_links.new(node.outputs['Color'], node_shader.inputs['Alpha'])
343+
node.image = bpy.data.images.load(_file_Opacity)
344+
node.image.colorspace_settings.name = 'Non-Color'
345+
346+
_material.blend_method = 'CLIP'
347+
334348
# Height
335349

336350
if bpy.context.preferences.addons[__package__].preferences.option_use_height_maps and _file_Height:

screenshots/sp_opacity.png

1.23 MB
Loading

0 commit comments

Comments
 (0)