Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4171

Undo Script if result is null of esc is press Rhino Python

$
0
0

Matt wrote:

Morning All,

I have written a code that first checks if layers are present and deletes the 'old' clipping planes and objects within selected group, then lets the user pick a new box for the clipping planes to be defined by.

If the user esc's the command it exits the script but does not undo the changes done in the code above it.

What do I need to add to the code here so it returns the file before the code was run with all the old clipping planes or if its the first time without the layer and group

boxpts = rs.GetBox(0)
if boxpts is None :return

Thanks
Matt

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4171

Latest Images

Trending Articles



Latest Images