sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] MaterialConsolidator

    Scheduled Pinned Locked Moved Plugins
    57 Posts 31 Posters 39.4k Views 31 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.
    • GaieusG Offline
      Gaieus
      last edited by

      Thanks TIG for the explanation, it makes sense now. โ˜€


      Ah, and before I forget; many thanks for the plugin, too!

      Gai...

      1 Reply Last reply Reply Quote 0
      • A Offline
        autarchos
        last edited by

        thank you so much TIG! this is a blessing. i can't tell you how many times i've downloaded models from the 3d warehouse which seem to exponentially multiply the list of materials already in my model.

        1 Reply Last reply Reply Quote 0
        • Didier BurD Offline
          Didier Bur
          last edited by

          Hi TIG,

          Are the faces that were painted with a "removed" material repainted with the consolidated one ?
          I mean suppose you have 2 faces, one is painted with material m1 and the other with material m2.
          If the materials have matching properties, one of them is purged, say m2.
          Does the face painted with m2 repainted with the remaining m1 material ?
          Thanks for all your work,

          DB

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

            @didier bur said:

            Hi TIG,

            Are the faces that were painted with a "removed" material repainted with the consolidated one ?
            I mean suppose you have 2 faces, one is painted with material m1 and the other with material m2.
            If the materials have matching properties, one of them is purged, say m2.
            Does the face painted with m2 repainted with the remaining m1 material ?
            Thanks for all your work,

            Yes!
            It ensures that only one material of the exact same 'properties' is used - this means that if m1==m2 then everything*** that used m2 now has m1 and m2 is purged if m1==m2==m3 etc m2 and m3 go and everything is m1...
            ---'everything' means all faces, edges, groups and component-instances etc... in the model and inside definitions too...

            TIG

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              Excellent! ๐Ÿ‘ ๐Ÿ‘

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

              1 Reply Last reply Reply Quote 0
              • soloS Offline
                solo
                last edited by

                Another awesome and needed tool, any possibility to have it available in the 'tools' drop down menu? as typing into ruby consol everytime will require me to remember the command and I have already forgotten it.

                http://www.solos-art.com

                If you see a toilet in your dreams do not use it.

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

                  Awesome! It's time to clean those Augean stables.

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    d12dozr
                    last edited by

                    Sweet! Thanks, TIG!

                    @solo said:

                    Another awesome and needed tool, any possibility to have it available in the 'tools' drop down menu? as typing into ruby consol everytime will require me to remember the command and I have already forgotten it.

                    +1

                    3D Printing with SketchUp Book
                    http://goo.gl/f7ooYh

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

                      Here's v1.1 http://forums.sketchucation.com/viewtopic.php?p=295290#p295290
                      It now has 'Material Consolidator' under the 'Tools' menu...

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • Bob JamesB Offline
                        Bob James
                        last edited by

                        Oh, YES!!

                        Thank you, TIG

                        i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

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

                          Hi TIG!
                          I have some important suggestion. The majority of people working in the 3D field use some prefixes in the mats\layers\camera names. It's extremely helpful to differ my stuff from the others.I for example name all my assets in this way: zzz_blahblah. And everything is inserted in the initial template file.
                          So what I'm asking for is ability to set the default nameprioty directly in the ruby file
                          itself (just to set up it once and forget). In my case zzz_* formula would be dominant.
                          What do you think?

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

                            rv1974

                            At the moment the first material in the database is used in preference to any other matches [the names are not considered just the position in the list], so if you have 'zzz_Material', 'zzz_Material1' and 'xxx_Material99' that are all exact matching 'clones' and 'zzz_Material' is the first one then everything becomes 'zzz_Material' and the others are purged...
                            I can't see how we would use 'prefixes' to sort materials [at the moment, as I said, the name is ignored and its 'order of being created' is used] ๐Ÿ˜•

                            TIG

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

                              Here's v1.2 http://forums.sketchucation.com/viewtopic.php?p=295290#p295290
                              The listing and sorting algorithms have been optimized for speed and command-line/console progress messages added...

                              TIG

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

                                @tig said:

                                rv1974

                                At the moment the first material in the database is used in preference to any other matches [the names are not considered just the position in the list], so if you have 'zzz_Material', 'zzz_Material1' and 'xxx_Material99' that are all exact matching 'clones' and 'zzz_Material' is the first one then everything becomes 'zzz_Material' and the others are purged...
                                I can't see how we would use 'prefixes' to sort materials [at the moment, as I said, the name is ignored and its 'order of being created' is used] ๐Ÿ˜•


                                order of being created is already a nice thing. The workaround is to embed a simple planes matrix with user common used materials applied into initial template.
                                Thank you.

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

                                  @tig said:

                                  @gaieus said:

                                  @tig said:

                                  These are:-

                                  materialType
                                  color RGB
                                  transparency [alpha]

                                  What is a material "type"?
                                  I feel I'm missing something basilar, but I can't find this in the "modify material" window.

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

                                    @rocorona said:

                                    @tig said:

                                    @gaieus said:

                                    @tig said:

                                    These are:-

                                    materialType
                                    color RGB
                                    transparency [alpha]

                                    What is a material "type"?
                                    I feel I'm missing something basilar, but I can't find this in the "modify material" window.

                                    The materialType is accessible via the API - it returns values [0/1/2] depending on if the material is simply a 'plain-color', has a 'texture' or it has a texture and it has been 'colorized'... that's all... http://code.google.com/apis/sketchup/docs/ourdoc/material.html#materialType

                                    TIG

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

                                      TIG, "thanks" for your reply, and "thanks" for your great and valuable work!

                                      1 Reply Last reply Reply Quote 0
                                      • E Offline
                                        Ecuadorian
                                        last edited by

                                        I was thinking about this yesterday, as using FormFonts objects bloats my files with duplicate materials.

                                        Thanks, TIG! ๐Ÿ‘

                                        -Miguel Lescano
                                        Subscribe to my house plans YouTube channel! (30K+ subs)

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

                                          Here's v1.3 http://forums.sketchucation.com/viewtopic.php?p=295290#p295290
                                          It is now wrapped into its own class 'MaterialConsolidator'.

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • H Offline
                                            headshot
                                            last edited by

                                            GR8 !!!
                                            TY.

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

                                            Advertisement