32#include "RNA_prototypes.hh"
38#include <fmt/format.h>
50 constexpr size_t name_maxncpy = 256;
53 if (
name ==
nullptr) {
85 const char *structname =
nullptr, *propname =
nullptr;
87 const char *arrayname =
nullptr;
88 bool free_structname =
false;
112 char pchanName[name_maxncpy], constName[name_maxncpy];
116 structname =
BLI_sprintfN(
"%s : %s", pchanName, constName);
117 free_structname =
true;
119 else if (
ptr.data !=
ptr.owner_id) {
123 free_structname =
true;
134 char stripname[name_maxncpy];
136 fcu->
rna_path,
"sequence_editor.strips_all[", stripname,
sizeof(stripname)))
138 if (strstr(fcu->
rna_path,
".transform.") || strstr(fcu->
rna_path,
".crop.") ||
139 strstr(fcu->
rna_path,
".modifiers["))
141 const char *structname_all =
BLI_sprintfN(
"%s : %s", stripname, structname);
142 if (free_structname) {
145 structname = structname_all;
146 free_structname =
true;
157 if (free_structname) {
160 structname = node.label_or_name().c_str();
161 free_structname =
false;
167 if (free_structname) {
170 structname = node->label_or_name().c_str();
171 free_structname =
false;
182 *node_group, propname))
184 propname =
input->name;
191 propname = socket->
name;
206 arrayname = &arrayindbuf[0];
224 if (free_structname) {
237 constexpr size_t name_maxncpy = 256;
238 char name_buffer[name_maxncpy];
239 name_buffer[0] =
'\0';
242 for (
ID *user : slot.
users(bmain)) {
244 if (
icon.has_value()) {
294 std::string arrayname;
297 arrayname = std::string(1, c);
300 arrayname = fmt::format(
"[{}]", fcurve.
array_index);
302 return arrayname +
" " + propname;
308#define HSV_BANDWIDTH 0.3f
323 grouping = (4 - (tot % 2));
336 hsv[0] =
fmod(hsv[0], 1.0f);
340 hsv[1] = ((hsv[0] > 0.5f) && (hsv[0] < 0.8f)) ? 0.5f : 0.6f;
Functions and classes to work with Actions.
#define BLI_assert_unreachable()
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxncpy)
size_t size_t size_t BLI_snprintf_utf8(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define SNPRINTF_UTF8(dst, format,...)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
Read Guarded memory(de)allocation.
StructRNA * ID_code_to_RNA_type(short idcode)
std::string getname_anim_fcurve_for_slot(Main &bmain, const blender::animrig::Slot &slot, FCurve &fcurve)
std::optional< int > getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
void getcolor_fcurve_rainbow(int cur, int tot, float out[3])
constexpr bool is_empty() const
static constexpr int64_t not_found
constexpr int64_t find(char c, int64_t pos=0) const
Span< ID * > users(Main &bmain) const
void MEM_freeN(void *vmemh)
ccl_device_inline float2 fmod(const float2 a, const float b)
const bNodeTreeInterfaceSocket * node_find_interface_input_by_identifier(const bNodeTree &ntree, StringRef identifier)
bNode & node_find_node(bNodeTree &ntree, bNodeSocket &socket)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
bool RNA_property_array_check(PropertyRNA *prop)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
char * RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len)
char RNA_property_array_item_char(PropertyRNA *prop, int index)
const char * RNA_property_ui_name(const PropertyRNA *prop, const PointerRNA *ptr)
int RNA_struct_ui_icon(const StructRNA *type)
const char * RNA_struct_ui_name(const StructRNA *type)
PropertyRNA * RNA_struct_name_property(const StructRNA *type)
PointerRNA RNA_id_pointer_create(ID *id)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
struct bNodeTree * node_group