diff options
author | Jacques Lucke <jacques@blender.org> | 2022-07-22 16:39:41 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-07-22 16:39:41 +0300 |
commit | 1f94b56d774440d08eb92f2a7a47b9a6a7aa7b84 (patch) | |
tree | 06928c94d524852c7031aa310d578691735dc0a8 /source/blender/nodes/intern/node_geometry_exec.cc | |
parent | 98bf714b37c1f1b05a162b6ffdaca367b312de1f (diff) |
Curves: support sculpting on deformed curves
Previously, curves sculpt tools only worked on original data. This was
very limiting, because one could effectively only sculpt the curves when
all procedural effects were turned off. This patch adds support for curves
sculpting while looking the result of procedural effects (like deformation
based on the surface mesh). This functionality is also known as "crazy space"
support in Blender.
For more details see D15407.
Differential Revision: https://developer.blender.org/D15407
Diffstat (limited to 'source/blender/nodes/intern/node_geometry_exec.cc')
-rw-r--r-- | source/blender/nodes/intern/node_geometry_exec.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/node_geometry_exec.cc b/source/blender/nodes/intern/node_geometry_exec.cc index 56e9c9f0496..c6ebc22c43c 100644 --- a/source/blender/nodes/intern/node_geometry_exec.cc +++ b/source/blender/nodes/intern/node_geometry_exec.cc @@ -4,6 +4,7 @@ #include "DEG_depsgraph_query.h" +#include "BKE_curves.hh" #include "BKE_type_conversions.hh" #include "NOD_geometry_exec.hh" @@ -94,11 +95,27 @@ void GeoNodeExecParams::check_input_geometry_set(StringRef identifier, message += TIP_("Curve"); break; } + case GEO_COMPONENT_TYPE_EDIT: { + continue; + } } this->error_message_add(NodeWarningType::Info, std::move(message)); } } +void GeoNodeExecParams::check_output_geometry_set(const GeometrySet &geometry_set) const +{ + UNUSED_VARS_NDEBUG(geometry_set); +#ifdef DEBUG + if (const bke::CurvesEditHints *curve_edit_hints = + geometry_set.get_curve_edit_hints_for_read()) { + /* If this is not valid, it's likely that the number of stored deformed points does not match + * the number of points in the original data. */ + BLI_assert(curve_edit_hints->is_valid()); + } +#endif +} + const bNodeSocket *GeoNodeExecParams::find_available_socket(const StringRef name) const { for (const InputSocketRef *socket : provider_->dnode->inputs()) { |