Skip to content

Commit 58ea55d

Browse files
committed
session based confirmation
1 parent 336d744 commit 58ea55d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

plugin/RV_pattern.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ def RunCommand():
1717
patternobj = session.find_pattern(warn=False)
1818

1919
if patternobj:
20-
result = rs.MessageBox(
21-
"This will remove all current RhinoVAULT data and objects. Do you wish to proceed?",
22-
buttons=4 | 32 | 256 | 0,
23-
title="RhinoVAULT",
24-
)
25-
if result == 6:
20+
if session.confirm("This will remove all current RhinoVAULT data and objects. Do you wish to proceed?"):
2621
session.scene.clear()
2722
else:
2823
return

plugin/RV_pattern_relax.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ def RunCommand():
2020

2121
rs.UnselectAllObjects()
2222

23+
supports = len(list(pattern.mesh.vertices_where(is_support=True)))
24+
if supports < 4:
25+
if not session.confirm(f"You only have {supports} supports. Do you wan to proceed?"):
26+
return
27+
2328
pattern.mesh.relax()
2429

2530
# =============================================================================

0 commit comments

Comments
 (0)