diff options
author | Hans Goudey <h.goudey@me.com> | 2021-09-11 21:54:40 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-09-11 21:54:40 +0300 |
commit | b9febb54a492ac6c93802fb0aa189d4c3fd99b0b (patch) | |
tree | a2f3b1d773d3a2424d7db0c8d9a0a0899da17747 /source/blender/io | |
parent | c946fdb2e5fc1eab139f70f01ea4e673435455bd (diff) |
Geometry Nodes: Support modifier on curve objects
With this commit, curve objects support the geometry nodes modifier.
Curves objects now evaluate to `CurveEval` unless there was a previous
implicit conversion (tessellating modifiers, mesh modifiers, or the
settings in the curve "Geometry" panel). In the new code, curves are
only considered to be the wire edges-- any generated surface is a mesh
instead, stored in the evaluated geometry set.
The consolidation of concepts mentioned above allows remove a lot of
code that had to do with maintaining the `DispList` type temporarily
for modifiers and rendering. Instead, render engines see a separate
object for the mesh from the mesh geometry component, and when the
curve object evaluates to a curve, the `CurveEval` is always used for
drawing wire edges.
However, currently the `DispList` type is still maintained and used as
an intermediate step in implicit mesh conversion. In the future, more
uses of it could be changed to use `CurveEval` and `Mesh` instead.
This is mostly not changed behavior, it is just a formalization of
existing logic after recent fixes for 2.8 versions last year and two
years ago. Also, in the future more functionality can be converted
to nodes, removing cases of implicit conversions. For more discussion
on that topic, see T89676.
The `use_fill_deform` option is removed. It has not worked properly
since 2.62, and the choice for filling a curve before or after
deformation will work much better and be clearer with a node system.
Applying the geometry nodes modifier to generate a curve is not
implemented with this commit, so applying the modifier won't work
at all. This is a separate technical challenge, and should be solved
in a separate step.
Differential Revision: https://developer.blender.org/D11597
Diffstat (limited to 'source/blender/io')
-rw-r--r-- | source/blender/io/alembic/intern/abc_reader_curves.cc | 2 | ||||
-rw-r--r-- | source/blender/io/usd/intern/usd_reader_curve.cc | 2 | ||||
-rw-r--r-- | source/blender/io/usd/intern/usd_reader_nurbs.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/io/alembic/intern/abc_reader_curves.cc b/source/blender/io/alembic/intern/abc_reader_curves.cc index 688ba23333a..d2ec7fb84db 100644 --- a/source/blender/io/alembic/intern/abc_reader_curves.cc +++ b/source/blender/io/alembic/intern/abc_reader_curves.cc @@ -94,7 +94,7 @@ void AbcCurveReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSele { Curve *cu = BKE_curve_add(bmain, m_data_name.c_str(), OB_CURVE); - cu->flag |= CU_DEFORM_FILL | CU_3D; + cu->flag |= CU_3D; cu->actvert = CU_ACT_NONE; cu->resolu = 1; diff --git a/source/blender/io/usd/intern/usd_reader_curve.cc b/source/blender/io/usd/intern/usd_reader_curve.cc index 31ecf27cf7e..7410757a9d9 100644 --- a/source/blender/io/usd/intern/usd_reader_curve.cc +++ b/source/blender/io/usd/intern/usd_reader_curve.cc @@ -46,7 +46,7 @@ void USDCurvesReader::create_object(Main *bmain, const double /* motionSampleTim { curve_ = BKE_curve_add(bmain, name_.c_str(), OB_CURVE); - curve_->flag |= CU_DEFORM_FILL | CU_3D; + curve_->flag |= CU_3D; curve_->actvert = CU_ACT_NONE; curve_->resolu = 2; diff --git a/source/blender/io/usd/intern/usd_reader_nurbs.cc b/source/blender/io/usd/intern/usd_reader_nurbs.cc index 9b30b524729..d6977d9c91a 100644 --- a/source/blender/io/usd/intern/usd_reader_nurbs.cc +++ b/source/blender/io/usd/intern/usd_reader_nurbs.cc @@ -62,7 +62,7 @@ void USDNurbsReader::create_object(Main *bmain, const double /* motionSampleTime { curve_ = BKE_curve_add(bmain, name_.c_str(), OB_CURVE); - curve_->flag |= CU_DEFORM_FILL | CU_3D; + curve_->flag |= CU_3D; curve_->actvert = CU_ACT_NONE; curve_->resolu = 2; |