Blender V4.3
blender::bke::CurveComponent Class Reference

#include <BKE_geometry_set.hh>

Inherits blender::bke::GeometryComponent.

Public Member Functions

std::optional< AttributeAccessorattributes () const final
 
std::optional< MutableAttributeAccessorattributes_for_write () final
 
Geometry Component Implementation
 CurveComponent ()
 
 CurveComponent (Curves *curve, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 
 ~CurveComponent ()
 
GeometryComponentPtr copy () const override
 
void clear () override
 
bool has_curves () const
 
void replace (Curves *curve, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 
Curvesrelease ()
 
const Curvesget () const
 
Curvesget_for_write ()
 
bool is_empty () const final
 
bool owns_direct_data () const override
 
void ensure_owns_direct_data () override
 
void count_memory (MemoryCounter &memory) const override
 
const Curveget_curve_for_render () const
 
- Public Member Functions inherited from blender::bke::GeometryComponent
virtual ~GeometryComponent ()=default
 
 GeometryComponent (Type type)
 
int attribute_domain_size (AttrDomain domain) const
 
Type type () const
 
- Public Member Functions inherited from blender::ImplicitSharingInfo
virtual ~ImplicitSharingInfo ()
 
bool is_mutable () const
 
bool is_expired () const
 
void add_user () const
 
void add_weak_user () const
 
void tag_ensured_mutable () const
 
int64_t version () const
 
int strong_users () const
 
void remove_user_and_delete_if_last () const
 
void remove_weak_user_and_delete_if_last () const
 

Static Public Attributes

static constexpr GeometryComponent::Type static_type = Type::Curve
 

Additional Inherited Members

- Public Types inherited from blender::bke::GeometryComponent
enum class  Type {
  Mesh = 0 , PointCloud = 1 , Instance = 2 , Volume = 3 ,
  Curve = 4 , Edit = 5 , GreasePencil = 6
}
 
- Static Public Member Functions inherited from blender::bke::GeometryComponent
static GeometryComponentPtr create (Type component_type)
 

Detailed Description

A geometry component that stores a group of curves, corresponding the Curves data-block and the CurvesGeometry type. Attributes are stored on the control point domain and the curve domain.

Definition at line 587 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ CurveComponent() [1/2]

blender::bke::CurveComponent::CurveComponent ( )

Definition at line 27 of file geometry_component_curves.cc.

Referenced by copy().

◆ CurveComponent() [2/2]

blender::bke::CurveComponent::CurveComponent ( Curves * curve,
GeometryOwnershipType ownership = GeometryOwnershipType::Owned )

Definition at line 29 of file geometry_component_curves.cc.

◆ ~CurveComponent()

blender::bke::CurveComponent::~CurveComponent ( )

Definition at line 34 of file geometry_component_curves.cc.

References clear().

Member Function Documentation

◆ attributes()

std::optional< AttributeAccessor > blender::bke::CurveComponent::attributes ( ) const
finalvirtual

Get access to the attributes in this geometry component. May return none if the geometry does not support the attribute system.

Reimplemented from blender::bke::GeometryComponent.

Definition at line 729 of file geometry_component_curves.cc.

References Curves::geometry, and blender::bke::get_curves_accessor_functions_ref().

◆ attributes_for_write()

std::optional< MutableAttributeAccessor > blender::bke::CurveComponent::attributes_for_write ( )
finalvirtual

◆ clear()

void blender::bke::CurveComponent::clear ( )
overridevirtual

◆ copy()

GeometryComponentPtr blender::bke::CurveComponent::copy ( ) const
overridevirtual

Copies the component. The returned component only has a single user and is therefor mutable.

Implements blender::bke::GeometryComponent.

Definition at line 39 of file geometry_component_curves.cc.

References BKE_curves_copy_for_eval(), CurveComponent(), and blender::bke::Owned.

◆ count_memory()

void blender::bke::CurveComponent::count_memory ( MemoryCounter & memory) const
overridevirtual

Reimplemented from blender::bke::GeometryComponent.

Definition at line 124 of file geometry_component_curves.cc.

References Curves::geometry.

◆ ensure_owns_direct_data()

void blender::bke::CurveComponent::ensure_owns_direct_data ( )
overridevirtual

◆ get()

◆ get_curve_for_render()

const Curve * blender::bke::CurveComponent::get_curve_for_render ( ) const

Create empty curve data used for rendering the spline's wire edges.

Note
See comment on curve_for_render_ for further explanation.

Definition at line 131 of file geometry_component_curves.cc.

References BKE_id_new_nomain(), Curve::curve_eval, ID_CU_LEGACY, and lock.

◆ get_for_write()

◆ has_curves()

bool blender::bke::CurveComponent::has_curves ( ) const

Definition at line 67 of file geometry_component_curves.cc.

Referenced by blender::bke::GeometrySet::has_curves().

◆ is_empty()

bool blender::bke::CurveComponent::is_empty ( ) const
finalvirtual

Reimplemented from blender::bke::GeometryComponent.

Definition at line 103 of file geometry_component_curves.cc.

◆ owns_direct_data()

bool blender::bke::CurveComponent::owns_direct_data ( ) const
overridevirtual

Implements blender::bke::GeometryComponent.

Definition at line 108 of file geometry_component_curves.cc.

References blender::bke::Owned.

◆ release()

Curves * blender::bke::CurveComponent::release ( )

◆ replace()

void blender::bke::CurveComponent::replace ( Curves * curve,
GeometryOwnershipType ownership = GeometryOwnershipType::Owned )

Clear the component and replace it with the new curve.

Definition at line 72 of file geometry_component_curves.cc.

References BLI_assert, clear(), and blender::ImplicitSharingInfo::is_mutable().

Referenced by blender::bke::GeometrySet::replace_curves().

Member Data Documentation

◆ static_type

GeometryComponent::Type blender::bke::CurveComponent::static_type = Type::Curve
inlinestaticconstexpr

Definition at line 633 of file BKE_geometry_set.hh.


The documentation for this class was generated from the following files: