Skip to content

Commit 1dc7006

Browse files
committed
1_8_6
fixed checked material error
1 parent ef38a76 commit 1dc7006

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

__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, 8, 5),
23+
"version": (1, 8, 6),
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: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,16 @@ def execute(self, context):
583583
_export_project = _export_path + _export_name + '.spp'
584584

585585
for _obj in bpy.data.collections[_export_name].all_objects:
586+
586587
if _obj.type=='MESH':
588+
587589
_obj.select_set(True)
588590

589-
if bpy.context.preferences.addons[__package__].preferences.option_create_materials:
590-
_checked = dks_sp_check_material()
591-
591+
if bpy.context.preferences.addons[__package__].preferences.option_create_materials:
592+
593+
if len(_obj.data.materials)==0:
594+
_created = dks_sp_create_material(_obj)
595+
592596
if bpy.context.preferences.addons[__package__].preferences.option_export_type=='obj':
593597
_export_file = dks_sp_obj_export_sel(self, context, _export_name)
594598
elif bpy.context.preferences.addons[__package__].preferences.option_export_type=='fbx':

0 commit comments

Comments
 (0)