Blender V4.3
blender::bke::GeometryComponentEditData Class Referencefinal

#include <BKE_geometry_set.hh>

Inherits blender::bke::GeometryComponent.

Public Member Functions

 GeometryComponentEditData ()
 
GeometryComponentPtr copy () const final
 
bool owns_direct_data () const final
 
void ensure_owns_direct_data () final
 
void clear () override
 
- Public Member Functions inherited from blender::bke::GeometryComponent
virtual ~GeometryComponent ()=default
 
 GeometryComponent (Type type)
 
int attribute_domain_size (AttrDomain domain) const
 
virtual std::optional< AttributeAccessorattributes () const
 
virtual std::optional< MutableAttributeAccessorattributes_for_write ()
 
virtual void count_memory (MemoryCounter &memory) const
 
Type type () const
 
virtual bool is_empty () 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 Member Functions

static void remember_deformed_positions_if_necessary (GeometrySet &geometry)
 
- Static Public Member Functions inherited from blender::bke::GeometryComponent
static GeometryComponentPtr create (Type component_type)
 

Public Attributes

std::unique_ptr< CurvesEditHintscurves_edit_hints_
 
std::unique_ptr< GreasePencilEditHintsgrease_pencil_edit_hints_
 
std::unique_ptr< GizmoEditHintsgizmo_edit_hints_
 

Static Public Attributes

static constexpr GeometryComponent::Type static_type = GeometryComponent::Type::Edit
 

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
}
 

Detailed Description

When the original data is in some edit mode, we want to propagate some additional information through object evaluation. This information can be used by edit modes to support working on evaluated data.

This component is added at the beginning of modifier evaluation.

Definition at line 728 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ GeometryComponentEditData()

blender::bke::GeometryComponentEditData::GeometryComponentEditData ( )

Definition at line 12 of file geometry_component_edit_data.cc.

Referenced by copy().

Member Function Documentation

◆ clear()

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

◆ copy()

GeometryComponentPtr blender::bke::GeometryComponentEditData::copy ( ) const
finalvirtual

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

Implements blender::bke::GeometryComponent.

Definition at line 14 of file geometry_component_edit_data.cc.

References curves_edit_hints_, GeometryComponentEditData(), gizmo_edit_hints_, and grease_pencil_edit_hints_.

◆ ensure_owns_direct_data()

void blender::bke::GeometryComponentEditData::ensure_owns_direct_data ( )
finalvirtual

Implements blender::bke::GeometryComponent.

Definition at line 35 of file geometry_component_edit_data.cc.

◆ owns_direct_data()

bool blender::bke::GeometryComponentEditData::owns_direct_data ( ) const
finalvirtual

Implements blender::bke::GeometryComponent.

Definition at line 30 of file geometry_component_edit_data.cc.

◆ remember_deformed_positions_if_necessary()

void blender::bke::GeometryComponentEditData::remember_deformed_positions_if_necessary ( GeometrySet & geometry)
static

The first node that does topology changing operations on curves should store the curve point positions it retrieved as input. Without this, information about the deformed positions is lost, which would make curves sculpt mode fall back to using original curve positions instead of deformed ones.

Definition at line 123 of file geometry_component_edit_data.cc.

References blender::bke::remember_deformed_curve_positions_if_necessary(), and blender::bke::remember_deformed_grease_pencil_if_necessary().

Referenced by blender::nodes::node_geo_curve_resample_cc::node_geo_exec(), blender::nodes::node_geo_curve_reverse_cc::node_geo_exec(), blender::nodes::node_geo_curve_subdivide_cc::node_geo_exec(), blender::nodes::node_geo_curve_to_mesh_cc::node_geo_exec(), blender::nodes::node_geo_curve_trim_cc::node_geo_exec(), blender::nodes::node_geo_join_geometry_cc::node_geo_exec(), and blender::nodes::node_geo_realize_instances_cc::node_geo_exec().

Member Data Documentation

◆ curves_edit_hints_

std::unique_ptr<CurvesEditHints> blender::bke::GeometryComponentEditData::curves_edit_hints_

Information about how original curves are manipulated during evaluation. This data is used so that curve sculpt tools can work on evaluated data. It is not stored in #CurveComponent because the data remains valid even when there is no actual curves geometry anymore, for example, when the curves have been converted to a mesh.

Definition at line 736 of file BKE_geometry_set.hh.

Referenced by BKE_curves_data_update(), clear(), copy(), blender::geometry::execute_realize_edit_data_tasks(), blender::bke::GeometrySet::get_curve_edit_hints(), blender::bke::GeometrySet::get_curve_edit_hints_for_write(), blender::bke::crazyspace::get_evaluated_curves_deformation(), and blender::bke::remember_deformed_curve_positions_if_necessary().

◆ gizmo_edit_hints_

std::unique_ptr<GizmoEditHints> blender::bke::GeometryComponentEditData::gizmo_edit_hints_

Propagated information for how gizmos should be transformed along with the geometry.

Definition at line 744 of file BKE_geometry_set.hh.

Referenced by clear(), copy(), blender::nodes::LazyFunctionForGizmoNode::execute_impl(), blender::bke::GeometrySet::get_gizmo_edit_hints(), and blender::bke::GeometrySet::get_gizmo_edit_hints_for_write().

◆ grease_pencil_edit_hints_

std::unique_ptr<GreasePencilEditHints> blender::bke::GeometryComponentEditData::grease_pencil_edit_hints_

Information about how drawings on the grease pencil layers are manipulated during evaluation.

Definition at line 740 of file BKE_geometry_set.hh.

Referenced by BKE_grease_pencil_data_update(), clear(), copy(), blender::bke::crazyspace::get_evaluated_grease_pencil_drawing_deformation(), and blender::bke::remember_deformed_grease_pencil_if_necessary().

◆ static_type

GeometryComponent::Type blender::bke::GeometryComponentEditData::static_type = GeometryComponent::Type::Edit
inlinestaticconstexpr

Definition at line 762 of file BKE_geometry_set.hh.


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