Blender  V3.3
Public Member Functions | List of all members
blender::ed::spreadsheet::GeometryDataSource Class Reference

#include <spreadsheet_data_source_geometry.hh>

Inheritance diagram for blender::ed::spreadsheet::GeometryDataSource:
blender::ed::spreadsheet::DataSource

Public Member Functions

 GeometryDataSource (Object *object_eval, GeometrySet geometry_set, const GeometryComponentType component_type, const eAttrDomain domain, ExtraColumns extra_columns)
 
Objectobject_eval () const
 
bool has_selection_filter () const override
 
IndexMask apply_selection_filter (Vector< int64_t > &indices) const
 
void foreach_default_column_ids (FunctionRef< void(const SpreadsheetColumnID &, bool is_extra)> fn) const override
 
std::unique_ptr< ColumnValuesget_column_values (const SpreadsheetColumnID &column_id) const override
 
int tot_rows () const override
 
- Public Member Functions inherited from blender::ed::spreadsheet::DataSource
virtual ~DataSource ()
 

Detailed Description

Definition at line 38 of file spreadsheet_data_source_geometry.hh.

Constructor & Destructor Documentation

◆ GeometryDataSource()

blender::ed::spreadsheet::GeometryDataSource::GeometryDataSource ( Object object_eval,
GeometrySet  geometry_set,
const GeometryComponentType  component_type,
const eAttrDomain  domain,
ExtraColumns  extra_columns 
)
inline

Definition at line 53 of file spreadsheet_data_source_geometry.hh.

Member Function Documentation

◆ apply_selection_filter()

IndexMask blender::ed::spreadsheet::GeometryDataSource::apply_selection_filter ( Vector< int64_t > &  indices) const

◆ foreach_default_column_ids()

void blender::ed::spreadsheet::GeometryDataSource::foreach_default_column_ids ( FunctionRef< void(const SpreadsheetColumnID &, bool is_extra)>  ) const
overridevirtual

Calls the callback with all the column ids that should be displayed as long as the user does not manually add or remove columns. The column id can be stack allocated. Therefore, the callback should not keep a reference to it (and copy it instead).

The is_extra argument indicates that this column is special and should be drawn as the first column. (This can be made a bit more generic in the future when necessary.)

Reimplemented from blender::ed::spreadsheet::DataSource.

Definition at line 68 of file spreadsheet_data_source_geometry.cc.

References blender::bke::allow_procedural_attribute_access(), ATTR_DOMAIN_CORNER, ATTR_DOMAIN_EDGE, ATTR_DOMAIN_FACE, GeometryComponent::attributes(), blender::StringRefBase::data(), blender::bke::AttributeMetaData::domain, blender::bke::AttributeAccessor::domain_size(), blender::bke::AttributeAccessor::for_all(), blender::ed::spreadsheet::ExtraColumns::foreach_default_column_ids(), G, GEO_COMPONENT_TYPE_INSTANCES, GEO_COMPONENT_TYPE_MESH, blender::bke::AttributeIDRef::is_anonymous(), blender::bke::AttributeIDRef::name(), SpreadsheetColumnID::name, and GeometryComponent::type().

◆ get_column_values()

std::unique_ptr< ColumnValues > blender::ed::spreadsheet::GeometryDataSource::get_column_values ( const SpreadsheetColumnID ) const
overridevirtual

◆ has_selection_filter()

bool blender::ed::spreadsheet::GeometryDataSource::has_selection_filter ( ) const
overridevirtual

Returns true if the data source has the ability to limit visible rows by user interface selection status.

Reimplemented from blender::ed::spreadsheet::DataSource.

Definition at line 237 of file spreadsheet_data_source_geometry.cc.

References DEG_get_original_object(), GEO_COMPONENT_TYPE_CURVE, GEO_COMPONENT_TYPE_MESH, Object::mode, OB_CURVES, OB_MESH, OB_MODE_EDIT, OB_MODE_SCULPT_CURVES, GeometryComponent::type(), and Object::type.

◆ object_eval()

Object* blender::ed::spreadsheet::GeometryDataSource::object_eval ( ) const
inline

Definition at line 66 of file spreadsheet_data_source_geometry.hh.

◆ tot_rows()

int blender::ed::spreadsheet::GeometryDataSource::tot_rows ( ) const
overridevirtual

Returns the number of rows in columns returned by get_column_values.

Reimplemented from blender::ed::spreadsheet::DataSource.

Definition at line 228 of file spreadsheet_data_source_geometry.cc.

References GeometryComponent::attributes(), and blender::bke::AttributeAccessor::domain_size().

Referenced by apply_selection_filter().


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