import rhinoscriptsyntax as rs
objs=rs.GetObjects("Select objects",preselect=True)
if objs:
rs.EnableRedraw(False)
layers=set()
for obj in objs: layers.add(rs.ObjectLayer(obj))
for layer in layers: rs.ObjectsByLayer(layer,True)
Suddenly it worked again and I finally understood why after a few tests. If the layer of the selected object(s) is or are in a folder that is not expanded, the command wonât work at all⌠but if on the layer panel you expand it, select an object and do sellayer it works!
(I donât know what changed about layer folders but they are very slow to expand as well)
Still the purpose of folders in layer panel are to keep some closed, so this shouldnât happen, right?
Hi -
Can you post a simple file with which you can reproduce this behavior? Also, please run the Rhino SystemInfo command and copy-paste the result here.
-wim
Hello,
Sure, here is a new rhino8 file with only a few curves in it. The curves are on layer 04 that is in the collapsed layer 02 : Curves_sellayer.3dm (66.1 KB)
Still the same problem occurs with the sellayer command.
And here is my SystemInfo :
Rhino 8 SR2 2023-12-12 (Rhino 8, 8.2.23346.13001, Git hash:master @ dbefe46c12cda06610a9ab683a211aa3d16f0030)
License type: Commercial, build 2023-12-12
License details: Cloud Zoo
Windows 11 (10.0.22621 SR0.0) or greater (Physical RAM: 32Gb)
.NET 7.0.0
Computer platform: LAPTOP - Plugged in [99% battery remaining]
Hybrid graphics configuration.
Primary display: Intel(R) Iris(R) Xe Graphics (Intel) Memory: 1GB, Driver date: 12-12-2022 (M-D-Y).
> Integrated graphics device with 4 adapter port(s)
- Windows Main Display is laptop's integrated screen or built-in port
Primary OpenGL: NVIDIA GeForce RTX 3070 Ti Laptop GPU (NVidia) Memory: 8GB, Driver date: 12-6-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 546.33
> Integrated accelerated graphics device with 4 adapter port(s)
- Video pass-through to primary display device
OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU's maximum)
Anti-alias mode: 8x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High
Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 12-6-2023
Driver Version: 31.0.15.4633
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8 GB
Rhino plugins that do not ship with Rhino
Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp "Commands" 8.2.23346.13001
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp "Renderer Development Kit"
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp "Rhino Render" 8.2.23346.13001
C:\Program Files\Rhino 8\Plug-ins\RhinoRender.rhp "Legacy Rhino Render"
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp "RDK_EtoUI" 8.2.23346.13001
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp "Snapshots"
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp "MeshCommands" 8.2.23346.13001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp "RhinoCycles" 8.2.23346.13001
C:\Program Files\Rhino 8\Plug-ins\RhinoCode\RhinoCodePlugin.rhp "RhinoCodePlugin" 8.2.23346.13001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp "Toolbars" 8.2.23346.13001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp "3Dconnexion 3D Mouse"
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp "Displacement"
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp "SectionTools"
If I run the SelLayer command on your file here in V8 (8.4SRC) and chose Layer 04 in the list, all the curves select. Maybe try updating to the current Service Release Candidate and see if that helps?
OK, I manually updated to 8.3. (Everythingâs greyed out in the update tab in settings.)
Now sellayer command works again with preselected objects without moving the mouse !
Thanks a lot !
Sorry that it was just about an updateâŚ