sketchucation logo sketchucation
    • 登入
    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!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    [Plugin] Remove group materials, leave geometry material

    已排程 已置頂 已鎖定 已移動 Plugins
    88 貼文 27 Posters 63.6k 瀏覽 27 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • J 離線
      Jackson
      最後由 編輯

      LOL, you guys are a two-man developer and beta team!

      Great work, I'll link this thread over at ASGvis.

      Jackson

      1 條回覆 最後回覆 回覆 引用 0
      • thomthomT 離線
        thomthom
        最後由 編輯

        @jackson said:

        Matthieu,

        You are the man! If you can produce a ruby script which removes group materials and applies them to the default geometry you will save me about 3 day's work on this model alone! I'm trying to update my portfolio so this would be of enormous benefit to me as I've got lots to do and very little time to do it.

        http://i449.photobucket.com/albums/qq215/JacksonPhotobucket/Malm1.jpg

        somewhat off topic, but: where did you get hold of the ground texture?

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

        1 條回覆 最後回覆 回覆 引用 0
        • W 離線
          watkins
          最後由 編輯

          Could someone explain exactly what this script does, and what are the benefits? It would help the technically challenged, like myself.

          Kind regards,
          Bob

          1 條回覆 最後回覆 回覆 引用 0
          • thomthomT 離線
            thomthom
            最後由 編輯

            It makes sure that no materials are applied to groups and components. It will either remove the materials of groups and components or transfer them to the geometry.
            For users of V-Ray for SketchUp it has the benefit of faster parsing time and more reliable outcome as VfSU struggles to get correct data for groups and components with materials applied to them.

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

            1 條回覆 最後回覆 回覆 引用 0
            • W 離線
              watkins
              最後由 編輯

              Thank you Thomas.

              Regards,
              Bob

              1 條回覆 最後回覆 回覆 引用 0
              • J 離線
                jds
                最後由 編輯

                Matt666

                i havent tried your plugin just like to thank you for giving this solution

                i already stop using the latest vray bec. of some issues but if this plugin will work wow thank you so much 🎉

                1 條回覆 最後回覆 回覆 引用 0
                • thomthomT 離線
                  thomthom
                  最後由 編輯

                  Matt; You could benefit from using the extra speedboost argument for the start_operation method which was introduced in SU7.

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

                  1 條回覆 最後回覆 回覆 引用 0
                  • M 離線
                    Matt666
                    最後由 編輯

                    Yep! First code post updated! Thank you Thomthom...

                    Frenglish at its best !
                    My scripts

                    1 條回覆 最後回覆 回覆 引用 0
                    • Didier BurD 離線
                      Didier Bur
                      最後由 編輯

                      Hi Matt,
                      Is this version only for v7 or does it run under v6 too ?

                      DB

                      1 條回覆 最後回覆 回覆 引用 0
                      • M 離線
                        Matt666
                        最後由 編輯

                        Hi Didier!
                        This update works with both versions.

                        if Sketchup.version[0,1].to_i >= 7
                          model.start_operation("Remove comp & group materials",true)
                        else
                          model.start_operation("Remove comp & group materials")
                        end
                        

                        Thank you for the remark 😉

                        Frenglish at its best !
                        My scripts

                        1 條回覆 最後回覆 回覆 引用 0
                        • Didier BurD 離線
                          Didier Bur
                          最後由 編輯

                          Merci,
                          C'était pour savoir comment l'indexer sur mon site.

                          DB

                          1 條回覆 最後回覆 回覆 引用 0
                          • thomthomT 離線
                            thomthom
                            最後由 編輯

                            I have a suggestion for an improvement. An option to make components painted with different materials into unique components.

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

                            1 條回覆 最後回覆 回覆 引用 0
                            • M 離線
                              Matt666
                              最後由 編輯

                              Hi thomthom!
                              Sorry for the delay! Great idea! O've updated the code.
                              I've tested it veeery quickly....
                              The plugin post is up-to-date.

                              Frenglish at its best !
                              My scripts

                              1 條回覆 最後回覆 回覆 引用 0
                              • M 離線
                                Matt666
                                最後由 編輯

                                Thank you Jackson 😄

                                Frenglish at its best !
                                My scripts

                                1 條回覆 最後回覆 回覆 引用 0
                                • J 離線
                                  Jackson
                                  最後由 編輯

                                  Amazing work Matthieu! 👍 👍

                                  Jackson

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • J 離線
                                    Jackson
                                    最後由 編輯

                                    Sorry Matthieu, I just ran a test and this isn't working, or at least it's not working at all as I would like. It doesn't create distinct components according to colour as ThomThom suggested- after running it on 3 identical car components which I'd painted different colours it just turned them all blue and they are still intances of the same component. I don't understand the logic behind the new colour choice for default either (personally I don't like ruby scripts to use their own material libraries, as I keep very strict control over my materials libraries, but that's another story). Surely this feature overrides the whole point of the original script i.e. that it replaces the default material applied to geometry within groups and components with the material which has been applied to the groups or component. Now all the geometry with default material applied turns a new global colour, which make the script useless for V-Ray users.

                                    Sorry for the criticism, hopefully you understand it is intended strictly constructively! I am still your number one fan! 😆

                                    Jackson

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • M 離線
                                      Matt666
                                      最後由 編輯

                                      @unknownuser said:

                                      Sorry for the criticism, hopefully you understand it is intended strictly constructively! I am still your number one fan!
                                      🤣
                                      Sorry for the incovenience...

                                      @unknownuser said:

                                      Surely this feature overrides the whole point of the original script i.e. that it replaces the default material applied to geometry within groups and components with the material which has been applied to the groups or component. Now all the geometry with default material applied turns a new global colour, which make the script useless for V-Ray users.
                                      You can use this new script as the old... Just select Yes, and default. And it will do the same thing! Or I'm completely wrong 😕

                                      In fact I didn't understand Thomthom's request 😳 😳
                                      Here, the update can replace parent material to desired colour. Or replace the default material when you choose No... If you don't understand, tell me... I have a poor english... 😳

                                      Thomthom's request is agood idea... I will see what I can do!

                                      Frenglish at its best !
                                      My scripts

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • J 離線
                                        Jackson
                                        最後由 編輯

                                        Matthieu,

                                        Still not working properly I'm afraid. Despite selecting "Yes" and "Default" 3 differently painted cars all turned red. Can you reattach the original (i.e. pre 17th March) ruby script while you're fixing the new one please? I stupidly overwrote it when I installed your new version and I'll need the old fully-functioning one for work tomorrow!

                                        Thanks again for all your hard work!

                                        Jackson

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • M 離線
                                          Matt666
                                          最後由 編輯

                                          This is normal your 3 differently painted cars all turned red. I didn't understand thomthom's request (my poor english 😢 )... The last one works like the precedent: It puts comp material on geometry, but it doesn't make different color component unique! No need to re-attach the original.
                                          And I also lost this one 😲 !! However I'm sure this last update can do what precedent version was able to!
                                          A future version will be able to do what thomthom want...

                                          Frenglish at its best !
                                          My scripts

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • J 離線
                                            Jackson
                                            最後由 編輯

                                            Ahh, I see... so I can continue using the current ruby script, just as long as I don't have identical components with different materials applied to them.

                                            One further suggestion for the next version though (I bet you wish you'd never started now!)- the Yes/No selection should be set to "Yes" as default or just set up as an "OK?" warning message as it was before, as it's rather irritating to have to change it every time you run the script (which in my case is many times daily). If the end user didn't want to apply the C-G materials to the geometry they wouldn't have chosen to run the script! 😄 I think the warning is sensible though so people know they are applying a permanent change to their entire skp file.

                                            Jackson

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 2 / 5
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement