• Login
sketchucation logo sketchucation
  • Login
โ„น๏ธ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

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

Scheduled Pinned Locked Moved Plugins
6 Posts 4 Posters 2.6k Views
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 14 Feb 2009, 05:07

    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 14 Feb 2009, 05:17

      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 14 Feb 2009, 05:53

        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
        • T Offline
          thomthom
          last edited by 15 Feb 2009, 18:33

          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
          • R Offline
            RayOchoa
            last edited by 15 Feb 2009, 18:39

            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
            • T Offline
              thomthom
              last edited by 17 Feb 2009, 12:04

              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
              1 / 1
              • First post
                1/6
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement