Blender V5.0
rna_attribute.cc File Reference
#include <cstdlib>
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "rna_internal.hh"
#include "DNA_customdata_types.h"
#include "BKE_attribute.hh"
#include "BLT_translation.hh"
#include "WM_types.hh"
#include "UI_resources.hh"

Go to the source code of this file.

Enumerations

enum class  AttrDomain

Functions

static void rna_def_attribute_float (BlenderRNA *brna)
static void rna_def_attribute_float_vector (BlenderRNA *brna)
static void rna_def_attribute_float_color (BlenderRNA *brna)
static void rna_def_attribute_byte_color (BlenderRNA *brna)
static void rna_def_attribute_int (BlenderRNA *brna)
static void rna_def_attribute_string (BlenderRNA *brna)
static void rna_def_attribute_bool (BlenderRNA *brna)
static void rna_def_attribute_int8 (BlenderRNA *brna)
static void rna_def_attribute_short2 (BlenderRNA *brna)
static void rna_def_attribute_int2 (BlenderRNA *brna)
static void rna_def_attribute_quaternion (BlenderRNA *brna)
static void rna_def_attribute_float4x4 (BlenderRNA *brna)
static void rna_def_attribute_float2 (BlenderRNA *brna)
static void rna_def_attribute (BlenderRNA *brna)
static void rna_def_attribute_group_id_common (StructRNA *srna)
static void rna_def_attribute_group_mesh (BlenderRNA *brna)
static void rna_def_attribute_group_pointcloud (BlenderRNA *brna)
static void rna_def_attribute_group_curves (BlenderRNA *brna)
static void rna_def_attribute_group_grease_pencil (BlenderRNA *brna)
static void rna_def_attribute_group_grease_pencil_drawing (BlenderRNA *brna)
void rna_def_attributes_common (StructRNA *srna, const AttributeOwnerType type)
void RNA_def_attribute (BlenderRNA *brna)

Variables

const EnumPropertyItem rna_enum_attribute_type_items []
const EnumPropertyItem rna_enum_color_attribute_type_items []
const EnumPropertyItem rna_enum_attribute_type_with_auto_items []
static const EnumPropertyItem rna_enum_attr_storage_type []
const EnumPropertyItem rna_enum_attribute_domain_items []
const EnumPropertyItem rna_enum_attribute_domain_only_mesh_items []
const EnumPropertyItem rna_enum_attribute_domain_only_mesh_no_edge_items []
const EnumPropertyItem rna_enum_attribute_domain_only_mesh_no_corner_items []
const EnumPropertyItem rna_enum_attribute_domain_point_face_curve_items []
const EnumPropertyItem rna_enum_attribute_domain_point_edge_face_curve_items []
const EnumPropertyItem rna_enum_attribute_domain_edge_face_items []
const EnumPropertyItem rna_enum_attribute_domain_without_corner_items []
const EnumPropertyItem rna_enum_attribute_domain_with_auto_items []
const EnumPropertyItem rna_enum_color_attribute_domain_items []
const EnumPropertyItem rna_enum_attribute_curves_domain_items []

Enumeration Type Documentation

◆ AttrDomain

enum class blender::bke::AttrDomain : int8_t
strong

Definition at line 63 of file BKE_attribute.hh.

Function Documentation

◆ RNA_def_attribute()

◆ rna_def_attribute()

◆ rna_def_attribute_bool()

◆ rna_def_attribute_byte_color()

◆ rna_def_attribute_float()

◆ rna_def_attribute_float2()

◆ rna_def_attribute_float4x4()

◆ rna_def_attribute_float_color()

◆ rna_def_attribute_float_vector()

◆ rna_def_attribute_group_curves()

void rna_def_attribute_group_curves ( BlenderRNA * brna)
static

◆ rna_def_attribute_group_grease_pencil()

void rna_def_attribute_group_grease_pencil ( BlenderRNA * brna)
static

◆ rna_def_attribute_group_grease_pencil_drawing()

◆ rna_def_attribute_group_id_common()

◆ rna_def_attribute_group_mesh()

◆ rna_def_attribute_group_pointcloud()

void rna_def_attribute_group_pointcloud ( BlenderRNA * brna)
static

◆ rna_def_attribute_int()

◆ rna_def_attribute_int2()

◆ rna_def_attribute_int8()

◆ rna_def_attribute_quaternion()

◆ rna_def_attribute_short2()

◆ rna_def_attribute_string()

◆ rna_def_attributes_common()

Variable Documentation

◆ rna_enum_attr_storage_type

const EnumPropertyItem rna_enum_attr_storage_type[]
static
Initial value:
= {
"ARRAY",
0,
"Array",
"Store a value for every element"},
"SINGLE",
0,
"Single",
"Store a single value for the entire domain"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 80 of file rna_attribute.cc.

Referenced by rna_def_attribute().

◆ rna_enum_attribute_curves_domain_items

const EnumPropertyItem rna_enum_attribute_curves_domain_items[]
Initial value:
= {
{int(AttrDomain::Point), "POINT", 0, "Control Point", ""},
{int(AttrDomain::Curve), "CURVE", 0, "Curve", ""},
{0, nullptr, 0, nullptr, nullptr}}

Definition at line 179 of file rna_attribute.cc.

Referenced by blender::ed::curves::CURVES_OT_set_selection_domain(), and rna_def_curves().

◆ rna_enum_attribute_domain_edge_face_items

const EnumPropertyItem rna_enum_attribute_domain_edge_face_items[]
Initial value:
= {
{int(AttrDomain::Edge), "EDGE", 0, "Edge", "Attribute on mesh edge"},
{int(AttrDomain::Face), "FACE", 0, "Face", "Attribute on mesh faces"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 146 of file rna_attribute.cc.

Referenced by blender::nodes::node_geo_set_shade_smooth_cc::node_rna().

◆ rna_enum_attribute_domain_items

const EnumPropertyItem rna_enum_attribute_domain_items[]
Initial value:
= {
{int(AttrDomain::Point), "POINT", 0, "Point", "Attribute on point"},
{int(AttrDomain::Edge), "EDGE", 0, "Edge", "Attribute on mesh edge"},
{int(AttrDomain::Face), "FACE", 0, "Face", "Attribute on mesh faces"},
{int(AttrDomain::Corner), "CORNER", 0, "Face Corner", "Attribute on mesh face corner"},
{int(AttrDomain::Curve), "CURVE", 0, "Spline", "Attribute on spline"},
{int(AttrDomain::Instance), "INSTANCE", 0, "Instance", "Attribute on instance"},
{int(AttrDomain::Layer), "LAYER", 0, "Layer", "Attribute on Grease Pencil layer"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 94 of file rna_attribute.cc.

Referenced by blender::ui::attribute_domain_string(), def_geo_foreach_geometry_element_output(), def_geo_sample_index(), blender::ed::geometry::GEOMETRY_OT_attribute_add(), blender::ed::geometry::GEOMETRY_OT_attribute_convert(), blender::bke::bake::get_domain_from_io_name(), blender::bke::bake::get_domain_io_name(), blender::nodes::node_geo_store_named_attribute_cc::node_geo_exec(), blender::nodes::node_geo_accumulate_field_cc::node_rna(), blender::nodes::node_geo_attribute_statistic_cc::node_rna(), blender::nodes::node_geo_evaluate_at_index_cc::node_rna(), blender::nodes::node_geo_evaluate_on_domain_cc::node_rna(), blender::nodes::node_geo_field_average_cc::node_rna(), blender::nodes::node_geo_field_min_and_max_cc::node_rna(), blender::nodes::node_geo_field_variance_cc::node_rna(), blender::nodes::node_geo_sort_elements_cc::node_rna(), blender::nodes::node_geo_store_named_attribute_cc::node_rna(), rna_def_attribute(), rna_def_attribute_group_grease_pencil_drawing(), rna_def_attribute_group_id_common(), rna_def_geo_bake_item(), rna_def_geo_capture_attribute(), rna_def_geo_foreach_geometry_element_generation_item(), rna_def_geo_simulation_state_item(), rna_def_node_interface_socket(), rna_def_space_spreadsheet(), and rna_def_spreadsheet_table_id_geometry().

◆ rna_enum_attribute_domain_only_mesh_items

const EnumPropertyItem rna_enum_attribute_domain_only_mesh_items[]
Initial value:
= {
{int(AttrDomain::Point), "POINT", 0, "Point", "Attribute on point"},
{int(AttrDomain::Edge), "EDGE", 0, "Edge", "Attribute on mesh edge"},
{int(AttrDomain::Face), "FACE", 0, "Face", "Attribute on mesh faces"},
{int(AttrDomain::Corner), "CORNER", 0, "Face Corner", "Attribute on mesh face corner"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 109 of file rna_attribute.cc.

Referenced by blender::nodes::node_geo_sample_nearest_cc::node_rna().

◆ rna_enum_attribute_domain_only_mesh_no_corner_items

const EnumPropertyItem rna_enum_attribute_domain_only_mesh_no_corner_items[]
Initial value:
= {
{int(AttrDomain::Point), "POINT", 0, "Point", "Attribute on point"},
{int(AttrDomain::Edge), "EDGE", 0, "Edge", "Attribute on mesh edge"},
{int(AttrDomain::Face), "FACE", 0, "Face", "Attribute on mesh faces"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 124 of file rna_attribute.cc.

◆ rna_enum_attribute_domain_only_mesh_no_edge_items

const EnumPropertyItem rna_enum_attribute_domain_only_mesh_no_edge_items[]
Initial value:
= {
{int(AttrDomain::Point), "POINT", 0, "Point", "Attribute on point"},
{int(AttrDomain::Face), "FACE", 0, "Face", "Attribute on mesh faces"},
{int(AttrDomain::Corner), "CORNER", 0, "Face Corner", "Attribute on mesh face corner"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 117 of file rna_attribute.cc.

Referenced by blender::nodes::node_geo_set_mesh_normal_cc::node_rna().

◆ rna_enum_attribute_domain_point_edge_face_curve_items

const EnumPropertyItem rna_enum_attribute_domain_point_edge_face_curve_items[]
Initial value:
= {
{int(AttrDomain::Point), "POINT", 0, "Point", "Attribute on point"},
{int(AttrDomain::Edge), "EDGE", 0, "Edge", "Attribute on mesh edge"},
{int(AttrDomain::Face), "FACE", 0, "Face", "Attribute on mesh faces"},
{int(AttrDomain::Curve), "CURVE", 0, "Spline", "Attribute on spline"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 138 of file rna_attribute.cc.

Referenced by blender::nodes::node_geo_tool_set_selection_cc::node_rna().

◆ rna_enum_attribute_domain_point_face_curve_items

const EnumPropertyItem rna_enum_attribute_domain_point_face_curve_items[]
Initial value:
= {
{int(AttrDomain::Point), "POINT", 0, "Point", "Attribute on point"},
{int(AttrDomain::Face), "FACE", 0, "Face", "Attribute on mesh faces"},
{int(AttrDomain::Curve), "CURVE", 0, "Spline", "Attribute on spline"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 131 of file rna_attribute.cc.

◆ rna_enum_attribute_domain_with_auto_items

const EnumPropertyItem rna_enum_attribute_domain_with_auto_items[]
Initial value:
= {
{int(AttrDomain::Auto), "AUTO", 0, "Auto", ""},
{int(AttrDomain::Point), "POINT", 0, "Point", "Attribute on point"},
{int(AttrDomain::Edge), "EDGE", 0, "Edge", "Attribute on mesh edge"},
{int(AttrDomain::Face), "FACE", 0, "Face", "Attribute on mesh faces"},
{int(AttrDomain::Corner), "CORNER", 0, "Face Corner", "Attribute on mesh face corner"},
{int(AttrDomain::Curve), "CURVE", 0, "Spline", "Attribute on spline"},
{int(AttrDomain::Instance), "INSTANCE", 0, "Instance", "Attribute on instance"},
{int(AttrDomain::Layer), "LAYER", 0, "Layer", "Attribute on Grease Pencil layer"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 162 of file rna_attribute.cc.

Referenced by rna_def_geo_viewer().

◆ rna_enum_attribute_domain_without_corner_items

const EnumPropertyItem rna_enum_attribute_domain_without_corner_items[]
Initial value:
= {
{int(AttrDomain::Point), "POINT", 0, "Point", "Attribute on point"},
{int(AttrDomain::Edge), "EDGE", 0, "Edge", "Attribute on mesh edge"},
{int(AttrDomain::Face), "FACE", 0, "Face", "Attribute on mesh faces"},
{int(AttrDomain::Curve), "CURVE", 0, "Spline", "Attribute on spline"},
{int(AttrDomain::Instance), "INSTANCE", 0, "Instance", "Attribute on instance"},
{int(AttrDomain::Layer), "LAYER", 0, "Layer", "Attribute on Grease Pencil layer"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 152 of file rna_attribute.cc.

Referenced by blender::nodes::node_geo_delete_geometry_cc::node_rna(), blender::nodes::node_geo_separate_geometry_cc::node_rna(), and blender::nodes::node_geo_split_to_instances_cc::node_rna().

◆ rna_enum_attribute_type_items

const EnumPropertyItem rna_enum_attribute_type_items[]
Initial value:
= {
{CD_PROP_FLOAT, "FLOAT", 0, "Float", "Floating-point value"},
{CD_PROP_INT32, "INT", 0, "Integer", "32-bit integer"},
{CD_PROP_BOOL, "BOOLEAN", 0, "Boolean", "True or false"},
{CD_PROP_FLOAT3, "FLOAT_VECTOR", 0, "Vector", "3D vector with floating-point values"},
{CD_PROP_COLOR, "FLOAT_COLOR", 0, "Color", "RGBA color with 32-bit floating-point values"},
{CD_PROP_QUATERNION, "QUATERNION", 0, "Quaternion", "Floating point quaternion rotation"},
{CD_PROP_FLOAT4X4, "FLOAT4X4", 0, "4x4 Matrix", "Floating point matrix"},
{CD_PROP_STRING, "STRING", 0, "String", "Text string"},
{CD_PROP_INT8, "INT8", 0, "8-Bit Integer", "Smaller integer with a range from -128 to 127"},
{CD_PROP_INT16_2D, "INT16_2D", 0, "2D 16-Bit Integer Vector", "16-bit signed integer vector"},
{CD_PROP_INT32_2D, "INT32_2D", 0, "2D Integer Vector", "32-bit signed integer vector"},
{CD_PROP_FLOAT2, "FLOAT2", 0, "2D Vector", "2D vector with floating-point values"},
"BYTE_COLOR",
0,
"Byte Color",
"RGBA color with 8-bit positive integer values"},
{0, nullptr, 0, nullptr, nullptr},
}
@ CD_PROP_BYTE_COLOR
@ CD_PROP_FLOAT
@ CD_PROP_FLOAT3
@ CD_PROP_INT32_2D
@ CD_PROP_COLOR
@ CD_PROP_QUATERNION
@ CD_PROP_INT32
@ CD_PROP_FLOAT2
@ CD_PROP_INT16_2D
@ CD_PROP_STRING
@ CD_PROP_FLOAT4X4

Definition at line 28 of file rna_attribute.cc.

Referenced by blender::ui::attribute_data_type_string(), blender::nodes::enums::attribute_type_type_with_socket_fn(), def_fn_random_value(), def_geo_curve_sample(), def_geo_sample_index(), blender::ed::geometry::GEOMETRY_OT_attribute_add(), blender::ed::geometry::GEOMETRY_OT_attribute_convert(), blender::bke::bake::get_data_type_from_io_name(), blender::bke::bake::get_data_type_io_name(), blender::nodes::node_geo_store_named_attribute_cc::node_geo_exec(), blender::nodes::node_geo_attribute_statistic_cc::node_rna(), blender::nodes::node_geo_blur_attribute_cc::node_rna(), blender::nodes::node_geo_evaluate_at_index_cc::node_rna(), blender::nodes::node_geo_evaluate_on_domain_cc::node_rna(), blender::nodes::node_geo_input_named_attribute_cc::node_rna(), blender::nodes::node_geo_raycast_cc::node_rna(), blender::nodes::node_geo_sample_nearest_surface_cc::node_rna(), blender::nodes::node_geo_sample_uv_surface_cc::node_rna(), blender::nodes::node_geo_store_named_attribute_cc::node_rna(), rna_def_attribute(), rna_def_attribute_group_grease_pencil_drawing(), rna_def_attribute_group_id_common(), and rna_def_geo_capture_attribute_item().

◆ rna_enum_attribute_type_with_auto_items

const EnumPropertyItem rna_enum_attribute_type_with_auto_items[]
Initial value:
= {
{CD_AUTO_FROM_NAME, "AUTO", 0, "Auto", ""},
{CD_PROP_FLOAT, "FLOAT", 0, "Float", "Floating-point value"},
{CD_PROP_INT32, "INT", 0, "Integer", "32-bit integer"},
{CD_PROP_BOOL, "BOOLEAN", 0, "Boolean", "True or false"},
{CD_PROP_FLOAT3, "FLOAT_VECTOR", 0, "Vector", "3D vector with floating-point values"},
{CD_PROP_COLOR, "FLOAT_COLOR", 0, "Color", "RGBA color with 32-bit floating-point values"},
{CD_PROP_QUATERNION, "QUATERNION", 0, "Quaternion", "Floating point quaternion rotation"},
{CD_PROP_FLOAT4X4, "FLOAT4X4", 0, "4x4 Matrix", "Floating point matrix"},
{CD_PROP_STRING, "STRING", 0, "String", "Text string"},
{CD_PROP_INT8, "INT8", 0, "8-Bit Integer", "Smaller integer with a range from -128 to 127"},
{CD_PROP_INT16_2D, "INT16_2D", 0, "2D 16-Bit Integer Vector", "16-bit signed integer vector"},
{CD_PROP_INT32_2D, "INT32_2D", 0, "2D Integer Vector", "32-bit signed integer vector"},
{CD_PROP_FLOAT2, "FLOAT2", 0, "2D Vector", "2D vector with floating-point values"},
"BYTE_COLOR",
0,
"Byte Color",
"RGBA color with 8-bit positive integer values"},
{0, nullptr, 0, nullptr, nullptr},
}
@ CD_AUTO_FROM_NAME

Definition at line 58 of file rna_attribute.cc.

◆ rna_enum_color_attribute_domain_items

const EnumPropertyItem rna_enum_color_attribute_domain_items[]
Initial value:
= {
{int(AttrDomain::Point), "POINT", 0, "Vertex", ""},
{int(AttrDomain::Corner), "CORNER", 0, "Face Corner", ""},
{0, nullptr, 0, nullptr, nullptr}}

Definition at line 174 of file rna_attribute.cc.

Referenced by blender::ed::geometry::GEOMETRY_OT_color_attribute_add(), blender::ed::geometry::GEOMETRY_OT_color_attribute_convert(), and PAINT_OT_add_texture_paint_slot().

◆ rna_enum_color_attribute_type_items

const EnumPropertyItem rna_enum_color_attribute_type_items[]
Initial value:
= {
{CD_PROP_COLOR, "FLOAT_COLOR", 0, "Color", "RGBA color 32-bit floating-point values"},
"BYTE_COLOR",
0,
"Byte Color",
"RGBA color with 8-bit positive integer values"},
{0, nullptr, 0, nullptr, nullptr}}

Definition at line 49 of file rna_attribute.cc.

Referenced by blender::ed::geometry::GEOMETRY_OT_color_attribute_add(), blender::ed::geometry::GEOMETRY_OT_color_attribute_convert(), and PAINT_OT_add_texture_paint_slot().