A long standing wish for an Isolate/Unisolate functionality.
I have been using a script for years now and starting work in V6 it immediately strikes me how much I use it.
Basic setup:
Have a (pre-)selection and run Isolate.
it will hide all but the Selected objects
options could include:
Hi Willem - Invert Hide does that bit, itās the Unisolate that takes more typing. I use a (hack-o-rama) script as wellā¦ Iāll add it to the pile, though I think I probably have done that in the dim past.
Some details -
should it be possible to nest Isolate so that you can repeat it as needed and Unisolate works backwards through the pile? I think that was one request and I may even have it that way in the script but if so I donāt use it enough to even remember.
Is it important to save the view at the time of isolation?
Got it. Sounds useful and relatively easy to do in the RhinoCommon based commands plug-in. @piac could probably whip up a command if you are looking for someone to assign the wish list item to.
EDIT, I see there were a lot of replies already, below might be obsolete
See my edit above and below the script I use for it @Pascal it is an adaptation of a script by you, matbe you have already logged this in the bugtracker ad a feature request?
Option Explicit
'Script date Thursday, September 03, 2009
Call Rhino.AddAlias ("PG_Isolate", "!_NoEcho _-Loadscript " & Chr(34) & Rhino.LastLoadedScriptFile & Chr(34))
Call Isolate
Sub Isolate()
Dim str : str = Rhino.GetString("Isolate or Unisolate")
If LCase(str) = "u" Then Call UnIsolateAction()
If LCase(str) = "i" Then Call IsolateAction()
End Sub
Sub IsolateAction()
Dim strSection, strEntry
Dim arrSel, arrObj
arrSel = Rhino.GetObjects("Select objects to isolate",,,True ,True)
If Not isArray(arrSel) Then Exit Sub
Rhino.EnableReDraw(False)
Dim aObj: aObj = Rhino.InvertSelectedObjects(True)
If Not IsArray(aObj) Then
Rhino.EnableReDraw(True)
Exit Sub
End If
Dim aDat, sDat, sHDat, blnHDat, sSection
blnHDat = False
If Rhino.IsDocumentData() Then
aDat = Rhino.GetDocumentData()
For Each sSection In aDat
If sSection = "Iso" Then
sHDat = Rhino.GetDocumentData("Iso", "H_Objects")
If Not isNull(sHDat) Then blnHDat = True
Exit For
End If
Next
End If
Rhino.EnableRedraw(False)
If isEmpty(sHDat) Then
sHDat= Join(aObj, ",")
Else
sHDat = sHDat &"," & Join(aObj, ",")
End If
Call Rhino.HideObjects (aObj)
Call Rhino.SetDocumentData ("Iso", "H_Objects", sHDat)
Rhino.EnableRedraw(True)
End Sub
Sub UnIsolateAction()
Dim sHDat
If Rhino.IsDocumentData() Then
sHdat = Rhino.GetDocumentData("Iso","H_Objects")
If IsNull(sHDat) Then Exit Sub
End If
Rhino.EnableReDraw(False)
Dim aHDat
If Not iSNull(sHDat) Then aHDat = Split(sHDat,",")
If Not IsArray(aHDat) Then
Rhino.EnableReDraw(True)
Exit Sub
End If
If isArray(aHDat) Then Rhino.ShowObjects(aHDat)
Call Rhino.DeleteDocumentData ("Iso", "H_Objects")
Rhino.EnableReDraw(True)
End Sub
I do not think miss such a feature, however I guess with some ahead planning it could be easy to add
Save subsequent isolate actions in such a way that there is an ordered array/list of objects that got isolated in each step. Initially all object in the list get unisolated.
An advanced command would be able to step through the list and go back and forward various steps
-Isolate (stepForward)
UnIsolate ( All, stepBack)
I have found that to be more confusing that usefull I think It was a functionality I deleted from your script.
Pascal - You also created the Isolate Lock option for me in the old scripts, which lock rather than hide the surrounding geometry so that it can still be referenced. I still use the Isolate scripts a lot!
Can someone clarify what exactly theyāre stepping forwards and backwards in to/out of in the above comments?
Hi Matt -What I meant in my question was the idea that you could isolate say 10 objects and then from there isolate four objects and have the first Unisolate only restore the six hidden by the last Isolate, not all. Another shot of Unisolate , in this example, would get back to the completely-pre-isolate stateā¦ if you see what I mean. I think maybe my script does that, or maybe I just dreamed itā¦ I will test, but it seems not to be important anyway.
Ah, OK. Thanks for the explanation. I donāt recall ever trying that, but I guess it could be a possibility in very complex models. It would be a bit like burrowing down when using BlockEdit, I guess. As long as thereās a command line message to tell you when thereās no more āundiggingā to be done, I canāt see that such a facility would do any harm.
I have thought of this behaviour for a while. I really like how Illustrator does it with groups. If you double click on a group it will isolate it by hiding the rest of the things. I envision this for both groups and blocks. Darkening the background color and adding a little tag at the top will help the user know he is editing a block/group. It is similar to clusters in grasshopper.
For years now, I use Isolate a lot, and made it slightly different. Over here Rhino also Zooms Extend the isolated object, and that is very useful.
Left mouse click: !_Select _Pause _Invert _Hide _Zoom _Extents
Right mouse click: !_Select _Pause _Invert _Hide _Zoom _All _Extents
Also I put it next to zoom _Extents in my toolbar with a dedicated icon.
When I use Isolate I almost never wanted to see objects on locked layers, but they remain visible as the command currently functions. Iād like to easily be able to isolate my selection from everything including locked objects.
I was just searching the forum for this same thing.
I suppose it could be done by script that would Unlock the LockedGeo, then Select it, and Hide it. Then, of course, run in reverse to being the geo back as visible and locked.
@pascal Do you have something laying around that does this? It would be really useful, as for example, right now Iām kitbashing from an existing model, copying geo to a new model, then Locking that original geo so I know itās been used. Iād like to be able to Isolate at times, and have the locked geo out of viewā¦