43 {
CD_PROP_FLOAT3,
"FLOAT_VECTOR", 0,
"Vector",
"3D vector with floating-point values"},
44 {
CD_PROP_COLOR,
"FLOAT_COLOR", 0,
"Color",
"RGBA color with floating-point precisions"},
45 {
CD_MLOOPCOL,
"BYTE_COLOR", 0,
"Byte Color",
"RGBA color with 8-bit precision"},
47 {
CD_PROP_BOOL,
"BOOLEAN", 0,
"Boolean",
"True or false"},
48 {
CD_PROP_FLOAT2,
"FLOAT2", 0,
"2D Vector",
"2D vector with floating-point values"},
100 return &RNA_FloatVectorAttribute;
119 return srna_by_custom_data_layer_type(layer->
type);
122 static void rna_Attribute_name_set(
PointerRNA *
ptr,
const char *value)
127 static int rna_Attribute_name_editable(
PointerRNA *
ptr,
const char **r_info)
131 *r_info =
N_(
"Can't modify name of required geometry attribute");
193 switch (layer->
type) {
201 struct_size =
sizeof(
float[3]);
216 struct_size =
sizeof(
float[2]);
247 static void rna_ByteColorAttributeValue_color_get(
PointerRNA *
ptr,
float *values)
253 static void rna_ByteColorAttributeValue_color_set(
PointerRNA *
ptr,
const float *values)
262 ID *
id,
ReportList *reports,
const char *name,
const int type,
const int domain)
291 static void rna_AttributeGroup_next_domain(
ID *
id,
299 if (customdata ==
NULL) {
303 iter, customdata->layers,
sizeof(
CustomDataLayer), customdata->totlayer,
false, skip);
304 }
while (!iter->
valid);
310 rna_AttributeGroup_next_domain(
ptr->
owner_id, iter, rna_Attributes_layer_skip);
319 rna_AttributeGroup_next_domain(
id, iter, rna_Attributes_layer_skip);
339 static int rna_AttributeGroup_active_index_get(
PointerRNA *
ptr)
351 return attribute_ptr;
363 static void rna_AttributeGroup_active_index_set(
PointerRNA *
ptr,
int value)
368 static void rna_AttributeGroup_active_index_range(
380 rna_Attribute_update_data(bmain,
scene,
ptr);
397 "rna_Attribute_data_begin",
398 "rna_iterator_array_next",
399 "rna_iterator_array_end",
400 "rna_iterator_array_get",
401 "rna_Attribute_data_length",
409 srna,
"Float Attribute Value",
"Floating-point value in geometry attribute");
424 srna,
"Float Vector Attribute",
"Vector geometry attribute, with floating-point precision");
429 "rna_Attribute_data_begin",
430 "rna_iterator_array_next",
431 "rna_iterator_array_end",
432 "rna_iterator_array_get",
433 "rna_Attribute_data_length",
442 srna,
"Float Vector Attribute Value",
"Vector value in geometry attribute");
460 srna,
"Float Color Attribute",
"Color geometry attribute, with floating-point precision");
465 "rna_Attribute_data_begin",
466 "rna_iterator_array_next",
467 "rna_iterator_array_end",
468 "rna_iterator_array_get",
469 "rna_Attribute_data_length",
495 srna,
"Byte Color Attribute",
"Color geometry attribute, with 8-bit precision");
500 "rna_Attribute_data_begin",
501 "rna_iterator_array_next",
502 "rna_iterator_array_end",
503 "rna_iterator_array_get",
504 "rna_Attribute_data_length",
518 "rna_ByteColorAttributeValue_color_get",
519 "rna_ByteColorAttributeValue_color_set",
537 "rna_Attribute_data_begin",
538 "rna_iterator_array_next",
539 "rna_iterator_array_end",
540 "rna_iterator_array_get",
541 "rna_Attribute_data_length",
566 "rna_Attribute_data_begin",
567 "rna_iterator_array_next",
568 "rna_iterator_array_end",
569 "rna_iterator_array_get",
570 "rna_Attribute_data_length",
595 "rna_Attribute_data_begin",
596 "rna_iterator_array_next",
597 "rna_iterator_array_end",
598 "rna_iterator_array_get",
599 "rna_Attribute_data_length",
620 srna,
"Float2 Attribute",
"2D vector geometry attribute, with floating-point precision");
625 "rna_Attribute_data_begin",
626 "rna_iterator_array_next",
627 "rna_iterator_array_end",
628 "rna_iterator_array_get",
629 "rna_Attribute_data_length",
673 prop,
"rna_Attribute_domain_get",
NULL,
"rna_Attribute_domain_itemf");
704 parm =
RNA_def_string(func,
"name",
"Attribute", 0,
"",
"Attribute name");
714 "Type of element that attribute is stored on");
716 parm =
RNA_def_pointer(func,
"attribute",
"Attribute",
"",
"New geometry attribute");
723 parm =
RNA_def_pointer(func,
"attribute",
"Attribute",
"",
"Geometry Attribute");
731 prop,
"rna_AttributeGroup_active_get",
"rna_AttributeGroup_active_set",
NULL,
NULL);
739 "rna_AttributeGroup_active_index_get",
740 "rna_AttributeGroup_active_index_set",
741 "rna_AttributeGroup_active_index_range");
752 "rna_AttributeGroup_iterator_begin",
753 "rna_AttributeGroup_iterator_next",
754 "rna_iterator_array_end",
755 "rna_AttributeGroup_iterator_get",
756 "rna_AttributeGroup_length",
Generic geometry attributes built on CustomData.
int BKE_id_attribute_data_length(struct ID *id, struct CustomDataLayer *layer)
bool BKE_id_attribute_remove(struct ID *id, struct CustomDataLayer *layer, struct ReportList *reports)
struct CustomDataLayer * BKE_id_attributes_active_get(struct ID *id)
int * BKE_id_attributes_active_index_p(struct ID *id)
void BKE_id_attributes_active_set(struct ID *id, struct CustomDataLayer *layer)
int BKE_id_attributes_length(struct ID *id, const CustomDataMask mask)
bool BKE_id_attribute_rename(struct ID *id, struct CustomDataLayer *layer, const char *new_name, struct ReportList *reports)
struct CustomDataLayer * BKE_id_attribute_new(struct ID *id, const char *name, const int type, const AttributeDomain domain, struct ReportList *reports)
CustomData * BKE_id_attributes_iterator_next_domain(struct ID *id, struct CustomDataLayer *layers)
AttributeDomain BKE_id_attribute_domain(struct ID *id, struct CustomDataLayer *layer)
bool BKE_id_attribute_required(struct ID *id, struct CustomDataLayer *layer)
CustomData interface, see also DNA_customdata_types.h.
#define CD_TYPE_AS_MASK(_type)
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])
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
void DEG_id_tag_update(struct ID *id, int flag)
struct MBoolProperty MBoolProperty
struct MStringProperty MStringProperty
struct MIntProperty MIntProperty
struct MFloatProperty MFloatProperty
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
StructRNA RNA_Float2Attribute
StructRNA RNA_StringAttribute
#define RNA_POINTER_INVALIDATE(ptr)
StructRNA RNA_ByteColorAttribute
StructRNA RNA_FloatAttribute
StructRNA RNA_BoolAttribute
StructRNA RNA_IntAttribute
StructRNA RNA_FloatColorAttribute
const EnumPropertyItem * rna_enum_attribute_domain_itemf(struct ID *id, bool *r_free)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
const PointerRNA PointerRNA_NULL
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
void * rna_iterator_array_get(CollectionPropertyIterator *iter)
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
void rna_iterator_array_next(CollectionPropertyIterator *iter)
static void rna_def_attribute_bool(BlenderRNA *brna)
static void rna_def_attribute(BlenderRNA *brna)
const EnumPropertyItem rna_enum_attribute_domain_with_auto_items[]
void rna_def_attributes_common(StructRNA *srna)
static void rna_def_attribute_float_vector(BlenderRNA *brna)
static void rna_def_attribute_float_color(BlenderRNA *brna)
static void rna_def_attribute_float(BlenderRNA *brna)
static void rna_def_attribute_group(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)
const EnumPropertyItem rna_enum_attribute_type_items[]
static void rna_def_attribute_string(BlenderRNA *brna)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
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)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
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_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
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)
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)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
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)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
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)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void rna_AttributeGroup_iterator_next(CollectionPropertyIterator *iter)
int rna_AttributeGroup_length(PointerRNA *ptr)
void rna_AttributeGroup_iterator_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
PointerRNA rna_AttributeGroup_iterator_get(CollectionPropertyIterator *iter)
union CollectionPropertyIterator::@1099 internal
void WM_main_add_notifier(unsigned int type, void *reference)