Blender  V2.93
Classes | Typedefs | Functions | Variables
blender::ed::spreadsheet Namespace Reference

Classes

struct  ObjectCellValue
 
struct  CollectionCellValue
 
class  CellValue
 
class  ColumnValues
 
class  LambdaColumnValues
 
class  DataSource
 
class  GeometryDataSource
 
class  InstancesDataSource
 
struct  CellDrawParams
 
class  SpreadsheetDrawer
 
class  SpreadsheetLayoutDrawer
 
struct  ColumnLayout
 
struct  SpreadsheetLayout
 

Typedefs

using IsVertexSelectedFn = FunctionRef< bool(int vertex_index)>
 

Functions

SpreadsheetColumnIDspreadsheet_column_id_new ()
 
SpreadsheetColumnIDspreadsheet_column_id_copy (const SpreadsheetColumnID *src_column_id)
 
void spreadsheet_column_id_free (SpreadsheetColumnID *column_id)
 
SpreadsheetColumnspreadsheet_column_new (SpreadsheetColumnID *column_id)
 
SpreadsheetColumnspreadsheet_column_copy (const SpreadsheetColumn *src_column)
 
void spreadsheet_column_free (SpreadsheetColumn *column)
 
template<typename GetValueF >
std::unique_ptr< ColumnValuescolumn_values_from_function (std::string name, const int size, GetValueF get_value, const float default_width=0.0f)
 
static SpreadsheetContextObjectspreadsheet_context_object_new ()
 
static SpreadsheetContextObjectspreadsheet_context_object_copy (const SpreadsheetContextObject *src_context)
 
static void spreadsheet_context_object_hash (const SpreadsheetContextObject *context, BLI_HashMurmur2A *mm2)
 
static void spreadsheet_context_object_free (SpreadsheetContextObject *context)
 
static SpreadsheetContextModifierspreadsheet_context_modifier_new ()
 
static SpreadsheetContextModifierspreadsheet_context_modifier_copy (const SpreadsheetContextModifier *src_context)
 
static void spreadsheet_context_modifier_hash (const SpreadsheetContextModifier *context, BLI_HashMurmur2A *mm2)
 
static void spreadsheet_context_modifier_free (SpreadsheetContextModifier *context)
 
static SpreadsheetContextNodespreadsheet_context_node_new ()
 
static SpreadsheetContextNodespreadsheet_context_node_copy (const SpreadsheetContextNode *src_context)
 
static void spreadsheet_context_node_hash (const SpreadsheetContextNode *context, BLI_HashMurmur2A *mm2)
 
static void spreadsheet_context_node_free (SpreadsheetContextNode *context)
 
SpreadsheetContextspreadsheet_context_new (eSpaceSpreadsheet_ContextType type)
 
SpreadsheetContextspreadsheet_context_copy (const SpreadsheetContext *old_context)
 
static void spreadsheet_context_hash (const SpreadsheetContext *context, BLI_HashMurmur2A *mm2)
 
void spreadsheet_context_free (SpreadsheetContext *context)
 
static void spreadsheet_context_update_tag (SpaceSpreadsheet *sspreadsheet)
 
static void get_selected_vertex_indices (const Mesh &mesh, const IsVertexSelectedFn is_vertex_selected_fn, Vector< int64_t > &r_vertex_indices)
 
static void get_selected_corner_indices (const Mesh &mesh, const IsVertexSelectedFn is_vertex_selected_fn, Vector< int64_t > &r_corner_indices)
 
static void get_selected_face_indices (const Mesh &mesh, const IsVertexSelectedFn is_vertex_selected_fn, Vector< int64_t > &r_face_indices)
 
static void get_selected_edge_indices (const Mesh &mesh, const IsVertexSelectedFn is_vertex_selected_fn, Vector< int64_t > &r_edge_indices)
 
static void get_selected_indices_on_domain (const Mesh &mesh, const AttributeDomain domain, const IsVertexSelectedFn is_vertex_selected_fn, Vector< int64_t > &r_indices)
 
static GeometrySet get_display_geometry_set (SpaceSpreadsheet *sspreadsheet, Object *object_eval, const GeometryComponentType used_component_type)
 
static GeometryComponentType get_display_component_type (const bContext *C, Object *object_eval)
 
std::unique_ptr< DataSourcedata_source_from_geometry (const bContext *C, Object *object_eval)
 
static void draw_index_column_background (const uint pos, const ARegion *region, const SpreadsheetDrawer &drawer)
 
static void draw_alternating_row_overlay (const uint pos, const int scroll_offset_y, const ARegion *region, const SpreadsheetDrawer &drawer)
 
static void draw_top_row_background (const uint pos, const ARegion *region, const SpreadsheetDrawer &drawer)
 
static void draw_separator_lines (const uint pos, const int scroll_offset_x, const ARegion *region, const SpreadsheetDrawer &drawer)
 
static void get_visible_rows (const SpreadsheetDrawer &drawer, const ARegion *region, const int scroll_offset_y, int *r_first_row, int *r_max_visible_rows)
 
static void draw_left_column_content (const int scroll_offset_y, const bContext *C, ARegion *region, const SpreadsheetDrawer &drawer)
 
static void draw_top_row_content (const bContext *C, ARegion *region, const SpreadsheetDrawer &drawer, const int scroll_offset_x)
 
static void draw_cell_contents (const bContext *C, ARegion *region, const SpreadsheetDrawer &drawer, const int scroll_offset_x, const int scroll_offset_y)
 
static void update_view2d_tot_rect (const SpreadsheetDrawer &drawer, ARegion *region, const int row_amount)
 
void draw_spreadsheet_in_region (const bContext *C, ARegion *region, const SpreadsheetDrawer &drawer)
 
std::unique_ptr< SpreadsheetDrawerspreadsheet_drawer_from_layout (const SpreadsheetLayout &spreadsheet_layout)
 

Variables

static constexpr float default_float_column_width = 3
 
static constexpr float default_float2_column_width = 2 * default_float_column_width
 
static constexpr float default_float3_column_width = 3 * default_float_column_width
 
static constexpr float default_color_column_width = 4 * default_float_column_width
 

Typedef Documentation

◆ IsVertexSelectedFn

using blender::ed::spreadsheet::IsVertexSelectedFn = typedef FunctionRef<bool(int vertex_index)>

Definition at line 135 of file spreadsheet_data_source_geometry.cc.

Function Documentation

◆ column_values_from_function()

template<typename GetValueF >
std::unique_ptr<ColumnValues> blender::ed::spreadsheet::column_values_from_function ( std::string  name,
const int  size,
GetValueF  get_value,
const float  default_width = 0.0f 
)

◆ data_source_from_geometry()

std::unique_ptr< DataSource > blender::ed::spreadsheet::data_source_from_geometry ( const bContext C,
Object object_eval 
)

◆ draw_alternating_row_overlay()

static void blender::ed::spreadsheet::draw_alternating_row_overlay ( const uint  pos,
const int  scroll_offset_y,
const ARegion region,
const SpreadsheetDrawer drawer 
)
static

◆ draw_cell_contents()

static void blender::ed::spreadsheet::draw_cell_contents ( const bContext C,
ARegion region,
const SpreadsheetDrawer drawer,
const int  scroll_offset_x,
const int  scroll_offset_y 
)
static

◆ draw_index_column_background()

static void blender::ed::spreadsheet::draw_index_column_background ( const uint  pos,
const ARegion region,
const SpreadsheetDrawer drawer 
)
static

◆ draw_left_column_content()

static void blender::ed::spreadsheet::draw_left_column_content ( const int  scroll_offset_y,
const bContext C,
ARegion region,
const SpreadsheetDrawer drawer 
)
static

◆ draw_separator_lines()

static void blender::ed::spreadsheet::draw_separator_lines ( const uint  pos,
const int  scroll_offset_x,
const ARegion region,
const SpreadsheetDrawer drawer 
)
static

◆ draw_spreadsheet_in_region()

void blender::ed::spreadsheet::draw_spreadsheet_in_region ( const bContext C,
ARegion region,
const SpreadsheetDrawer drawer 
)

◆ draw_top_row_background()

static void blender::ed::spreadsheet::draw_top_row_background ( const uint  pos,
const ARegion region,
const SpreadsheetDrawer drawer 
)
static

◆ draw_top_row_content()

static void blender::ed::spreadsheet::draw_top_row_content ( const bContext C,
ARegion region,
const SpreadsheetDrawer drawer,
const int  scroll_offset_x 
)
static

◆ get_display_component_type()

static GeometryComponentType blender::ed::spreadsheet::get_display_component_type ( const bContext C,
Object object_eval 
)
static

◆ get_display_geometry_set()

static GeometrySet blender::ed::spreadsheet::get_display_geometry_set ( SpaceSpreadsheet sspreadsheet,
Object object_eval,
const GeometryComponentType  used_component_type 
)
static

◆ get_selected_corner_indices()

static void blender::ed::spreadsheet::get_selected_corner_indices ( const Mesh mesh,
const IsVertexSelectedFn  is_vertex_selected_fn,
Vector< int64_t > &  r_corner_indices 
)
static

◆ get_selected_edge_indices()

static void blender::ed::spreadsheet::get_selected_edge_indices ( const Mesh mesh,
const IsVertexSelectedFn  is_vertex_selected_fn,
Vector< int64_t > &  r_edge_indices 
)
static

◆ get_selected_face_indices()

static void blender::ed::spreadsheet::get_selected_face_indices ( const Mesh mesh,
const IsVertexSelectedFn  is_vertex_selected_fn,
Vector< int64_t > &  r_face_indices 
)
static

◆ get_selected_indices_on_domain()

static void blender::ed::spreadsheet::get_selected_indices_on_domain ( const Mesh mesh,
const AttributeDomain  domain,
const IsVertexSelectedFn  is_vertex_selected_fn,
Vector< int64_t > &  r_indices 
)
static

◆ get_selected_vertex_indices()

static void blender::ed::spreadsheet::get_selected_vertex_indices ( const Mesh mesh,
const IsVertexSelectedFn  is_vertex_selected_fn,
Vector< int64_t > &  r_vertex_indices 
)
static

◆ get_visible_rows()

static void blender::ed::spreadsheet::get_visible_rows ( const SpreadsheetDrawer drawer,
const ARegion region,
const int  scroll_offset_y,
int *  r_first_row,
int *  r_max_visible_rows 
)
static

◆ spreadsheet_column_copy()

SpreadsheetColumn * blender::ed::spreadsheet::spreadsheet_column_copy ( const SpreadsheetColumn src_column)

◆ spreadsheet_column_free()

void blender::ed::spreadsheet::spreadsheet_column_free ( SpreadsheetColumn column)

◆ spreadsheet_column_id_copy()

SpreadsheetColumnID * blender::ed::spreadsheet::spreadsheet_column_id_copy ( const SpreadsheetColumnID src_column_id)

◆ spreadsheet_column_id_free()

void blender::ed::spreadsheet::spreadsheet_column_id_free ( SpreadsheetColumnID column_id)

Definition at line 43 of file spreadsheet_column.cc.

References MEM_freeN, and SpreadsheetColumnID::name.

Referenced by spreadsheet_column_free().

◆ spreadsheet_column_id_new()

SpreadsheetColumnID * blender::ed::spreadsheet::spreadsheet_column_id_new ( )

Definition at line 29 of file spreadsheet_column.cc.

References MEM_callocN.

Referenced by spreadsheet_column_id_copy().

◆ spreadsheet_column_new()

SpreadsheetColumn * blender::ed::spreadsheet::spreadsheet_column_new ( SpreadsheetColumnID column_id)

Definition at line 51 of file spreadsheet_column.cc.

References SpreadsheetColumn::id, and MEM_callocN.

Referenced by spreadsheet_column_copy().

◆ spreadsheet_context_copy()

SpreadsheetContext * blender::ed::spreadsheet::spreadsheet_context_copy ( const SpreadsheetContext old_context)

◆ spreadsheet_context_free()

void blender::ed::spreadsheet::spreadsheet_context_free ( SpreadsheetContext context)

◆ spreadsheet_context_hash()

static void blender::ed::spreadsheet::spreadsheet_context_hash ( const SpreadsheetContext context,
BLI_HashMurmur2A mm2 
)
static

◆ spreadsheet_context_modifier_copy()

static SpreadsheetContextModifier* blender::ed::spreadsheet::spreadsheet_context_modifier_copy ( const SpreadsheetContextModifier src_context)
static

◆ spreadsheet_context_modifier_free()

static void blender::ed::spreadsheet::spreadsheet_context_modifier_free ( SpreadsheetContextModifier context)
static

Definition at line 92 of file spreadsheet_context.cc.

References context, and MEM_freeN.

Referenced by spreadsheet_context_free().

◆ spreadsheet_context_modifier_hash()

static void blender::ed::spreadsheet::spreadsheet_context_modifier_hash ( const SpreadsheetContextModifier context,
BLI_HashMurmur2A mm2 
)
static

Definition at line 84 of file spreadsheet_context.cc.

References BLI_hash_mm2a_add(), and context.

Referenced by spreadsheet_context_hash().

◆ spreadsheet_context_modifier_new()

static SpreadsheetContextModifier* blender::ed::spreadsheet::spreadsheet_context_modifier_new ( )
static

◆ spreadsheet_context_new()

SpreadsheetContext * blender::ed::spreadsheet::spreadsheet_context_new ( eSpaceSpreadsheet_ContextType  type)

◆ spreadsheet_context_node_copy()

static SpreadsheetContextNode* blender::ed::spreadsheet::spreadsheet_context_node_copy ( const SpreadsheetContextNode src_context)
static

◆ spreadsheet_context_node_free()

static void blender::ed::spreadsheet::spreadsheet_context_node_free ( SpreadsheetContextNode context)
static

Definition at line 126 of file spreadsheet_context.cc.

References context, and MEM_freeN.

Referenced by spreadsheet_context_free().

◆ spreadsheet_context_node_hash()

static void blender::ed::spreadsheet::spreadsheet_context_node_hash ( const SpreadsheetContextNode context,
BLI_HashMurmur2A mm2 
)
static

Definition at line 118 of file spreadsheet_context.cc.

References BLI_hash_mm2a_add(), and context.

Referenced by spreadsheet_context_hash().

◆ spreadsheet_context_node_new()

static SpreadsheetContextNode* blender::ed::spreadsheet::spreadsheet_context_node_new ( )
static

◆ spreadsheet_context_object_copy()

static SpreadsheetContextObject* blender::ed::spreadsheet::spreadsheet_context_object_copy ( const SpreadsheetContextObject src_context)
static

◆ spreadsheet_context_object_free()

static void blender::ed::spreadsheet::spreadsheet_context_object_free ( SpreadsheetContextObject context)
static

Definition at line 61 of file spreadsheet_context.cc.

References context, and MEM_freeN.

Referenced by spreadsheet_context_free().

◆ spreadsheet_context_object_hash()

static void blender::ed::spreadsheet::spreadsheet_context_object_hash ( const SpreadsheetContextObject context,
BLI_HashMurmur2A mm2 
)
static

Definition at line 55 of file spreadsheet_context.cc.

References BLI_hash_mm2a_add(), and context.

Referenced by spreadsheet_context_hash().

◆ spreadsheet_context_object_new()

static SpreadsheetContextObject* blender::ed::spreadsheet::spreadsheet_context_object_new ( )
static

◆ spreadsheet_context_update_tag()

static void blender::ed::spreadsheet::spreadsheet_context_update_tag ( SpaceSpreadsheet sspreadsheet)
static

Tag any data relevant to the spreadsheet's context for recalculation in order to collect information to display in the editor, which may be cached during evaluation.

Definition at line 210 of file spreadsheet_context.cc.

References SpaceSpreadsheet::context_path, DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), SpreadsheetContextObject::object, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), SPREADSHEET_CONTEXT_OBJECT, and type.

Referenced by ED_spreadsheet_context_path_update_tag().

◆ spreadsheet_drawer_from_layout()

std::unique_ptr< SpreadsheetDrawer > blender::ed::spreadsheet::spreadsheet_drawer_from_layout ( const SpreadsheetLayout spreadsheet_layout)

Definition at line 250 of file spreadsheet_layout.cc.

Referenced by spreadsheet_main_region_draw().

◆ update_view2d_tot_rect()

static void blender::ed::spreadsheet::update_view2d_tot_rect ( const SpreadsheetDrawer drawer,
ARegion region,
const int  row_amount 
)
static

Variable Documentation

◆ default_color_column_width

constexpr float blender::ed::spreadsheet::default_color_column_width = 4 * default_float_column_width
staticconstexpr

◆ default_float2_column_width

constexpr float blender::ed::spreadsheet::default_float2_column_width = 2 * default_float_column_width
staticconstexpr

◆ default_float3_column_width

constexpr float blender::ed::spreadsheet::default_float3_column_width = 3 * default_float_column_width
staticconstexpr

◆ default_float_column_width

constexpr float blender::ed::spreadsheet::default_float_column_width = 3
staticconstexpr

Definition at line 87 of file spreadsheet_column_values.hh.