Blender V4.3
rna_attribute.cc File Reference
#include <cstdlib>
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "rna_internal.hh"
#include "DNA_curves_types.h"
#include "DNA_customdata_types.h"
#include "DNA_grease_pencil_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_pointcloud_types.h"
#include "BLI_math_color.h"
#include "BKE_attribute.hh"
#include "BKE_customdata.hh"
#include "BLT_translation.hh"
#include "WM_types.hh"

Go to the source code of this file.

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_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_point_cloud (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 []
 
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 []
 

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()

static void rna_def_attribute_group_curves ( BlenderRNA * brna)
static

◆ rna_def_attribute_group_grease_pencil()

static 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_point_cloud()

static void rna_def_attribute_group_point_cloud ( BlenderRNA * brna)
static

◆ rna_def_attribute_int()

◆ rna_def_attribute_int2()

◆ rna_def_attribute_int8()

◆ rna_def_attribute_quaternion()

◆ rna_def_attribute_string()

◆ rna_def_attributes_common()

Variable Documentation

◆ 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}}
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int

Definition at line 170 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 137 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 85 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_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_node_interface_socket(), rna_def_simulation_state_item(), and rna_def_space_spreadsheet().

◆ 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 100 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 115 of file rna_attribute.cc.

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

◆ 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 108 of file rna_attribute.cc.

◆ 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 129 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 122 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 153 of file rna_attribute.cc.

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

◆ 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 143 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_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"},
"BYTE_COLOR",
0,
"Byte Color",
"RGBA color with 8-bit positive integer values"},
{CD_PROP_STRING, "STRING", 0, "String", "Text string"},
{CD_PROP_BOOL, "BOOLEAN", 0, "Boolean", "True or false"},
{CD_PROP_FLOAT2, "FLOAT2", 0, "2D Vector", "2D vector with floating-point values"},
{CD_PROP_INT8, "INT8", 0, "8-Bit Integer", "Smaller integer with a range from -128 to 127"},
{CD_PROP_INT32_2D, "INT32_2D", 0, "2D Integer Vector", "32-bit signed integer vector"},
{CD_PROP_QUATERNION, "QUATERNION", 0, "Quaternion", "Floating point quaternion rotation"},
{CD_PROP_FLOAT4X4, "FLOAT4X4", 0, "4x4 Matrix", "Floating point matrix"},
{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_STRING
@ CD_PROP_FLOAT4X4

Definition at line 35 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::grid_custom_data_type_items_filter_fn(), 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(), blender::nodes::node_geo_store_named_grid_cc::node_rna(), blender::nodes::node_geo_viewer_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_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"},
"BYTE_COLOR",
0,
"Byte Color",
"RGBA color with 8-bit positive integer values"},
{CD_PROP_STRING, "STRING", 0, "String", "Text string"},
{CD_PROP_BOOL, "BOOLEAN", 0, "Boolean", "True or false"},
{CD_PROP_FLOAT2, "FLOAT2", 0, "2D Vector", "2D vector with floating-point values"},
{CD_PROP_FLOAT2, "FLOAT2", 0, "2D Vector", "2D vector with floating-point values"},
{CD_PROP_INT32_2D, "INT32_2D", 0, "2D Integer Vector", "32-bit signed integer vector"},
{CD_PROP_QUATERNION, "QUATERNION", 0, "Quaternion", "Floating point quaternion rotation"},
{CD_PROP_FLOAT4X4, "FLOAT4X4", 0, "4x4 Matrix", "Floating point matrix"},
{0, nullptr, 0, nullptr, nullptr},
}
@ CD_AUTO_FROM_NAME

Definition at line 64 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 165 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 55 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().