sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Need some help with scripting - batch apply materials

    Scheduled Pinned Locked Moved Newbie Forum
    sketchup
    6 Posts 3 Posters 475 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V Offline
      valleytin
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • GaieusG Offline
        Gaieus
        last edited by

        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;

        Gai...

        1 Reply Last reply Reply Quote 0
        • V Offline
          valleytin
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • GaieusG Offline
            Gaieus
            last edited by

            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?

            Gai...

            1 Reply Last reply Reply Quote 0
            • V Offline
              valleytin
              last edited by

              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?...

              1 Reply Last reply Reply Quote 0
              • G Offline
                GreyHead
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement