Simple Light include with wildcards
Hi there,
I am very slowly learning maxscript and would like to add a function to a light utility I created.
I am after 1 button which will create (or merge) a light with my settings, which I can do - but I would like it to add an include list for all objects that contain a keyword.
I am guessing I would need to create an array from the wildcard results and add that to the include list, but I'm having a hard time getting started.
All I have managed so far is:
$Lightname.includeList = testarray
-Using this I get no errors, but I also don't get that array added to my include list.
Any help would be muchly appreciated.
Thanks in advance.
Comments
ah ha!
Yep that works brilliantly,
I had tried creating the testarray previously, but I had obviously done it wrong (I didnt use 'as Array') and I also had no idea about how to select using keywords.
Thanks for your help br0t!
Mhm it should error if
Mhm it should error if "testarray" has not been created and filled with an array before. If I have an "Omni001" light and a bunch of objects in my scene, that have the keyword "buzzaloo" in their name and use this code:
it works fine for me.
Cheers
Never get low & slow & out of ideas