Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

3.8 KB
Raw Blame
# Tube (Tool > Tube, PanelTube.cpp; requested by GABO on Discord): Draw Tube draws a clay tube in the air from a drag
# that starts on the model and leaves it, as a new Tube Part (undo takes it away); its points are dragged to move
# them, Ctrl+dragged to resize, Alt+clicked to delete; Insert / Delete Point, flat ends and Bake; Merge puts a
# stroke into the active Part as one undo step. The shots feed the guide's Tube chapter.
run ui_look look=classic layout=classic        # written for the Classic look and the classic palette bar and shelves
wait 0.3
click "Tube##tool.tube"
expect "Tube/Draw Tube"
hold ctrl
hover "Tube/Draw Tube"
expect_help "3D pen"
hold none
shot panel
click "Tube/Draw Tube"
expect_value tube_draw == 1
expect_status "drag anywhere"

# An S from the model out into the air: the trail shows while drawing, then a Tube Part; the sculpt stays active.
drag_path 0.3 0.4 0.55 0.2 0.8 0.45 1.05 0.25 1.3 0.5 keep S=1.2
shot drawing
release
wait 0.2
expect_value tube_parts == 1
expect_value parts == 2
expect_value active_part == 0
expect_status "Added Tube Part"
shot drawn
ui_scale 200                                   # 200%: the dots and the panel stay crisp and in proportion
wait 0.3
shot drawn-200
ui_scale 100
wait 0.3
key ctrl+z
expect_value tube_parts == 0
run redo
expect_value tube_parts == 1

# A point's dot: dragging it selects the Tube Part and moves the point (one undo step).
drag_tube_point 2 0 -60
expect_value active_part == 1
expect_value tube_selected == 2
expect_status "point moved"
shot edit
ui_scale auto                                  # the Edit group as a 2560x1600 laptop at 200% shows it (#105)
logical_width 1280
wait_idle 30
shot panel-200
logical_width 1600
ui_scale 100
wait 0.3
key ctrl+z
expect_status "Undo"

# Ctrl+drag: thicker there.
hold ctrl
drag_tube_point 2 80 0
hold none
expect_status "point size"

# Insert after the selected point, delete it again; Alt+click deletes a point too.
run tube_list
expect_value tube_selected == 2
click "Tube/Insert Point"
expect_value tube_selected == 3
click "Tube/Delete Point"
expect_value tube_selected == -1
hold alt
drag_tube_point 0 0 0
hold none
expect_status "Tube delete point"

# Flat ends on the active tube, then Bake: a plain mesh to sculpt.
click "Tube/Flat"
expect_status "Tube settings"
shot flat
click "Tube/Bake"
expect_value tube_points == 0
expect_value tube_parts == 0
expect_status "Baked the tube"
key ctrl+z
expect_value tube_parts == 1

# Merge with Snap to surfaces: a strap along the sculpt goes into it, one undo step, no new Part.
run part_select index=0
click "Tube/Merge"
click "Tube/Snap to surfaces"
wait_value triangles > 0
drag_path 0.22 0.55 0.35 0.72 0.5 0.78 0.65 0.72 0.78 0.55 S=0.8
wait 0.2
expect_value parts == 2
expect_status "merged into"
shot merged
key ctrl+z
expect_status "Undo"
click "Tube/Snap to surfaces"
click "Tube/Draw Tube"
expect_value tube_draw == 0

# Review shots at 1440 and 1024 logical px wide (display scale, as on a laptop) (the 200% ones are above): drawing, then the result with its Tube Part
# selected (the panel's Edit group). The old tube goes first so the new one stands alone.
run part_delete index=1
expect_value tube_parts == 0
click "Tube/New Part"
click "Tube/Draw Tube"
ui_scale auto
logical_width 1440
wait_idle 30
drag_path 0.3 0.4 0.55 0.2 0.8 0.45 1.05 0.25 1.3 0.5 keep S=1.2
shot drawing-1440
release
wait 0.2
run part_select index=1
expect_value tube_parts == 1
shot result-1440
run part_delete index=1
run part_select index=0
expect_value tube_parts == 0
logical_width 1024
wait_idle 30
drag_path 0.3 0.4 0.55 0.2 0.8 0.45 1.05 0.25 1.3 0.5 keep S=1.2
shot drawing-1024
release
wait 0.2
run part_select index=1
expect_value tube_parts == 1
shot result-1024
logical_width 1600
ui_scale 100
wait 0.3
click "Tube/Draw Tube"
expect_value tube_draw == 0