27#include "RNA_prototypes.hh"
33#include "fmt/format.h"
44 constexpr size_t name_maxncpy = 256;
47 if (name ==
nullptr) {
79 const char *structname =
nullptr, *propname =
nullptr;
81 const char *arrayname =
nullptr;
82 bool free_structname =
false;
106 char pchanName[name_maxncpy], constName[name_maxncpy];
110 structname =
BLI_sprintfN(
"%s : %s", pchanName, constName);
111 free_structname =
true;
117 free_structname =
true;
128 char stripname[name_maxncpy];
130 fcu->
rna_path,
"sequence_editor.sequences_all[", stripname,
sizeof(stripname)))
132 if (strstr(fcu->
rna_path,
".transform.") || strstr(fcu->
rna_path,
".crop.") ||
133 strstr(fcu->
rna_path,
".modifiers["))
135 const char *structname_all =
BLI_sprintfN(
"%s : %s", stripname, structname);
136 if (free_structname) {
139 structname = structname_all;
140 free_structname =
true;
150 char nodename[name_maxncpy];
152 const char *structname_all =
BLI_sprintfN(
"%s : %s", nodename, structname);
153 if (free_structname) {
156 structname = structname_all;
157 free_structname =
true;
177 arrayname = &arrayindbuf[0];
188 BLI_snprintf(name, name_maxncpy,
"%s%s (%s)", arrayname, propname, structname);
191 BLI_snprintf(name, name_maxncpy,
"%s%s", arrayname, propname);
195 if (free_structname) {
201 fcu->
flag &= ~FCURVE_DISABLED;
212 constexpr size_t name_maxncpy = 256;
213 char name_buffer[name_maxncpy];
214 name_buffer[0] =
'\0';
217 for (
ID *user : slot.
users(bmain)) {
219 if (
icon.has_value()) {
269 std::string arrayname =
"";
272 arrayname = std::string(1, c);
275 arrayname = fmt::format(
"[{}]", fcurve.
array_index);
277 return arrayname +
" " + propname;
283#define HSV_BANDWIDTH 0.3f
298 grouping = (4 - (tot % 2));
311 hsv[0] =
fmod(hsv[0], 1.0f);
315 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
#define SNPRINTF(dst, format,...)
size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxncpy)
char * BLI_strncpy(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
draw_view in_light_buf[] float
void MEM_freeN(void *vmemh)
ccl_device_inline float2 fmod(const float2 a, const float b)
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)
int RNA_struct_ui_icon(const StructRNA *type)
const char * RNA_struct_ui_name(const StructRNA *type)
const char * RNA_property_ui_name(const PropertyRNA *prop)
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)