Selecting Array through Listview
Question
1.How do I make the listviews selected item associate with the object array when the button "Select" is pressed. So when Select is pressed it then selects the correct array of objects which are defined at the top in the maxscript file.
rollout rlLights "Light Me Up" ( local OutterLights = #($Outter_00,$Outter_01,$Outter_02,$Outter_03,$Outter_04,$Outter_05,$Outter_06,$Outter_07) local InnerLights = #($Sphere009,$Sphere010,$Sphere011,$Sphere012) button btnPrint "Print" width:45 height:14 pos:[84,10] multiListBox mlbxSelSets "Selection Sets: " items:#("OutterLights","InnerLights") pos:[10,10] width:120 height:10 button btnSetMtl "Make Material" width:120 height:20 pos:[10,165] button btn0 "0" width:24 height:20 pos:[10,185] button btn25 ".25" width:24 height:20 pos:[34,185] button btn5 ".5" width:24 height:20 pos:[58,185] button btn75 ".75" width:24 height:20 pos:[82,185] button btn1 "1" width:24 height:20 pos:[106,185] button btnCopy "Copy mtl" width:55 height:20 pos:[10,210] button btnPaste "Paste mtl" width:55 height:20 pos:[75,210] button btnClear "Clear keys" width:120 height:20 pos:[10,235] button btnSelect "Select" width:120 height:20 pos:[10,260] on mlbxSelSets doubleclicked val do ( print "here we go" ) on btnSelect pressed do ( select OutterLights ) on btnPrint pressed do ( clearListener() SelObjects = for i in selection do format "$%," i.name print SelObjects ) ) createDialog rlLights width:140 height:290
Comments
if understand the question...
maybe this can help?
my recent MAXScripts RSS (archive here)
Updated the code
Updated the code, Check it out because its still being funky.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
Hi, I think you can use
Hi,
I think you can use selectionSets for that. If you write something like this in your add button:
and something like this to the doubleclicked event:
it will create a selection set when u press the add button and it will select all items of that set when you doubleclick it in the list.
Regards
Never get low & slow & out of ideas