Previously, the lifetimes of anonymous attributes were determined by reference counts which were non-deterministic when multiple threads are used. Now the lifetimes of anonymous attributes are handled more explicitly and deterministically. This is a prerequisite for any kind of caching, because caching the output of nodes that do things non-deterministically and have "invisible inputs" (reference counts) doesn't really work. For more details for how deterministic lifetimes are achieved, see D16858. No functional changes are expected. Small performance changes are expected as well (within few percent, anything larger regressions should be reported as bugs). Differential Revision: https://developer.blender.org/D16858
38 lines
1.3 KiB
C++
38 lines
1.3 KiB
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
struct CurvesGeometry;
|
|
struct Mesh;
|
|
|
|
/** \file
|
|
* \ingroup bke
|
|
*/
|
|
|
|
namespace blender::bke {
|
|
|
|
class AnonymousAttributePropagationInfo;
|
|
|
|
/**
|
|
* Extrude all splines in the profile curve along the path of every spline in the curve input.
|
|
* Transfer curve attributes to the mesh.
|
|
*
|
|
* \note Normal calculation is by far the slowest part of calculations relating to the result mesh.
|
|
* Although it would be a sensible decision to use the better topology information available while
|
|
* generating the mesh to also generate the normals, that work may wasted if the output mesh is
|
|
* changed anyway in a way that affects the normals. So currently this code uses the safer /
|
|
* simpler solution of deferring normal calculation to the rest of Blender.
|
|
*/
|
|
Mesh *curve_to_mesh_sweep(const CurvesGeometry &main,
|
|
const CurvesGeometry &profile,
|
|
bool fill_caps,
|
|
const AnonymousAttributePropagationInfo &propagation_info);
|
|
/**
|
|
* Create a loose-edge mesh based on the evaluated path of the curve's splines.
|
|
* Transfer curve attributes to the mesh.
|
|
*/
|
|
Mesh *curve_to_wire_mesh(const CurvesGeometry &curve,
|
|
const AnonymousAttributePropagationInfo &propagation_info);
|
|
|
|
} // namespace blender::bke
|