From 78924196db31f87d9a2fc961223d2dc0e244bad2 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Tue, 13 Jul 2021 17:41:33 +0200 Subject: [PATCH] Material: better warning message if card name is not file name --- src/Mod/Material/importFCMat.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Material/importFCMat.py b/src/Mod/Material/importFCMat.py index 25ade51e9a..6b43218e3a 100644 --- a/src/Mod/Material/importFCMat.py +++ b/src/Mod/Material/importFCMat.py @@ -201,7 +201,10 @@ def write(filename, dictionary, write_group_section=True): # first five lines are the same in any card file, see comment above read def if header["CardName"] != card_name_file: # CardName is the MatCard file name - FreeCAD.Console.PrintMessage("File CardName is used: {}\n".format(card_name_file)) + FreeCAD.Console.PrintWarning( + "The file name {} is not equal to the card name {}. The file name is used." + .format(card_name_file, header["CardName"]) + ) f.write("; " + card_name_file + "\n") # f.write("; " + header["AuthorAndLicense"] + "\n") f.write("; " + header.get("AuthorAndLicense", "no author") + "\n")