Need some help with scripting - batch apply materials
-
Hi... I've been reading on here for a while and beginning to try and teach myself a bit of ruby (but it'll be a while before I'm at all proficient!)
I've been using sketchup to model products for my company for about a year or so, am able at this point to do what I need to do on a small scale. Now I'm working on a web page where I want to be able to show all of our products with each of the available trim options. The problem is, I've got about 500 models for all of our dimension options. I need to figure out how to easily apply each of 8 materials to each of these models, go to a saved camera scene, and save them as 2-dimensional jpgs, following specified rules for naming them.
Is there anything like this already out there? If not, does anyone have any recommendations as to where I can start?
The page I'm working on, in case anyone wants to see it, is http://metalloarts.com/rangehood-builder/newrhb - all the model drawings were done in skp and exported as jpgs.
Than
-
Hi Than,
I am NOT answering your question here but giving feedbck to the website you have allowed us to visit.
Javascript is fine and OK - until one allows it to work inside his/her browser.
I do. Yet NOT allowing to navigete (say back and forth with the simple bak/forward clicks/buttons) is kind of a "non-user-friendly" mistake which you may consider. I started to browse the site with much interest but then I got fed up with the "non.possibility" to navigete back where I had started from so I quit very soon. I guess this is not what you want.Bestregards;
-
Well, yeah... good point.
I'm replacing a page that was done entirely in PHP, and I consciously decided to use javascript to avoid the browser refresh issues that were slowing the page down so much. The link I posted is just a very roughed-out barebones of the page - I just got enough done to where I can start posting my models.
I'm pretty sure that overriding the browser's 'back' and 'forward' navigation can be done in javascript, although I don't know that I would want to. I will be adding a permalink feature that creates a querystring so that someone can go back to a certain point (something like what google maps does when you email a map to someone).
Does what I'm trying to do in Sketchup sound even possible to you?
-
I think the way should be that you export as many images as many colour variations you want to apply (but from the same viewoint) and just simply change the images as they click on the variations.
Is this what you would like to achieve?
-
Yes, that's exactly what I was planning on doing. The problem is just that I will end up with several thousand files, and it would take me weeks to plow through them all. I'm just wondering if there's any way of batch processing them, either through a ruby script or some other method? Maybe something like photoshop's record actions capability?...
-
You could experiment with Macro Express it's a very versatile Windows Macro tool and can be scripted to do almost anything . . . never tried it with SketchUp though.
Bob
Advertisement