15#include <fmt/format.h>
57#include "RNA_prototypes.hh"
84#define USE_INT_IDPROPS_FOR_BOOLEAN_RNA_PROP
95 if (!srna->cont.prop_lookup_set) {
96 srna->cont.prop_lookup_set =
97 MEM_new<CustomIDVectorSet<PropertyRNA *, PropertyRNAIdentifierGetter>>(__func__);
101 srna->cont.prop_lookup_set->add(&prop);
106 brna.
structs_map.add(srna->identifier, srna.get());
124 MEM_SAFE_DELETE(srna->cont.prop_lookup_set);
136 if (type == r_ptr.
type) {
153 r_ptr = {
static_cast<ID *
>(
data), type,
data};
167 return {
nullptr, RNA_BlendData,
main};
209 if (ancestor_idx >= ptr.
ancestors.size()) {
219 ptr.
ancestors.as_span().slice(0, ancestor_idx)};
233 ptr.
type = RNA_BlenderRNA;
274 if (type ==
nullptr) {
287 if (property_ptr ==
nullptr) {
291 if (create && *property_ptr ==
nullptr) {
295 return *property_ptr;
317 printf(
"Got unexpected IDProp container when trying to retrieve %s: %d\n", name, group->
type);
326 if (type ==
nullptr) {
339 if (property_ptr ==
nullptr) {
343 if (create && *property_ptr ==
nullptr) {
347 return *property_ptr;
370 printf(
"Got unexpected IDProp container when trying to retrieve %s: %d\n", name, group->
type);
507 &rna_PropertyGroupItem_string,
508 &rna_PropertyGroupItem_int,
509 &rna_PropertyGroupItem_float,
513 &rna_PropertyGroupItem_group,
514 &rna_PropertyGroupItem_id,
515 &rna_PropertyGroupItem_double,
516 &rna_PropertyGroupItem_idp_array,
517 &rna_PropertyGroupItem_bool,
522 &rna_PropertyGroupItem_int_array,
523 &rna_PropertyGroupItem_float_array,
527 &rna_PropertyGroupItem_collection,
529 &rna_PropertyGroupItem_double_array,
531 &rna_PropertyGroupItem_bool_array,
543 return is_prop_builtin || !is_meta_type || is_prop_of_meta_type;
556 *r_prop_rna_or_id = {};
558 r_prop_rna_or_id->
ptr = ptr;
559 r_prop_rna_or_id->
rawprop = prop;
564 r_prop_rna_or_id->
rnaprop = prop;
593 r_prop_rna_or_id->
is_set =
true;
601 if (idprop_evaluated !=
nullptr &&
idprop->type != idprop_evaluated->
type) {
602 idprop_evaluated =
nullptr;
605 r_prop_rna_or_id->
idprop = idprop_evaluated;
608 r_prop_rna_or_id->
is_set = (idprop_evaluated !=
nullptr);
614 r_prop_rna_or_id->
array_len = idprop_evaluated !=
nullptr ?
uint(idprop_evaluated->
len) : 0;
622 r_prop_rna_or_id->
rnaprop = &rna_PropertyGroupItem_enum;
637 *prop = prop_rna_or_id.
rnaprop;
638 return prop_rna_or_id.
idprop;
660 return &rna_PropertyGroupItem_enum;
672 return (
reinterpret_cast<const IDProperty *
>(prop))->name;
698 name = (
reinterpret_cast<const IDProperty *
>(prop))->name;
766 fmt::memory_buffer buf;
767 fmt::appender dst{buf};
768 fmt::format_to(dst,
"Type: {}\n", type.
identifier);
774 return fmt::to_string(buf);
785 if (type->
base == parent_type) {
837 if (srna == RNA_AnyType) {
846 for (base = type; base; base = base->
base) {
857 if (identifier[0] ==
'[' && identifier[1] ==
'"') {
890 }
while ((srna = srna->
base));
926 if (prop_type == property_type_check) {
930 "'%s : %s()' expected, got '%s : %s()'",
949 if (prop_type ==
PROP_COLLECTION && prop_struct_type == struct_type_check) {
955 "'%s : %s(type = %s)' expected, got '%s : %s()'",
965 "'%s : %s(type = %s)' expected, got '%s : %s(type = %s)'.",
1003 if (prop_test ==
static_cast<PropertyRNA *
>(itemptr.data)) {
1035 for (
int i = ptr->
ancestors.size() - 1; i >= 0; i--) {
1043 return std::nullopt;
1063 const UString identifier_ustr(identifier);
1064 for (; srna; srna = srna->
base) {
1066 if (prop !=
nullptr) {
1076 const UString identifier(identifier_c_str);
1077 for (; srna; srna = srna->
base) {
1078 std::unique_ptr<FunctionRNA> *func = std::find_if(
1080 return func->identifier == identifier;
1100 func = funcptr.data;
1126 }
while ((type = type->
base));
1139 }
while ((type = type->
base));
1169 *r_nameprop = nameprop;
1189 if (srna_exists !=
nullptr) [[unlikely]] {
1196 if (srna_exists->
base) {
1217 const char *identifier,
1220 const int len_sep = strlen(sep);
1221 const int len_id = strlen(identifier);
1222 const char *p = strstr(identifier, sep);
1226 const bool failure =
true;
1229 const bool failure =
false;
1231 if (p ==
nullptr || p == identifier || p + len_sep >= identifier + len_id) {
1234 "'%s' does not contain '%s' with prefix and suffix",
1240 const char *c, *start, *end, *last;
1244 for (c = start; c != end; c++) {
1245 if (((*c >=
'A' && *c <=
'Z') || ((c != start) && (*c >=
'0' && *c <=
'9')) ||
1246 ((c != start) && (c != last) && (*c ==
'_'))) == 0)
1250 "'%s' does not have upper case alphanumeric prefix",
1256 start = p + len_sep;
1257 end = identifier + len_id;
1259 for (c = start; c != end; c++) {
1260 if (((*c >=
'A' && *c <=
'Z') || (*c >=
'a' && *c <=
'z') || (*c >=
'0' && *c <=
'9') ||
1261 ((c != start) && (c != last) && (*c ==
'_'))) == 0)
1265 "'%s' does not have an alphanumeric suffix",
1328 switch (rna_prop->
type) {
1398 return len[dimension];
1403 const char *vectoritem =
"XYZW";
1404 const char *quatitem =
"WXYZ";
1405 const char *coloritem =
"RGBA";
1412 return quatitem[
index];
1425 return vectoritem[
index];
1428 return coloritem[
index];
1453 else if (
ELEM(subtype,
1493 int softmin, softmax;
1499 *hardmin = ui_data->
min;
1500 *hardmax = ui_data->
max;
1513 iprop->
range(ptr, hardmin, hardmax, &softmin, &softmax);
1519 iprop->
range_ex(ptr, prop, hardmin, hardmax, &softmin, &softmax);
1531 int hardmin, hardmax;
1556 iprop->
range(ptr, &hardmin, &hardmax, softmin, softmax);
1558 *softmin =
max_ii(*softmin, hardmin);
1559 *softmax =
min_ii(*softmax, hardmax);
1565 iprop->
range_ex(ptr, prop, &hardmin, &hardmax, softmin, softmax);
1567 *softmin =
max_ii(*softmin, hardmin);
1568 *softmax =
min_ii(*softmax, hardmax);
1577 float softmin, softmax;
1597 fprop->
range(ptr, hardmin, hardmax, &softmin, &softmax);
1603 fprop->
range_ex(ptr, prop, hardmin, hardmax, &softmin, &softmax);
1619 float hardmin, hardmax;
1646 fprop->
range(ptr, &hardmin, &hardmax, softmin, softmax);
1648 *softmin =
max_ff(*softmin, hardmin);
1649 *softmax =
min_ff(*softmax, hardmax);
1655 fprop->
range_ex(ptr, prop, &hardmin, &hardmax, softmin, softmax);
1657 *softmin =
max_ff(*softmin, hardmin);
1658 *softmax =
min_ff(*softmax, hardmax);
1730 if (pprop->
type_fn && is_ptr_data_usable) {
1747 return RNA_UnknownType;
1776 return pprop->
poll(ptr, *value);
1782 const bool use_static,
1798 BLI_assert(idprop_item.identifier !=
nullptr);
1801 idprop_item.identifier,
1804 idprop_item.description ? idprop_item.description :
""};
1813 *r_totitem = totitem - 1;
1824 if (!use_static && (eprop->
item_fn !=
nullptr)) {
1828 if (
C !=
nullptr || no_context) {
1838 item = eprop->
item_fn(no_context ?
nullptr :
C, ptr, prop, r_free);
1856 *r_item = eprop->
item;
1872#ifdef WITH_INTERNATIONAL
1873static void property_enum_translate(PropertyRNA *prop,
1874 EnumPropertyItem **r_item,
1884 EnumPropertyItem *nitem;
1886 if (!(do_iface || do_tooltip)) {
1902 for (tot = 0; item[tot].identifier; tot++) {
1915 for (i = 0; nitem[i].identifier; i++) {
1916 if (nitem[i].name && do_iface) {
1917 nitem[i].name =
BLT_pgettext(translation_context, nitem[i].name);
1919 if (nitem[i].description && do_tooltip) {
1920 nitem[i].description =
BLT_pgettext(
nullptr, nitem[i].description);
1938#ifdef WITH_INTERNATIONAL
1941 property_enum_translate(prop, (
EnumPropertyItem **)r_item, r_totitem, r_free);
1956 size_t(eprop->
totitem) + 1,
"enum_gettext_all");
1958 memcpy(item_array, eprop->
item, mem_size);
1964 if (eprop->
item_fn !=
nullptr) {
1968 if (
C !=
nullptr || no_context) {
1980 item = eprop->
item_fn(no_context ?
nullptr :
nullptr, ptr, prop, &
free);
1985 for (i = 0; i < eprop->
totitem; i++) {
1986 bool exists =
false;
1991 for (i_fixed = 0; item[i_fixed].
identifier; i_fixed++) {
1992 if (
STREQ(item[i_fixed].identifier, item_array[i].identifier)) {
1999 item_array[i].
name =
nullptr;
2010#ifdef WITH_INTERNATIONAL
2011 property_enum_translate(prop, &item_array, r_totitem, r_free);
2013 *r_item = item_array;
2028 *r_value = item[i].
value;
2057 const char **r_identifier)
2065 r_identifier[
index] =
nullptr;
2073 *r_name = item[i].
name;
2081 const char *translation_context,
2082 const char **r_name)
2097 const char **r_description)
2119 const char *identifier,
2126 *r_value = item[i].
value;
2280 if (
const char *name = prop->
ui_name_func(ptr, prop,
true)) {
2290 if (
const char *name = prop->
ui_name_func(ptr, prop,
false)) {
2342 const char **r_info)
2348 const char *info =
"";
2354 if (r_info !=
nullptr) {
2365 if (r_info !=
nullptr && (*r_info)[0] ==
'\0') {
2366 *r_info =
N_(
"This property is for internal use only and cannot be edited");
2372 if (
id ==
nullptr) {
2379 if (is_linked_prop_exception) {
2382 if (r_info !=
nullptr && (*r_info)[0] ==
'\0') {
2383 *r_info =
N_(
"Cannot edit this property from a linked data-block");
2390 if (r_info !=
nullptr && (*r_info)[0] ==
'\0') {
2391 *r_info =
N_(
"Cannot edit this property from an override data-block");
2395 if (is_liboverride_system && !is_linked_prop_exception) {
2396 if (r_info !=
nullptr && (*r_info)[0] ==
'\0') {
2397 *r_info =
N_(
"Cannot edit this property from a system override data-block");
2425 const char *dummy_info;
2465 if (anim_data && anim_data->
action &&
2487 nullptr, ptr->
owner_id,
nullptr,
nullptr);
2489 if (linked_reference_anim_data) {
2500 bool driven, special;
2528 if (
RNA_path_resolve(&id_ptr, path->c_str(), &ptr_test, &prop_test) ==
true) {
2529 ret = (prop == prop_test);
2557 prop->
update(bmain, scene, ptr);
2578 const short id_type = ptr->
owner_id->id_type();
2605 if (!is_rna || (is_idprop && use_deg_update)) {
2665 if (prop_rna_or_id.
idprop) {
2666#ifdef USE_INT_IDPROPS_FOR_BOOLEAN_RNA_PROP
2674 return bprop->
get(ptr);
2677 return bprop->
get_ex(ptr, bprop);
2722#ifdef USE_INT_IDPROPS_FOR_BOOLEAN_RNA_PROP
2729 else if (bprop->
set) {
2730 bprop->
set(ptr, value);
2732 else if (bprop->
set_ex) {
2733 bprop->
set_ex(ptr, bprop, value);
2737#ifdef USE_INT_IDPROPS_FOR_BOOLEAN_RNA_PROP
2753 const bool *defarr,
int defarr_length,
bool defvalue,
int out_length,
bool *r_values)
2755 if (defarr && defarr_length > 0) {
2756 defarr_length = std::min(defarr_length, out_length);
2757 memcpy(r_values, defarr,
sizeof(
bool) * defarr_length);
2763 for (
int i = defarr_length; i < out_length; i++) {
2764 r_values[i] = defvalue;
2769 const int *defarr,
int defarr_length,
bool defvalue,
int out_length,
bool *r_values)
2771 if (defarr && defarr_length > 0) {
2772 defarr_length = std::min(defarr_length, out_length);
2773 for (
int i = 0; i < defarr_length; i++) {
2774 r_values[i] = defarr[i] != 0;
2781 for (
int i = defarr_length; i < out_length; i++) {
2782 r_values[i] = defvalue;
2808 if (prop_rna_or_id.
idprop) {
2819 for (
int i = 0; i <
idprop->len; i++) {
2820 r_values[i] = bool(values_src[i]);
2825 for (
int i = 0; i <
idprop->len; i++) {
2826 r_values[i] = values_src[i];
2866 ptr, bprop, curr_values.
data(), prop_rna_or_id.
is_set, r_values.
data());
2877 if (values_num >= array_num) {
2884 memcpy(values, value_buf.
data(),
sizeof(*values) * values_num);
2907 value = tmparray[
index];
2908 MEM_delete(tmparray);
2944 final_values.
data(),
2947 final_values_storage.
data());
2948 final_values = final_values_storage.
as_span();
2968 final_values.
data(),
2969 sizeof(
decltype(final_values)::value_type) *
idprop->len);
2974 for (
int i = 0; i <
idprop->len; i++) {
2975 values_dst[i] = int(final_values[i]);
2994#ifdef USE_INT_IDPROPS_FOR_BOOLEAN_RNA_PROP
3002#ifdef USE_INT_IDPROPS_FOR_BOOLEAN_RNA_PROP
3004 for (
int i = 0; i <
idprop->len; i++) {
3005 values_dst[i] = int(final_values[i]);
3009 for (
int i = 0; i <
idprop->len; i++) {
3010 values_dst[i] = final_values[i];
3024 if (values_num >= array_num) {
3031 memcpy(value_buf.
data(), values,
sizeof(*values) * values_num);
3056 tmparray[
index] = value;
3058 MEM_delete(tmparray);
3173 bool *tmparray, value;
3177 value = tmparray[
index];
3178 MEM_delete(tmparray);
3185 if (prop_rna_or_id.
idprop) {
3190 return iprop->
get(ptr);
3193 return iprop->
get_ex(ptr, iprop);
3242 else if (iprop->
set) {
3243 iprop->
set(ptr, value);
3245 else if (iprop->
set_ex) {
3246 iprop->
set_ex(ptr, iprop, value);
3260 const int *defarr,
int defarr_length,
int defvalue,
int out_length,
int *r_values)
3262 if (defarr && defarr_length > 0) {
3263 defarr_length = std::min(defarr_length, out_length);
3264 memcpy(r_values, defarr,
sizeof(
int) * defarr_length);
3270 for (
int i = defarr_length; i < out_length; i++) {
3271 r_values[i] = defvalue;
3297 if (prop_rna_or_id.
idprop) {
3305 memcpy(r_values.
data(),
3307 sizeof(
decltype(r_values)::value_type) *
idprop->len);
3346 ptr, iprop, curr_values.
data(), prop_rna_or_id.
is_set, r_values.
data());
3357 if (values_num >= array_num) {
3364 memcpy(values, value_buf.
data(),
sizeof(*values) * values_num);
3371 if (array_len <= 0) {
3375 else if (array_len == 1) {
3377 values[1] = values[0];
3384 if (array_len > 32) {
3392 values[0] = values[1] = arr[0];
3393 for (i = 1; i < array_len; i++) {
3394 values[0] = std::min(values[0], arr[i]);
3395 values[1] = std::max(values[1], arr[i]);
3398 if (arr != arr_stack) {
3418 int *tmparray, value;
3422 value = tmparray[
index];
3423 MEM_delete(tmparray);
3443 Span<int> final_values(values, values_num);
3456 final_values.
data(),
3459 final_values_storage.
data());
3460 final_values = final_values_storage.
as_span();
3470 final_values.
data(),
3471 sizeof(
decltype(final_values)::value_type) *
idprop->len);
3503 if (values_num >= array_num) {
3510 memcpy(value_buf.
data(), values,
sizeof(*values) * values_num);
3534 tmparray[
index] = value;
3536 MEM_delete(tmparray);
3627 int *tmparray, value;
3631 value = tmparray[
index];
3632 MEM_delete(tmparray);
3639 if (prop_rna_or_id.
idprop) {
3648 return fprop->
get(ptr);
3651 return fprop->
get_ex(ptr, fprop);
3705 else if (fprop->
set) {
3706 fprop->
set(ptr, value);
3708 else if (fprop->
set_ex) {
3709 fprop->
set_ex(ptr, fprop, value);
3723 const float *defarr,
int defarr_length,
float defvalue,
int out_length,
float *r_values)
3725 if (defarr && defarr_length > 0) {
3726 defarr_length = std::min(defarr_length, out_length);
3727 memcpy(r_values, defarr,
sizeof(
float) * defarr_length);
3733 for (
int i = defarr_length; i < out_length; i++) {
3734 r_values[i] = defvalue;
3742 const int default_array_len,
3743 const double default_value,
3744 const int out_length,
3747 const int array_copy_len = std::min(out_length, default_array_len);
3749 for (
int i = 0; i < array_copy_len; i++) {
3750 r_values[i] =
float(default_array[i]);
3753 for (
int i = array_copy_len; i < out_length; i++) {
3754 r_values[i] =
float(default_value);
3780 if (prop_rna_or_id.
idprop) {
3788 memcpy(r_values.
data(),
3790 sizeof(
decltype(r_values)::value_type) *
idprop->len);
3794 for (
int i = 0; i <
idprop->len; i++) {
3795 r_values[i] =
float(src_values[i]);
3836 ptr, fprop, curr_values.
data(), prop_rna_or_id.
is_set, r_values.
data());
3847 if (values_num >= array_num) {
3854 memcpy(values, value_buf.
data(),
sizeof(*values) * values_num);
3861 if (array_len <= 0) {
3865 else if (array_len == 1) {
3867 values[1] = values[0];
3870 float arr_stack[32];
3874 if (array_len > 32) {
3882 values[0] = values[1] = arr[0];
3883 for (i = 1; i < array_len; i++) {
3884 values[0] = std::min(values[0], arr[i]);
3885 values[1] = std::max(values[1], arr[i]);
3888 if (arr != arr_stack) {
3908 float *tmparray, value;
3912 value = tmparray[
index];
3913 MEM_delete(tmparray);
3946 final_values.
data(),
3949 final_values_storage.
data());
3950 final_values = final_values_storage.
as_span();
3965 final_values.
data(),
3966 sizeof(
decltype(final_values)::value_type) *
idprop->len);
3970 for (
int i = 0; i <
idprop->len; i++) {
3971 dst_values[i] = double(final_values[i]);
3999 const float *values,
4004 if (values_num >= array_num) {
4011 memcpy(value_buf.
data(), values,
sizeof(*values) * values_num);
4035 tmparray[
index] = value;
4037 MEM_delete(tmparray);
4126 float *tmparray, value;
4130 value = tmparray[
index];
4131 MEM_delete(tmparray);
4138 if (prop_rna_or_id.
idprop) {
4141 return size_t(
idprop->len);
4148 return size_t(
idprop->len - 1);
4153 return sprop->
length(ptr);
4156 return size_t(sprop->
length_ex(ptr, sprop));
4160 return default_value.size();
4167 if (prop_rna_or_id.
idprop) {
4177 std::string string_ret;
4178 string_ret.resize(
length);
4180 sprop->
get(ptr, string_ret.
data());
4184 return sprop->
get_ex(ptr, sprop);
4208 "Returned string exceeds the property's max length");
4217 memcpy(value, string_ret.c_str(), string_ret.size() + 1);
4230 if (string_ret.size() < fixedlen) {
4237 memcpy(buf, string_ret.c_str(), string_ret.size() + 1);
4239 *r_len = int(string_ret.size());
4263 return int(string_final.size());
4281 std::string value_set = value ? value :
"";
4285 value_set = sprop->
set_transform(ptr, sprop, value_set, curr_value, prop_rna_or_id.
is_set);
4293 else if (sprop->
set) {
4294 sprop->
set(ptr, value_set.c_str());
4296 else if (sprop->
set_ex) {
4297 sprop->
set_ex(ptr, sprop, value_set);
4322 std::string value_set = {value, size_t(
len)};
4326 value_set = sprop->
set_transform(ptr, sprop, value_set, curr_value, prop_rna_or_id.
is_set);
4331 memcpy(
idprop->data.pointer, value_set.data(), value_set.size());
4334 else if (sprop->
set) {
4335 sprop->
set(ptr, value_set.c_str());
4337 else if (sprop->
set_ex) {
4338 sprop->
set_ex(ptr, sprop, value_set);
4343 val.
string.str = value_set.c_str();
4344 val.
string.len = value_set.size();
4355 const int value_maxncpy)
4377 std::string default_value = sprop->
get_default(ptr, prop);
4382 BLI_strncpy(value, default_value.c_str(), value_maxncpy);
4404 if (
length + 1 < fixedlen) {
4440 const std::string default_value = sprop->
get_default(ptr, prop);
4441 return default_value.size();
4466 const char *edit_text,
4472 sprop->
search(
C, ptr, prop, edit_text, visit_fn);
4484 return std::nullopt;
4491 if (prop_rna_or_id.
idprop) {
4496 return eprop->
get(ptr);
4499 return eprop->
get_ex(ptr, eprop);
4547 else if (eprop->
set) {
4548 eprop->
set(ptr, value);
4550 else if (eprop->
set_ex) {
4551 eprop->
set_ex(ptr, eprop, value);
4591 int result_value = from_value;
4593 int single_step = (
step < 0) ? -1 : 1;
4600 MEM_delete(item_array);
4602 return result_value;
4609 i =
mod_i(i + single_step, totitem);
4610 if (item_array[i].identifier[0]) {
4611 step_tot += single_step;
4613 }
while ((i != i_init) && (step_tot !=
step));
4616 result_value = item_array[i].
value;
4620 MEM_delete(item_array);
4623 return result_value;
4650 return pprop->
get(ptr);
4656 std::scoped_lock
lock(mutex);
4693 "%s: expected %s type, not %s",
4712 "If the property is tagged with ID reference-counting, "
4713 "its current value should be null or an ID");
4728 pprop->
set(ptr, ptr_value, reports);
4741 "If the property is tagged with ID reference-counting, its current value should be "
4744 static_cast<ID *
>(current_id_ptr.
data) :
4749 if (
ELEM(old_id, new_id, current_id)) {
4751 "Reassigning the same ID to a RNA pointer property, or assignment failure, "
4752 "should not modify the original ID user-count");
4754 else if (is_id_refcounting) {
4756 old_id_new_refcount < old_id_old_refcount,
4757 "Unassigning an ID from a reference-counting RNA pointer property should decrease "
4762 old_id_new_refcount == old_id_old_refcount,
4763 "Unassigning an ID from a non-reference-counting RNA pointer property should not "
4764 "modify its user-count");
4767 if (new_id && new_id != old_id) {
4769 if (current_id == old_id) {
4771 "Failed assigning a new ID to a RNA pointer property, should not modify "
4772 "the new ID user-count");
4774 else if (is_id_refcounting) {
4776 new_id_new_refcount > new_id_old_refcount,
4777 "Assigning an ID to a reference-counting RNA pointer property should increase "
4782 new_id_new_refcount == new_id_old_refcount,
4783 "Assigning an ID to a non-reference-counting RNA pointer property should not "
4784 "modify its user-count");
4793 ID *value =
static_cast<ID *
>(ptr_value.
data);
4798 "%s: expected ID type, not %s",
4804 BKE_reportf(reports,
RPT_ERROR,
"%s: cannot assign an embedded ID to an IDProperty", __func__);
4845 if (pprop->id_default_session_uid != 0) {
4874 printf(
"%s %s.%s: only supported for id properties.\n",
4895 printf(
"%s %s.%s: only supported for id properties.\n",
4946 cprop->
begin(iter, ptr);
4988 for (i = 0; i <
num && iter->
valid; i++) {
5018 return cprop->
length(ptr);
5037 bool test = iter.
valid;
5047 bool *r_is_liboverride)
5050 if (
id ==
nullptr) {
5051 *r_is_liboverride =
false;
5057 if (!is_liboverride) {
5087 bool is_liboverride;
5099 if (is_liboverride) {
5117 if (is_liboverride) {
5147 bool is_liboverride;
5159 if (key >= 0 && key <
len) {
5165 if (key + 1 <
len) {
5191 bool is_liboverride;
5201 if (src_index < 0 || src_index >=
len || dst_index < 0 || dst_index >=
len) {
5210 if (src_index != dst_index) {
5213 if (dst_index < src_index) {
5214 memmove(
array + dst_index + 1,
5216 sizeof(
IDProperty) * (src_index - dst_index));
5219 memmove(
array + src_index,
5220 array + src_index + 1,
5221 sizeof(
IDProperty) * (dst_index - src_index));
5241 bool is_liboverride;
5247 if (is_liboverride) {
5251 for (
int i = 0; i <
len; i++) {
5335 return cprop->
lookupint(ptr, key, r_ptr);
5379 char name_buf[256], *name;
5381 int keylen = strlen(key);
5391 &iter.
ptr, nameprop, name_buf,
sizeof(name_buf), &namelen);
5393 if ((keylen == namelen) &&
STREQ(name, key)) {
5398 if (name != name_buf) {
5442 return cprop->
assignint(ptr, key, assign_ptr);
5452 if (type ==
nullptr) {
5453 return std::nullopt;
5478 arrayp = (iter.
valid) ?
static_cast<char *
>(iter.
ptr.
data) :
nullptr;
5500#define RAW_GET(dtype, var, raw, a) \
5502 switch (raw.type) { \
5503 case PROP_RAW_CHAR: \
5504 var = (dtype)((char *)raw.array)[a]; \
5506 case PROP_RAW_INT8: \
5507 var = (dtype)((int8_t *)raw.array)[a]; \
5509 case PROP_RAW_UINT8: \
5510 var = (dtype)((uint8_t *)raw.array)[a]; \
5512 case PROP_RAW_SHORT: \
5513 var = (dtype)((short *)raw.array)[a]; \
5515 case PROP_RAW_UINT16: \
5516 var = (dtype)((uint16_t *)raw.array)[a]; \
5518 case PROP_RAW_INT: \
5519 var = (dtype)((int *)raw.array)[a]; \
5521 case PROP_RAW_BOOLEAN: \
5522 var = (dtype)((bool *)raw.array)[a]; \
5524 case PROP_RAW_FLOAT: \
5525 var = (dtype)((float *)raw.array)[a]; \
5527 case PROP_RAW_DOUBLE: \
5528 var = (dtype)((double *)raw.array)[a]; \
5530 case PROP_RAW_INT64: \
5531 var = (dtype)((int64_t *)raw.array)[a]; \
5533 case PROP_RAW_UINT64: \
5534 var = (dtype)((uint64_t *)raw.array)[a]; \
5542#define RAW_SET(dtype, raw, a, var) \
5544 switch (raw.type) { \
5545 case PROP_RAW_CHAR: \
5546 ((char *)raw.array)[a] = char(var); \
5548 case PROP_RAW_INT8: \
5549 ((int8_t *)raw.array)[a] = int8_t(var); \
5551 case PROP_RAW_UINT8: \
5552 ((uint8_t *)raw.array)[a] = uint8_t(var); \
5554 case PROP_RAW_SHORT: \
5555 ((short *)raw.array)[a] = short(var); \
5557 case PROP_RAW_UINT16: \
5558 ((uint16_t *)raw.array)[a] = uint16_t(var); \
5560 case PROP_RAW_INT: \
5561 ((int *)raw.array)[a] = int(var); \
5563 case PROP_RAW_BOOLEAN: \
5564 ((bool *)raw.array)[a] = bool(var); \
5566 case PROP_RAW_FLOAT: \
5567 ((float *)raw.array)[a] = float(var); \
5569 case PROP_RAW_DOUBLE: \
5570 ((double *)raw.array)[a] = double(var); \
5572 case PROP_RAW_INT64: \
5573 ((int64_t *)raw.array)[a] = int64_t(var); \
5575 case PROP_RAW_UINT64: \
5576 ((uint64_t *)raw.array)[a] = uint64_t(var); \
5588 return sizeof(char);
5594 return sizeof(short);
5600 return sizeof(bool);
5602 return sizeof(
float);
5604 return sizeof(double);
5624 for (size = 1, i = 0; i < dim; i++) {
5634 const char *propname,
5672 BKE_report(reports,
RPT_ERROR,
"Only boolean, int, float, and enum properties supported");
5678 item_len = is_array ? array_len : 1;
5686 if (
in.len != item_len *
out.len) {
5689 "Array length mismatch (expected %d, got %d)",
5696 if (
out.type ==
in.type) {
5697 void *inp =
in.array;
5698 void *outp =
out.array;
5703 if (size ==
out.stride) {
5706 memcpy(outp, inp, size *
out.len);
5709 memcpy(inp, outp, size *
out.len);
5713 for (
int a = 0; a <
out.len; a++) {
5715 memcpy(outp, inp, size);
5718 memcpy(inp, outp, size);
5721 inp =
static_cast<char *
>(inp) + size;
5722 outp =
static_cast<char *
>(outp) +
out.stride;
5733 "Enum array properties should not exist");
5737 void *tmparray =
nullptr;
5739 int err = 0, j, a = 0;
5764 item_len = is_array ? array_len : 1;
5775 reports,
RPT_ERROR,
"Only boolean, int, float and enum properties supported");
5780 "Enum array properties should not exist");
5785 if (a + item_len >
in.len) {
5787 reports,
RPT_ERROR,
"Array length mismatch (got %d, expected more)",
in.len);
5792 if (array_len == 0) {
5854 else if (needconv == 1) {
5856 if (tmparray && tmplen != array_len) {
5869 bool *
array =
static_cast<bool *
>(tmparray);
5870 for (j = 0; j < array_len; j++, a++) {
5877 int *
array =
static_cast<int *
>(tmparray);
5878 for (j = 0; j < array_len; j++, a++) {
5885 float *
array =
static_cast<float *
>(tmparray);
5886 for (j = 0; j < array_len; j++, a++) {
5900 bool *
array =
static_cast<bool *
>(tmparray);
5902 for (j = 0; j < array_len; j++, a++) {
5903 RAW_SET(
int,
in, a, ((
bool *)tmparray)[j]);
5908 int *
array =
static_cast<int *
>(tmparray);
5910 for (j = 0; j < array_len; j++, a++) {
5916 float *
array =
static_cast<float *
>(tmparray);
5918 for (j = 0; j < array_len; j++, a++) {
5934 &itemptr, iprop, &(
static_cast<bool *
>(
in.array))[a]);
5945 &itemptr, iprop, &(
static_cast<float *
>(
in.array))[a]);
5958 &itemptr, iprop, &(
static_cast<bool *
>(
in.array))[a]);
5969 &itemptr, iprop, &(
static_cast<float *
>(
in.array))[a]);
5997 switch (prop->
type) {
6016 const char *propname,
6027 const char *propname,
6039 const auto fill_new = [&]() {
6041 if (rna_array_size > 1) {
6045 "update_idprop_bool");
6046 idprop.len = rna_array_size;
6047 idprop.totallen = rna_array_size;
6049 &rna_ptr, &rna_prop,
static_cast<bool *
>(
idprop.data.pointer));
6072 const int idprop_array_size =
idprop.len;
6086 for (
const int i :
IndexRange(std::min(rna_array_size, idprop_array_size))) {
6087 new_values[i] = bool(old_values[i]);
6091 idprop.len = rna_array_size;
6092 idprop.totallen = rna_array_size;
6093 idprop.data.pointer = new_values;
6099 for (
const int i :
IndexRange(std::min(rna_array_size, idprop_array_size))) {
6100 new_values[i] = bool(old_values[i]);
6104 idprop.len = rna_array_size;
6105 idprop.totallen = rna_array_size;
6106 idprop.data.pointer = new_values;
6112 for (
const int i :
IndexRange(std::min(rna_array_size, idprop_array_size))) {
6113 new_values[i] = bool(old_values[i]);
6117 idprop.len = rna_array_size;
6118 idprop.totallen = rna_array_size;
6119 idprop.data.pointer = new_values;
6123 if (idprop_array_size != rna_array_size) {
6124 if (rna_array_size == 0) {
6130 std::copy_n(old_values, std::min(rna_array_size, idprop_array_size), new_values);
6133 idprop.len = rna_array_size;
6134 idprop.totallen = rna_array_size;
6135 idprop.data.pointer = new_values;
6165 if (rna_array_size != 0) {
6177 const auto fill_new = [&]() {
6179 if (rna_array_size > 1) {
6183 idprop.len = rna_array_size;
6184 idprop.totallen = rna_array_size;
6186 &rna_ptr, &rna_prop,
static_cast<int *
>(
idprop.data.pointer));
6209 const int idprop_array_size =
idprop.len;
6221 if (idprop_array_size != rna_array_size) {
6222 if (rna_array_size == 0) {
6228 std::copy_n(old_values, std::min(rna_array_size, idprop_array_size), new_values);
6231 idprop.len = rna_array_size;
6232 idprop.totallen = rna_array_size;
6233 idprop.data.pointer = new_values;
6241 for (
const int i :
IndexRange(std::min(rna_array_size, idprop_array_size))) {
6242 new_values[i] = int(old_values[i]);
6246 idprop.len = rna_array_size;
6247 idprop.totallen = rna_array_size;
6248 idprop.data.pointer = new_values;
6254 for (
const int i :
IndexRange(std::min(rna_array_size, idprop_array_size))) {
6255 new_values[i] = int(old_values[i]);
6259 idprop.len = rna_array_size;
6260 idprop.totallen = rna_array_size;
6261 idprop.data.pointer = new_values;
6267 for (
const int i :
IndexRange(std::min(rna_array_size, idprop_array_size))) {
6268 new_values[i] = int(old_values[i]);
6272 idprop.len = rna_array_size;
6273 idprop.totallen = rna_array_size;
6274 idprop.data.pointer = new_values;
6281 if (rna_array_size != 0) {
6314 const auto fill_new = [&]() {
6316 if (rna_array_size > 1) {
6320 "update_idprop_float");
6321 idprop.len = rna_array_size;
6322 idprop.totallen = rna_array_size;
6324 &rna_ptr, &rna_prop,
static_cast<float *
>(
idprop.data.pointer));
6347 const int idprop_array_size =
idprop.len;
6361 for (
const int i :
IndexRange(std::min(rna_array_size, idprop_array_size))) {
6362 new_values[i] =
float(old_values[i]);
6366 idprop.len = rna_array_size;
6367 idprop.totallen = rna_array_size;
6368 idprop.data.pointer = new_values;
6372 if (idprop_array_size != rna_array_size) {
6373 if (rna_array_size == 0) {
6379 std::copy_n(old_values, std::min(rna_array_size, idprop_array_size), new_values);
6382 idprop.len = rna_array_size;
6383 idprop.totallen = rna_array_size;
6384 idprop.data.pointer = new_values;
6390 if (idprop_array_size != rna_array_size) {
6391 if (rna_array_size == 0) {
6397 std::copy_n(old_values, std::min(rna_array_size, idprop_array_size), new_values);
6400 idprop.len = rna_array_size;
6401 idprop.totallen = rna_array_size;
6402 idprop.data.pointer = new_values;
6410 for (
const int i :
IndexRange(std::min(rna_array_size, idprop_array_size))) {
6411 new_values[i] =
float(old_values[i]);
6415 idprop.len = rna_array_size;
6416 idprop.totallen = rna_array_size;
6417 idprop.data.pointer = new_values;
6431 if (rna_array_size != 0) {
6437 if (rna_array_size != 0) {
6457 const auto fill_new = [&]() {
6481 if (rna_prop.identifier ==
"rna_type"_ustr) {
6522 idprop->data.pointer = string;
6642 void *data_free =
data;
6644 if (
data ==
nullptr) {
6660 internal->free_ptr = free_ptr ? data_free :
nullptr;
6701 return *
reinterpret_cast<void **
>(
internal->ptr);
6708 MEM_SAFE_DELETE_VOID(
internal->free_ptr);
6714 if (index < 0 || index >=
length) {
6717 if (
index > std::numeric_limits<uint64_t>::max() / itemsize) [[unlikely]] {
6724 *ptr, type, (
static_cast<char *
>(
data)) + itemsize *
index);
6937 "%s: %s.%s item %s not found.\n", __func__, ptr->
type->
identifier.
c_str(), name, enumname);
6948 *r_value = item[i].
value;
6968 *r_icon = item[i].
icon;
6978 *r_name = item[i].
name;
7008 PointerRNA *ptr,
const char *name,
char *fixedbuf,
int fixedlen,
int *r_len)
7016 if (r_len !=
nullptr) {
7216 std::stringstream ss;
7218 const char *propname;
7226 if (
STREQ(propname,
"rna_type")) {
7230 if (first_time == 0) {
7236 ss << fmt::format(
"\"{}\":{}", propname,
str);
7273 const bool as_function,
7274 const bool all_args,
7275 const bool nested_args,
7276 const int max_prop_length,
7279 const char *arg_name =
nullptr;
7283 std::stringstream ss;
7285 bool first_iter =
true;
7286 int flag, flag_parameter;
7294 if (as_function && (flag_parameter &
PARM_OUTPUT)) {
7300 if (
STREQ(arg_name,
"rna_type")) {
7310 ss << fmt::format(fmt::runtime(first_iter ?
"{}" :
", {}"), arg_name);
7316 if (all_args ==
true) {
7339 ss << fmt::format(fmt::runtime(first_iter ?
"{}={}" :
", {}={}"), arg_name, buf);
7351 const bool as_function,
7352 const bool all_args,
7353 const bool nested_args,
7354 const int max_prop_length)
7361 C, ptr, as_function, all_args, nested_args, max_prop_length, iterprop);
7366 const bool as_function,
7367 const bool all_args,
7368 const int max_prop_length)
7377 C, &funcptr, as_function, all_args,
true, max_prop_length, iterprop);
7382 return var ?
"True" :
"False";
7392 *r_buf_end = buf +
len;
7398 *r_buf_end = buf +
len;
7404 *r_buf_end = buf +
len;
7417 const int end =
len - 1;
7420 bool *buf =
static_cast<bool *
>(*buf_p);
7421 for (
int i = 0; i <
len; i++, buf++) {
7422 ss << fmt::format(fmt::runtime((i < end || !end) ?
"{}, " :
"{}"),
7429 int *buf =
static_cast<int *
>(*buf_p);
7430 for (
int i = 0; i <
len; i++, buf++) {
7431 ss << fmt::format(fmt::runtime((i < end || !end) ?
"{}, " :
"{}"), *buf);
7437 float *buf =
static_cast<float *
>(*buf_p);
7438 for (
int i = 0; i <
len; i++, buf++) {
7439 ss << fmt::format(fmt::runtime((i < end || !end) ?
"{:g}, " :
"{:g}"), *buf);
7450 int type,
void **buf_p,
int totdim,
const int *dim_size, std::stringstream &ss)
7455 const int end = dim_size[totdim] - 1;
7456 for (
int i = 0; i <= end; i++) {
7458 if (i < end || !end) {
7474 void *buf_step = buf;
7490 std::stringstream ss;
7536 ss << fmt::format(
"\"{}\"", escaped);
7541 const char *identifier;
7555 bool is_first =
true;
7558 ss << fmt::format(fmt::runtime(is_first ?
"'{}'" :
", '{}'"), item->
identifier);
7564 MEM_delete(item_array);
7576 ss << fmt::format(
"'{}'", identifier);
7579 return "'<UNKNOWN ENUM>'";
7594 (i < max_prop_length) && collect_iter.
valid;
7612 return "'<UNKNOWN TYPE>'";
7642 return func->
call !=
nullptr;
7652 const char *identifier)
7657 for (; parm; parm = parm->
next) {
7684 int alloc_size = 0, size;
7715 data_alloc->
array =
nullptr;
7723 switch (parm.
type) {
7747 static_cast<float *
>(
data));
7757 const char *defvalue = (
reinterpret_cast<StringPropertyRNA *
>(&parm))->defaultvalue;
7758 if (defvalue && defvalue[0]) {
7764 memcpy(
data, &defvalue, size);
7787 for (; parm; parm = parm->
next) {
7790 vector->~CollectionVector();
7802 if (data_alloc->
array) {
7810 parms->
data =
nullptr;
7812 parms->
func =
nullptr;
7835 iter->
parms = parms;
7870 if (iter.
parm == parm) {
7879 *r_value = data_alloc->
array;
7882 *r_value = iter.
data;
7897 for (; parm; parm = parm->
next) {
7915 if (iter.
parm == parm) {
7925 switch (parm->
type) {
7927 size =
sizeof(char);
7934 size =
sizeof(
float);
7940 if (data_alloc->
array) {
7944 memcpy(data_alloc->
array, value, size);
7955 memcpy(iter.
data, value, iter.
size);
7967 for (; parm; parm = parm->
next) {
7986 if (iter.
parm == parm) {
8007 if (iter.
parm == parm) {
8041 func->
call(
C, reports, ptr, parms);
8072 MEM_delete(tmparray);
8092 MEM_delete(tmparray);
8112 MEM_delete(tmparray);
8187 va_start(args, format);
8188 vprintf(format, args);
8193 fputc(
'\n', stdout);
8205 const int prop_index,
8210 if ((array_len == 0) || (prop_index < array_len)) {
8211 r_anim_rna->
ptr = *ptr;
8212 r_anim_rna->
prop = prop;
8213 r_anim_rna->
prop_index = array_len ? prop_index : -1;
#define IDP_int_or_bool_set(prop, value)
#define IDP_float_get(prop)
#define IDP_bool_set(prop, value)
#define IDP_int_get(prop)
#define IDP_array_double_get(prop)
#define IDP_int_set(prop, value)
#define IDP_string_get(prop)
#define IDP_double_get(prop)
#define IDP_array_bool_get(prop)
#define IDP_array_int_get(prop)
#define IDP_property_array_get(prop)
#define IDP_int_or_bool_get(prop)
#define IDP_float_set(prop, value)
#define IDP_double_set(prop, value)
#define IDP_array_float_get(prop)
#define IDP_bool_get(prop)
A dynamically sized string ADT.
#define BLI_string_debug_size(str, str_maxncpy)
#define CTX_IFACE_(context, msgid)
#define CLOG_WARN(clg_ref,...)
ID and Library types, which are fundamental for SDNA.
#define ID_REFCOUNTING_USERS(id)
#define ID_TYPE_USE_COPY_ON_EVAL(_id_type)
#define ID_IS_EDITABLE(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
Read Blender memory allocation and freeing.
#define RNA_STRUCT_BEGIN(sptr, prop)
#define RNA_PROP_BEGIN(sptr, itemptr, prop)
#define RNA_MAX_ARRAY_LENGTH
#define RNA_MAX_ARRAY_DIMENSION
#define RNA_SUBTYPE_UNIT(subtype)
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
Span< T > as_span() const
MutableSpan< T > as_mutable_span()
void reinitialize(const int64_t new_size)
constexpr IndexRange()=default
constexpr T * data() const
constexpr Span< T > as_span() const
bool contains(const Key &key) const
void add_new(const Key &key)
constexpr const T * data() const
const char * c_str() const
StringRefNull ref() const
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
float length(VecOp< float, D >) RET
float4x4 translate(float4x4 mat, float3 translation)
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
std::unique_ptr< IDProperty, IDPropertyDeleter > create_bool(StringRef prop_name, bool value, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_BOOLEAN, set its name and value.
std::unique_ptr< IDProperty, IDPropertyDeleter > create(StringRef prop_name, int32_t value, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_INT, set its name and value.
std::unique_ptr< IDProperty, IDPropertyDeleter > create_group(StringRef prop_name, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_GROUP.
void free(Subdiv *subdiv)
MINLINE float min_ff(float a, float b)
void WM_main_add_notifier(uint type, void *reference)
IDProperty * rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
PropertyRNA * RNA_function_find_parameter(PointerRNA *, FunctionRNA *func, const char *identifier)
char * RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len)
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void RNA_collection_begin(PointerRNA *ptr, const char *name, CollectionPropertyIterator *iter)
bool RNA_property_assign_default(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
PointerRNA RNA_pointer_create_from_ancestor(const PointerRNA &ptr, const int ancestor_idx)
void RNA_property_string_get_default(PointerRNA *ptr, PropertyRNA *prop, char *value, const int value_maxncpy)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
const char * RNA_function_ui_description_raw(FunctionRNA *func)
static void property_float_get_array(PointerRNA *ptr, PropertyRNAOrID &prop_rna_or_id, MutableSpan< float > r_values)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
int RNA_property_enum_bitflag_identifiers(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **r_identifier)
void IDP_FreeFromGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL()
bool rna_property_can_access_pointer_data(const PointerRNA &ptr, PropertyRNA &prop)
void ** RNA_struct_instance(PointerRNA *ptr)
static void update_idprop_int(PointerRNA &rna_ptr, PropertyRNA &rna_prop, IDProperty &idprop)
int RNA_parameter_dynamic_length_get_data(ParameterList *, PropertyRNA *parm, void *data)
unsigned __int64 uint64_t
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
MINLINE int mod_i(int i, int n)
void BLI_dynstr_appendf(DynStr *__restrict ds, const char *__restrict format,...) ATTR_PRINTF_FORMAT(2
std::string RNA_struct_to_string(const StructRNA &type)
bool RNA_struct_idprops_datablock_allowed(const StructRNA *type)
bool RNA_struct_system_idprops_check(StructRNA *srna)
void RNA_property_int_get_array_at_most(PointerRNA *ptr, PropertyRNA *prop, int *values, int values_num)
void RNA_property_int_get_default_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
char * STRNCPY(char(&dst)[N], const char *src)
void RNA_parameter_get(ParameterList *parms, PropertyRNA *parm, void **r_value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
void RNA_property_float_get_array_range(PointerRNA *ptr, PropertyRNA *prop, float values[2])
void IDP_ReplaceInGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL()
static void rna_array_as_string_elem(int type, void **buf_p, int len, std::stringstream &ss)
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
PropertyRNA * rna_struct_find_nested(PointerRNA *ptr, StructRNA *srna)
void RNA_property_float_get_array_at_most(PointerRNA *ptr, PropertyRNA *prop, float *values, int values_num)
PointerRNA RNA_main_pointer_create(Main *main)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
@ STRUCT_PUBLIC_NAMESPACE
@ STRUCT_CONTAINS_DATABLOCK_IDPROPERTIES
@ STRUCT_NO_DATABLOCK_IDPROPERTIES
@ STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID
bool RNA_struct_idprops_check(const StructRNA *srna)
PointerRNA RNA_pointer_recast(PointerRNA *ptr)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
static int property_enum_get(PointerRNA *ptr, PropertyRNAOrID &prop_rna_or_id)
int RNA_parameter_list_ret_count(const ParameterList *parms)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
const char * RNA_property_ui_name_raw(const PropertyRNA *prop, const PointerRNA *ptr)
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
bool RNA_path_resolve(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
static bool property_boolean_get(PointerRNA *ptr, PropertyRNAOrID &prop_rna_or_id)
const char * RNA_function_ui_description(FunctionRNA *func)
static std::string property_string_get(PointerRNA *ptr, PropertyRNAOrID &prop_rna_or_id)
void RNA_property_string_set_bytes(PointerRNA *ptr, PropertyRNA *prop, const char *value, int len)
void rna_iterator_array_end(CollectionPropertyIterator *iter)
static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
PointerRNA RNA_blender_rna_pointer_create()
int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop)
static void rna_property_boolean_fill_default_array_values_from_ints(const int *defarr, int defarr_length, bool defvalue, int out_length, bool *r_values)
bool RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char *enumname)
bool RNA_property_editable_flag(const PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_int_get_array_range(PointerRNA *ptr, PropertyRNA *prop, int values[2])
bool RNA_property_reset(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, int index)
bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **r_identifier)
PointerRNA RNA_id_pointer_create(ID *id)
void RNA_parameter_set(ParameterList *parms, PropertyRNA *parm, const void *value)
ID * BKE_libblock_find_session_uid(Main *bmain, short type, uint32_t session_uid)
void * RNA_struct_py_type_get(StructRNA *srna)
int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, const PointerRNA *t_ptr)
std::optional< std::string > RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
std::optional< std::string > RNA_path_full_struct_py(const PointerRNA *ptr)
bool BLT_translate_tooltips()
int rna_parameter_size_pad(const int size)
PropertyRNA * RNA_struct_type_find_property_no_base(StructRNA *srna, const UString identifier)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
const char * RNA_property_identifier(const PropertyRNA *prop)
void RNA_parameter_dynamic_length_set(ParameterList *parms, PropertyRNA *parm, int length)
bool RNA_property_editable_info(const PointerRNA *ptr, PropertyRNA *prop, const char **r_info)
eRNAStatus RNA_property_collection_move(PointerRNA *ptr, PropertyRNA *prop, int src_index, int dst_index)
StructRNA * ID_code_to_RNA_type(short idcode)
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
bool IDP_AddToGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL()
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bool RNA_struct_available_or_report(ReportList *reports, const char *identifier)
bool RNA_property_builtin(PropertyRNA *prop)
bool RNA_property_enum_name(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **r_name)
static bool property_collection_liboverride_editable(PointerRNA *ptr, PropertyRNA *prop, bool *r_is_liboverride)
bool RNA_property_float_set_default(PropertyRNA *prop, float value)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
int RNA_enum_bitflag_identifiers(const EnumPropertyItem *item, const int value, const char **r_identifier)
uint RNA_struct_count_properties(StructRNA *srna)
int RNA_property_collection_raw_get(ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, const char *propname, void *array, RawPropertyType type, int len)
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
IDProperty * IDP_GetPropertyFromGroup(const IDProperty *prop, StringRef name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
int rna_parameter_size(PropertyRNA *parm)
static void update_idprop_id(Main &bmain, PointerRNA &rna_ptr, PropertyRNA &rna_prop, IDProperty &idprop)
PointerRNA RNA_property_pointer_get_default(Main &bmain, PointerRNA &, PropertyRNA &prop)
void RNA_sync_system_properties(Main &bmain, PointerRNA &ptr, IDProperty &idprops)
std::optional< AncestorPointerRNA > RNA_struct_search_closest_ancestor_by_type(const PointerRNA *ptr, const StructRNA *srna)
const char * RNA_struct_state_owner_get()
FCurve * BKE_fcurve_find_by_rna(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **r_adt, bAction **r_action, bool *r_driven, bool *r_special)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
FunctionRNA * RNA_struct_find_function(StructRNA *srna, const char *identifier_c_str)
PointerRNA RNA_property_pointer_get_never_create(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_struct_property_is_set_ex(PointerRNA *ptr, const char *identifier, bool use_ghost)
void RNA_parameter_list_next(ParameterIterator *iter)
void * RNA_struct_blender_type_get(StructRNA *srna)
void RNA_property_collection_begin(PointerRNA *ptr, PropertyRNA *prop, CollectionPropertyIterator *iter)
bool RNA_struct_idprops_contains_datablock(const StructRNA *type)
PropertyUnit RNA_property_unit(PropertyRNA *prop)
void RNA_parameter_list_end(ParameterIterator *)
bool RNA_property_driver_editable(const PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property_check(PointerRNA &props, const char *name, const PropertyType property_type_check)
void RNA_struct_property_unset(PointerRNA *ptr, const char *identifier)
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_overridable_get(const PointerRNA *ptr, PropertyRNA *prop)
StructUnregisterFunc RNA_struct_unregister(StructRNA *type)
bool RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *r_value)
bool RNA_property_collection_assign_int(PointerRNA *ptr, PropertyRNA *prop, const int key, const PointerRNA *assign_ptr)
int RNA_int_get(PointerRNA *ptr, const char *name)
std::optional< std::string > RNA_pointer_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop_ptr, PointerRNA *ptr_prop)
static const char * rna_ensure_property_description(const PropertyRNA *prop)
float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
void rna_pointer_create_with_ancestors(const PointerRNA &parent, StructRNA *type, void *data, PointerRNA &r_ptr)
const char * RNA_property_description(PropertyRNA *prop)
bool RNA_property_string_is_utf8(PropertyRNA *prop)
IDProperty ** RNA_struct_system_idprops_p(PointerRNA *ptr)
char * RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen, int *r_len)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
const char * RNA_property_translation_context(const PropertyRNA *prop)
MINLINE int max_ii(int a, int b)
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
const char * RNA_struct_ui_name(const StructRNA *type)
bool RNA_property_animateable(const PointerRNA *ptr, PropertyRNA *prop_orig)
PropertyRNA * RNA_struct_iterator_property(StructRNA *type)
void RNA_property_string_search(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *edit_text, FunctionRef< void(StringPropertySearchVisitParams)> visit_fn)
uint RNA_enum_items_count(const EnumPropertyItem *item)
static int property_int_get(PointerRNA *ptr, PropertyRNAOrID &prop_rna_or_id)
int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_boolean_get_array(PointerRNA *ptr, const char *name, bool *values)
bool id_can_have_animdata(const ID *id)
const char * RNA_struct_ui_name_raw(const StructRNA *type)
PropertyScaleType RNA_property_ui_scale(PropertyRNA *prop)
int RNA_property_array_item_index(PropertyRNA *prop, char name)
bool BKE_lib_override_library_is_system_defined(const Main *bmain, const ID *id)
eIDPropertyUIDataType IDP_ui_data_type(const IDProperty *prop)
void IDP_AssignID(IDProperty *prop, ID *id, int flag)
int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
StructRNA * RNA_struct_find(const char *identifier)
static bool rna_idproperty_verify_valid(PointerRNA *ptr, PropertyRNA *prop, IDProperty *idprop)
void RNA_free(BlenderRNA *brna)
static void update_idprop_float(PointerRNA &rna_ptr, PropertyRNA &rna_prop, IDProperty &idprop)
void MEM_delete_void(void *vmemh)
void rna_iterator_listbase_end(CollectionPropertyIterator *)
std::optional< StringRefNull > rna_translate_ui_text(const char *text, const char *text_ctxt, StructRNA *type, PropertyRNA *prop, bool translate)
char * RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen, int *r_len)
static void property_boolean_get_array(PointerRNA *ptr, PropertyRNAOrID &prop_rna_or_id, MutableSpan< bool > r_values)
const ListBaseT< PropertyRNA > * RNA_struct_type_properties(StructRNA *srna)
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL()
void RNA_pointer_add(PointerRNA *ptr, const char *name)
void IDP_ReplaceInGroup_ex(IDProperty *group, IDProperty *prop, IDProperty *prop_exist, int flag)
bool RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
@ PROPOVERRIDE_LIBRARY_INSERTION
int RNA_function_flag(FunctionRNA *func)
ParameterList * RNA_parameter_list_create(ParameterList *parms, PointerRNA *, FunctionRNA *func)
void RNA_parameter_dynamic_length_set_data(ParameterList *, PropertyRNA *parm, void *data, int length)
PropertyRNA * RNA_function_get_parameter(PointerRNA *, FunctionRNA *func, int index)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_array_check(PropertyRNA *prop)
void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr)
bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value)
void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
bool RNA_property_enum_name_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **r_name)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
bool BKE_id_can_use_id(const ID &id_from, const ID &id_to)
static const char * rna_ensure_property_name(const PropertyRNA *prop)
std::string RNA_pointer_as_string_id(bContext *C, PointerRNA *ptr)
const EnumPropertyItem * RNA_struct_property_tag_defines(const StructRNA *type)
@ PROP_INTERN_RNA_DEFINITION
PropertyType RNA_property_type(PropertyRNA *prop)
bool RNA_property_collection_lookup_string_has_fn(PropertyRNA *prop)
AnimData * BKE_animdata_from_id(const ID *id)
static size_t property_string_length_storage(PointerRNA *ptr, PropertyRNAOrID &prop_rna_or_id)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool RNA_property_is_runtime(const PropertyRNA *prop)
static const char * rna_ensure_property_identifier(const PropertyRNA *prop)
bool RNA_property_undo_check(const PropertyRNA *prop, const StructRNA *type)
static bool rna_ensure_property_array_check(PropertyRNA *prop)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void IDP_ResizeIDPArray(IDProperty *prop, int newlen)
void BLI_dynstr_append(DynStr *__restrict ds, const char *cstr) ATTR_NONNULL()
PropertyPathTemplateType RNA_property_path_template_type(PropertyRNA *prop)
void RNA_int_set_array(PointerRNA *ptr, const char *name, const int *values)
BLI_INLINE void rna_pointer_refine(PointerRNA &r_ptr)
int RNA_function_defined(FunctionRNA *func)
int RNA_property_enum_get_default(PointerRNA *ptr, PropertyRNA *prop)
static void sync_system_properties(Main &bmain, PointerRNA &ptr, IDProperty &idprops, const bool ensure)
int RNA_enum_from_identifier(const EnumPropertyItem *item, const char *identifier)
bool RNA_property_anim_editable(const PointerRNA *ptr, PropertyRNA *prop_orig)
void IDP_ClearProperty(IDProperty *prop)
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
std::optional< StringRefNull > RNA_translate_ui_text(const char *text, const char *text_ctxt, StructRNA *type, PropertyRNA *prop, int translate)
void RNA_collection_clear(PointerRNA *ptr, const char *name)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
bool RNA_enum_name_from_value(const EnumPropertyItem *item, int value, const char **r_name)
eStringPropertySearchFlag
@ PROP_STRING_SEARCH_SUPPORTED
static PropertyRNA * typemap[IDP_NUMTYPES]
int RNA_property_tags(PropertyRNA *prop)
IDProperty * RNA_struct_system_idprops(PointerRNA *ptr, bool create)
@ IDP_FLAG_OVERRIDELIBRARY_LOCAL
void DEG_id_tag_update(ID *id, unsigned int flags)
static void update_idprop_bool(PointerRNA &rna_ptr, PropertyRNA &rna_prop, IDProperty &idprop)
const char * BLT_pgettext(const char *msgctxt, const char *msgid)
void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
void BKE_report(ReportList *reports, eReportType type, const char *message)
static void rna_property_float_get_default_array_values(PointerRNA *ptr, FloatPropertyRNA *fprop, float *r_values)
BMesh const char void * data
std::string RNA_pointer_as_string_keywords(bContext *C, PointerRNA *ptr, const bool as_function, const bool all_args, const bool nested_args, const int max_prop_length)
void RNA_property_collection_end(CollectionPropertyIterator *iter)
void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values)
bool RNA_property_is_set_ex(PointerRNA *ptr, PropertyRNA *prop, bool use_ghost)
void RNA_property_enum_items_ex(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const bool use_static, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
IDProperty * RNA_struct_idprops(PointerRNA *ptr, bool create)
bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name)
bool(*)(Main *bmain, StructRNA *type) StructUnregisterFunc
std::string RNA_path_full_ID_py(ID *id)
bool RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
std::string RNA_function_as_string_keywords(bContext *C, FunctionRNA *func, const bool as_function, const bool all_args, const int max_prop_length)
char char size_t BLI_str_escape(char *__restrict dst, StringRef src, size_t dst_maxncpy) ATTR_NONNULL(1)
PointerRNA rna_array_lookup_int(PointerRNA *ptr, StructRNA *type, void *data, size_t itemsize, int64_t length, int64_t index)
bool RNA_path_resolved_create(PointerRNA *ptr, PropertyRNA *prop, const int prop_index, PathResolvedRNA *r_anim_rna)
void * rna_iterator_array_dereference_get(CollectionPropertyIterator *iter)
bool RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test)
int RNA_parameter_dynamic_length_get(ParameterList *parms, PropertyRNA *parm)
void RNA_property_unset(PointerRNA *ptr, PropertyRNA *prop)
char RNA_property_array_item_char(PropertyRNA *prop, int index)
bool RNA_enum_icon_from_value(const EnumPropertyItem *item, int value, int *r_icon)
int RNA_property_flag(PropertyRNA *prop)
void rna_iterator_array_next(CollectionPropertyIterator *iter)
int RNA_property_float_clamp(PointerRNA *ptr, PropertyRNA *prop, float *value)
bool RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr)
const char * RNA_function_identifier(FunctionRNA *func)
void _RNA_warning(const char *format,...)
const char * RNA_property_ui_description_raw(const PropertyRNA *prop, const PointerRNA *ptr)
static char rna_struct_state_owner[128]
RawPropertyType RNA_property_raw_type(PropertyRNA *prop)
int RNA_parameter_list_size(const ParameterList *parms)
static void rna_property_boolean_fill_default_array_values(const bool *defarr, int defarr_length, bool defvalue, int out_length, bool *r_values)
bool RNA_property_is_idprop(const PropertyRNA *prop)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
void RNA_struct_py_type_set(StructRNA *srna, void *py_type)
bool RNA_property_enum_item_from_value_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, EnumPropertyItem *r_item)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
char * BLI_dynstr_get_cstring(const DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void(*)(bContext *C, PointerRNA *ptr, PropertyRNA *prop) ContextPropUpdateFunc
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
bool RNA_property_update_check(PropertyRNA *prop)
void RNA_property_boolean_set_array_at_most(PointerRNA *ptr, PropertyRNA *prop, const bool *values, int values_num)
void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
const char * RNA_struct_ui_description_raw(const StructRNA *type)
void RNA_property_float_set_array_at_most(PointerRNA *ptr, PropertyRNA *prop, const float *values, int values_num)
ATTR_WARN_UNUSED_RESULT const size_t num
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void(*)(bContext *C, PointerRNA *ptr) ContextUpdateFunc
void RNA_property_collection_skip(CollectionPropertyIterator *iter, int num)
bool RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **r_identifier)
void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_name_property(const StructRNA *type)
static PropertyRNA * arraytypemap[IDP_NUMTYPES]
void * rna_iterator_array_get(CollectionPropertyIterator *iter)
bool RNA_property_collection_lookup_int_has_fn(PropertyRNA *prop)
void IDP_ResizeArray(IDProperty *prop, int newlen)
IDProperty * IDP_GetIndexArray(IDProperty *prop, int index) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int RNA_property_array_dimension(const PointerRNA *ptr, PropertyRNA *prop, int length[])
static void rna_property_float_fill_default_array_values(const float *defarr, int defarr_length, float defvalue, int out_length, float *r_values)
bool RNA_struct_system_idprops_unset(PointerRNA *ptr, const char *identifier)
void WM_msg_publish_rna(wmMsgBus *mbus, PointerRNA *ptr, PropertyRNA *prop)
wmMsgBus * CTX_wm_message_bus(const bContext *C)
int RNA_parameter_list_arg_count(const ParameterList *parms)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
static int rna_property_array_length_all_dimensions(PointerRNA *ptr, PropertyRNA *prop)
PointerRNA rna_listbase_lookup_int(PointerRNA *ptr, StructRNA *type, ListBase *lb, int index)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
std::optional< std::string > RNA_property_string_path_filter(const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_enum_item_from_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, EnumPropertyItem *r_item)
int RNA_struct_ui_icon(const StructRNA *type)
static void rna_system_idproperty_free(PointerRNA *ptr, const char *name)
bool RNA_struct_is_ID(const StructRNA *type)
bool(*)(PointerRNA *ptr, const PointerRNA value, const PropertyRNA *prop) PropPointerPollFuncPy
int RNA_string_length(PointerRNA *ptr, const char *name)
const char * BLT_translate_do_iface(const char *msgctxt, const char *msgid)
void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void **r_value)
const DeprecatedRNA * RNA_property_deprecated(const PropertyRNA *prop)
void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const bool *values)
bool RNA_struct_system_idprops_register_check(const StructRNA *type)
int RNA_property_enum_step(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, int from_value, int step)
const char * RNA_struct_identifier(const StructRNA *type)
void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin, int *softmax, int *step)
void IDP_AppendArray(IDProperty *prop, IDProperty *item)
void RNA_struct_state_owner_set(const char *name)
bool RNA_enum_value_from_identifier(const EnumPropertyItem *item, const char *identifier, int *r_value)
void RNA_property_collection_next(CollectionPropertyIterator *iter)
int RNA_property_string_default_length(PointerRNA *ptr, PropertyRNA *prop)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
const char * RNA_struct_ui_description(const StructRNA *type)
bool RNA_enum_name_gettexted(const EnumPropertyItem *item, int value, const char *translation_context, const char **r_name)
bool RNA_property_collection_is_empty(PointerRNA *ptr, PropertyRNA *prop)
static void property_int_get_array(PointerRNA *ptr, PropertyRNAOrID &prop_rna_or_id, MutableSpan< int > r_values)
int RNA_parameter_flag(PropertyRNA *prop)
bool RNA_struct_bl_idname_ok_or_report(ReportList *reports, const char *identifier, const char *sep)
void * rna_iterator_listbase_get(CollectionPropertyIterator *iter)
const StructRNA * RNA_struct_base_child_of(const StructRNA *type, const StructRNA *parent_type)
static float property_float_get(PointerRNA *ptr, PropertyRNAOrID &prop_rna_or_id)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
bool RNA_property_int_set_default(PropertyRNA *prop, int value)
float RNA_property_float_get_default(PointerRNA *ptr, PropertyRNA *prop)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
StructRNA *(*)(Main *bmain, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) StructRegisterFunc
Main * CTX_data_main(const bContext *C)
int RNA_property_collection_raw_set(ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, const char *propname, void *array, RawPropertyType type, int len)
IDProperty * rna_system_idproperty_find(PointerRNA *ptr, const char *name)
StructRNA * RNA_struct_base(StructRNA *type)
void RNA_ensure_and_sync_system_properties(Main &bmain, PointerRNA &ptr, IDProperty &idprops)
char * RNA_struct_name_get_alloc_ex(PointerRNA *ptr, char *fixedbuf, int fixedlen, int *r_len, PropertyRNA **r_nameprop)
void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_property_ui_description(const PropertyRNA *prop, const PointerRNA *ptr)
std::optional< PointerRNA > RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop)
MINLINE float max_ff(float a, float b)
static const char * bool_as_py_string(const int var)
static void rna_property_int_fill_default_array_values(const int *defarr, int defarr_length, int defvalue, int out_length, int *r_values)
int RNA_function_call(bContext *C, ReportList *reports, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms)
std::string RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, const bool as_function, const bool all_args, const bool nested_args, const int max_prop_length, PropertyRNA *iterprop)
bool RNA_enum_description(const EnumPropertyItem *item, const int value, const char **r_description)
@ PROP_CONTEXT_PROPERTY_UPDATE
int RNA_property_int_get_default(PointerRNA *ptr, PropertyRNA *prop)
void BPY_free_srna_pytype(StructRNA *srna)
bool RNA_property_collection_lookup_string_supported(PropertyRNA *prop)
void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, const void *value)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
bool RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr)
bool BLT_translate_iface()
PointerRNA RNA_pointer_create_id_subdata(ID &id, StructRNA *type, void *data)
void RNA_property_float_get_default_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
bool RNA_property_collection_lookup_string_has_nameprop(PropertyRNA *prop)
bool RNA_property_editable(const PointerRNA *ptr, PropertyRNA *prop)
IDProperty * IDP_New(char type, const IDPropertyTemplate *val, StringRef name, eIDPropertyFlag flags={}) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Span< std::unique_ptr< FunctionRNA > > RNA_struct_type_functions(StructRNA *srna)
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
static bool rna_property_editable_do(const PointerRNA *ptr, PropertyRNA *prop_orig, const int index, const char **r_info)
static void rna_property_float_fill_default_array_values_double(const double *default_array, const int default_array_len, const double default_value, const int out_length, float *r_values)
int RNA_property_int_clamp(PointerRNA *ptr, PropertyRNA *prop, int *value)
void DEG_relations_tag_update(Main *bmain)
PropertyRNA * rna_ensure_property(PropertyRNA *prop)
static void rna_ensure_property_multi_array_length(const PointerRNA *ptr, PropertyRNA *prop, int length[])
int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dimension)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
static void rna_property_boolean_get_default_array_values(PointerRNA *ptr, BoolPropertyRNA *bprop, bool *r_values)
Scene * CTX_data_scene(const bContext *C)
IDProperty * IDP_NewStringMaxSize(const char *st, size_t st_maxncpy, StringRef name, eIDPropertyFlag flags={}) ATTR_WARN_UNUSED_RESULT
static void * rna_array_as_string_alloc(int type, int len, PointerRNA *ptr, PropertyRNA *prop, void **r_buf_end)
int RNA_property_ui_icon(const PropertyRNA *prop)
bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_collection_lookup_string_index(PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr, int *r_index)
bool RNA_collection_is_empty(PointerRNA *ptr, const char *name)
void RNA_pointer_set(PointerRNA *ptr, const char *name, PointerRNA ptr_value)
int RNA_enum_from_name(const EnumPropertyItem *item, const char *name)
void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *softmin, float *softmax, float *step, float *precision)
static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *prop, const char *propname, void *inarray, RawPropertyType intype, int inlen, int set)
size_t RNA_raw_type_sizeof(RawPropertyType type)
void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, float value)
bool RNA_enum_identifier(const EnumPropertyItem *item, const int value, const char **r_identifier)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter)
bool RNA_property_boolean_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
static std::optional< std::string > rna_pointer_as_string__bldata(PointerRNA *ptr)
static void rna_array_as_string_recursive(int type, void **buf_p, int totdim, const int *dim_size, std::stringstream &ss)
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, bool value)
void RNA_property_boolean_get_array_at_most(PointerRNA *ptr, PropertyRNA *prop, bool *values, int values_num)
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, ListBase *lb, IteratorSkipFunc skip)
PropertyRNA * RNA_struct_find_collection_property_check(PointerRNA &props, const char *name, const StructRNA *struct_type_check)
static void rna_property_collection_get_idp(CollectionPropertyIterator *iter)
IDProperty * rna_idproperty_find(PointerRNA *ptr, const char *name)
int RNA_property_string_maxlength(PropertyRNA *prop)
const char * BLT_translate_do_tooltip(const char *msgctxt, const char *msgid)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
char * RNA_property_string_get_default_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len)
static void rna_array_as_string(int type, int len, PointerRNA *ptr, PropertyRNA *prop, std::stringstream &ss)
IDProperty ** RNA_struct_idprops_p(PointerRNA *ptr)
void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, int *hardmax)
int RNA_property_int_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
eStringPropertySearchFlag RNA_property_string_search_flag(PropertyRNA *prop)
static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
IDPropertyUIData * IDP_ui_data_ensure(IDProperty *prop)
void RNA_property_boolean_get_default_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
MINLINE int min_ii(int a, int b)
DynStr * BLI_dynstr_new() ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
void rna_idproperty_touch(IDProperty *idprop)
@ IDP_UI_DATA_TYPE_BOOLEAN
int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, PropertyRNA *itemprop, bool set, RawArray *array)
bool RNA_struct_in_public_namespace(const StructRNA *type)
bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value)
static const char * rna_property_type_identifier(PropertyType prop_type)
bool RNA_property_boolean_get_default(PointerRNA *ptr, PropertyRNA *prop)
float RNA_float_get(PointerRNA *ptr, const char *name)
void rna_property_rna_or_id_get(PropertyRNA *prop, PointerRNA *ptr, PropertyRNAOrID *r_prop_rna_or_id)
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, size_t itemsize, int64_t length, bool free_ptr, IteratorSkipFunc skip)
void RNA_enum_set_identifier(bContext *C, PointerRNA *ptr, const char *name, const char *id)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
IDProperty * IDP_NewIDPArray(StringRef name) ATTR_WARN_UNUSED_RESULT
bool(*)(CollectionPropertyIterator *iter, void *data) IteratorSkipFunc
static void rna_property_int_get_default_array_values(PointerRNA *ptr, IntPropertyRNA *iprop, int *r_values)
const char * RNA_property_ui_name(const PropertyRNA *prop, const PointerRNA *ptr)
const ListBaseT< PropertyRNA > * RNA_function_defined_parameters(FunctionRNA *func)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
void RNA_parameter_list_free(ParameterList *parms)
void IDP_AssignStringMaxSize(IDProperty *prop, const char *st, size_t st_maxncpy) ATTR_NONNULL()
const char * RNA_struct_translation_context(const StructRNA *type)
bool RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop)
int RNA_collection_length(PointerRNA *ptr, const char *name)
void rna_iterator_listbase_next(CollectionPropertyIterator *iter)
void RNA_property_enum_items_gettexted_all(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
void RNA_property_int_set_array_at_most(PointerRNA *ptr, PropertyRNA *prop, const int *values, int values_num)
IDOverrideLibrary * BKE_lib_override_library_get(Main *bmain, ID *id, ID *owner_id_hint, ID **r_owner_id)
void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin, float *hardmax)
std::string RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, int index, int max_prop_length)
bool RNA_property_editable_index(const PointerRNA *ptr, PropertyRNA *prop, const int index)
StructRegisterFunc RNA_struct_register(StructRNA *type)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
BlenderRNA RNA_blender_rna_get()
static PointerRNA property_pointer_get(PointerRNA *ptr, PropertyRNA *prop, const bool do_create)
bool RNA_property_is_unlink(PropertyRNA *prop)
void * RNA_property_py_data_get(PropertyRNA *prop)
#define RAW_GET(dtype, var, raw, a)
#define RAW_SET(dtype, raw, a, var)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
Map< UString, StructRNA * > structs_map
PropBooleanArraySetFunc setarray
PropBooleanGetTransformFunc get_transform
PropBooleanSetTransformFunc set_transform
PropBooleanArraySetTransformFunc setarray_transform
PropBooleanSetFuncEx set_ex
PropBooleanArraySetFuncEx setarray_ex
PropBooleanGetFuncEx get_default
PropBooleanArrayGetFunc getarray
PropBooleanArrayGetFuncEx getarray_ex
PropBooleanGetFuncEx get_ex
const bool * defaultarray
PropBooleanArrayGetFuncEx get_default_array
PropBooleanArrayGetTransformFunc getarray_transform
union blender::CollectionPropertyIterator::@041041065315317147142203032351220146061055321205 internal
PropCollectionBeginFunc begin
PropCollectionLookupStringFunc lookupstring
PropCollectionAssignIntFunc assignint
PropCollectionEndFunc end
PropCollectionLookupIntFunc lookupint
PropCollectionNextFunc next
PropCollectionLengthFunc length
CustomIDVectorSet< PropertyRNA *, PropertyRNAIdentifierGetter > * prop_lookup_set
ListBaseT< PropertyRNA > properties
const EnumPropertyItem * item
PropEnumGetFuncEx get_default
PropEnumSetTransformFunc set_transform
PropEnumGetTransformFunc get_transform
PropFloatArraySetFuncEx setarray_ex
PropFloatGetTransformFunc get_transform
PropFloatRangeFuncEx range_ex
PropFloatSetTransformFunc set_transform
PropFloatArraySetTransformFunc setarray_transform
PropFloatSetFuncEx set_ex
PropFloatArrayGetFuncEx getarray_ex
PropFloatGetFuncEx get_ex
PropertyScaleType ui_scale_type
PropFloatGetFuncEx get_default
PropFloatArraySetFunc setarray
PropFloatArrayGetFuncEx get_default_array
const float * defaultarray
PropFloatArrayGetTransformFunc getarray_transform
PropFloatArrayGetFunc getarray
ListBaseT< struct IDProperty > group
IDPropertyUIDataEnumItem * enum_items
PropIntArrayGetFunc getarray
PropIntGetFuncEx get_default
PropIntArrayGetTransformFunc getarray_transform
PropIntArrayGetFuncEx getarray_ex
PropIntRangeFuncEx range_ex
PropIntArraySetFuncEx setarray_ex
PropIntArraySetFunc setarray
PropIntArraySetTransformFunc setarray_transform
PropertyScaleType ui_scale_type
PropIntGetTransformFunc get_transform
PropIntSetTransformFunc set_transform
PropIntArrayGetFuncEx get_default_array
PropPointerTypeFunc type_fn
Vector< AncestorPointerRNA, ANCESTOR_POINTERRNA_DEFAULT_SIZE > ancestors
bool has_owner_id() const
bool is_rna_storage_idprop
PropUINameFunc ui_description_func
const char * translation_context
PropertyFlagIntern flag_internal
ItemEditableFunc itemeditable
unsigned int totarraylength
PropUINameFunc ui_name_func
ParameterFlag flag_parameter
unsigned int arraydimension
PropArrayLengthGetFunc getlength
const DeprecatedRNA * deprecated
unsigned int arraylength[RNA_MAX_ARRAY_DIMENSION]
PropertyOverrideFlag flag_override
PropertyPathTemplateType path_template_type
PropStringLengthFunc length
PropStringGetFuncEx get_ex
PropStringGetFuncEx get_default
eStringPropertySearchFlag search_flag
PropStringSetFuncEx set_ex
PropStringGetTransformFunc get_transform
const char * defaultvalue
StringPropertyPathFilterFunc path_filter
PropStringSetTransformFunc set_transform
StringPropertySearchFunc search
PropStringLengthFuncEx length_ex
StructInstanceFunc instance
PropertyRNA * iteratorproperty
IDPropertiesFunc system_idproperties
Vector< std::unique_ptr< FunctionRNA > > functions
IDPropertiesFunc idproperties
const EnumPropertyItem * prop_tag_defines
PropertyRNA * nameproperty
StructUnregisterFunc unreg
const char * translation_context
struct blender::IDPropertyTemplate::@100215251242210352227251277016155305041022127377 array
struct blender::IDPropertyTemplate::@116303142222164257205355242364302075230051143265 string