@@ -586,8 +586,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
|
||||
# print("read material")
|
||||
|
||||
#print 'elif (new_chunk.ID == MATERIAL):'
|
||||
contextMaterial = bpy.data.add_material('Material')
|
||||
# contextMaterial = bpy.data.materials.new('Material')
|
||||
contextMaterial = bpy.data.materials.new('Material')
|
||||
|
||||
elif (new_chunk.ID == MAT_NAME):
|
||||
#print 'elif (new_chunk.ID == MAT_NAME):'
|
||||
|
||||
@@ -440,8 +440,7 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
|
||||
#Create new materials
|
||||
for name in unique_materials: # .keys()
|
||||
if name != None:
|
||||
unique_materials[name]= bpy.data.add_material(name)
|
||||
# unique_materials[name]= bpy.data.materials.new(name)
|
||||
unique_materials[name]= bpy.data.materials.new(name)
|
||||
unique_material_images[name]= None, False # assign None to all material images to start with, add to later.
|
||||
|
||||
unique_materials[None]= None
|
||||
|
||||
Reference in New Issue
Block a user