FEM: Change default behaviour of ConfigParser used for materials

ConfigParser changes option capital letters in keys to small letters.
That commit changes it to generate verbatim keys as read from FCMat
files. Also Section names are no longer used to generate material
dictionary.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
Przemo Firszt
2015-04-21 19:49:49 +01:00
committed by wmayer
parent 9b2f2b15bc
commit f96f319986
3 changed files with 21 additions and 20 deletions

View File

@@ -57,12 +57,13 @@ def importFCMat(fileName):
"Read a FCMat file into a dictionary"
import ConfigParser
Config = ConfigParser.ConfigParser()
Config.optionxform = str
Config.read(fileName)
dict1 = {}
for section in Config.sections():
options = Config.options(section)
for option in options:
dict1[section+'_'+option] = Config.get(section, option)
dict1[option] = Config.get(section, option)
return dict1