[Closed] frgba type
I have discovered that since max 6 there is frgba type avaible, but unfortunatelly there is no description in the dcumentation for that type. Anybody having knowledge about it?
in short – it’s a color parameter type definition by using point4 value normalized from 0.0 to 1.0, where x,y,z components are r,g,b, and w component is the color alpha.
default corresponding UI control is the ColorPicker with available Alpha
OK thanks, was thinking it could be something like that, but was not shure. Can this type be converted to color? I mean not manually converted.
sure. it’s a benefit of the type… you can simply convert it as “<frgba value> as color”. it will automatically coerce to (point4 value * 255)
Strange, I can´t create instances of frgba, tried frgba() but geting error mesage, also when triing <point3> as frgba geting an other error mesage.
Posibly it´s point4, but don´t think it´s the reason for the error mesage, it looks more like frgba type is not known.
frgba is a sdk c++ paramblock2 type. in MXS it presents as point4. But parameter defined with this type has a default bound UI control – Color Picker.
you can’t create a frgba type value in max script, and can’t convert to this type. But you can define a parameter with this type.
Thanks for explanation. So looks like this type is useles for my purpose, as I just wanted to convert poin3 values to color ones. <poin3> as color returns unfortunately complete usles result, for example: c=[1.0, 1.0, 1.0] as color sets c to black (color 1 1 1), while it should be white (color 255 255 255). Thought by using frgba I could get around this problem, but it´s not the case.