I found the way in jscript after reading
this<https://groups.google.com/forum/#!searchin/xsi_list/color$20parameter$20script/xsi_list/dUrC8i2mpb4/C_gQLRfzpicJ>
var paramDef = params.AddParamDef("scattering_color",
siShaderDataTypeColor3, paramOptions);
var subParamDef = paramDef.SubParamDefs;
subParamDef.GetParamDefByName("red").DefaultValue = 0.2;
subParamDef.GetParamDefByName("green").DefaultValue = 0.4;
subParamDef.GetParamDefByName("blue").DefaultValue = 0.6;
On Fri, Jul 26, 2013 at 8:37 PM, Vincent Ullmann <
[email protected]> wrote:
> "Is this in python?" == True
>
> Am 26.07.2013 20:35, schrieb Stefano Jannuzzo:
>
> Thanks Vincent, Vladimir. Is this in python? It still doesn't work in
> jscript.
>
> On Fri, Jul 26, 2013 at 6:08 PM, Vladimir Jankijevic <
> [email protected]> wrote:
>
>> like this: paramOptions.SetDefaultValue( [0.5, 0.3, 0.2] )
>>
>>
>> On Fri, Jul 26, 2013 at 6:05 PM, Stefano Jannuzzo <
>> [email protected]> 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
>>>
>>>
>>
>
>