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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user