sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Material Replacer

    Scheduled Pinned Locked Moved Plugins
    73 Posts 39 Posters 79.1k Views 39 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.
    • thomthomT Offline
      thomthom
      last edited by

      I can't modify the native SketchUp tools I'm afraid.

      As for context menu, I could, but then someone would ask me to reverse it. But I'll see if I can send you a modified version.

      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
        samyell77
        last edited by

        Would really appreciate that - thanks! πŸ˜„

        SU Pro 2016
        Dell Precision M4800
        PC Windows 10
        Intel Core i7-4900MQ @ 2.80ghz
        Nvidia Quadro K2100M
        16gb RAM

        1 Reply Last reply Reply Quote 0
        • S Offline
          samyell77
          last edited by

          Hey Thomthom - don't worry about sending the revised ruby. I hadn't realised that I can invoke plugins using key commands so have set up a keyboard short cut to your material replacer now. Thanks

          SU Pro 2016
          Dell Precision M4800
          PC Windows 10
          Intel Core i7-4900MQ @ 2.80ghz
          Nvidia Quadro K2100M
          16gb RAM

          1 Reply Last reply Reply Quote 0
          • R Offline
            rachitect
            last edited by

            Does this work with SketchUp 8 Pro? I copied the unzipped files into the SketchUp Ruby folder but it is not showing up in the Plugins menu in Sketchup... πŸ˜•

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

              You don't see it there because it's not in the 'Plugins' menu!
              It's in the 'Tools' menu - as 'Material Replacer'...
              πŸ˜’

              TIG

              1 Reply Last reply Reply Quote 0
              • M Offline
                MartinK
                last edited by

                Thanks for a great time saver. πŸ‘

                1 Reply Last reply Reply Quote 0
                • C Offline
                  caronte01
                  last edited by

                  thanks Thomas, I use this plugin a lot!
                  galletas.jpg

                  1 Reply Last reply Reply Quote 0
                  • McGyverM Offline
                    McGyver
                    last edited by

                    Thank you very much for this extremely useful tool! I Just tried it out and it works smoothly and without any trouble! Thank you!

                    [Visit My ShareCG Freebie Gallery](http://www.ShareCG.com/pf/full_uploads.php?pf_user_name)

                    1 Reply Last reply Reply Quote 0
                    • F Offline
                      fullyfledgeded
                      last edited by

                      Hi, great simple little tool works perfectly, except the material being replaced, did not inherit the same scale of the texture. Any ideas?
                      thanks

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        LesZautres
                        last edited by

                        This plug-in does exactly what I expected through a really nicely made UI!
                        Many thanks!

                        1 Reply Last reply Reply Quote 0
                        • NithinN Offline
                          Nithin
                          last edited by

                          I think this plugin can be updated to make this function possible.
                          More details:
                          window frames with different sizes say 4'x3', 2'x3, 5'x2' are present which has same wooden texture(teak). Using this plugin if 4'x3' selected as source material then all other group/model with same dimension(ultimately volume) can be replaced with other material(oak) and other frames should remains unchanged.

                          1 Reply Last reply Reply Quote 0
                          • NithinN Offline
                            Nithin
                            last edited by

                            Hi Thom,

                            with a little guide from TIG here, I manage to update this plugin.

                            I have no knowledge about ruby , not even a basic grammer 😞 , but as I am familiar with other languages like php and C++ , I just gone through the some ruby resources and made this modification.
                            Some minor changes is required as when trying to replace the default material , it is replacing whole model.

                            I am attaching both modified code and skp test file, hope you rectify this minor bug πŸ‘ .


                            http://sketchucation.com/forums/viewtopic.php?f=323&t=55340


                            default material change bug using Material Replacer(Mod)

                            1 Reply Last reply Reply Quote 0
                            • tt_suT Offline
                              tt_su
                              last edited by

                              Thanks. I've added an issue in the BitBucket repo to remind me to merge this: https://bitbucket.org/thomthom/material-replacer/issue/1/merge-user-fix

                              1 Reply Last reply Reply Quote 0
                              • MrMitchellM Offline
                                MrMitchell
                                last edited by

                                I have been exploring the Thea for Sketchup latest build on my Mac at work using SketchupPro2014 and was just playing around with the Thea Materials and Material Replacer this morning and think I have run into a serious problem.

                                I had just added some of the default materials from the Thea library to the sketchup material library and had applied them to some of the components I had been working with earlier.

                                I had applied the materials to the whole components instead of the faces of the components on some, while going inside of the components and adding the materials directly to the faces of the objects on others.

                                I then drew a rectangular plane next to the models to pull the default material color from.

                                Next I successfully used the material replacer to replace the materials applied to the components as a whole from their Thea Material (which was one of the default wood materials) back to the default white/blue sketchup material from the rectangular plane I was pulling from.

                                However when I attempted to replace the materials inside of the components where the faces had been directly painted (using the example 01.mat.thea inside the displacement folder in the Thea Material Library) sketchup hung up.

                                I force quit the program expecting to simply reopen the file, or at least even an earlier version of the file, but to no avail. All I get now when trying to open the file is this error message
                                http://i.imgur.com/R10bA0S.png

                                I even used Time Machine, which pulled versions of the files created earlier... same problem... Could you please shed some light as to how this problem could have occurred, or how I might be able to recover my files?

                                -Thanks

                                1 Reply Last reply Reply Quote 0
                                • tt_suT Offline
                                  tt_su
                                  last edited by

                                  Can you upload or PM the file in question?
                                  Does the backup file work? (the one with the tilde)

                                  1 Reply Last reply Reply Quote 0
                                  • MrMitchellM Offline
                                    MrMitchell
                                    last edited by

                                    Here are the corrupted files. Thankfully I had exported the file as an .obj to render and was able to convert the .obj to a .dae and recomponantize the model back in sketchup... but still... pretty scary.


                                    14016 Salter.skp


                                    AutoSave_14016 Salter.skp


                                    14016 Salter~.skp

                                    1 Reply Last reply Reply Quote 0
                                    • MrMitchellM Offline
                                      MrMitchell
                                      last edited by

                                      None of the files work. Even when I attempted to recover the files using Time Machine, the restored files still were treated like the corrupted files currently in the folder. Here are the recovered files, from the previous evening in case you want to try and poke at them...


                                      14016 Salter.skp


                                      14016 Salter~.skp

                                      1 Reply Last reply Reply Quote 0
                                      • romboutR Offline
                                        rombout
                                        last edited by

                                        @thomthom said:

                                        @unknownuser said:

                                        When I use paint bucket tool to change the material on some object, the UV is reset.

                                        Use the Entity Info to replace materials - then the UV is preserved.

                                        Ive used UV textures to uvmap a mesh, is it still possible to replace the material. It keeps messing up the uv cause the base textures have different scale settings. I have the same material 3times, but they all have different settings though

                                        1 Reply Last reply Reply Quote 0
                                        • JQLJ Offline
                                          JQL
                                          last edited by

                                          Rombout,

                                          You can change materials while keeping the same UV with Fredo Tool's Thrupaint. There's an Icon with a multicolor brush there that does that. That doesn't do it automatically, but you can paint without being inside the group wich is handy.

                                          www.casca.pt
                                          Visit us on facebook!

                                          1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            ronhiatt
                                            last edited by

                                            TT:

                                            Wow! Thanks very much. Great tool that does what it names says. Rare these days.

                                            Ron

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

                                            Advertisement