Blender
V3.3
|
#include <spreadsheet_data_source_geometry.hh>
Public Member Functions | |
GeometryDataSource (Object *object_eval, GeometrySet geometry_set, const GeometryComponentType component_type, const eAttrDomain domain, ExtraColumns extra_columns) | |
Object * | object_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< ColumnValues > | get_column_values (const SpreadsheetColumnID &column_id) const override |
int | tot_rows () const override |
![]() | |
virtual | ~DataSource () |
Definition at line 38 of file spreadsheet_data_source_geometry.hh.
|
inline |
Definition at line 53 of file spreadsheet_data_source_geometry.hh.
IndexMask blender::ed::spreadsheet::GeometryDataSource::apply_selection_filter | ( | Vector< int64_t > & | indices | ) | const |
Definition at line 264 of file spreadsheet_data_source_geometry.cc.
References blender::bke::AttributeAccessor::adapt_domain(), ATTR_DOMAIN_CURVE, ATTR_DOMAIN_POINT, BLI_assert, BLI_assert_unreachable, BMEditMesh::bm, bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_mesh_elem_table_ensure(), BM_VERT, BM_vert_at_index(), CD_ORIGINDEX, component(), CustomData_get_layer(), Object::data, DEG_get_original_object(), Mesh::edit_mesh, blender::index_mask_ops::find_indices_from_virtual_array(), blender::VArray< T >::ForFunc(), GEO_COMPONENT_TYPE_CURVE, GEO_COMPONENT_TYPE_MESH, GeometrySet::get_mesh_for_read(), if(), indices, blender::IndexMask::is_empty(), lock, blender::bke::mesh_attributes(), Object::mode, OB_CURVES, OB_MESH, OB_MODE_EDIT, OB_MODE_SCULPT_CURVES, blender::ed::sculpt_paint::retrieve_selected_curves(), blender::ed::sculpt_paint::retrieve_selected_points(), tot_rows(), BMesh::totvert, Mesh::totvert, GeometryComponent::type(), Object::type, and Mesh::vdata.
Referenced by blender::ed::spreadsheet::spreadsheet_filter_rows().
|
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().
|
overridevirtual |
Returns the column values the given column id. If no data exists for this id, null is returned.
Reimplemented from blender::ed::spreadsheet::DataSource.
Definition at line 123 of file spreadsheet_data_source_geometry.cc.
References ATTR_DOMAIN_CORNER, ATTR_DOMAIN_EDGE, ATTR_DOMAIN_FACE, attribute, GeometryComponent::attributes(), component(), blender::bke::domain_num(), blender::bke::AttributeAccessor::domain_size(), G, GEO_COMPONENT_TYPE_INSTANCES, GEO_COMPONENT_TYPE_MESH, blender::ed::spreadsheet::ExtraColumns::get_column_values(), InstancesComponent::instance_reference_handles(), InstancesComponent::instance_transforms(), lock, blender::bke::AttributeAccessor::lookup(), mesh, SpreadsheetColumnID::name, InstancesComponent::references(), STREQ, Mesh::totedge, Mesh::totloop, Mesh::totpoly, and GeometryComponent::type().
|
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.
|
inline |
Definition at line 66 of file spreadsheet_data_source_geometry.hh.
|
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().