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.

1.7 KB
Raw Blame
# The Blender bridge (File > Blender): what the add-on sends loads by itself (checked every frame in UI tests,
# once a second in the app), Send to Blender writes the Parts back, and a second send from Blender updates
# the Part it came from (undoable) and adds the new object. The sends are staged from tests/ui/data/blender
# into an exchange folder in the working directory (the build folder under ctest).
run ui_look look=classic layout=classic        # written for the Classic look and the classic palette bar and shelves
run new_sphere subdivisions=3
env SCULPTFORGE_BLENDER_EXCHANGE sf_ui_blender
copy data/blender/send1 sf_ui_blender/to_sculptforge
wait 0.2
expect_status "Received 2 objects from Blender"
expect_value parts == 2
expect_value active_part == 0
expect_text Box
expect_text Rock
expect_value colored > 0
shot received

# The menu: File > Blender, with Ctrl-hover help on its items.
click "File##palette.file"
expect "Export STL...##file.export_stl"
hover "Blender"
wait 0.2
expect "Send to Blender##file.send_blender"
expect "Receive automatically##blender"
shot menu
hold ctrl
hover "Send to Blender##file.send_blender"
expect_help "back to Blender"
hover "Receive automatically##blender"
expect_help "as soon as it arrives"
hold none
click "Send to Blender##file.send_blender"
expect_status "Sent 2 objects to Blender"

# Blender sends again: the box changed and a pebble is new.
copy data/blender/send2 sf_ui_blender/to_sculptforge
wait 0.2
expect_status "Received 2 objects from Blender"
expect_value parts == 3
expect_text Pebble
expect_value can_undo == 1
shot updated
# Both receives into the box are undo steps: the update, then the first one (which replaced the fresh sphere).
key ctrl+z
expect_value can_undo == 1
key ctrl+z
expect_value can_undo == 0