In C++ you do this to set the diffuse ui mapping (should be simple to port this to python):
diffuseParamDef.GetAttributes().Set(L"{8C80DEF3-1064-11d3-B0B7-00A0C982A112}", L"{3515CC72-082C-11D0-91DE-00A024C78EE3}"); The GUID "{8C80DEF3-1064-11d3-B0B7-00A0C982A112}" means "ui mapping". The GUID "{3515CC72-082C-11D0-91DE-00A024C78EE3}" is the XSI GUID for diffuse. GUIDs for other shader parameters (like spec etc..) can be found by looking at the ui mapping lines in material-phong.spdl. -Nicolas On Fri, Jul 26, 2013 at 9:13 AM, Vincent Ullmann < vincent.ullm...@googlemail.com> wrote: > Becouse it partly fits on this Topic: > > Does anyone know how to set the Viewport-Mapping in a > Python-ShaderDefinition? > > In a SPDL-File you can set a it via > ui "mapping" > > Is there a similar function for Python? > > > > Am 26.07.2013 18:08, schrieb Vladimir Jankijevic: > > like this: paramOptions.SetDefaultValue( [0.5, 0.3, 0.2] ) > > > On Fri, Jul 26, 2013 at 6:05 PM, Stefano Jannuzzo < > stefano.jannu...@gmail.com> wrote: > >> Hi folks. >> In a shaderdef define function, I can create a color param and set its >> default value to a mid gray by >> >> paramOptions = XSIFactory.CreateShaderParamDefOptions(); >> paramOptions.SetDefaultValue(0.5); >> params.AddParamDef("color", siShaderDataTypeColor3, paramOptions); >> >> Any idea how to set each channel independently? >> Thanks. Stefano >> >> > >