The main problem is that it's not documented and it's actually not discoverable (if you query the ShaderParamDef of the softimage phong, this attribute seems to be hidden). Other than that using GUIDs as attribute names isn't exactly user friendly, but it works.
On Mon, Apr 30, 2012 at 10:14 AM, Steven Caron <car...@gmail.com> wrote: > ugh. you told them that sucks right? > > s > > > On Mon, Apr 30, 2012 at 9:55 AM, Nicolas Burtnyk > <nico...@redshift3d.com>wrote: > >> Got the solution from support and thought I'd post it here in case anyone >> else runs into this. >> >> For plugin-based custom shaders, the equivalent to setting the 'ui >> "mapping"' in an SPDL is to set a special undocumented attribute on the >> ShaderParamDef. The attribute name >> is {8C80DEF3-1064-11d3-B0B7-00A0C982A112} and the value is the GUID for the >> viewport ambient/diffuse/spec/whatever (you can find those from the >> softimage SPDL by searching for ui "mapping") >> >> Example: >> >> inputParamDefs.GetParamDefByName(L"diffuse").GetAttributes().Set(L"{8C80DEF3-1064-11d3-B0B7-00A0C982A112}", >> L"{3515CC72-082C-11D0-91DE-00A024C78EE3}"); >> >> -Nicolas >> >> >> On Thu, Apr 26, 2012 at 7:18 PM, Nicolas Burtnyk >> <nico...@redshift3d.com>wrote: >> >>> Hi everyone, >>> >>> For SPDL-based shaders, one can use the ui "mapping" statement to >>> control the viewport rendering of a shader. >>> Is there an equivalent mechanism for plugin-based shaders? >>> >>> Thanks! >>> >>> -Nicolas >>> >> >> >