--- maxscript: xrefSceneManager --- author: Andrei Kletskov (111) - http://andklv.narod.ru - andklv@mail.ru --- description: this script provides a tiny interface for managing xrefscenes (in fact it just enables/disables xrefscenes, more functionality can be added later) --- history: -- v0.1 - 14 december 2009 - inital version -- v0.2 - 03 dec 2019 - screen update added and a button for the large xrefscene manager added, left click - hide/unhide, right click - on/off incr = 13 rollout ak_about "v0.2" width:120 height:80 ( label lbl3 "(c) 2009 - 2019" pos:[5,5] width:100 height:20 label lbl4 "Andrei Kletskov (111)" pos:[5,20] width:110 height:20 label lbl5 "http://andklv.narod.ru" pos:[5,35] width:110 height:20 label lbl6 "andklv@rambler.ru" pos:[5,50] width:100 height:20 ) rollout xsm "xrefSM" width:120 height:106 ( listbox lb items:#("-empty-") readOnly:false width:116 pos:[2,20] height:6 button btn_refresh "r" pos:[2,2] width:16 height:16 button btn_about "a" pos:[54,2] width:16 height:16 button btn_grow "+" pos:[102,2] width:16 height:16 button btn_shrink "-" pos:[86,2] width:16 height:16 button btn_mngr "m" pos:[28,2] width:16 height:16 on btn_mngr pressed do actionMan.executeAction 0 "40368" on btn_shrink pressed do ( xsm.height = xsm.height - incr lb.height = lb.height - incr ) on btn_grow pressed do ( xsm.height = xsm.height + incr lb.height = lb.height + incr ) on btn_about pressed do ( createdialog ak_about ) on lb selected arg do ( xf = xrefs.getXRefFile arg xf.hidden = not xf.hidden btn_refresh.pressed() --redrawViews() ) on lb rightClick arg do ( xf = xrefs.getXRefFile arg xf.disabled = not xf.disabled btn_refresh.pressed() --redrawViews() ) on lb doubleClicked arg do ( actionMan.executeAction 0 "40368" -- File: XRef Scenes ) on btn_refresh pressed do ( redrawViews() xc = xrefs.getXRefFileCount () if xc > 0 then ( ta = #() for i =1 to xc do ( xf = xrefs.getXRefFile i st = xf.hidden std = xf.disabled if st == true then sst = "-" else sst = "v" if std == true then sst = "d" str = (sst + " " + (filenameFromPath xf.filename) as string) append ta str ) lb.items = ta ) else lb.items = #() ) ) --rf = newRolloutFloater "111_xsm" 130 236 --addRollout xsm rf --addRollout ak_about rf --ak_about.open = 0 createdialog xsm xsm.btn_refresh.pressed()