- Fri Jan 31, 2014 5:34 pm
#377400
Hi,
I'm having difficulties to replicate what's happening in the Maxwell Material Editor [Mxed] (Maxwell version 3) from within the Python API. I can store a MXS scene containing for example a simple 'Transparent' material (Global Properties -> Type = Transparent in the Mxed) and load the material extension from there like this:
/Applications/Maxwell 3/extensions/Transparent.xui
/Applications/Maxwell 3/extensions/presets/Transparent.xpr
Can I load those files somehow and use it to create the paramList and change settings from there?
I'm having difficulties to replicate what's happening in the Maxwell Material Editor [Mxed] (Maxwell version 3) from within the Python API. I can store a MXS scene containing for example a simple 'Transparent' material (Global Properties -> Type = Transparent in the Mxed) and load the material extension from there like this:
Code: Select all
But what I really would like to do is to use mat.setMaterialModifierExtensionParams() and somehow make the Python interpreter aware of the material extension. I found files like this:# scene
scene = pymaxwell.Cmaxwell(pymaxwell.mwcallback)
ok = scene.readMXS('Transparent.mxs')
if ok:
mit = pymaxwell.CmaxwellMaterialIterator()
mat = mit.first(scene)
paramList, ok = mat.getMaterialModifierExtensionParams()
param = paramList.getByIndex(3)
paramList.setDouble('Ior', 1.4)
/Applications/Maxwell 3/extensions/Transparent.xui
/Applications/Maxwell 3/extensions/presets/Transparent.xpr
Can I load those files somehow and use it to create the paramList and change settings from there?