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

    [Plugin] Material Tools

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

      If you have a long list in a UI dialog you can click in the list pane and then use the up/down arrow keys to scroll to the item you want.
      If you want to jump a long way up/down a list [i.e. to somethings that's off screen!] let's say you are on 'Aardvark' but you want to jump to 'White' then press the W key and it'll jump to the first W - perhaps 'Wheat' [assuming alphanumeric sorting], then you can press the down-arrow until 'White' is the select item...
      It's not perfect... BUT it does allow you to access any item in an overly long list in a standard UI dialog... 🤓

      TIG

      1 條回覆 最後回覆 回覆 引用 0
      • halroachH 離線
        halroach
        最後由 編輯

        @tig said:

        If you have a long list in a UI dialog you can click in the list pane and then use the up/down arrow keys to scroll to the item you want.
        If you want to jump a long way up/down a list [i.e. to somethings that's off screen!] let's say you are on 'Aardvark' but you want to jump to 'White' then press the W key and it'll jump to the first W - perhaps 'Wheat' [assuming alphanumeric sorting], then you can press the down-arrow until 'White' is the select item...
        It's not perfect... BUT it does allow you to access any item in an overly long list in a standard UI dialog... 🤓

        For some reason my list is not sorted alphanumerically... but your tip is good to know!

        FlexTools - Super Quick Windows, Doors, Slats...

        1 條回覆 最後回覆 回覆 引用 0
        • TIGT 離線
          TIG Moderator
          最後由 編輯

          If you have an array of strings then array.sort! will sort it...
          I'm unfamiliar with the code producing this list - but it should be easy enough to have an ordered list ??

          TIG

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

            @tig said:

            If you have an array of strings then array.sort! will sort it...

            Since the list of SketchUp material names which is UTF-8 - meaning there can be multi-byte characters. And Ruby's #sort will mangle these characters because it treat each byte as individual characters.

            This is another reason why a WebDialog is better - since one can make a dropdown box with scrollbar and utilize the fact the JS is Unicode compatible. (In addition I have a natural sort algorithm that would ensure that you get numbers in correct order ( 1,2,3,10...etc instead of 1,10,2,3... )

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

            1 條回覆 最後回覆 回覆 引用 0
            • EarthMoverE 離線
              EarthMover
              最後由 編輯

              Thom, possible to add removing materials from all groups and components? Not the materials on the inside surfaces, just anything applied to a group or component itself and replacing it with default?

              3D Artist at Clearstory 3D Imaging
              Guide Tool at Winning With Sketchup
              Content Creator at Skapeup

              1 條回覆 最後回覆 回覆 引用 0
              • TIGT 離線
                TIG Moderator
                最後由 編輯

                Something like

                Sketchup.active_model.definitions.each{|d|next if d.image?;d.instances.each{|i|i.material=nil}}
                

                for every group/instance in the model, ignoring whether visible/locked etc...
                OR

                Sketchup.active_model.selection.each{|e|e.material=nil if(e.is_a?(Sketchup;;Group)||e.is_a?(Sketchup;;ComponentInstance))&& !e.locked?)}}
                

                to process all groups/instances in a selection, ignoring locked ones...
                Copy/paste one-liners into the Ruby Console...

                TIG

                1 條回覆 最後回覆 回覆 引用 0
                • R 離線
                  rv1974
                  最後由 編輯

                  Fantastic tools! 👍 Thank you.
                  What I really miss 😒 is additional script to assign the front faces material to backfaces (at least
                  on geometry with transparent mats).

                  1 條回覆 最後回覆 回覆 引用 0
                  • massimoM 離線
                    massimo Moderator
                    最後由 編輯

                    @rv1974 said:

                    Fantastic tools! 👍 Thank you.
                    What I really miss 😒 is additional script to assign the front faces material to backfaces (at least
                    on geometry with transparent mats).

                    http://sketchucation.com/forums/viewtopic.php?p=155759#p155759

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

                      Transparent.png

                      ❓ ❓

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

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

                        oh... I might have forgotten to upload this little update... 😳

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

                        1 條回覆 最後回覆 回覆 引用 0
                        • R 離線
                          rv1974
                          最後由 編輯

                          @thomthom said:

                          [attachment=0:37kfn04k]<!-- ia0 -->Transparent.png<!-- ia0 -->[/attachment:37kfn04k]

                          ❓ ❓

                          What exactly do you ask?
                          If it's already there (the last line) I for some mystic reason don't have it (the version is updated)
                          If it's a printscreen of the latest future update- it looks awesome (exactly what I mean (if it processes entire model)).
                          P.S. How do you make the printscreen of the dropped down list???

                          1 條回覆 最後回覆 回覆 引用 0
                          • R 離線
                            rv1974
                            最後由 編輯

                            @thomthom said:

                            oh... I might have forgotten to upload this little update... 😳

                            unpardonable forgetfulness
                            💚

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

                              Give me a couple of days. I need to release an update to TT_Lib2 first.

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

                              1 條回覆 最後回覆 回覆 引用 0
                              • R 離線
                                rv1974
                                最後由 編輯

                                Yet another thing:
                                Assign component\group mat to its front faces (to the inner geometry with default mat) would be amazing feature.
                                There's already the great 'remove C-G materials.rb' , something the opposite is also needed.

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

                                  How would you handle groups with faces of multiple materials? It's just not an symmetrical operation.

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

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • R 離線
                                    rv1974
                                    最後由 編輯

                                    @thomthom said:

                                    How would you handle groups with faces of multiple materials? It's just not an symmetrical operation.

                                    Only default material within the would inherit the comp\group mat. The manually set multiple mats would survive.

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

                                      Oh - I misread you. I thought you wanted face material to group materials.

                                      You want the instance materials to be applied to all faces with default material in the group/component? That's already there: "Instance Material to Faces"

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

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • R 離線
                                        rv1974
                                        最後由 編輯

                                        damn how could I miss it.

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • R 離線
                                          rv1974
                                          最後由 編輯

                                          @thomthom said:

                                          Give me a couple of days. I need to release an update to TT_Lib2 first.

                                          ...bump
                                          😒

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

                                            Yeeea.... didn't happen... 😞 I've run into a bug that needs fixing.

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

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

                                            Advertisement