@@ -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 :
0 commit comments