• 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 43 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.
  • J Offline
    jorge2011
    last edited by 4 Oct 2011, 23:09

    Thank you very much. πŸ˜„

    1 Reply Last reply Reply Quote 0
    • I Offline
      irwanwr
      last edited by 29 Nov 2011, 16:38

      thank you very much for this plugins. πŸ‘
      it's very useful for me to keep the file size as small as it could.

      1 Reply Last reply Reply Quote 0
      • H Offline
        halroach
        last edited by 18 Mar 2012, 08:21

        1. Does the 'remove specific material work on textures?

        2. I've got a problem when trying to remove a specific material. Have many many materials in my model and the list of materials in the plugin is not long enough for me to see all of them. Any solution?

        3. The reason I am trying to use this plugin is for removing a material that has a TGA in it (which causes annoying errors when I first open the model). I am not able to find the TGA in the model, but am able to find the material it is in. When I try to right click on the material in the regular materials window, sketchup freezes for 10 seconds or so, and then I see the context menu for only a fraction of a second, and I am not able to actually delete the material. This happens a lot when I have a lot of materials in a model.

        This is a sketchup bug that's been around for quite a long time! Any suggestions?

        1. 'List textures in console' doesn't seem to do anything other than opening the console box, but nothing happens.

        (I'm using latest sketchup pro 8 with windows 7 64bit)

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

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 19 Mar 2012, 08:57

          @unknownuser said:

          1. Does the 'remove specific material work on textures?

          You mean removing texture from material?
          The plugin would remove the material - entirely. Making no distinction if it is textured or not.

          @unknownuser said:

          1. I've got a problem when trying to remove a specific material. Have many many materials in my model and the list of materials in the plugin is not long enough for me to see all of them. Any solution?

          That's a bug in SketchUp. Only way around it is to create a WebDialog instead - which I don't have the time for right now.

          @unknownuser said:

          1. The reason I am trying to use this plugin is for removing a material that has a TGA in it (which causes annoying errors when I first open the model). I am not able to find the TGA in the model, but am able to find the material it is in. When I try to right click on the material in the regular materials window, sketchup freezes for 10 seconds or so, and then I see the context menu for only a fraction of a second, and I am not able to actually delete the material. This happens a lot when I have a lot of materials in a model.

          Have you tried assigning a different texture to that material - if the purpose is to avoid the errors when you open the model? (What does the error say btw?)

          @unknownuser said:

          1. 'List textures in console' doesn't seem to do anything other than opening the console box, but nothing happens.
            Huh! I see that as well. Sure is a bug.

          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
            halroach
            last edited by 19 Mar 2012, 09:38

            1. cool

            2. I imagine the sketchup team is aware of the bug... I really wish I could just mark a bunch of selected materials in one go, and delete them...

            3. That's a good idea! I just unchecked the texture in the material, purged, saved, and the error doesn't appear anymore.
              The error I get looked like this:
              TGA Error - must be from a really old component I downloaded

            4. happy I could be of assistance


            @thomthom said:

            @unknownuser said:

            1. Does the 'remove specific material work on textures?

            You mean removing texture from material?
            The plugin would remove the material - entirely. Making no distinction if it is textured or not.

            @unknownuser said:

            1. I've got a problem when trying to remove a specific material. Have many many materials in my model and the list of materials in the plugin is not long enough for me to see all of them. Any solution?

            That's a bug in SketchUp. Only way around it is to create a WebDialog instead - which I don't have the time for right now.

            @unknownuser said:

            1. The reason I am trying to use this plugin is for removing a material that has a TGA in it (which causes annoying errors when I first open the model). I am not able to find the TGA in the model, but am able to find the material it is in. When I try to right click on the material in the regular materials window, sketchup freezes for 10 seconds or so, and then I see the context menu for only a fraction of a second, and I am not able to actually delete the material. This happens a lot when I have a lot of materials in a model.

            Have you tried assigning a different texture to that material - if the purpose is to avoid the errors when you open the model? (What does the error say btw?)

            @unknownuser said:

            1. 'List textures in console' doesn't seem to do anything other than opening the console box, but nothing happens.
              Huh! I see that as well. Sure is a bug.

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

            1 Reply Last reply Reply Quote 0
            • T Offline
              TIG Moderator
              last edited by 19 Mar 2012, 10:41

              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 Reply Last reply Reply Quote 0
              • H Offline
                halroach
                last edited by 19 Mar 2012, 13:18

                @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 Reply Last reply Reply Quote 0
                • T Offline
                  TIG Moderator
                  last edited by 19 Mar 2012, 13:57

                  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 Reply Last reply Reply Quote 0
                  • T Offline
                    thomthom
                    last edited by 19 Mar 2012, 14:08

                    @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 Reply Last reply Reply Quote 0
                    • EarthMoverE Offline
                      EarthMover
                      last edited by 11 Aug 2012, 12:27

                      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 Reply Last reply Reply Quote 0
                      • T Offline
                        TIG Moderator
                        last edited by 11 Aug 2012, 12:43

                        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 Reply Last reply Reply Quote 0
                        • R Offline
                          rv1974
                          last edited by 16 Jan 2013, 07:27

                          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 Reply Last reply Reply Quote 0
                          • massimoM Offline
                            massimo Moderator
                            last edited by 16 Jan 2013, 07:44

                            @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 Reply Last reply Reply Quote 0
                            • T Offline
                              thomthom
                              last edited by 16 Jan 2013, 08:47

                              Transparent.png

                              ❓ ❓

                              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 16 Jan 2013, 10:30

                                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 Reply Last reply Reply Quote 0
                                • R Offline
                                  rv1974
                                  last edited by 16 Jan 2013, 10:30

                                  @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 Reply Last reply Reply Quote 0
                                  • R Offline
                                    rv1974
                                    last edited by 16 Jan 2013, 11:01

                                    @thomthom said:

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

                                    unpardonable forgetfulness
                                    πŸ’š

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      thomthom
                                      last edited by 16 Jan 2013, 11:58

                                      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 Reply Last reply Reply Quote 0
                                      • R Offline
                                        rv1974
                                        last edited by 17 Jan 2013, 08:01

                                        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 Reply Last reply Reply Quote 0
                                        • T Offline
                                          thomthom
                                          last edited by 17 Jan 2013, 08:49

                                          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 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 6
                                          • 7
                                          • 5 / 7
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement