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

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

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    3 Posts 2 Posters 682 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 Offline
        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 Offline
          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
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement