Wish: keep selection of 'unlock selected objects'

Hi,

I unlock some objects and miss that the selection is kept for further editing like applying a material. Could be nice if this little feature could be added.

Thanks,
Micha

Hi Micha,

Good wish.
For now it can be done with this nifty Python script:

import rhinoscriptsyntax as rs

def SelectUnlocked():
    all_start = rs.NormalObjects()
    rs.Command('!_UnlockSelected ')
    rs.SelectObjects([obj for obj in rs.NormalObjects() if not obj in all_start])

SelectUnlocked()

Hi Willem,

thank you for your script. Can python scripts direct copied to a button?

Ciao,
Micha

Hi Micha,

This should work as a button macro:

! _-RunPythonScript (  
import rhinoscriptsyntax as rs

def SelectUnlocked():
    all_start = rs.NormalObjects()
    rs.Command('!_UnlockSelected ')
    rs.SelectObjects([obj for obj in rs.NormalObjects() if not obj in all_start])

SelectUnlocked()
)

source:
Run scripts on Windows Rhino

HTH
-Willem

Works like missed. Thank you very much. :slight_smile:

missed?

Anyway good to hear it works!
-Willem

I mean like I missed before. :slight_smile:

1 Like