ruby google sketchup plugin - importing textures from a directory
im new here and pretty much brand new to ruby. I am using ruby to write sketchup plugins with the Sketchup module, and i want to import all the image files (textures) from the directory 'C:\Users\(your name)\Pictures\sketchup-textures' and put them into the material list in sketchup, so that i can put them onto my models.
I know that there is a way of manually doing this, but I often need to handle a lot of textures at once, and want to automate the proccess. THANKS!
EDIT:I know i can do this, but it only does one file at a time and only the one i code.
m = materials.add "test1" m2 = materials.add "test2" m.texture = "c:\\Users\\(yourname)\\Pictures\\(file).png" m2.texture = "c:\\Users\\(yourname)\\Pictures\\(file).jpg" texture = m.texture = "c:\\Users\\(yourname)\\Pictures\\(images).png" if (texture) UI.messagebox texture else UI.messagebox "Failure" end