π‘ LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Fast way to toggle visibility
-
I am looking for the fast possible way to toggle the visibility of a lot of individual groups or components. I am currently using Set (selection sets) to remember what objects need to be turned on and off, but it is still a little slow when I use the script below on a 100+ groups:
$set.each { | item | item.visible = true }
Any way to speed this process up? Or is this the only way?
Thanks,
NewGuy -
Assign them a Layer and toggle the Layer?
-
Are you using it within a
model.start_operation
with the second argument to true? (disable UI?) -
"model.start_operation"
That was it! Layers was my plan B. Thanks for the quick response.
-
Note that using the second argument only works with SU7+
I use this proxy method:
def self.start_operation(name) model = Sketchup.active_model if Sketchup.version.split('.')[0].to_i >= 7 model.start_operation(name, true) else model.start_operation(name) end end
-
Good point.
Thanks
Advertisement