sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Highlighting items in groups or components

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 4 Posters 304 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.
    • Al HartA Offline
      Al Hart
      last edited by

      We would like to find a way for users to identify which geometry they have marked to be lights (or other special features). We can easily select (and highlight) lights at the top level, but many times people want to mark a light bulb or surface in a group or component as a light, and then it is harder to find a way to identify them later (Sometimes people want to see what lights they have already defined)

      Does anyone know any existing scripts which try to find and/or identify things inside of groups or components?

      Or, does anyone have any ideas?

      Al Hart

      http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
      IRender nXt from Render Plus

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

        Let's assume the component definition is known and we called it defn

        
        model=Sketchup.active_model
        ss=model.selection
        ss.clear
        defn.instances.each{|e|ss.add(e)}
        ### this highlights all instances of the component even inside groups or component definitions...
        
        

        Let's assume you want to find the defn from a picked instance...
        You can also code it as a 'tool' to let you pick an instance...

        
        defn=ss[0].definition
        defn.instances.each{|e|ss.add(e)}
        
        

        If you have things with common attributes like 'light' then you could search model.entities/definition.entities for those and highlight them ?
        ??? 🤓

        TIG

        1 Reply Last reply Reply Quote 0
        • Al HartA Offline
          Al Hart
          last edited by

          Interesting TIG...

          I didn't know you could add something to the selection set which was inside of a group or component. Let me give it a try. (I have noticed that people who try things which are not (necessarily) documented, often learn new things... ☀ )

          If it works, I should also be able to add faces which are inside a group to component to the selection set. (People can make a component, group or face glow as a light)

          Al Hart

          http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
          IRender nXt from Render Plus

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

            My Selection Toys plugin allows the user to select all instances of a component/group in a model regardless of nesting.
            There is a quirk selecting groups/components that's not within the active space though - you'll see a ghost bounding boxes.

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

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

              Word of warning doing some things to selected entities that have other parentage can cause bugsplats - e.g just try to move them! Remember to model.selection.clear them afterwards - I have successfully deleted things or changed their layers or materials within definitions so it is possible...

              TIG

              1 Reply Last reply Reply Quote 0
              • R Offline
                RickW
                last edited by

                I've used my SelectionMemory script to do the opposite - select edges outside the space I was in. Specifically, I would group a profile shape, select and "memorize" the edges to be used for FollowMe, then go inside the profile's group and "recall" the edges, then start the FollowMe tool and click on the profile face. It prevents the extruded shape from reacting to the edges of the path - very handy in some cases.

                RickW
                [www.smustard.com](http://www.smustard.com)

                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