sketchucation logo sketchucation
    • Login
    🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

    [REQ]: Select All Objects With 'Default Material'

    Scheduled Pinned Locked Moved Plugins
    6 Posts 4 Posters 2.6k Views 4 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.
    • K Offline
      kwistenbiebel
      last edited by

      Hi Ruby masters,

      This is bothering me for a very long time now.
      By context clicking, we can easily do 'select all with same material', but it doesn't work for geometry that has the 'Default Material'. It almost feels like a bug, so I was wondering if a ruby could be made for it.

      Thank you in advance.

      Kwistenbiebel

      1 Reply Last reply Reply Quote 0
      • W Offline
        Whaat
        last edited by

        Sketchup.active_model.active_entities.each {|e| Sketchup.active_model.selection.add(e) if e.material==nil}
        

        SketchUp Plugins for Professionals

        1 Reply Last reply Reply Quote 0
        • K Offline
          kwistenbiebel
          last edited by

          Thank you Whaat ...and such a fast reply . 👍

          I don't know what to do with the code, but I'll find out. It must have something to do with copy pasting it in the ruby console right ?

          Would it difficult for me to make it into a ruby that I can use by context clicking geometry?
          (I am such a ruby noob 😳 )

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

            Someone at work asked me about this on friday. I did the same thing as Whaat posted, typing it into the ruby console.
            (it was to assign a colour to all default materials so it could be rendered properly in V-Ray)

            I was planning on writing it into a ruby on monday.

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

            1 Reply Last reply Reply Quote 0
            • RayOchoaR Offline
              RayOchoa
              last edited by

              WHen you do can you post the ruby file here? 😛

              CaR DeSiGnS bY mE
              http://ray-ochoa.com

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

                I added selection filter for entities with default materials to my Selection Toys plugin. http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=14975

                You'll find the commands from the context menu when you do a selection.

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

                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