enable mcpl from the python layer

if the source filename ends with mcpl use that
This commit is contained in:
Erik B Knudsen 2022-10-12 19:30:38 +02:00
parent 4623cb4c9c
commit e3f1bdaca1

View file

@ -223,7 +223,10 @@ class Source:
if self.particle != 'neutron':
element.set("particle", self.particle)
if self.file is not None:
element.set("file", self.file)
if (self.file.endswith('.mcpl')):
element.set("mcpl", self.file)
else:
element.set("file", self.file)
if self.library is not None:
element.set("library", self.library)
if self.parameters is not None: