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

    Purge material or find material

    Scheduled Pinned Locked Moved Plugins
    15 Posts 6 Posters 632 Views 6 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.
    • tt_suT Offline
      tt_su
      last edited by

      Anyone have a sample model to share?

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

        A Material will only Purge if it is unused [and of course it is not the active-material].

        A Material is 'used' if it has been applied to a face, or an edge, or a group, or a component-instance - even though you may not see it on-screen.

        Also if such an entity has been assigned an OFF Layer or is set 'Hidden' [or is a Softened edge], again you won't see it, but the Material is 'used'.

        A Material is also 'used' if it is applied to any of the above entity types within a Component definition - even if that definition itself is unused.
        Purge the Components to remove unused definitions, then Purge the Materials to resolve that.

        You can also Delete a Material from the Browser's pop-out context-menu - even if that Material is in use - it then reverts any entity which had used the deleted-material to be assigned the default-material.

        TIG

        1 Reply Last reply Reply Quote 0
        • kenK Offline
          ken
          last edited by

          Thanks everyone for your reply.

          I had a model that I wanted to export to CAD. I wanted to make the file smaller, so I purge all unused components, then purge unused materials. However, in the material browser I found about 30 materials that did not purge. Now, since I purged all unused components, I would have thought that selecting the whole model, I would have purge all materials. Didn't happen.

          So I used TomTom Material Tools. This plugin purged all materials expect one yellow. That I just deleted.

          So I was wondering if there was a plugin that would find the component that was using a selected material. Just wanted to see where the material was hiding.

          I would have search the Ruby Library Depot, however the server seems to be down.

          My real problem is in SU 2014 I can't seem to export to CAD without hidden lines being shown. I can do this in SU 2013 but not in SU 2014. Yes the settings seem to be the same. And yes I have requested help from Thrimble's SU 2014 team.

          So thanks for your replies.

          Ken

          Fight like your the third monkey on Noah's Ark gangway.

          1 Reply Last reply Reply Quote 0
          • ppoublanP Offline
            ppoublan
            last edited by

            @tt_su said:

            Anyone have a sample model to share?

            Attached.
            This model contains only 4 edges. No component.
            None have material applied.
            Material is still not purged.


            material_not_used_not_purged.skp

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

              That's because it's also the currently selected material. The currently selected material won't be purge because SketchUp assume you're about to use it. Select the default material instead and then purge and you should be all set.

              1 Reply Last reply Reply Quote 0
              • kenK Offline
                ken
                last edited by

                @tt_su said:

                That's because it's also the currently selected material. The currently selected material won't be purge because SketchUp assume you're about to use it. Select the default material instead and then purge and you should be all set.

                Thanks TT for your input, that make sense.

                Saw you at BaseCamp, however you were busy. Had a green bowler, but was not brave enough to wear it at basecamp.

                Now got any reason why I can't export to a CAD from SU 2014 and not have the hidden lines showing, like it does in SU 2013?

                Now aren't you sorry you responded.

                Ken

                Fight like your the third monkey on Noah's Ark gangway.

                1 Reply Last reply Reply Quote 0
                • ppoublanP Offline
                  ppoublan
                  last edited by

                  Ok
                  I better understand now.
                  But sometimes difficult to understand the logic of developers : "Used" is not "Selected". As in the other way when a material is selected on Mac and not applied, Materials.current returns nil on Mac, and the material on PC.
                  Someone of SU should clearly define for developers what is "used" material and what is a "selected" material.

                  1 Reply Last reply Reply Quote 0
                  • sdmitchS Offline
                    sdmitch
                    last edited by

                    If all you want to do is get rid of all materials in the model, this one-line will do it.

                    m=Sketchup.active_model.materials;l=m.length-1;l.step(0,-1) do |i| m.remove(m[i].name) end
                    

                    Nothing is worthless, it can always be used as a bad example.

                    http://sdmitch.blogspot.com/

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

                      @ppoublan said:

                      Ok
                      But sometimes difficult to understand the logic of developers : "Used" is not "Selected".

                      Yea, I know what you mean. What I describe is only what I assume was the original "logic" behind it. I didn't confirm it.
                      I have been caught by that myself. In CleanUp I made it deselect the current material before it purges the model in order to prevent exactly this issue.

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

                        @unknownuser said:

                        Saw you at BaseCamp, however you were busy. Had a green bowler, but was not brave enough to wear it at basecamp.

                        Ah, yea, there was so many people I wanted to catch up with - but man that last BaseCamp was busy! Next time you just grab me and we'll chat. 😄

                        @unknownuser said:

                        Now got any reason why I can't export to a CAD from SU 2014 and not have the hidden lines showing, like it does in SU 2013?

                        I'm not sure what we're talking about here... examples?

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

                        Advertisement