mirror of
https://github.com/DarklightGames/io_scene_psk_psa.git
synced 2025-01-31 19:55:26 +01:00
A blank material is now created if it is unable to be loaded via the BDK.
This commit is contained in:
parent
25e1b73fc7
commit
7111a536b2
@ -140,6 +140,10 @@ def import_psk(psk: Psk, context, options: PskImportOptions) -> PskImportResult:
|
||||
material_reference = psk.material_references[material_index]
|
||||
if material_reference and bpy.ops.bdk.link_material(reference=material_reference) == {'FINISHED'}:
|
||||
material = bpy.data.materials[material_name]
|
||||
else:
|
||||
# Just create a blank material.
|
||||
material = bpy.data.materials.new(material_name)
|
||||
material.use_nodes = True
|
||||
mesh_data.materials.append(material)
|
||||
|
||||
bm = bmesh.new()
|
||||
|
Loading…
x
Reference in New Issue
Block a user