• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Material Tools

Scheduled Pinned Locked Moved Plugins
123 Posts 43 Posters 148.1k Views
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.
  • T Offline
    thomthom
    last edited by thomthom 16 Mar 2009, 14:00

    Overview
    (Previously named "Remove Materials")
    There are some various plugins out there already which removes material from the model. But I had some specific needs which didn't fit so I wrote some extra ones. Thought I'd post them here just in case. There's been other small utitlities I've written which I thought other people would never have any use for, but as it turned out, they did.

    Access
    Plugins > Material Tools

    Features
    Instance Material to Faces
    Recursively transfers the material on groups and components onto the faces inside.
    (Does not take into account instances with different materials applied.)

    Remove From Entire Model
    Removes all materials from all the entities in the model.

    Remove From Selection
    Recursively removes the material from the selected entities.

    Remove From All Edges
    Removes the material from all edges in the model. This is useful for when some edges has a material applied to it preventing the material from being purged.

    Remove From Faces and Edges
    Removes the material from all edges and faces in the model.

    Remove All Backface Materials

    Remove Specific Material
    This will prompt you for which material you would like to remove from the entities in your current selection. I also processes the entities of the groups and components in your selection, but not nested groups or components!

    Remove All Textures
    Strips all materials from the texture.

    List Textures in Console
    Prints out a list of the textures in the model sorted by texture size (number of pixels).

    Apply Colour Adjustments
    Bakes the colour adjustment into the textured materials.

    Ensure Unique Filenames
    Ensures all texture filenames are unique. ( Use at own risk! )

    Paint roof
    Applies the current material to non-vertical surfaces.

    Transparent Material to Backside
    Transfers transparent front side materials from to the backside.

    Requirements

    • SketchUp 7 or newer - ( Other versions untested )
    • TT_Lib2 (v2.7.0)

    Link Preview Image
    SketchUp Plugins | PluginStore | SketchUcation

    SketchUp Plugin and Extension Store by SketchUcation provides free downloads of hundreds of SketchUp extensions and plugins

    favicon

    (sketchucation.com)

    Footprint

    http://forums.sketchucation.com/download/file.php?id=53762
    <Sketchup>/Plugins/
    +-
    http://forums.sketchucation.com/download/file.php?id=53763
    tt_material_tools.rb


    http://forums.sketchucation.com/download/file.php?id=53761

    Thomas Thomassen β€” SketchUp Monkey & Coding addict
    List of my plugins and link to the CookieWare fund

    1 Reply Last reply Reply Quote 0
    • H Offline
      Heven7_floor
      last edited by 16 Mar 2009, 15:22

      Thanks very much Thom
      I doubt and wait the script like this for a long time, it is usefully for specific mat. what need edit/remove πŸ‘

      1 Reply Last reply Reply Quote 0
      • J Offline
        jim smith
        last edited by 16 Mar 2009, 15:43

        Thank you Thomas. I will find this useful.

        "Out of clutter find simplicity,
        from discord find harmony,
        In the middle of difficulty lies opportunity"
        Albert Einstein

        1 Reply Last reply Reply Quote 0
        • C Offline
          Chris Fullmer
          last edited by 16 Mar 2009, 15:57

          @thomthom said:

          There's been other small utitlities I've written which I thought other people would never have any use for, but as it turned out, they did.

          Funny how that works! My most involved script so far has been a script that started off drawing a vertical line. 🀣

          And so it is with this, it will be quite useful to many, thanks a bunch!

          Chris

          Lately you've been tan, suspicious for the winter.
          All my Plugins I've written

          1 Reply Last reply Reply Quote 0
          • C Offline
            craigbic
            last edited by 16 Mar 2009, 17:45

            Excellent! Can't have too many options for removing materials. Thank you! πŸ˜„

            Checkout the Sketchup Graphics Blog at http://sketchupgraphics.com

            1 Reply Last reply Reply Quote 0
            • I Offline
              ilovesally99
              last edited by 31 Mar 2009, 08:42

              thx for sharing
              it solved a lot of problem!

              1 Reply Last reply Reply Quote 0
              • W Offline
                wolfy
                last edited by 31 Mar 2009, 13:42

                Thanks Thomthom! Will come in very handy. I was wondering why some mats wouldn't purge so thanks for answering that as well. πŸ˜„ Keep up the great work!

                1 Reply Last reply Reply Quote 0
                • X Offline
                  xjxjordan
                  last edited by 31 Mar 2009, 23:21

                  Thank you so muck

                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    linea
                    last edited by 1 Apr 2009, 05:58

                    Good idea Thom.

                    Thanks

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      Tomi
                      last edited by 9 May 2009, 09:13

                      I apologise for this not being quite the right thread, but you're the man for this, I think...

                      I have a thoroughly complex model, imported from Autocad where every individual object was a block and then those blocks nested within a block (e.g. 1st floor structure). Now in Sketchup I want to add materials to what are now components, components nested within components, groups etc. I thought I could do this from the layer window, but, of course, I'm still thinking in Autocad and Sketchup works differently, and I can not change the materials of components and nested components this way.

                      Is there a way to apply materials by layer to components, groups, and nested components? I'm loathed to edit thousands of components individually by double clicking on the component and then using the paint bucket tool.

                      Please help me thomthom!

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        Chris Fullmer
                        last edited by 9 May 2009, 09:23

                        I'll help get the ball rolling...

                        Do you just want a single material applied to the entire component? Like, you want all components named "doorhandle_01" to be painted silver, regardless how deep they are buried?

                        Also, how many DIFFERENT components are there? You say thousands, but is it 10os of copies of only 10 different components? Or is it really thousands of different components?

                        Do you have a sample model you could upload?

                        Lately you've been tan, suspicious for the winter.
                        All my Plugins I've written

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          thomthom
                          last edited by 9 May 2009, 09:27

                          @tomi said:

                          Is there a way to apply materials by layer to components, groups, and nested components? I'm loathed to edit thousands of components individually by double clicking on the component and then using the paint bucket tool.

                          Are you aware of the Color By Layer function from the menu that pops up when you click the button with the arrow icon to tha far right of the layer window? Would that do the trick for you?

                          Thomas Thomassen β€” SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            thomthom
                            last edited by 9 May 2009, 09:30

                            If you want to transfer the layer colours to the geometry, then there's already a plugin out there. Search for " layers_materials" at http://www.sketchucation.com/extensions-index/

                            Thomas Thomassen β€” SketchUp Monkey & Coding addict
                            List of my plugins and link to the CookieWare fund

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              Tomi
                              last edited by 9 May 2009, 09:39

                              Wow. You were quick. I can't upload the whole file because even zipped it is 25MB. Layer by colour... tried that first but it only changed the elements of the drawings that weren't components - namely one or two (the landscaping). The other suggestions sound promising, let me look into them now...

                              P.S. Thanks tremendously.

                              1 Reply Last reply Reply Quote 0
                              • T Offline
                                Tomi
                                last edited by 9 May 2009, 09:55

                                @chris fullmer said:

                                I'll help get the ball rolling...

                                Do you just want a single material applied to the entire component? Like, you want all components named "doorhandle_01" to be painted silver, regardless how deep they are buried?

                                Also, how many DIFFERENT components are there? You say thousands, but is it 10os of copies of only 10 different components? Or is it really thousands of different components?

                                Do you have a sample model you could upload?

                                Yes. I'd like to apply a single material to a component, regardless of how deep they are buried.

                                Yep, there's thousands of separate components all made to create a building. I've uploaded a zipped file of just the structure. Added to this is secondary structure, claddings, windows, stairs, floors - essentially every element of the entire build (right down to silly things that I probably shouldn't have detailed, like the rubber seals in between the panes of double glazing). The plan is to do an exploded perspective along the way (I'd love it if there was a plugin for this!).


                                Structure.skp.zip

                                1 Reply Last reply Reply Quote 0
                                • T Offline
                                  Tomi
                                  last edited by 9 May 2009, 09:59

                                  @thomthom said:

                                  If you want to transfer the layer colours to the geometry, then there's already a plugin out there. Search for " layers_materials" at http://www.sketchucation.com/extensions-index/

                                  I'm going to try this now. Do you know if it applies the layer colours to even geometry nested as components within larger components? Thanks thomthom

                                  1 Reply Last reply Reply Quote 0
                                  • T Offline
                                    Tomi
                                    last edited by 9 May 2009, 10:20

                                    Hang about, sometimes when you're stressed you miss things. I had a little meditation, came back to re-read your first comment, thomthom, and just needed to select layer by colour like you suggested. Thanks a million (and Chris) for your help. It's kind people like you who by sharing, make the world a better place. I didn't need any plugins after all, but as I'm falling back in love with sketchup, how do you load them? I went to the layers_materials plugin page and the link brought up a script...

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      thomthom
                                      last edited by 9 May 2009, 10:29

                                      Place the .rb file in the Plugins folder where SU is installed. Some plugins also include folders that needs to be extracted to the plugin folder as well.

                                      Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                      List of my plugins and link to the CookieWare fund

                                      1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        Sir
                                        last edited by 9 May 2009, 10:40

                                        ok, not actually thousands of components! you have lots of instances, but with the others added you'll only have a hundred or so, maybe 200!

                                        have you found the components window yet? this is a good way to keep track of the components in your model. you can also use it to add materials to specific components by

                                        1. insert a new copy of the component into the model, doesnt matter where
                                        2. add material to that new one. this will update all instances (copys) of it throughout the model
                                        3. delete the inserted component

                                        repeat

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          Tomi
                                          last edited by 9 May 2009, 11:43

                                          @sir said:

                                          ok, not actually thousands of components! you have lots of instances, but with the others added you'll only have a hundred or so, maybe 200!

                                          have you found the components window yet? this is a good way to keep track of the components in your model. you can also use it to add materials to specific components by

                                          1. insert a new copy of the component into the model, doesnt matter where
                                          2. add material to that new one. this will update all instances (copys) of it throughout the model
                                          3. delete the inserted component

                                          repeat

                                          Thanks. Still getting my head round the nitty gritty. Thomthom's simple suggestion achieved what I wanted to do - add materials according to layer - by using the colour by layer option. But that's a great tip - my drawings is mainly organised into layers, but supposedly by this way I could have more control if needed and change individual components on the same layer. Thanks for your help.

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 6
                                          • 7
                                          • 1 / 7
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement