I'm trying to get a selectbyname() filter to list all objects with the currently material ( MLister.matIndex[MLister.count] )
The code for the selectbyname is
MLister.vrayMatRC.addControl #Button (("ObjSel" + MLister.count as string) as name) "S"
MLister.vrayMatRC.addHandler (("ObjSel" + MLister.count as string) as name) #'pressed' codeStr:("selectByName filter:objFilter title:\"select objects\"")
and the filter :-
fn obFilter obj = ( obj.material == MLister.matList[MLister.count])
At the moment, when I click the button, I get a "-- Type error: selectByName filter:requires MAXScriptFunction, got: undefined" error. Nothing I do seems to change this!!
Thanks in advance for any help! :)