---------------------------------------------------------------------------
Download the latest version of this script here :-
http://www.reformstudios.com/03-reso...atList_0_41.ms
-----------------------------------------------------------------------------
I've started work on a vray material lister, so you can easily find rougue parameters.
Its early days yet, so excuse the poor coding...but can anyone help?
I can't get the table to scale with the size of the window it sits in.
Are there any good tutorials on controlling the ui of a rollout?
Any suggestions appreciated!
The script so far is....
At the moment, I've just got a few parameters listed, but the final script will have a filter to choose whatever relevant parameters you are looking for.
Also, I hope to add the function to edit parameters once I suss it out.
If anyone has any other ideas to make this better, please let me know!
Download the latest version of this script here :-
http://www.reformstudios.com/03-reso...atList_0_41.ms
-----------------------------------------------------------------------------
I've started work on a vray material lister, so you can easily find rougue parameters.
Its early days yet, so excuse the poor coding...but can anyone help?
I can't get the table to scale with the size of the window it sits in.
Are there any good tutorials on controlling the ui of a rollout?
Any suggestions appreciated!
The script so far is....
Code:
--------------------------------------------------------------------------- --MATERIAL LISTER --Beta 0.0.1 --Started 21.02.06 --Code By Patrick Macdonald [email]--mail@reformstudios.com[/email] --------------------------------------------------------------------------- --SHORT DESCRIPTION: --Listing of all scene materials with control over all material properties. --------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------------------- --Define a default layout-- --------------------------- macroScript SceneListView category:"HowTo" ( global listview_rollout rollout listview_rollout "Scene Vray Materials" ( -- Initialise spreadsheet -- Courtesy of Bobo's Spreadsheet Editor fn initListView lv = ( enableAccelerators = false lv.ListItems.clear() lv.Arrange = #lvwAutoLeft lv.View = #lvwReport lv.Appearance = #cc3D --: AppearanceConstants( #ccFlat | #cc3D ) lv.fullRowSelect = true lv.BorderStyle = #ccNone --: BorderStyleConstants( #ccNone | #ccFixedSingle ) lv.FlatScrollBar = false lv.HoverSelection = false lv.TextBackground = #lvwOpaque --: ListTextBackgroundConstants( #lvwTransparent | #lvwOpaque ) lv.gridLines = true lv.view = #lvwReport lv.fullRowSelect = true lv.multiSelect = true lv.labelEdit = #lvwManual lv.hideSelection = false lv.sorted = false lv.sortorder = #lvwAscending lv.hideColumnHeaders = false lv.allowColumnReorder = true lv.HotTracking = false lv.checkboxes = false textColor = ((colorman.getColor #text)*255) as color windowColor = ((colorman.getColor #window)*255) as color lv.backColor = (color windowColor.b windowColor.g windowColor.r) lv.foreColor = (color textColor.b textColor.g textColor.r) cnt = lv.ColumnHeaders.count for i = 1 to cnt do ( lv.ColumnHeaders.remove 1 ) layout_def = #(#("Material Name",120), #("Material Class",120), #("Refl. Glossiness",50), #("Subdivs",50)) for i in layout_def do ( column = lv.ColumnHeaders.add() column.text = i[1] ) LV_FIRST = 0x1000 LV_SETCOLUMNWIDTH = (LV_FIRST + 30) for i = 0 to layout_def.count-1 do windows.sendMessage lv.hwnd LV_SETCOLUMNWIDTH i layout_def[1+i][2] ) -------------------------- -- Enter values into table -------------------------- fn fillInSpreadSheet lv = ( cnt=1 for o in sceneMaterials do ( if isProperty sceneMaterials[cnt] "category" do -- is category defined? ( if sceneMaterials[cnt].category == #VRay do ( li = lv.ListItems.add() li.text = o.name sub_li = li.ListSubItems.add() sub_li.text = (classof o) as string sub_li = li.ListSubItems.add() sub_li.text = try((o.reflection_glossiness) as string)catch("--") sub_li.tooltipText = "reflection_glossiness" sub_li = li.ListSubItems.add() sub_li.text = try((o.reflection_subdivs) as string)catch("--") sub_li = li.ListSubItems.add() ) ) cnt+=1 ) ) ---------- -- MAIN -- ---------- activeXControl lv_objects "MSComctlLib.ListViewCtrl" width:490 height:490 align:#center on listview_rollout open do ( initListView lv_objects fillInSpreadSheet lv_objects ) ) try(destroyDialog listview_rollout)catch() createDialog listview_rollout width:500 height:500 style:#(#style_titlebar, #style_sysmenu, #style_resizing, #style_minimizebox, #style_maximizebox ) )
Also, I hope to add the function to edit parameters once I suss it out.
If anyone has any other ideas to make this better, please let me know!
Comment