  | | | shader array parameters - spdl example | shader array parameters - spdl example 2004-12-17 - By Haarm-Pieter Duiker
Back Hello, I'm trying to put together an spdl file for an shader that has two array parameters, one string and the other color array. The Defaults section of the declaration seems to override the fact that the parameters are arrays but it's not clear to me how this case is supposed to be handled. Can anyone point me at an example of an spdl file that defines the interface to an array parameter that isn't a light list? Thanks in advance for your help, Haarm-Pieter Duiker PS. This is what I have thus far : #XSI-Wizard SPDL Version = "2.0.0.0"; #Reference = "{1AC592BC-DEA4-11d5-92BD-009027219F81}"; Reference = "{faf30d36-5057-11d9-b85e-000c766f0ed7}"; PropertySet "testColor" { Parameter "out" output { title = "testColor output parameter"; guid = "{4C6879FF-7EC8-11D0-8E3B-00A0C90640EC}"; type = color; flags = 0; texturable = off; } Parameter "nameList" input { title = ""; guid = "{b5b6c25f-5063-11d9-b85f-000c766f0ed7}"; type = array { Parameter "name1" input { title = "Name1"; guid = "{b5b6c260-5063-11d9-b85f-000c766f0ed7}"; type = string; flags = 0; texturable = off; value = ""; } }; } Parameter "valueList" input { title = ""; guid = "{b5b6c261-5063-11d9-b85f-000c766f0ed7}"; type = array { Parameter "value1" input { title = "Value1"; guid = "{b5b6c262-5063-11d9-b85f-000c766f0ed7}"; type = color; flags = 0; texturable = on; value = 0.0 0.0 0.0 0.0; } }; } } MetaShader "testColor_declare" { Name = "testColor"; Type = material, texture; Renderer "mental ray" { Name = "testColor"; Options { "version" = 1; } } } # NOTE: You must use this same GUID when you make your own shader spdls. BEGIN "{24810490-56FF-11d2-BF23-00A0C982CE5D}" Defaults { nameList { Name = "nameList"; Description = ""; UIType = "String"; } valueList { Name = "valueList"; Description = ""; UIType = "rgba",4; } } Layout "Default" { nameList; valueList; } # This optional section allows you to use a different DLL # name than the name of the spdl file. Plugin = Shader { Filename = "testShaders1.0.dll"; } END
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2>Hello,</FONT></SPAN></DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2></FONT></SPAN> </DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2>I'm trying to put together an spdl file for an shader that has two array parameters, one string and the other color array. The Defaults section of the declaration seems to override the fact that the parameters are arrays but it's not clear to me how this case is supposed to be handled.</FONT></SPAN></DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2></FONT></SPAN> </DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2>Can anyone point me at an example of an spdl file that defines the interface to an array parameter that isn't a light list?</FONT></SPAN></DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2></FONT></SPAN> </DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2>Thanks in advance for your help,</FONT></SPAN></DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2>Haarm -Pieter Duiker</FONT></SPAN></DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2></FONT></SPAN> </DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2>PS. This is what I have thus far :</FONT></SPAN></DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2>#XSI-Wizard<BR>SPDL<BR>Version = "2.0.0.0";<BR>#Reference = "{1AC592BC-DEA4-11d5-92BD-009027219F81}";<BR>Reference = "{faf30d36-5057-11d9-b85e-000c766f0ed7}";<BR>PropertySet "testColor"<BR>{<BR> Parameter "out" output<BR> {<BR>   ;title = "testColor output parameter";<BR> guid = "{4C6879FF-7EC8-11D0-8E3B-00A0C90640EC}";<BR> type = color;<BR> flags = 0;<BR> texturable = off;<BR> }<BR> Parameter "nameList" input<BR> {<BR> title = "";<BR> guid = "{b5b6c25f-5063-11d9-b85f-000c766f0ed7}";<BR> type = array<BR> {<BR> Parameter "name1" input<BR> {<BR> title = "Name1";<BR> guid = "{b5b6c260-5063-11d9-b85f-000c766f0ed7}";<BR> type = string;<BR> flags = 0;<BR> texturable = off;<BR>   ;value = "";<BR> }<BR> };<BR> }<BR> Parameter "valueList" input<BR> {<BR> title = "";<BR> guid = "{b5b6c261-5063-11d9-b85f-000c766f0ed7}";<BR> type = array<BR> {<BR> Parameter "value1" input<BR> {<BR> title = "Value1";<BR> guid = "{b5b6c262-5063-11d9-b85f-000c766f0ed7}";<BR> type = color;<BR> flags = 0;<BR> texturable = on;<BR> value = 0.0 0.0 0.0 0.0;<BR> }<BR> };<BR> }<BR>}</FONT></SPAN>< /DIV> <DIV> </DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2>MetaShader "testColor_declare"<BR>{<BR> Name = "testColor";<BR> Type = material, texture;<BR> Renderer "mental ray"<BR> {<BR> Name = "testColor";<BR> Options<BR> {<BR> "version" = 1;<BR> }<BR> }<BR>}</FONT></SPAN></DIV> <DIV> </DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2># NOTE: You must use this same GUID when you make your own shader spdls.<BR>BEGIN "{24810490-56FF-11d2-BF23-00A0C982CE5D}"<BR>Defaults<BR>{<BR> nameList<BR> {<BR> Name = "nameList";<BR> Description = "";<BR> UIType = "String";<BR> }<BR> valueList<BR> {<BR> Name = "valueList";<BR> Description = "";<BR> UIType = "rgba",4;<BR> }<BR>}<BR>Layout "Default"<BR>{<BR> nameList;<BR> valueList;<BR>}</FONT></SPAN></DIV> <DIV> </DIV> <DIV><SPAN class=157372520-17122004><FONT face="Courier New" size=2># This optional section allows you to use a different DLL <BR># name than the name of the spdl file.<BR>Plugin = Shader<BR>{<BR> Filename = "testShaders1.0.dll";<BR>}<BR>END<BR></FONT></SPAN></DIV></BODY></HTML>
|
|
 |