MAXScript : connecting a OSL Hash/name to another OSL node


#1

I’m trying to connect a OSL: hash/name node to a OSL: random by index node using Maxscript in the SME.
because it has two outputs the normal way isn’t working
(newmat.texmap_self_illumination.input_tex_map.I1_map.index_map.InputNumber_map = OSLMap ()
newmat.texmap_self_illumination.input_tex_map.I1_map.index_map.InputNumber_map.OSLpath = @“W:\03_CGI_library\material libraries\OSL\GetNodeName.osl”).

I noticed when doing it manually that it is adding a hidden map output selector.

anyone know how to use it in the script?


#2

SOLVED:

(newmat.texmap_self_illumination.input_tex_map.I1_map.index_map.InputNumber_map = OSLMap ()
newmat.texmap_self_illumination.input_tex_map.I1_map.index_map.InputNumber_map.OSLpath = @“W:\03_CGI_library\material libraries\OSL\GetNodeName.osl”
newmat.texmap_self_illumination.input_tex_map.I1_map.index_map.InputNumber_map.name = “some name”).

hope this helps someone