diff options
author | Jacques Lucke <jacques@blender.org> | 2022-07-08 15:45:48 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-07-08 15:47:10 +0300 |
commit | 05b38ecc7835b32a9f3aedf36ead4b3e41ec6ca4 (patch) | |
tree | 847549cae6eb8cf0344b14c6c0bc4d0cf5497a6e /source/blender/editors/include/ED_curves.h | |
parent | aa78278ef6571b3784fe3d883ee00dc44bc7ed15 (diff) |
Curves: support deforming curves on surface
Curves that are attached to a surface can now follow the surface when
it is modified using shape keys or modifiers (but not when the original
surface is deformed in edit or sculpt mode).
The surface is allowed to be changed in any way that keeps uv maps
intact. So deformation is allowed, but also some topology changes like
subdivision.
The following features are added:
* A new `Deform Curves on Surface` node, which deforms curves with
attachment information based on the surface object and uv map set
in the properties panel.
* A new `Add Rest Position` checkbox in the shape keys panel. When checked,
a new `rest_position` vector attribute is added to the mesh before shape
keys and modifiers are applied. This is necessary to support proper
deformation of the curves, but can also be used for other purposes.
* The `Add > Curve > Empty Hair` operator now sets up a simple geometry
nodes setup that deforms the hair. It also makes sure that the rest
position attribute is added to the surface.
* A new `Object (Attach Curves to Surface)` operator in the `Set Parent To`
(ctrl+P) menu, which attaches existing curves to the surface and sets the
surface object as parent.
Limitations:
* Sculpting the procedurally deformed curves will be implemented separately.
* The `Deform Curves on Surface` node is not generic and can only be used
for one specific purpose currently. We plan to generalize this more in the
future by adding support by exposing more inputs and/or by turning it into
a node group.
Differential Revision: https://developer.blender.org/D14864
Diffstat (limited to 'source/blender/editors/include/ED_curves.h')
-rw-r--r-- | source/blender/editors/include/ED_curves.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_curves.h b/source/blender/editors/include/ED_curves.h index 68e09fd1b12..0817241a5c2 100644 --- a/source/blender/editors/include/ED_curves.h +++ b/source/blender/editors/include/ED_curves.h @@ -29,6 +29,7 @@ bke::CurvesGeometry primitive_random_sphere(int curves_size, int points_per_curv bool selection_operator_poll(bContext *C); bool has_anything_selected(const Curves &curves_id); VectorSet<Curves *> get_unique_editable_curves(const bContext &C); +void ensure_surface_deformation_node_exists(bContext &C, Object &curves_ob); } // namespace blender::ed::curves #endif |