I want to append a material from another blend file, but I have problems to get the appended materail:
#This works fine
with bpy.data.libraries.load(self.blendpath, link=False) as (data_from, data_to):
data_to.materials = ["myTestMaterial"]
#This is the problem maker
mat = bpy.data.materials.get("myTestMaterial")
The problem is that the new material is named "myTestMaterial001" after I run the script for the secound time, is there a way to get the material object directly?