sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    Urasik Extensions | Lots of new extensions to check out Learn More

    Convert All Materials to Default? (Or one of my choosing?)

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    3 Posts 2 Posters 782 Views 2 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.
    • S Offline
      scmc872
      last edited by

      Hello,

      I am wondering if there is a tool (maybe a plugin) that will convert all of the textures in a model to default. I am tweaking and rendering a few projects from college and my models have a lot of extra materials that I'd like to just convert to default (actually I'd prefer to just convert them all to white).

      I know I can just change the style so they show up that way, but I am exporting the model to kerkythea to render, and the fastest way to work there is to apply materials in sketchup, then use those materials as selections to apply materials in kerkythea. When you have 100's of mats that you neither need, nor know what they are applied to, it makes the application (and more importantly editing and tweaking) of materials very tedious.

      I'd like to just turn everything to default so I can apply glass, metal, concrete, etc. to pertinent in-model items, then render the rest as clay and texture them in post-processing (or leave them).

      So essentially the problem is
      - Too many Materials
      - Too many embedded components to go in and apply materials individually and purge
      - Complexity in sketchup model perpetuates throughout the remainder of render process

      Hopefully someone else has come across the fix I'm looking for.

      Thank you,

      1 Reply Last reply Reply Quote 0
      • TIGT Online
        TIG Moderator
        last edited by

        There are some scripts which can globally change materials...

        But if you want to remove all materials in a model, then this one-liner will work in >=v8...
        Copy+paste into the Ruy Console + <enter>

        m=Sketchup.active_model;m.start_operation('default_ms',true);ms=m.materials;ms.current=nil;ms.to_a.each{|e|ms.remove(e)};m.commit_operation;
        

        It traps for a material being 'current'.
        It is one step undo-able.

        TIG

        1 Reply Last reply Reply Quote 0
        • TIGT Online
          TIG Moderator
          last edited by

          If you want to change to another material in the model - then use a plugin...
          Although it'd be relatively straightforward to make a longer one-liner to do that 'by-name'...

          TIG

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better đź’—

          Register Login
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement