31 {
CD_PROP_BOOL,
"BOOLEAN", 0,
"Boolean",
"True or false"},
32 {
CD_PROP_FLOAT3,
"FLOAT_VECTOR", 0,
"Vector",
"3D vector with floating-point values"},
33 {
CD_PROP_COLOR,
"FLOAT_COLOR", 0,
"Color",
"RGBA color with 32-bit floating-point values"},
34 {
CD_PROP_QUATERNION,
"QUATERNION", 0,
"Quaternion",
"Floating point quaternion rotation"},
37 {
CD_PROP_INT8,
"INT8", 0,
"8-Bit Integer",
"Smaller integer with a range from -128 to 127"},
38 {
CD_PROP_INT16_2D,
"INT16_2D", 0,
"2D 16-Bit Integer Vector",
"16-bit signed integer vector"},
39 {
CD_PROP_INT32_2D,
"INT32_2D", 0,
"2D Integer Vector",
"32-bit signed integer vector"},
40 {
CD_PROP_FLOAT2,
"FLOAT2", 0,
"2D Vector",
"2D vector with floating-point values"},
45 "RGBA color with 8-bit positive integer values"},
46 {0,
nullptr, 0,
nullptr,
nullptr},
50 {
CD_PROP_COLOR,
"FLOAT_COLOR", 0,
"Color",
"RGBA color 32-bit floating-point values"},
55 "RGBA color with 8-bit positive integer values"},
56 {0,
nullptr, 0,
nullptr,
nullptr}};
62 {
CD_PROP_BOOL,
"BOOLEAN", 0,
"Boolean",
"True or false"},
63 {
CD_PROP_FLOAT3,
"FLOAT_VECTOR", 0,
"Vector",
"3D vector with floating-point values"},
64 {
CD_PROP_COLOR,
"FLOAT_COLOR", 0,
"Color",
"RGBA color with 32-bit floating-point values"},
65 {
CD_PROP_QUATERNION,
"QUATERNION", 0,
"Quaternion",
"Floating point quaternion rotation"},
68 {
CD_PROP_INT8,
"INT8", 0,
"8-Bit Integer",
"Smaller integer with a range from -128 to 127"},
69 {
CD_PROP_INT16_2D,
"INT16_2D", 0,
"2D 16-Bit Integer Vector",
"16-bit signed integer vector"},
70 {
CD_PROP_INT32_2D,
"INT32_2D", 0,
"2D Integer Vector",
"32-bit signed integer vector"},
71 {
CD_PROP_FLOAT2,
"FLOAT2", 0,
"2D Vector",
"2D vector with floating-point values"},
76 "RGBA color with 8-bit positive integer values"},
77 {0,
nullptr, 0,
nullptr,
nullptr},
85 "Store a value for every element"},
90 "Store a single value for the entire domain"},
91 {0,
nullptr, 0,
nullptr,
nullptr},
97 {int(AttrDomain::Point),
"POINT", 0,
"Point",
"Attribute on point"},
98 {int(AttrDomain::Edge),
"EDGE", 0,
"Edge",
"Attribute on mesh edge"},
99 {int(AttrDomain::Face),
"FACE", 0,
"Face",
"Attribute on mesh faces"},
100 {int(AttrDomain::Corner),
"CORNER", 0,
"Face Corner",
"Attribute on mesh face corner"},
103 {int(AttrDomain::Curve),
"CURVE", 0,
"Spline",
"Attribute on spline"},
104 {int(AttrDomain::Instance),
"INSTANCE", 0,
"Instance",
"Attribute on instance"},
105 {int(AttrDomain::Layer),
"LAYER", 0,
"Layer",
"Attribute on Grease Pencil layer"},
106 {0,
nullptr, 0,
nullptr,
nullptr},
110 {int(AttrDomain::Point),
"POINT", 0,
"Point",
"Attribute on point"},
111 {int(AttrDomain::Edge),
"EDGE", 0,
"Edge",
"Attribute on mesh edge"},
112 {int(AttrDomain::Face),
"FACE", 0,
"Face",
"Attribute on mesh faces"},
113 {int(AttrDomain::Corner),
"CORNER", 0,
"Face Corner",
"Attribute on mesh face corner"},
114 {0,
nullptr, 0,
nullptr,
nullptr},
118 {int(AttrDomain::Point),
"POINT", 0,
"Point",
"Attribute on point"},
119 {int(AttrDomain::Face),
"FACE", 0,
"Face",
"Attribute on mesh faces"},
120 {int(AttrDomain::Corner),
"CORNER", 0,
"Face Corner",
"Attribute on mesh face corner"},
121 {0,
nullptr, 0,
nullptr,
nullptr},
125 {int(AttrDomain::Point),
"POINT", 0,
"Point",
"Attribute on point"},
126 {int(AttrDomain::Edge),
"EDGE", 0,
"Edge",
"Attribute on mesh edge"},
127 {int(AttrDomain::Face),
"FACE", 0,
"Face",
"Attribute on mesh faces"},
128 {0,
nullptr, 0,
nullptr,
nullptr},
132 {int(AttrDomain::Point),
"POINT", 0,
"Point",
"Attribute on point"},
133 {int(AttrDomain::Face),
"FACE", 0,
"Face",
"Attribute on mesh faces"},
134 {int(AttrDomain::Curve),
"CURVE", 0,
"Spline",
"Attribute on spline"},
135 {0,
nullptr, 0,
nullptr,
nullptr},
139 {int(AttrDomain::Point),
"POINT", 0,
"Point",
"Attribute on point"},
140 {int(AttrDomain::Edge),
"EDGE", 0,
"Edge",
"Attribute on mesh edge"},
141 {int(AttrDomain::Face),
"FACE", 0,
"Face",
"Attribute on mesh faces"},
142 {int(AttrDomain::Curve),
"CURVE", 0,
"Spline",
"Attribute on spline"},
143 {0,
nullptr, 0,
nullptr,
nullptr},
147 {int(AttrDomain::Edge),
"EDGE", 0,
"Edge",
"Attribute on mesh edge"},
148 {int(AttrDomain::Face),
"FACE", 0,
"Face",
"Attribute on mesh faces"},
149 {0,
nullptr, 0,
nullptr,
nullptr},
153 {int(AttrDomain::Point),
"POINT", 0,
"Point",
"Attribute on point"},
154 {int(AttrDomain::Edge),
"EDGE", 0,
"Edge",
"Attribute on mesh edge"},
155 {int(AttrDomain::Face),
"FACE", 0,
"Face",
"Attribute on mesh faces"},
156 {int(AttrDomain::Curve),
"CURVE", 0,
"Spline",
"Attribute on spline"},
157 {int(AttrDomain::Instance),
"INSTANCE", 0,
"Instance",
"Attribute on instance"},
158 {int(AttrDomain::Layer),
"LAYER", 0,
"Layer",
"Attribute on Grease Pencil layer"},
159 {0,
nullptr, 0,
nullptr,
nullptr},
163 {int(AttrDomain::Auto),
"AUTO", 0,
"Auto",
""},
164 {int(AttrDomain::Point),
"POINT", 0,
"Point",
"Attribute on point"},
165 {int(AttrDomain::Edge),
"EDGE", 0,
"Edge",
"Attribute on mesh edge"},
166 {int(AttrDomain::Face),
"FACE", 0,
"Face",
"Attribute on mesh faces"},
167 {int(AttrDomain::Corner),
"CORNER", 0,
"Face Corner",
"Attribute on mesh face corner"},
168 {int(AttrDomain::Curve),
"CURVE", 0,
"Spline",
"Attribute on spline"},
169 {int(AttrDomain::Instance),
"INSTANCE", 0,
"Instance",
"Attribute on instance"},
170 {int(AttrDomain::Layer),
"LAYER", 0,
"Layer",
"Attribute on Grease Pencil layer"},
171 {0,
nullptr, 0,
nullptr,
nullptr},
175 {int(AttrDomain::Point),
"POINT", 0,
"Vertex",
""},
176 {int(AttrDomain::Corner),
"CORNER", 0,
"Face Corner",
""},
177 {0,
nullptr, 0,
nullptr,
nullptr}};
180 {int(AttrDomain::Point),
"POINT", 0,
"Control Point",
""},
181 {int(AttrDomain::Curve),
"CURVE", 0,
"Curve",
""},
182 {0,
nullptr, 0,
nullptr,
nullptr}};
186# include <fmt/format.h>
202# include "RNA_prototypes.hh"
219 bool found_attr =
false;
221 if (&attr_iter == &attr) {
233 ID *owner_id =
ptr->owner_id;
263 if (
ptr->type == &RNA_GreasePencilDrawing) {
269static std::optional<std::string> rna_Attribute_path(
const PointerRNA *
ptr)
275 return fmt::format(
"attributes[\"{}\"]", escaped_name);
279 char layer_name_esc[
sizeof(layer->
name) * 2];
281 return fmt::format(
"attributes[\"{}\"]", layer_name_esc);
288 return &RNA_FloatAttribute;
290 return &RNA_IntAttribute;
292 return &RNA_FloatVectorAttribute;
294 return &RNA_FloatColorAttribute;
296 return &RNA_ByteColorAttribute;
298 return &RNA_StringAttribute;
300 return &RNA_BoolAttribute;
302 return &RNA_Float2Attribute;
304 return &RNA_ByteIntAttribute;
306 return &RNA_Short2Attribute;
308 return &RNA_Int2Attribute;
310 return &RNA_QuaternionAttribute;
312 return &RNA_Float4x4Attribute;
324 return srna_by_custom_data_layer_type(data_type);
331static void rna_Attribute_name_get(
PointerRNA *
ptr,
char *value)
354 return strlen(layer->
name);
357static void rna_Attribute_name_set(
PointerRNA *
ptr,
const char *value)
371static int rna_Attribute_name_editable(
const PointerRNA *
ptr,
const char **r_info)
378 *r_info =
N_(
"Cannot modify name of required geometry attribute");
386 *r_info =
N_(
"Cannot modify name of required geometry attribute");
417 bool include_instances,
485 return int(attr->
domain());
560 return accessor.domain_size(attr->
domain());
569 ID *
id =
ptr->owner_id;
580static void rna_ByteColorAttributeValue_color_get(
PointerRNA *
ptr,
float *values)
587static void rna_ByteColorAttributeValue_color_set(
PointerRNA *
ptr,
const float *values)
592 rec709[3] = values[3];
596static void rna_ByteColorAttributeValue_color_srgb_get(
PointerRNA *
ptr,
float *values)
599 values[0] =
col->r / 255.0f;
600 values[1] =
col->g / 255.0f;
601 values[2] =
col->b / 255.0f;
602 values[3] =
col->a / 255.0f;
605static void rna_ByteColorAttributeValue_color_srgb_set(
PointerRNA *
ptr,
const float *values)
614static void rna_FloatColorAttributeValue_color_srgb_get(
PointerRNA *
ptr,
float *values)
618 values[3] =
col->color[3];
621static void rna_FloatColorAttributeValue_color_srgb_set(
PointerRNA *
ptr,
const float *values)
625 col->color[3] = values[3];
630static void rna_StringAttributeValue_s_get(
PointerRNA *
ptr,
char *value)
633 const int len = std::min<int>(mstring->
s_len,
sizeof(mstring->
s) - 1);
634 memcpy(value, mstring->
s,
len);
642 const int len = std::min<int>(mstring->
s_len,
sizeof(mstring->
s) - 1);
646static void rna_StringAttributeValue_s_set(
PointerRNA *
ptr,
const char *value)
653 memcpy(mstring->
s, value, mstring->
s_len);
659 ID *
id,
ReportList *reports,
const char *
name,
const int type,
const int domain)
750 const AttributeOwner owner = owner_from_attribute_pointer_rna(&attribute_pointer);
774 if (customdata ==
nullptr) {
779 }
while (!iter->
valid);
797 rna_AttributeGroup_next_domain(owner, iter,
ptr, rna_Attributes_layer_skip);
809 rna_AttributeGroup_next_domain(owner, iter, &iter->
parent, rna_Attributes_layer_skip);
820 StructRNA *type = srna_by_custom_data_layer_type(data_type);
826 if (type ==
nullptr) {
857 rna_AttributeGroup_next_domain(owner, iter,
ptr, rna_Attributes_noncolor_layer_skip);
871 rna_AttributeGroup_next_domain(owner, iter, &iter->
parent, rna_Attributes_noncolor_layer_skip);
882 StructRNA *type = srna_by_custom_data_layer_type(data_type);
888 if (type ==
nullptr) {
956static int rna_AttributeGroupID_active_index_get(
PointerRNA *
ptr)
1002static void rna_AttributeGroupID_active_index_set(
PointerRNA *
ptr,
int value)
1008static void rna_AttributeGroupID_active_index_range(
1020 rna_Attribute_update_data(bmain, scene,
ptr);
1023static void rna_AttributeGroup_update_active_color(
Main * ,
1027 ID *
id =
ptr->owner_id;
1036static int rna_AttributeGroupID_domain_size(
ID *
id,
const int domain)
1058 return attribute_ptr;
1061static void rna_AttributeGroupMesh_active_color_set(
PointerRNA *
ptr,
1065 ID *
id =
ptr->owner_id;
1075static int rna_AttributeGroupMesh_active_color_index_get(
PointerRNA *
ptr)
1087static void rna_AttributeGroupMesh_active_color_index_set(
PointerRNA *
ptr,
int value)
1094 fprintf(stderr,
"%s: error setting active color index to %d\n", __func__, value);
1101static void rna_AttributeGroupMesh_active_color_index_range(
1112static int rna_AttributeGroupMesh_render_color_index_get(
PointerRNA *
ptr)
1121static void rna_AttributeGroupMesh_render_color_index_set(
PointerRNA *
ptr,
int value)
1128 fprintf(stderr,
"%s: error setting render color index to %d\n", __func__, value);
1135static void rna_AttributeGroupMesh_render_color_index_range(
1146static void rna_AttributeGroupMesh_default_color_name_get(
PointerRNA *
ptr,
char *value)
1148 const ID *
id =
ptr->owner_id;
1150 name.copy_unsafe(value);
1153static int rna_AttributeGroupMesh_default_color_name_length(
PointerRNA *
ptr)
1155 const ID *
id =
ptr->owner_id;
1160static void rna_AttributeGroupMesh_default_color_name_set(
PointerRNA *
ptr,
const char *value)
1162 ID *
id =
ptr->owner_id;
1172static void rna_AttributeGroupMesh_active_color_name_get(
PointerRNA *
ptr,
char *value)
1174 const ID *
id =
ptr->owner_id;
1176 name.copy_unsafe(value);
1179static int rna_AttributeGroupMesh_active_color_name_length(
PointerRNA *
ptr)
1181 const ID *
id =
ptr->owner_id;
1186static void rna_AttributeGroupMesh_active_color_name_set(
PointerRNA *
ptr,
const char *value)
1188 ID *
id =
ptr->owner_id;
1198static PointerRNA rna_AttributeGroupGreasePencilDrawing_new(
ID *grease_pencil_id,
1228static void rna_AttributeGroupGreasePencilDrawing_remove(
ID *grease_pencil_id,
1263static void rna_AttributeGroupGreasePencilDrawing_active_set(
PointerRNA *
ptr,
1278static bool rna_AttributeGroupGreasePencilDrawing_active_poll(
PointerRNA *
ptr,
1286static int rna_AttributeGroupGreasePencilDrawing_active_index_get(
PointerRNA *
ptr)
1293static void rna_AttributeGroupGreasePencilDrawing_active_index_set(
PointerRNA *
ptr,
int value)
1300static void rna_AttributeGroupGreasePencilDrawing_active_index_range(
1329 srna,
"Float Attribute",
"Geometry attribute that stores floating-point values");
1335 "rna_Attribute_data_begin",
1336 "rna_iterator_array_next",
1337 "rna_iterator_array_end",
1338 "rna_iterator_array_get",
1339 "rna_Attribute_data_length",
1348 srna,
"Float Attribute Value",
"Floating-point value in geometry attribute");
1360 srna =
RNA_def_struct(brna,
"FloatVectorAttribute",
"Attribute");
1363 srna,
"Float Vector Attribute",
"Geometry attribute that stores floating-point 3D vectors");
1369 "rna_Attribute_data_begin",
1370 "rna_iterator_array_next",
1371 "rna_iterator_array_end",
1372 "rna_iterator_array_get",
1373 "rna_Attribute_data_length",
1380 srna =
RNA_def_struct(brna,
"FloatVectorAttributeValue",
nullptr);
1383 srna,
"Float Vector Attribute Value",
"Vector value in geometry attribute");
1401 "Float Color Attribute",
1402 "Geometry attribute that stores RGBA colors as floating-point values "
1403 "using 32-bits per channel");
1409 "rna_Attribute_data_begin",
1410 "rna_iterator_array_next",
1411 "rna_iterator_array_end",
1412 "rna_iterator_array_get",
1413 "rna_Attribute_data_length",
1420 srna =
RNA_def_struct(brna,
"FloatColorAttributeValue",
nullptr);
1435 "rna_FloatColorAttributeValue_color_srgb_get",
1436 "rna_FloatColorAttributeValue_color_srgb_set",
1450 "Byte Color Attribute",
1451 "Geometry attribute that stores RGBA colors as positive integer values "
1452 "using 8-bits per channel");
1458 "rna_Attribute_data_begin",
1459 "rna_iterator_array_next",
1460 "rna_iterator_array_end",
1461 "rna_iterator_array_get",
1462 "rna_Attribute_data_length",
1477 "rna_ByteColorAttributeValue_color_get",
1478 "rna_ByteColorAttributeValue_color_set",
1487 "rna_ByteColorAttributeValue_color_srgb_get",
1488 "rna_ByteColorAttributeValue_color_srgb_set",
1502 srna,
"Integer Attribute",
"Geometry attribute that stores integer values");
1508 "rna_Attribute_data_begin",
1509 "rna_iterator_array_next",
1510 "rna_iterator_array_end",
1511 "rna_iterator_array_get",
1512 "rna_Attribute_data_length",
1539 "rna_Attribute_data_begin",
1540 "rna_iterator_array_next",
1541 "rna_iterator_array_end",
1542 "rna_iterator_array_get",
1543 "rna_Attribute_data_length",
1555 "rna_StringAttributeValue_s_get",
1556 "rna_StringAttributeValue_s_length",
1557 "rna_StringAttributeValue_s_set");
1574 "rna_Attribute_data_begin",
1575 "rna_iterator_array_next",
1576 "rna_iterator_array_end",
1577 "rna_iterator_array_get",
1578 "rna_Attribute_data_length",
1599 srna,
"8-bit Integer Attribute",
"Geometry attribute that stores 8-bit integers");
1605 "rna_Attribute_data_begin",
1606 "rna_iterator_array_next",
1607 "rna_iterator_array_end",
1608 "rna_iterator_array_get",
1609 "rna_Attribute_data_length",
1618 srna,
"8-bit Integer Attribute Value",
"8-bit value in geometry attribute");
1631 "2D 16-Bit Integer Vector Attribute",
1632 "Geometry attribute that stores 2D integer vectors");
1638 "rna_Attribute_data_begin",
1639 "rna_iterator_array_next",
1640 "rna_iterator_array_end",
1641 "rna_iterator_array_get",
1642 "rna_Attribute_data_length",
1651 srna,
"2D 16-Bit Integer Vector Attribute Value",
"2D value in geometry attribute");
1668 srna,
"2D Integer Vector Attribute",
"Geometry attribute that stores 2D integer vectors");
1674 "rna_Attribute_data_begin",
1675 "rna_iterator_array_next",
1676 "rna_iterator_array_end",
1677 "rna_iterator_array_get",
1678 "rna_Attribute_data_length",
1687 srna,
"2D Integer Vector Attribute Value",
"2D value in geometry attribute");
1709 "rna_Attribute_data_begin",
1710 "rna_iterator_array_next",
1711 "rna_iterator_array_end",
1712 "rna_iterator_array_get",
1713 "rna_Attribute_data_length",
1719 srna =
RNA_def_struct(brna,
"QuaternionAttributeValue",
nullptr);
1722 srna,
"Quaternion Attribute Value",
"Rotation value in geometry attribute");
1739 srna,
"4x4 Matrix Attribute",
"Geometry attribute that stores a 4 by 4 float matrix");
1745 "rna_Attribute_data_begin",
1746 "rna_iterator_array_next",
1747 "rna_iterator_array_end",
1748 "rna_iterator_array_get",
1749 "rna_Attribute_data_length",
1775 srna,
"Float2 Attribute",
"Geometry attribute that stores floating-point 2D vectors");
1781 "rna_Attribute_data_begin",
1782 "rna_iterator_array_next",
1783 "rna_iterator_array_end",
1784 "rna_iterator_array_get",
1785 "rna_Attribute_data_length",
1815 prop,
"rna_Attribute_name_get",
"rna_Attribute_name_length",
"rna_Attribute_name_set");
1836 prop,
"rna_Attribute_domain_get",
nullptr,
"rna_Attribute_domain_itemf");
1843 prop,
"Is Internal",
"The attribute is meant for internal use by Blender");
1877 parm =
RNA_def_string(func,
"name",
"Attribute", 0,
"Name",
"Name of geometry attribute");
1889 "Type of element that attribute is stored on");
1892 parm =
RNA_def_pointer(func,
"attribute",
"Attribute",
"",
"New geometry attribute");
1899 parm =
RNA_def_pointer(func,
"attribute",
"Attribute",
"",
"Geometry Attribute");
1908 "rna_AttributeGroupID_active_get",
1909 "rna_AttributeGroupID_active_set",
1917 prop,
"Active Attribute Index",
"Active attribute index or -1 when none are active");
1921 "rna_AttributeGroupID_active_index_get",
1922 "rna_AttributeGroupID_active_index_set",
1923 "rna_AttributeGroupID_active_index_range");
1927 func =
RNA_def_function(srna,
"domain_size",
"rna_AttributeGroupID_domain_size");
1934 "Type of element that attribute is stored on");
1936 parm =
RNA_def_int(func,
"size", 0, 0, INT_MAX,
"Size",
"Size of the domain", 0, INT_MAX);
1957 "rna_AttributeGroupMesh_active_color_get",
1958 "rna_AttributeGroupMesh_active_color_set",
1968 "rna_AttributeGroupMesh_active_color_index_get",
1969 "rna_AttributeGroupMesh_active_color_index_set",
1970 "rna_AttributeGroupMesh_active_color_index_range");
1975 "Active Render Color Index",
1976 "The index of the color attribute used as a fallback for rendering");
1979 "rna_AttributeGroupMesh_render_color_index_get",
1980 "rna_AttributeGroupMesh_render_color_index_set",
1981 "rna_AttributeGroupMesh_render_color_index_range");
1987 "rna_AttributeGroupMesh_default_color_name_get",
1988 "rna_AttributeGroupMesh_default_color_name_length",
1989 "rna_AttributeGroupMesh_default_color_name_set");
1992 "Default Color Attribute",
1993 "The name of the default color attribute used as a fallback for rendering");
1998 "rna_AttributeGroupMesh_active_color_name_get",
1999 "rna_AttributeGroupMesh_active_color_name_length",
2000 "rna_AttributeGroupMesh_active_color_name_set");
2002 "Active Color Attribute",
2003 "The name of the active color attribute for display and editing");
2010 srna =
RNA_def_struct(brna,
"AttributeGroupPointCloud",
nullptr);
2032 srna =
RNA_def_struct(brna,
"AttributeGroupGreasePencil",
nullptr);
2046 srna =
RNA_def_struct(brna,
"AttributeGroupGreasePencilDrawing",
nullptr);
2051 func =
RNA_def_function(srna,
"new",
"rna_AttributeGroupGreasePencilDrawing_new");
2054 parm =
RNA_def_string(func,
"name",
"Attribute", 0,
"Name",
"Name of geometry attribute");
2066 "Type of element that attribute is stored on");
2069 parm =
RNA_def_pointer(func,
"attribute",
"Attribute",
"",
"New geometry attribute");
2073 func =
RNA_def_function(srna,
"remove",
"rna_AttributeGroupGreasePencilDrawing_remove");
2076 parm =
RNA_def_pointer(func,
"attribute",
"Attribute",
"",
"Geometry Attribute");
2085 "rna_AttributeGroupGreasePencilDrawing_active_get",
2086 "rna_AttributeGroupGreasePencilDrawing_active_set",
2088 "rna_AttributeGroupGreasePencilDrawing_active_poll");
2094 prop,
"Active Attribute Index",
"Active attribute index or -1 when none are active");
2098 "rna_AttributeGroupGreasePencilDrawing_active_index_get",
2099 "rna_AttributeGroupGreasePencilDrawing_active_index_set",
2100 "rna_AttributeGroupGreasePencilDrawing_active_index_range");
2105 srna,
"domain_size",
"rna_AttributeGroupGreasePencilDrawing_domain_size");
2112 "Type of element that attribute is stored on");
2114 parm =
RNA_def_int(func,
"size", 0, 0, INT_MAX,
"Size",
"Size of the domain", 0, INT_MAX);
2125 "rna_AttributeGroup_iterator_begin",
2126 "rna_AttributeGroup_iterator_next",
2127 "rna_iterator_array_end",
2128 "rna_AttributeGroup_iterator_get",
2129 "rna_AttributeGroup_length",
2131 "rna_AttributeGroup_lookup_string",
2155 "rna_AttributeGroup_color_iterator_begin",
2156 "rna_AttributeGroup_color_iterator_next",
2157 "rna_iterator_array_end",
2158 "rna_AttributeGroup_color_iterator_get",
2159 "rna_AttributeGroup_color_length",
void BKE_id_attributes_default_color_set(struct ID *id, std::optional< blender::StringRef > name)
struct CustomDataLayer * BKE_attribute_new(AttributeOwner &owner, blender::StringRef name, eCustomDataType type, blender::bke::AttrDomain domain, struct ReportList *reports)
std::optional< blender::StringRefNull > BKE_attributes_active_name_get(AttributeOwner &owner)
int BKE_attribute_to_index(const AttributeOwner &owner, const CustomDataLayer *layer, AttrDomainMask domain_mask, eCustomDataMask layer_mask)
struct CustomDataLayer * BKE_attribute_search_for_write(AttributeOwner &owner, blender::StringRef name, eCustomDataMask type, AttrDomainMask domain_mask)
blender::bke::AttrDomain BKE_attribute_domain(const AttributeOwner &owner, const struct CustomDataLayer *layer)
CustomData * BKE_attributes_iterator_next_domain(AttributeOwner &owner, struct CustomDataLayer *layers)
int BKE_attribute_domain_size(const AttributeOwner &owner, int domain)
std::optional< blender::StringRef > BKE_id_attributes_default_color_name(const struct ID *id)
CustomDataLayer * BKE_attribute_from_index(AttributeOwner &owner, int lookup_index, AttrDomainMask domain_mask, eCustomDataMask layer_mask)
bool BKE_attribute_remove(AttributeOwner &owner, blender::StringRef name, struct ReportList *reports)
void BKE_attributes_active_set(AttributeOwner &owner, blender::StringRef name)
const struct CustomDataLayer * BKE_attribute_search(const AttributeOwner &owner, blender::StringRef name, eCustomDataMask type, AttrDomainMask domain_mask)
const struct CustomDataLayer * BKE_id_attributes_color_find(const struct ID *id, blender::StringRef name)
int * BKE_attributes_active_index_p(AttributeOwner &owner)
void BKE_id_attributes_active_color_clear(struct ID *id)
bool BKE_attribute_required(const AttributeOwner &owner, blender::StringRef name)
int BKE_attribute_data_length(AttributeOwner &owner, struct CustomDataLayer *layer)
std::optional< blender::StringRef > BKE_id_attributes_active_color_name(const struct ID *id)
#define ATTR_DOMAIN_MASK_COLOR
#define ATTR_DOMAIN_AS_MASK(domain)
bool BKE_attribute_rename(AttributeOwner &owner, blender::StringRef old_name, blender::StringRef new_name, struct ReportList *reports)
int BKE_attributes_length(const AttributeOwner &owner, AttrDomainMask domain_mask, eCustomDataMask mask)
void BKE_id_attributes_active_color_set(struct ID *id, std::optional< blender::StringRef > name)
void BKE_attributes_active_clear(AttributeOwner &owner)
Low-level operations for curves.
CustomData interface, see also DNA_customdata_types.h.
eCustomDataMask CD_TYPE_AS_MASK(eCustomDataType type)
void CustomData_ensure_data_is_mutable(CustomDataLayer *layer, int totelem)
size_t CustomData_get_elem_size(const CustomDataLayer *layer)
void BKE_report(ReportList *reports, eReportType type, const char *message)
MINLINE unsigned char round_fl_to_uchar_clamp(float a)
MINLINE void srgb_to_linearrgb_uchar4(float linear[4], const unsigned char srgb[4])
MINLINE void linearrgb_to_srgb_uchar4(unsigned char srgb[4], const float linear[4])
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
int char char int int int int size_t BLI_strnlen(const char *str, size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define BLT_I18NCONTEXT_AMOUNT
void DEG_id_tag_update(ID *id, unsigned int flags)
#define CD_MASK_COLOR_ALL
#define MAX_CUSTOMDATA_LAYER_NAME_NO_PREFIX
BLI_INLINE void IMB_colormanagement_srgb_to_scene_linear_v3(float scene_linear[3], const float srgb[3])
BLI_INLINE void IMB_colormanagement_scene_linear_to_rec709(float rec709[3], const float scene_linear[3])
BLI_INLINE void IMB_colormanagement_rec709_to_scene_linear(float scene_linear[3], const float rec709[3])
BLI_INLINE void IMB_colormanagement_scene_linear_to_srgb_v3(float srgb[3], const float scene_linear[3])
const EnumPropertyItem * rna_enum_attribute_domain_itemf(const AttributeOwner &owner, bool include_instances, bool *r_free)
BMesh const char void * data
AttributeOwnerType type() const
std::optional< blender::bke::MutableAttributeAccessor > get_accessor() const
static AttributeOwner from_id(ID *id)
GreasePencilDrawing * get_grease_pencil_drawing() const
blender::bke::AttributeStorage * get_storage() const
void append(const T &value)
VectorData< T, Allocator > release()
void copy_unsafe(char *dst) const
constexpr int64_t size() const
constexpr const char * c_str() const
bool domain_supported(const AttrDomain domain) const
int domain_size(const AttrDomain domain) const
Attribute & add(std::string name, bke::AttrDomain domain, bke::AttrType data_type, Attribute::DataVariant data)
Attribute * lookup(StringRef name)
void foreach(FunctionRef< void(Attribute &)> fn)
std::string unique_name_calc(StringRef name) const
void foreach_with_stop(FunctionRef< bool(Attribute &)> fn)
AttrStorageType storage_type() const
DataVariant & data_for_write()
AttrDomain domain() const
StringRefNull name() const
AttrType data_type() const
bool remove(const StringRef attribute_id)
float length(VecOp< float, D >) RET
std::optional< eCustomDataType > attr_type_to_custom_data_type(AttrType attr_type)
bool allow_procedural_attribute_access(StringRef attribute_name)
std::optional< AttrType > custom_data_type_to_attr_type(eCustomDataType data_type)
const CPPType * custom_data_type_to_cpp_type(eCustomDataType type)
const CPPType & attribute_type_to_cpp_type(AttrType type)
uint32_t struct_size(Span< shader::ShaderCreateInfo::PushConst > push_constants)
const PointerRNA PointerRNA_NULL
void * rna_iterator_array_get(CollectionPropertyIterator *iter)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, size_t itemsize, int64_t length, bool free_ptr, IteratorSkipFunc skip)
void rna_iterator_array_next(CollectionPropertyIterator *iter)
void rna_pointer_create_with_ancestors(const PointerRNA &parent, StructRNA *type, void *data, PointerRNA &r_ptr)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
static void rna_def_attribute_float4x4(BlenderRNA *brna)
static void rna_def_attribute_group_id_common(StructRNA *srna)
const EnumPropertyItem rna_enum_attribute_domain_only_mesh_items[]
static const EnumPropertyItem rna_enum_attr_storage_type[]
static void rna_def_attribute_short2(BlenderRNA *brna)
static void rna_def_attribute_int8(BlenderRNA *brna)
const EnumPropertyItem rna_enum_color_attribute_domain_items[]
static void rna_def_attribute_bool(BlenderRNA *brna)
static void rna_def_attribute(BlenderRNA *brna)
const EnumPropertyItem rna_enum_attribute_domain_with_auto_items[]
static void rna_def_attribute_quaternion(BlenderRNA *brna)
static void rna_def_attribute_group_grease_pencil(BlenderRNA *brna)
static void rna_def_attribute_group_mesh(BlenderRNA *brna)
const EnumPropertyItem rna_enum_attribute_domain_only_mesh_no_corner_items[]
static void rna_def_attribute_int2(BlenderRNA *brna)
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_curves_domain_items[]
const EnumPropertyItem rna_enum_attribute_domain_point_face_curve_items[]
static void rna_def_attribute_float_vector(BlenderRNA *brna)
static void rna_def_attribute_group_grease_pencil_drawing(BlenderRNA *brna)
const EnumPropertyItem rna_enum_attribute_domain_only_mesh_no_edge_items[]
static void rna_def_attribute_float_color(BlenderRNA *brna)
static void rna_def_attribute_float(BlenderRNA *brna)
const EnumPropertyItem rna_enum_attribute_domain_items[]
static void rna_def_attribute_int(BlenderRNA *brna)
static void rna_def_attribute_byte_color(BlenderRNA *brna)
void RNA_def_attribute(BlenderRNA *brna)
static void rna_def_attribute_float2(BlenderRNA *brna)
void rna_def_attributes_common(StructRNA *srna, const AttributeOwnerType type)
const EnumPropertyItem rna_enum_attribute_domain_without_corner_items[]
static void rna_def_attribute_group_pointcloud(BlenderRNA *brna)
const EnumPropertyItem rna_enum_attribute_type_items[]
static void rna_def_attribute_group_curves(BlenderRNA *brna)
const EnumPropertyItem rna_enum_attribute_type_with_auto_items[]
const EnumPropertyItem rna_enum_color_attribute_type_items[]
static void rna_def_attribute_string(BlenderRNA *brna)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
const int rna_matrix_dimsize_4x4[]
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void rna_AttributeGroup_iterator_next(CollectionPropertyIterator *iter)
void rna_AttributeGroup_color_iterator_next(CollectionPropertyIterator *iter)
int rna_AttributeGroup_length(PointerRNA *ptr)
int rna_AttributeGroup_color_length(PointerRNA *ptr)
bool rna_AttributeGroup_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
PointerRNA rna_AttributeGroup_color_iterator_get(CollectionPropertyIterator *iter)
void rna_AttributeGroup_iterator_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
void rna_AttributeGroup_color_iterator_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
PointerRNA rna_AttributeGroup_iterator_get(CollectionPropertyIterator *iter)
union CollectionPropertyIterator::@220100362304005352221007113371015217044252346141 internal
struct AttributeStorage attribute_storage
struct AttributeStorage attribute_storage
char * default_color_attribute
char * active_color_attribute
static ArrayData from_default_value(const CPPType &type, int64_t domain_size)
void WM_main_add_notifier(uint type, void *reference)