diff options
author | Jacques Lucke <jacques@blender.org> | 2022-04-07 13:49:13 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-04-07 13:50:15 +0300 |
commit | 50869b408b20f621fe8860e9f3551fb653b4b714 (patch) | |
tree | 4f2bb84aa32298577e4a078b4f27648b93673293 /release | |
parent | e5c7f3722370f3cd70a7a00079820332c5b92de4 (diff) |
Curves: operator to snap curves to surface
This operator snaps the first point of every curve to the corresponding
surface object. The shape of individual curves or their orientation is
not changed.
There are two different attachment modes:
* `Nearest`: Move each curve so that the first point is on the closest
point on the surface. This should be used when the topology of the
surface mesh changed, but the shape generally stayed the same.
* `Deform`: Use the existing attachment information that is stored
for curves to move curves to their new location when the surface
mesh was deformed. This generally does not work when the
topology changed.
The purpose of the operator is to help setup the "ground truth"
for how curves are attached to the surface. When the ground
truth surface changed, the original curves have to be updated
as well. Deforming curves based on an animated surface will be
done with geometry nodes independent of the operator.
In the UI, the operator is currently exposed in curves sculpt mode
in the `Curves > Snap Curves to Surface` menu.
Differential Revision: https://developer.blender.org/D14515
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 41c1f3d0683..dbb28513a51 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -935,6 +935,8 @@ class VIEW3D_MT_editor_menus(Menu): if mode_string == 'SCULPT': layout.menu("VIEW3D_MT_mask") layout.menu("VIEW3D_MT_face_sets") + if mode_string == 'SCULPT_CURVES': + layout.menu("VIEW3D_MT_sculpt_curves") else: layout.menu("VIEW3D_MT_object") @@ -3124,6 +3126,15 @@ class VIEW3D_MT_sculpt(Menu): layout.operator("object.transfer_mode", text="Transfer Sculpt Mode") +class VIEW3D_MT_sculpt_curves(Menu): + bl_label = "Curves" + + def draw(self, _context): + layout = self.layout + + layout.operator("curves.snap_curves_to_surface") + + class VIEW3D_MT_mask(Menu): bl_label = "Mask" @@ -7759,6 +7770,7 @@ classes = ( VIEW3D_MT_sculpt_automasking_pie, VIEW3D_MT_wpaint_vgroup_lock_pie, VIEW3D_MT_sculpt_face_sets_edit_pie, + VIEW3D_MT_sculpt_curves, VIEW3D_PT_active_tool, VIEW3D_PT_active_tool_duplicate, VIEW3D_PT_view3d_properties, |