I know, I already added it.
But i would like to add some more stuff before to upload it.
I know, I already added it.
But i would like to add some more stuff before to upload it.
I hope you don’t mind , I customized mine a bit … fell free to build on top of it if you want
or tear it apart
Cheer,
Martin
Thanks Martin.
I’m working on the properties Rollout. So i disabled it. My code is really messy now, i’m doing a lot of tests.
I also add an option to edit your script, instead of running it. (The checkbutton in the middle)
I’ve no idea how to update a dotnet treeview.
I m using an ini file to store my folders paths (only the main ones).
And in my properties panel, i can delete them into the ini, but i m wondering how to update it.
I tried by closing and creating my floater again, but it doesn t work, because it can’t find my Rollout or my Floater, since i’m calling them from an other Rollout
BTW Martin, I ll add it on yours
We could all of us, add a tab with some personal special tools in it and make a bigger one from it ^^
I’ve no idea how to update a dotnet treeview.
well, some time ago , I used a timer that checked the file count and updated the list if the count changed but that was on a single folder …don’t know how this would react on that many folder !!
not sure if this is exactly what you mean, but I usually have a function that generates my arrays (say create an array of the folders and files), and then another function that actually tells the treeview to update (actually rebuild) based on those arrays. I then usually have an update button to update my lists…
I used something like this to update the treeview
fn timer_evaluate f =
(
local TheSelectedNodeName = tv.selectednode.text
local FilesCount = f
for f in 1 to SearchDirectory.count do
(
FilesCount += (getFiles (SearchDirectory[f]+"*.ms")).count
)
if Treeview_count != FilesCount do
(
update_treeview()
SelectNodeByName TheSelectedNodeName
)
)
In fact, the little getFilesRecursive func from the maxscript help does gather all of the
subfolder …I was in the impression it gathered just the first subchild …but, no, it seam to work prety well
---------------------------------------------
fn GatherSubFolder Rootfolder =
(
TreeStruct=GetDirectories (Rootfolder+"\\*")
FinalPath=#()
NeedCheck=#()
--//--
if TreeStruct.count != 0 then
(
for f in 1 to TreeStruct.count do
(
if (GetDirectories (TreeStruct[f]+"\\*")).count > 1 then
(
append NeedCheck TreeStruct[f]
)
else
(
append FinalPath TreeStruct[f]
)
)
)
--//--
while NeedCheck.count != 0 do
(
append FinalPath NeedCheck[1]
SubChild=GetDirectories (NeedCheck[1]+"\\*")
--//--
for f in 1 to SubChild.count do
(
append FinalPath SubChild[f]
AppChild=GetDirectories (SubChild[f]+"\\*")
if AppChild.count >= 1 then join NeedCheck AppChild
)
--//--
deleteitem NeedCheck 1
)
--//--
sort FinalPath
)
---------------------------------------------
fn getFolderRecursive root=
(
dir_array=GetDirectories (root+"/*")
for d in dir_array do join dir_array (GetDirectories (d+"/*"))
--//--
sort dir_array
)
---------------------------------------------
xx=yy=undefined
gc()
ProcStart = timestamp()
xx=GatherSubFolder "c:\\"
print xx.count
ProcEnd = timestamp()
format("Processing took : "+(((ProcEnd-ProcStart) / 1000.0)as string)+" Secondes"+"
")
--24747
--Processing took : 4.656 Secondes
gc()
ProcStart = timestamp()
yy=getFolderRecursive "c:\\"
print yy.count
ProcEnd = timestamp()
format("Processing took : "+(((ProcEnd-ProcStart) / 1000.0)as string)+" Secondes"+"
")
--24756
--Processing took : 7.531 Secondes
windows report 24749 by selecting all the files including hidden one and showing property.
well, so who’s right here?..I don’t get it, anyone ? :banghead:
edit : speed is prety much the same …I was not trying to win by filling up memory but still that folder thing is very strange …maybe I got some intruder folder on my pc …can anyone confirm this ?
edit2 : seam the second count is the right one, but that mean the explorer don’t see all the folder that’s weird :curious:
Hi Ruben,
I’ve continued to improve the toolbar , I just added some kind of hack to permit resize of the toolbar and the viewport at the same time
http://www.youtube.com/watch?v=iZeYU9LjrtI
do you guy know of a simple way of doing this because it pretty unstable at the moment , it keep crashing and freezing all the time
do you think it’s a good idea ?
Martin
What the hack is? You can’t change size of window which is registered as dialogBar… UnregisterDialogBar -> Change window size -> RegisterDialogBar back… it’s not a good idea IMHO.