Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_attribute.h
| /* SPDX-License-Identifier: GPL-2.0-or-later | /* SPDX-License-Identifier: GPL-2.0-or-later | ||||
| * Copyright 2006 Blender Foundation. All rights reserved. */ | * Copyright 2006 Blender Foundation. All rights reserved. */ | ||||
| /** \file | /** \file | ||||
| * \ingroup bke | * \ingroup bke | ||||
| * \brief Generic geometry attributes built on CustomData. | * \brief Generic geometry attributes built on CustomData. | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #include "BLI_sys_types.h" | #include "BLI_sys_types.h" | ||||
| #include "BKE_customdata.h" | #include "BKE_customdata.h" | ||||
chrisbblend: Not required to include <string.h> or "BLI_string.h" here on my machine. | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| struct CustomData; | struct CustomData; | ||||
| struct CustomDataLayer; | struct CustomDataLayer; | ||||
| struct ID; | struct ID; | ||||
| struct ReportList; | struct ReportList; | ||||
Done Inline ActionsSeems unnecessary? brecht: Seems unnecessary? | |||||
| /** #Attribute.domain */ | /** #Attribute.domain */ | ||||
| typedef enum eAttrDomain { | typedef enum eAttrDomain { | ||||
| ATTR_DOMAIN_AUTO = -1, /* Use for nodes to choose automatically based on other data. */ | ATTR_DOMAIN_AUTO = -1, /* Use for nodes to choose automatically based on other data. */ | ||||
| ATTR_DOMAIN_POINT = 0, /* Mesh, Curve or Point Cloud Point */ | ATTR_DOMAIN_POINT = 0, /* Mesh, Curve or Point Cloud Point */ | ||||
| ATTR_DOMAIN_EDGE = 1, /* Mesh Edge */ | ATTR_DOMAIN_EDGE = 1, /* Mesh Edge */ | ||||
| ATTR_DOMAIN_FACE = 2, /* Mesh Face */ | ATTR_DOMAIN_FACE = 2, /* Mesh Face */ | ||||
| ATTR_DOMAIN_CORNER = 3, /* Mesh Corner */ | ATTR_DOMAIN_CORNER = 3, /* Mesh Corner */ | ||||
| ATTR_DOMAIN_CURVE = 4, /* A single curve in a larger curve data-block */ | ATTR_DOMAIN_CURVE = 4, /* A single curve in a larger curve data-block */ | ||||
| ▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | |||||
| struct CustomDataLayer *BKE_id_attributes_active_color_get(const struct ID *id); | struct CustomDataLayer *BKE_id_attributes_active_color_get(const struct ID *id); | ||||
| void BKE_id_attributes_active_color_set(struct ID *id, const char *name); | void BKE_id_attributes_active_color_set(struct ID *id, const char *name); | ||||
| struct CustomDataLayer *BKE_id_attributes_default_color_get(const struct ID *id); | struct CustomDataLayer *BKE_id_attributes_default_color_get(const struct ID *id); | ||||
| void BKE_id_attributes_default_color_set(struct ID *id, const char *name); | void BKE_id_attributes_default_color_set(struct ID *id, const char *name); | ||||
| struct CustomDataLayer *BKE_id_attributes_color_find(const struct ID *id, const char *name); | struct CustomDataLayer *BKE_id_attributes_color_find(const struct ID *id, const char *name); | ||||
| bool BKE_id_attribute_calc_unique_name(struct ID *id, const char *name, char *outname); | bool BKE_id_attribute_calc_unique_name(struct ID *id, const char *name, char *outname); | ||||
| const char *BKE_uv_map_vert_select_name_get(const char *uv_map_name, char *buffer); | |||||
| const char *BKE_uv_map_edge_select_name_get(const char *uv_map_name, char *buffer); | |||||
Done Inline Actionsselection -> select. campbellbarton: `selection` -> `select`. | |||||
| const char *BKE_uv_map_pin_name_get(const char *uv_map_name, char *buffer); | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
Done Inline ActionsMaybe this TODO come down to using the attribute API for more code and extending it to BMesh? Or did you have something else in mind? HooglyBoogly: Maybe this TODO come down to using the attribute API for more code and extending it to BMesh? | |||||
Done Inline ActionsI don't really understand you here. I was thinking of something like happens when uploading names to the GPU. Something with hashing. Or rather I was sticking my head in the sand, my fingers in my ears and going LALALA can't hear you ;-) For now I changed it into an assert. Ugly, but uv_map_name is supposed to be small enough... Baardaap: I don't really understand you here.
I was thinking of something like happens when uploading… | |||||
Done Inline ActionsThe attribute API still has the same name-length limitations as long as it is stored in CustomData layers I think? Baardaap: The attribute API still has the same name-length limitations as long as it is stored in… | |||||
Done Inline ActionsI think I misunderstood the todo comment. Thanks for explaining. HooglyBoogly: I think I misunderstood the todo comment. Thanks for explaining. | |||||
Not required to include <string.h> or "BLI_string.h" here on my machine.