RhinoScript: can't delete object that is hidden?

Hi,

I didn’t realize that but it looks like if an object is hidden the DeleteObject method does not work on it. Is it by design or a bug? Seems logical to be able to delete object via script even if its not visible.

Dim ob : ob = Rhino.GetObject()
Rhino.HideObject ob
Rhino.DeleteObject ob
Rhino.ShowObjects Rhino.AllObjects

best,

~j

Hi Jarek,

This is the default behavior of Rhino’s object table - to now allow for locked and hidden objects to be deleted. Its possible to override this behavior. Would you want to see a flag on Rhino.DeleteObject that controls this, or would you rather this just happen?

– Dale

Hi Dale,

good to know! - I think an additional argument in the DeleteObject(s) methods would be great. There is some sense to preventing deleting invisible geometry by default.

thank you,

Jarek

Yes, would agree here. --Mitch

On the pile…

http://mcneel.myjetbrains.com/youtrack/issue/RH-30007