46# include "RNA_prototypes.hh"
50# define ASSERT_SOFT_HARD_LIMITS \
51 if (softmin < hardmin || softmax > hardmax) { \
52 CLOG_ERROR(&LOG, "error with soft/hard limits: %s.%s", CONTAINER_RNA_ID(cont), identifier); \
53 BLI_assert_msg(0, "invalid soft/hard limits"); \
57# define ASSERT_SOFT_HARD_LIMITS (void)0
66#define IS_DNATYPE_BOOLEAN_BITSHIFT_FULLRANGE_COMPAT(_str) \
67 STR_ELEM(_str, "char", "uchar", "ushort", "uint", "uint8_t", "uint16_t", "uint32_t")
100 "dna_type=%s, dna_offset=%d, dna_struct=%s, dna_name=%s, id=%s\n",
111 Link *link =
static_cast<Link *
>(vlink);
113 link->
next =
nullptr;
116 if (listbase->
last) {
117 ((
Link *)listbase->
last)->next = link;
119 if (listbase->
first ==
nullptr) {
120 listbase->
first = link;
122 listbase->
last = link;
127 Link *link =
static_cast<Link *
>(vlink);
136 if (listbase->
last == link) {
139 if (listbase->
first == link) {
165 for (link =
static_cast<Link *
>(listbase->
first); link; link =
next) {
170 listbase->
first = listbase->
last =
nullptr;
211 g_version_data.type_map_static_from_alias, type_name, (
void *)type_name));
228 if (dsrna->
srna == srna) {
249 for (; dprop; dprop = dprop->
prev) {
250 if (dprop->
prop == prop) {
258 for (; dprop; dprop = dprop->
prev) {
259 if (dprop->
prop == prop) {
307 if (dfunc->
func == func) {
316 if (dfunc->
func == func) {
341 for (; dparm; dparm = dparm->
prev) {
342 if (dparm->
prop == parm) {
353 for (; dparm; dparm = dparm->
prev) {
354 if (dparm->
prop == parm) {
404 while (
name[0] ==
'*') {
407 while (oname[0] ==
'*') {
412 if (
name[a] ==
'[' && oname[a] == 0) {
415 if (
name[a] ==
'[' && oname[a] ==
'[') {
421 if (
name[a] != oname[a]) {
426 if (
name[a] == 0 && oname[a] ==
'.') {
429 if (
name[a] == 0 && oname[a] ==
'-' && oname[a + 1] ==
'>') {
433 return (
name[a] == oname[a]);
437 const char *structname,
438 const char *membername,
443 int b, structnr, cmp;
452 if (structnr == -1) {
458 for (
int a = 0; a < struct_info->
members_num; a++) {
466 smember->
name = dnaname;
467 smember->
offset = *offset;
470 if (strstr(membername,
"[")) {
478 for (
b = 0; dnaname[
b] ==
'*';
b++) {
486 smember->
name = dnaname;
487 smember->
offset = *offset;
492 membername = strstr(membername,
".") + strlen(
".");
500 smember->
name = dnaname;
501 smember->
offset = *offset;
507 membername = strstr(membername,
"->") + strlen(
"->");
535 static const char *kwlist[] = {
537 "and",
"as",
"assert",
"async",
"await",
"break",
"class",
"continue",
"def",
538 "del",
"elif",
"else",
"except",
"finally",
"for",
"from",
"global",
"if",
539 "import",
"in",
"is",
"lambda",
"nonlocal",
"not",
"or",
"pass",
"raise",
540 "return",
"try",
"while",
"with",
"yield",
nullptr,
543 if (!isalpha(identifier[0])) {
544 *r_error =
"first character failed isalpha() check";
548 for (a = 0; identifier[a]; a++) {
549 if (
DefRNA.preprocess && property) {
550 if (isalpha(identifier[a]) && isupper(identifier[a])) {
551 *r_error =
"property names must contain lower case characters only";
556 if (identifier[a] ==
'_') {
560 if (identifier[a] ==
' ') {
561 *r_error =
"spaces are not okay in identifier names";
565 if (isalnum(identifier[a]) == 0) {
566 *r_error =
"one of the characters failed an isalnum() check and is not an underscore";
571 for (a = 0; kwlist[a]; a++) {
572 if (
STREQ(identifier, kwlist[a])) {
573 *r_error =
"this keyword is reserved by Python";
579 static const char *kwlist_prop[] = {
588 for (a = 0; kwlist_prop[a]; a++) {
589 if (
STREQ(identifier, kwlist_prop[a])) {
590 *r_error =
"this keyword is reserved by Python";
604 static const char *kwlist[] = {
606 "and",
"as",
"assert",
"break",
"class",
"continue",
"def",
"del",
607 "elif",
"else",
"except",
"finally",
"for",
"from",
"global",
"if",
608 "import",
"in",
"is",
"lambda",
"nonlocal",
"not",
"or",
"pass",
609 "raise",
"return",
"try",
"while",
"with",
"yield",
nullptr,
612 if (!isalpha(identifier[0])) {
617 for (a = 0; identifier[a]; a++) {
618 if (
DefRNA.preprocess && property) {
619 if (isalpha(identifier[a]) && isupper(identifier[a])) {
621 identifier[a] = tolower(identifier[a]);
625 if (identifier[a] ==
'_') {
629 if (identifier[a] ==
' ') {
634 if (isalnum(identifier[a]) == 0) {
640 for (a = 0; kwlist[a]; a++) {
641 if (
STREQ(identifier, kwlist[a])) {
645 identifier[strlen(identifier) - 1] =
'_';
651 static const char *kwlist_prop[] = {
660 for (a = 0; kwlist_prop[a]; a++) {
661 if (
STREQ(identifier, kwlist_prop[a])) {
665 identifier[strlen(identifier) - 1] =
'_';
675 if (
STR_ELEM(dnatype,
"char",
"uchar")) {
676 r_range[0] = CHAR_MIN;
677 r_range[1] = CHAR_MAX;
680 if (
STREQ(dnatype,
"short")) {
681 r_range[0] = SHRT_MIN;
682 r_range[1] = SHRT_MAX;
685 if (
STREQ(dnatype,
"int")) {
686 r_range[0] = INT_MIN;
687 r_range[1] = INT_MAX;
690 if (
STREQ(dnatype,
"int8_t")) {
705 const char *error_message =
nullptr;
714 const bool do_alias =
true;
717 if (
DefRNA.sdna ==
nullptr) {
718 CLOG_ERROR(&
LOG,
"Failed to decode SDNA: %s.", error_message);
770 DefRNA.make_overridable = make_overridable;
783 DefRNA.fallback.property_update.noteflag = noteflag;
784 DefRNA.fallback.property_update.updatefunc = updatefunc;
818 const char *srna_identifier =
"UNKNOWN";
823 "RNA Struct definition '%s' freed while holding a Python reference.\n",
829 nextprop = prop->
next;
842 nextparm = parm->
next;
858 rna_brna_structs_remove_and_free(brna, srna);
934 if (ds->
srna == srna) {
949 const char *
error =
nullptr;
963 memcpy(srna, srnafrom,
sizeof(
StructRNA));
969 srna->
base = srnafrom;
985 srna->
name = identifier;
990 srna->
icon = ICON_DOT;
1017 MEM_new<blender::CustomIDVectorSet<PropertyRNA *, PropertyRNAIdentifierGetter>>(__func__);
1037 "rna_builtin_properties_begin",
1038 "rna_builtin_properties_next",
1039 "rna_iterator_listbase_end",
1040 "rna_builtin_properties_get",
1043 "rna_builtin_properties_lookup_string",
1068 pprop->
type = &RNA_Struct;
1088 CLOG_ERROR(&
LOG,
"struct %s not found to define %s.", from, identifier);
1100 if (!
DefRNA.preprocess) {
1127 if (!
DefRNA.preprocess) {
1135 CLOG_ERROR(&
LOG,
"%s base struct must know DNA already.", structname);
1198 if (!
DefRNA.preprocess) {
1210 if (!
DefRNA.preprocess) {
1229 if (!
DefRNA.preprocess) {
1234 if (!system_idproperties) {
1238 const_cast<char *
>(system_idproperties));
1241 srna,
"bl_system_properties_get",
"rna_struct_system_properties_get_func");
1244 "DEBUG ONLY. Internal access to runtime-defined RNA data storage, intended solely for "
1245 "testing and debugging purposes. Do not access it in regular scripting work, and in "
1246 "particular, do not assume that it contains writable data");
1252 "Ensure that system properties are created if they do not exist yet");
1255 "system_properties",
1258 "The system properties root container, or None if there are no system properties stored in "
1259 "this data yet, and its creation was not requested");
1266 const char *instance)
1268 if (!
DefRNA.preprocess) {
1286 if (!
DefRNA.preprocess) {
1309 if (identifier[0] !=
'\0') {
1347 const char *identifier,
1358 const char *
error =
nullptr;
1379 const char *
error =
nullptr;
1382 "runtime property identifier \"%s.%s\" - %s",
1399 "subtype does not apply to 'PROP_BOOLEAN' \"%s.%s\"",
1412 "subtype does not apply to 'PROP_INT' \"%s.%s\"",
1480 prop->
name = identifier;
1502 if (
DefRNA.make_overridable) {
1562 prop,
DefRNA.fallback.property_update.noteflag,
DefRNA.fallback.property_update.updatefunc);
1572 switch (prop->
type) {
1580 "\"%s.%s\", PROP_ENUM_FLAG must be set before setting items",
1634 prop->
flag |= flag_property;
1642 prop->
flag &= ~flag_property;
1663 "\"%s.%s\", array length must be zero of greater.",
1672 "\"%s.%s\", array length must be smaller than %d.",
1682 "\"%s.%s\", array dimensions has been set to %u but would be overwritten as 1.",
1699 "\"%s.%s\", cannot define a bitflags boolean array wrapping a scalar DNA member. "
1700 "`RNA_def_property_boolean_bitset_array_sdna` should be used instead.",
1708 switch (prop->
type) {
1718 "\"%s.%s\", only boolean/int/float can be array.",
1741 "\"%s.%s\", array dimension must be between 1 and %d.",
1749 switch (prop->
type) {
1756 "\"%s.%s\", only boolean/int/float can be array.",
1770 for (
i = 1;
i < dimension;
i++) {
1789 const short version,
1790 const short removal_version)
1792 if (!
DefRNA.preprocess) {
1793 fprintf(stderr,
"%s: \"%s\": only during preprocessing.", __func__, prop->
identifier);
1808 "\nWARNING: \"%s.%s\" deprecation starting at %d.%d marks this property to be removed "
1809 "in the current Blender version!\n\n",
1817 deprecated->
note = note;
1818 deprecated->
version = version;
1824 (void)removal_version;
1831 if (consecutive != 0) {
1834 if (consecutive < 0) {
1866 switch (prop->
type) {
1894 switch (prop->
type) {
1923 switch (prop->
type) {
1951 if (!
DefRNA.preprocess) {
1956 switch (prop->
type) {
1987 switch (prop->
type) {
1997 "\"%s.%s\", this struct type (probably an Operator, Keymap or UserPreference) "
1998 "does not accept ID pointer properties.",
2022 "\"%s.%s\", invalid type for struct type.",
2037 switch (prop->
type) {
2054 int i, defaultfound = 0, defaultflag = 0;
2056 switch (prop->
type) {
2060 int enum_dna_size = -1;
2061 int enum_dna_range[2];
2065 if (dp->dnatype ==
nullptr || dp->dnatype[0] ==
'\0') {
2069 else if (dp->dnaarraylength > 1) {
2072 else if (dp->dnasize == 0) {
2076 enum_dna_size = dp->dnasize;
2079 "\"%s.%s\", enum type \"%s\" size is not known.",
2094 if (item[
i].identifier[0]) {
2096 if (
DefRNA.preprocess && strstr(item[
i].identifier,
" ")) {
2098 "\"%s.%s\", enum identifiers must not contain spaces.",
2106 if (enum_dna_size != -1) {
2108 uint32_t enum_type_mask = 0;
2109 if (enum_dna_size == 1) {
2110 enum_type_mask = 0xff;
2112 else if (enum_dna_size == 2) {
2113 enum_type_mask = 0xffff;
2115 if (enum_type_mask != 0) {
2116 if (uint32_t(item[
i].value) != (uint32_t(item[
i].value) & enum_type_mask)) {
2118 "\"%s.%s\", enum value for '%s' does not fit into %d byte(s).",
2129 if (
ELEM(enum_dna_size, 1, 2)) {
2130 if ((item[
i].value < enum_dna_range[0]) || (item[
i].value > enum_dna_range[1])) {
2132 "\"%s.%s\", enum value for '%s' is outside of range [%d - %d].",
2146 defaultflag |= item[
i].
value;
2163 if (!defaultfound) {
2165 if (item[
i].identifier[0]) {
2187 switch (prop->
type) {
2204 switch (prop->
type) {
2228 switch (prop->
type) {
2245 switch (prop->
type) {
2267 switch (prop->
type) {
2289 switch (prop->
type) {
2310 switch (prop->
type) {
2332 switch (prop->
type) {
2336 if (value ==
nullptr) {
2338 "\"%s.%s\", nullptr string passed (don't call in this case).",
2347 "\"%s.%s\", empty string passed (don't call in this case).",
2372 int i, defaultfound = 0;
2374 switch (prop->
type) {
2390 "\"%s.%s\", default includes unused bits (%d).",
2404 if (!defaultfound && eprop->
totitem) {
2428 const char *structname,
2429 const char *propname)
2436 if (dp ==
nullptr) {
2468 "\"%s.%s\" (identifier \"%s\") not found. Struct must be in DNA.",
2500 const char *structname,
2501 const char *propname,
2503 const bool booleannegative,
2510 if (!
DefRNA.preprocess) {
2527 if (booleanbit <= 0) {
2529 "%s.%s is using a null or negative 'booleanbit' value of %" PRId64
2530 ", which is invalid "
2531 "for 'bitset arrays' boolean properties.",
2540 if ((booleanbit & ~(1 << bit_index)) != 0) {
2542 "%s.%s is using a multi-bit 'booleanbit' value of %" PRId64
2543 ", which is invalid for "
2544 "'bitset arrays' boolean properties.",
2562 "%s.%s is a '%s' but wrapped as type '%s'.",
2572 const bool is_bitset_array = (
length > 1);
2573 if (is_bitset_array) {
2575 const short max_length = (dp->
dnasize * 8) -
2577 if ((bit_index +
length) > max_length) {
2579 "%s.%s is a '%s' of %d bytes, but wrapped as type '%s' 'bitset array' of %d "
2580 "items starting at bit %u.",
2608 bool has_default =
true;
2610 has_default =
false;
2612 fprintf(stderr,
"%s default: unsupported boolean array default\n", __func__);
2617 bprop->
defaultvalue = *(
const char *)default_data & booleanbit;
2620 bprop->
defaultvalue = *(
const short *)default_data & booleanbit;
2623 bprop->
defaultvalue = *(
const int *)default_data & booleanbit;
2626 has_default =
false;
2629 stderr,
"%s default: unsupported boolean type (%s)\n", __func__, dp->
dnatype);
2653 const char *structname,
2654 const char *propname,
2661 const char *structname,
2662 const char *propname,
2669 const char *structname,
2670 const char *propname,
2683 if (!
DefRNA.preprocess) {
2700 "%s.%s is a '%s' but wrapped as type '%s'.",
2719 "\"%s.%s\", type \"%s\" range not known.",
2747 bool has_default =
true;
2752 int *defaultarray =
static_cast<int *
>(
rna_calloc(size_final));
2753 for (
int i = 0;
i < prop->
totarraylength && default_data < default_data_end;
i++) {
2754 defaultarray[
i] = *(
const char *)default_data;
2761 int *defaultarray =
static_cast<int *
>(
rna_calloc(size_final));
2762 for (
int i = 0;
i < prop->
totarraylength && default_data < default_data_end;
i++) {
2764 *(
const ushort *)default_data;
2770 int *defaultarray =
static_cast<int *
>(
rna_calloc(size_final));
2771 memcpy(defaultarray, default_data, std::min(size_final, dp->
dnasize));
2775 has_default =
false;
2778 "%s default: unsupported int array type (%s)\n",
2786 fprintf(stderr,
"value=(");
2790 fprintf(stderr,
"), ");
2801 *(
const short *)default_data :
2802 *(
const ushort *)default_data;
2806 *(
const uint *)default_data;
2809 has_default =
false;
2811 fprintf(stderr,
"%s default: unsupported int type (%s)\n", __func__, dp->
dnatype);
2835 if (!
DefRNA.preprocess) {
2853 "%s.%s is a '%s' but wrapped as type '%s'.",
2877 bool has_default =
true;
2881 float *defaultarray =
static_cast<float *
>(
rna_calloc(size_final));
2882 memcpy(defaultarray, default_data, std::min(size_final, dp->
dnasize));
2886 has_default =
false;
2889 "%s default: unsupported float array type (%s)\n",
2897 fprintf(stderr,
"value=(");
2901 fprintf(stderr,
"), ");
2914 has_default =
false;
2917 stderr,
"%s default: unsupported float type (%s)\n", __func__, dp->
dnatype);
2943 if (!
DefRNA.preprocess) {
2960 CLOG_ERROR(&
LOG,
"\"%s.%s\", array not supported for enum type.", structname, propname);
2973 bool has_default =
true;
2984 has_default =
false;
2986 fprintf(stderr,
"%s default: unsupported enum type (%s)\n", __func__, dp->
dnatype);
3006 const char *structname,
3007 const char *propname)
3026 if (!
DefRNA.preprocess) {
3052 sprop->
defaultvalue =
static_cast<const char *
>(default_data);
3055 fprintf(stderr,
"value=\"%s\", ", sprop->
defaultvalue);
3070 if (!
DefRNA.preprocess) {
3087 CLOG_ERROR(&
LOG,
"\"%s.%s\", array not supported for pointer type.", structname, propname);
3095 const char *structname,
3096 const char *propname,
3097 const char *lengthpropname)
3103 if (!
DefRNA.preprocess) {
3120 CLOG_ERROR(&
LOG,
"\"%s.%s\", array of collections not supported.", structname, propname);
3132 if (dp && lengthpropname) {
3141 if (lengthpropname[0] == 0 ||
3144 if (lengthpropname[0] == 0) {
3167 CLOG_ERROR(&
LOG,
"\"%s.%s\" not found.", structname, lengthpropname);
3183 if (!
DefRNA.preprocess) {
3195 if (!
DefRNA.preprocess) {
3210 if (!
DefRNA.preprocess) {
3228 if (!
DefRNA.preprocess) {
3240 if (!
DefRNA.preprocess) {
3278 if (!
DefRNA.preprocess) {
3298 if (!
DefRNA.preprocess) {
3303 switch (prop->
type) {
3347 if (getfunc || setfunc) {
3356 if (get_transform_fn) {
3359 if (set_transform_fn) {
3380 if (getfunc || setfunc) {
3389 if (get_transform_fn) {
3392 if (set_transform_fn) {
3404 if (!
DefRNA.preprocess) {
3409 switch (prop->
type) {
3460 if (getfunc || setfunc) {
3469 if (get_transform_fn) {
3472 if (set_transform_fn) {
3496 if (getfunc || setfunc) {
3505 if (get_transform_fn) {
3508 if (set_transform_fn) {
3520 if (!
DefRNA.preprocess) {
3525 switch (prop->
type) {
3576 if (getfunc || setfunc) {
3585 if (get_transform_fn) {
3588 if (set_transform_fn) {
3613 if (getfunc || setfunc) {
3622 if (get_transform_fn) {
3625 if (set_transform_fn) {
3637 if (!
DefRNA.preprocess) {
3642 switch (prop->
type) {
3683 if (getfunc || setfunc) {
3692 if (get_transform_fn) {
3695 if (set_transform_fn) {
3707 if (!
DefRNA.preprocess) {
3712 switch (prop->
type) {
3740 if (!
DefRNA.preprocess) {
3745 switch (prop->
type) {
3749 if (search !=
nullptr) {
3765 if (!
DefRNA.preprocess) {
3770 switch (prop->
type) {
3802 if (getfunc || setfunc) {
3811 if (get_transform_fn) {
3814 if (set_transform_fn) {
3825 sprop->
search = search_fn;
3826 if (search_fn !=
nullptr) {
3832 PropertyRNA *prop,
const char *get,
const char *set,
const char *type_fn,
const char *poll)
3836 if (!
DefRNA.preprocess) {
3841 switch (prop->
type) {
3872 const char *lookupint,
3873 const char *lookupstring,
3874 const char *assignint)
3878 if (!
DefRNA.preprocess) {
3883 switch (prop->
type) {
3924 if (!
DefRNA.preprocess) {
3928 switch (prop->
type) {
3955 if (!
DefRNA.preprocess) {
3959 switch (prop->
type) {
3986 if (!
DefRNA.preprocess) {
3990 switch (prop->
type) {
4017 if (!
DefRNA.preprocess) {
4021 switch (prop->
type) {
4043 const char *
error =
nullptr;
4061 const char *identifier,
4062 const bool default_value,
4063 const char *ui_name,
4064 const char *ui_description)
4077 const char *identifier,
4079 const bool *default_value,
4080 const char *ui_name,
4081 const char *ui_description)
4090 if (default_value) {
4099 const char *identifier,
4101 const bool *default_value,
4102 const char *ui_name,
4103 const char *ui_description)
4112 if (default_value) {
4121 const char *identifier,
4123 const bool *default_value,
4124 const char *ui_name,
4125 const char *ui_description)
4134 if (default_value) {
4143 const char *identifier,
4145 const bool *default_value,
4146 const char *ui_name,
4147 const char *ui_description)
4156 if (default_value) {
4165 const char *identifier,
4166 const int default_value,
4169 const char *ui_name,
4170 const char *ui_description,
4181 if (hardmin != hardmax) {
4191 const char *identifier,
4193 const int *default_value,
4196 const char *ui_name,
4197 const char *ui_description,
4210 if (default_value) {
4213 if (hardmin != hardmax) {
4223 const char *identifier,
4225 const int *default_value,
4228 const char *ui_name,
4229 const char *ui_description,
4242 if (default_value) {
4245 if (hardmin != hardmax) {
4255 const char *identifier,
4256 const char *default_value,
4258 const char *ui_name,
4259 const char *ui_description)
4264 BLI_assert(default_value ==
nullptr || default_value[0]);
4270 if (default_value) {
4279 const char *identifier,
4280 const char *default_value,
4282 const char *ui_name,
4283 const char *ui_description)
4288 BLI_assert(default_value ==
nullptr || default_value[0]);
4294 if (default_value) {
4303 const char *identifier,
4304 const char *default_value,
4306 const char *ui_name,
4307 const char *ui_description)
4312 BLI_assert(default_value ==
nullptr || default_value[0]);
4318 if (default_value) {
4327 const char *identifier,
4328 const char *default_value,
4330 const char *ui_name,
4331 const char *ui_description)
4336 BLI_assert(default_value ==
nullptr || default_value[0]);
4342 if (default_value) {
4351 const char *identifier,
4353 const int default_value,
4354 const char *ui_name,
4355 const char *ui_description)
4360 if (items ==
nullptr) {
4374 const char *identifier,
4376 const int default_value,
4377 const char *ui_name,
4378 const char *ui_description)
4383 if (items ==
nullptr) {
4404 const char *identifier,
4405 const float default_value,
4406 const float hardmin,
4407 const float hardmax,
4408 const char *ui_name,
4409 const char *ui_description,
4410 const float softmin,
4411 const float softmax)
4420 if (hardmin != hardmax) {
4430 const char *identifier,
4432 const float *default_value,
4433 const float hardmin,
4434 const float hardmax,
4435 const char *ui_name,
4436 const char *ui_description,
4437 const float softmin,
4438 const float softmax)
4449 if (default_value) {
4452 if (hardmin != hardmax) {
4462 const char *identifier,
4464 const float *default_value,
4465 const float hardmin,
4466 const float hardmax,
4467 const char *ui_name,
4468 const char *ui_description,
4469 const float softmin,
4470 const float softmax)
4490 const char *identifier,
4492 const float *default_value,
4493 const float hardmin,
4494 const float hardmax,
4495 const char *ui_name,
4496 const char *ui_description,
4497 const float softmin,
4498 const float softmax)
4509 if (default_value) {
4512 if (hardmin != hardmax) {
4522 const char *identifier,
4525 const float *default_value,
4526 const float hardmin,
4527 const float hardmax,
4528 const char *ui_name,
4529 const char *ui_description,
4530 const float softmin,
4531 const float softmax)
4535 const int length[2] = {rows, columns};
4541 if (default_value) {
4544 if (hardmin != hardmax) {
4554 const char *identifier,
4556 const float *default_value,
4557 const float hardmin,
4558 const float hardmax,
4559 const char *ui_name,
4560 const char *ui_description,
4561 const float softmin,
4562 const float softmax)
4584 const char *identifier,
4586 const float *default_value,
4587 const float hardmin,
4588 const float hardmax,
4589 const char *ui_name,
4590 const char *ui_description,
4591 const float softmin,
4592 const float softmax)
4602 if (default_value) {
4610 if (hardmin != hardmax) {
4620 const char *identifier,
4621 const float default_value,
4622 const float hardmin,
4623 const float hardmax,
4624 const char *ui_name,
4625 const char *ui_description,
4626 const float softmin,
4627 const float softmax)
4644 const char *identifier,
4646 const float *default_value,
4647 const float hardmin,
4648 const float hardmax,
4649 const char *ui_name,
4650 const char *ui_description,
4651 const float softmin,
4652 const float softmax)
4663 if (default_value) {
4666 if (hardmin != hardmax) {
4676 const char *identifier,
4677 const float default_value,
4678 const float hardmin,
4679 const float hardmax,
4680 const char *ui_name,
4681 const char *ui_description,
4682 const float softmin,
4683 const float softmax)
4692 if (hardmax < 2.0f) {
4694 "Percentage property with incorrect range: %s.%s",
4702 if (hardmin != hardmax) {
4712 const char *identifier,
4713 const float default_value,
4714 const float hardmin,
4715 const float hardmax,
4716 const char *ui_name,
4717 const char *ui_description,
4718 const float softmin,
4719 const float softmax)
4728 if (hardmin != hardmax) {
4738 const char *identifier,
4740 const char *ui_name,
4741 const char *ui_description)
4754 const char *identifier,
4756 const char *ui_name,
4757 const char *ui_description)
4773 const char *identifier,
4775 const char *ui_name,
4776 const char *ui_description)
4789 const char *identifier,
4791 const char *ui_name,
4792 const char *ui_description)
4813 const char *
error =
nullptr;
4851 if (!
DefRNA.preprocess) {
4882 "\"%s.%s\", dynamic values are not allowed as strict returns, "
4883 "use RNA_def_function_output instead.",
4888 if (
ret->arraydimension) {
4890 "\"%s.%s\", arrays are not allowed as strict returns, "
4891 "use RNA_def_function_output instead.",
4917 "FUNC_SELF_AS_RNA and FUNC_NO_SELF are mutually exclusive");
4939 return sizeof(bool) *
len;
4941 return sizeof(int) *
len;
4951 return sizeof(bool);
4956 return sizeof(
float);
4964 return sizeof(
char *);
4977 return sizeof(
void *);
4986 return sizeof(
void *);
4995 return sizeof(
void *);
5004 const int alignment =
sizeof(
void *);
5005 return (
size + alignment - 1) & ~(alignment - 1);
5021 else if (tot >= 8 && (tot & (tot - 1)) == 0) {
5030 (*items)[tot] = *item;
5053 if (item->
value == value) {
5094 if (brna !=
nullptr) {
5148 switch (prop->
type) {
5154 "RNA_def_property_store");
5165 "RNA_def_property_store");
5176 "RNA_def_property_store");
5180 for (a = 0; a < eprop->
totitem; a++) {
5181 if (
array[a].identifier) {
5187 if (
array[a].description) {
5199 "RNA_def_property_store");
5219static void (*g_py_data_clear_fn)(
PropertyRNA *prop) =
nullptr;
5229 g_py_data_clear_fn = py_data_clear_fn;
5237 if (g_py_data_clear_fn) {
5238 g_py_data_clear_fn(prop);
5257 switch (prop->
type) {
5282 for (a = 0; a < eprop->
totitem; a++) {
5345 PropertyRNA *prop = rna_def_property_find_py_id(cont, identifier);
5346 if (prop !=
nullptr) {
5348 rna_def_property_free(cont, prop);
5359 const char *identifier,
5363 PropertyRNA *prop = rna_def_property_find_py_id(cont, identifier);
5364 if (prop !=
nullptr) {
5382 rna_def_property_free(cont, prop);
5391 return "PROP_BOOLEAN";
5395 return "PROP_FLOAT";
5397 return "PROP_STRING";
5401 return "PROP_POINTER";
5403 return "PROP_COLLECTION";
5406 return "PROP_UNKNOWN";
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
void * BLI_ghash_lookup_default(const GHash *gh, const void *key, void *val_default) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_str_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void * BLI_ghash_replace_key(GHash *gh, void *key)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
void * BLI_findstring_ptr(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE unsigned int bitscan_forward_uint64(unsigned long long a)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
#define POINTER_OFFSET(v, ofs)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
void BPY_DECREF(void *pyob_ptr)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
const void * DNA_default_table[SDNA_TYPE_MAX]
blenloader genfile private function prototypes
void DNA_sdna_free(struct SDNA *sdna)
const unsigned char DNAstr[]
struct SDNA * DNA_sdna_from_data(const void *data, int data_len, bool data_alloc, bool do_alias, const char **r_error_message)
int DNA_struct_member_size(const struct SDNA *sdna, short type, short member_index)
int DNA_struct_find_index_without_alias(const struct SDNA *sdna, const char *str)
Read Guarded memory(de)allocation.
int RNA_def_property_free_identifier(StructOrFunctionRNA *cont_, const char *identifier)
void(*)(Main *, Scene *, PointerRNA *) RNAPropertyUpdateFunc
void RNA_def_struct_free_pointers(BlenderRNA *brna, StructRNA *srna)
#define IS_DNATYPE_BOOLEAN_COMPAT(_str)
void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA *prop)
void RNA_def_property_free_pointers_set_py_data_callback(void(*py_data_clear_fn)(PropertyRNA *prop))
#define IS_DNATYPE_FLOAT_COMPAT(_str)
void RNA_def_property_free_identifier_deferred_finish(StructOrFunctionRNA *cont_, void *handle)
#define IS_DNATYPE_INT_COMPAT(_str)
void RNA_def_func_duplicate_pointers(FunctionRNA *func)
void(*)(bContext *C, PointerRNA *ptr, PropertyRNA *prop) RNAPropertyUpdateFuncWithContextAndProperty
#define RNA_MAX_ARRAY_LENGTH
void RNA_def_struct_duplicate_pointers(BlenderRNA *brna, StructRNA *srna)
void RNA_def_property_free_pointers(PropertyRNA *prop)
void RNA_def_func_free_pointers(FunctionRNA *func)
int RNA_def_property_free_identifier_deferred_prepare(StructOrFunctionRNA *cont_, const char *identifier, void **handle)
#define RNA_MAX_ARRAY_DIMENSION
void(*)(PointerRNA *ptr, PropertyRNA *prop, int *min, int *max, int *softmin, int *softmax) IntPropertyRangeFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop) EnumPropertyGetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, const std::string &value) StringPropertySetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, const float *new_values, const float *curr_values, bool is_set, float *r_values) FloatArrayPropertySetTransformFunc
float(*)(PointerRNA *ptr, PropertyRNA *prop, float value, bool is_set) FloatPropertyGetTransformFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop) StringPropertyLengthFunc
@ STRUCT_PUBLIC_NAMESPACE
@ STRUCT_NO_DATABLOCK_IDPROPERTIES
@ STRUCT_PUBLIC_NAMESPACE_INHERIT
void(*)(PointerRNA *ptr, PropertyRNA *prop, const int *new_values, const int *curr_values, bool is_set, int *r_values) IntArrayPropertySetTransformFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, const bool *r_values) BooleanArrayPropertySetFunc
const EnumPropertyItem *(*)(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) EnumPropertyItemFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop, int value, bool is_set) EnumPropertyGetTransformFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, float *values) FloatArrayPropertyGetFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop, int value, bool is_set) IntPropertyGetTransformFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, bool *r_values) BooleanArrayPropertyGetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, const bool *new_values, const bool *curr_values, bool is_set, bool *r_values) BooleanArrayPropertySetTransformFunc
eStringPropertySearchFlag
@ PROP_STRING_SEARCH_SUPPORTED
void(*)(PointerRNA *ptr, PropertyRNA *prop, int *values) IntArrayPropertyGetFunc
StructRNA *(*)(Main *bmain, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) StructRegisterFunc
void(*)( PointerRNA *ptr, PropertyRNA *prop, const bool *curr_values, bool is_set, bool *r_values) BooleanArrayPropertyGetTransformFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, int value) EnumPropertySetFunc
std::string(*)(PointerRNA *ptr, PropertyRNA *prop) StringPropertyGetFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, const int *values) IntArrayPropertySetFunc
void(*)( PointerRNA *ptr, PropertyRNA *prop, const float *curr_values, bool is_set, float *r_values) FloatArrayPropertyGetTransformFunc
std::string(*)(PointerRNA *ptr, PropertyRNA *prop, const std::string &value, bool is_set) StringPropertyGetTransformFunc
#define RNA_ENUM_ITEM_SEPR
bool(*)(Main *bmain, StructRNA *type) StructUnregisterFunc
bool(*)(PointerRNA *ptr, PropertyRNA *prop) BooleanPropertyGetFunc
void(*)(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *edit_text, blender::FunctionRef< void(StringPropertySearchVisitParams)> visit_fn) StringPropertySearchFunc
bool(*)(PointerRNA *ptr, PropertyRNA *prop, bool value, bool is_set) BooleanPropertyGetTransformFunc
#define RNA_TRANSLATION_PREC_DEFAULT
int(*)(PointerRNA *ptr, PropertyRNA *prop, int new_value, int curr_value, bool is_set) IntPropertySetTransformFunc
float(*)(PointerRNA *ptr, PropertyRNA *prop) FloatPropertyGetFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop) IntPropertyGetFunc
void(*)( PointerRNA *ptr, PropertyRNA *prop, const int *curr_values, bool is_set, int *r_values) IntArrayPropertyGetTransformFunc
void(*)( PointerRNA *ptr, PropertyRNA *prop, float *min, float *max, float *softmin, float *softmax) FloatPropertyRangeFunc
float(*)(PointerRNA *ptr, PropertyRNA *prop, float new_value, float curr_value, bool is_set) FloatPropertySetTransformFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, float value) FloatPropertySetFunc
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
bool(*)(PointerRNA *ptr, PropertyRNA *prop, bool new_value, bool curr_value, bool is_set) BooleanPropertySetTransformFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop, int new_value, int curr_value, bool is_set) EnumPropertySetTransformFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, int value) IntPropertySetFunc
void(*)(bContext *C, ReportList *reports, PointerRNA *ptr, ParameterList *parms) CallFunc
std::string(*)(PointerRNA *ptr, PropertyRNA *prop, const std::string &new_value, const std::string &curr_value, bool is_set) StringPropertySetTransformFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, const float *values) FloatArrayPropertySetFunc
@ PROP_CONTEXT_PROPERTY_UPDATE
std::optional< std::string >(*)(const bContext *C, PointerRNA *ptr, PropertyRNA *prop) StringPropertyPathFilterFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, bool value) BooleanPropertySetFunc
void **(*)(PointerRNA *ptr) StructInstanceFunc
#define UI_PRECISION_FLOAT_MAX
unsigned long long int uint64_t
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const char * DNA_struct_rename_legacy_hack_static_from_alias(const char *name)
int DNA_member_array_num(const char *str)
@ DNA_RENAME_STATIC_FROM_ALIAS
void DNA_alias_maps(enum eDNA_RenameDir version_dir, struct GHash **r_type_map, struct GHash **r_member_map)
IMETHOD Vector diff(const Vector &a, const Vector &b, double dt)
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
float length(VecOp< float, D >) RET
static struct @262302365306145015147135362170176324152201236327 g_version_data
GHash * type_map_static_from_alias
void * rna_calloc(int buffer_size)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void *(* MEM_recallocN_id)(void *vmemh, size_t len, const char *str)
void MEM_freeN(void *vmemh)
static void error(const char *str)
void RNA_struct_py_type_set(StructRNA *srna, void *py_type)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
IDProperty * RNA_struct_system_idprops(PointerRNA *ptr, bool create)
void * RNA_struct_py_type_get(StructRNA *srna)
PropertyRNA * RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_int_array_funcs_runtime(PropertyRNA *prop, IntArrayPropertyGetFunc getfunc, IntArrayPropertySetFunc setfunc, IntPropertyRangeFunc rangefunc, IntArrayPropertyGetTransformFunc get_transform_fn, IntArrayPropertySetTransformFunc set_transform_fn)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
PropertyRNA * RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const int *default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
PropertyRNA * RNA_def_float_percentage(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_define_lib_overridable(const bool make_overridable)
void RNA_def_property_struct_runtime(StructOrFunctionRNA *cont, PropertyRNA *prop, StructRNA *type)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_define_animate_sdna(bool animate)
PropertyRNA * RNA_def_boolean_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const bool *default_value, const char *ui_name, const char *ui_description)
static int DNA_struct_find_index_wrapper(const SDNA *sdna, const char *type_name)
PropertyRNA * RNA_def_float_color(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void rna_freelinkN(ListBase *listbase, void *vlink)
void RNA_def_property_ui_name_func(PropertyRNA *prop, const char *name_func)
void RNA_def_property_string_search_func_runtime(PropertyRNA *prop, StringPropertySearchFunc search_fn, const eStringPropertySearchFlag search_flag)
void RNA_def_struct_system_idprops_func(StructRNA *srna, const char *system_idproperties)
void RNA_def_struct_flag(StructRNA *srna, int flag)
PropertyRNA * RNA_def_pointer_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
FunctionRNA * RNA_def_function_runtime(StructRNA *srna, const char *identifier, CallFunc call)
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)
const char * RNA_property_typename(PropertyType type)
const float rna_default_quaternion[4]
void RNA_def_property_float_default(PropertyRNA *prop, float value)
static void rna_remlink(ListBase *listbase, void *vlink)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
static bool rna_validate_identifier(const char *identifier, bool property, const char **r_error)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
static void rna_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, const int64_t booleanbit, const bool booleannegative, const int length)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_define_verify_sdna(bool verify)
void rna_freelistN(ListBase *listbase)
void RNA_def_property_string_search_func(PropertyRNA *prop, const char *search, const eStringPropertySearchFlag search_flag)
void RNA_def_property_enum_native_type(PropertyRNA *prop, const char *native_enum_type)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
PropertyRNA * RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float_distance(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
const int rna_matrix_dimsize_4x2[]
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
void RNA_def_property_boolean_default_func(PropertyRNA *prop, const char *get_default)
void RNA_def_struct_property_tags(StructRNA *srna, const EnumPropertyItem *prop_tag_defines)
PropertyRNA * RNA_def_float_translation(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_boolean_layer(StructOrFunctionRNA *cont_, const char *identifier, const int len, const bool *default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
PropertyRNA * RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identifier, const int rows, const int columns, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_deprecated(PropertyRNA *prop, const char *note, const short version, const short removal_version)
static PropertyDefRNA * rna_def_property_sdna(PropertyRNA *prop, const char *structname, const char *propname)
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)
const float rna_default_scale_3d[3]
void RNA_def_property_boolean_bitset_array_sdna(PropertyRNA *prop, const char *structname, const char *propname, const int64_t booleanbit, const int length)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
#define ASSERT_SOFT_HARD_LIMITS
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg, const char *instance)
void RNA_def_property_update_runtime(PropertyRNA *prop, RNAPropertyUpdateFunc func)
void RNA_identifier_sanitize(char *identifier, int property)
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
FunctionDefRNA * rna_find_function_def(FunctionRNA *func)
void RNA_def_struct_identifier(BlenderRNA *brna, StructRNA *srna, const char *identifier)
static int rna_member_cmp(const char *name, const char *oname)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_int_default(PropertyRNA *prop, int value)
void RNA_def_property_path_template_type(PropertyRNA *prop, PropertyPathTemplateType path_template_type)
const float rna_default_axis_angle[4]
void RNA_def_property_editable_array_func(PropertyRNA *prop, const char *editable)
PropertyRNA * RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const int *default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void RNA_def_property_boolean_funcs_runtime(PropertyRNA *prop, BooleanPropertyGetFunc getfunc, BooleanPropertySetFunc setfunc, BooleanPropertyGetTransformFunc get_transform_fn, BooleanPropertySetTransformFunc set_transform_fn)
PropertyRNA * RNA_def_boolean_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const bool *default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_property_update_notifier(PropertyRNA *prop, const int noteflag)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
PropertyRNA * RNA_def_float_vector_xyz(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_py_data(PropertyRNA *prop, void *py_data)
void RNA_def_struct_clear_flag(StructRNA *srna, int flag)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_float_default_func(PropertyRNA *prop, const char *get_default)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
PropertyRNA * RNA_def_string_file_name(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
static bool debugSRNA_defaults
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_struct_identifier_no_struct_map(StructRNA *srna, const char *identifier)
void RNA_def_property_poll_runtime(PropertyRNA *prop, const void *func)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const char *propname)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
static FunctionRNA * rna_def_function(StructRNA *srna, const char *identifier)
void RNA_def_property_update_runtime_with_context_and_property(PropertyRNA *prop, RNAPropertyUpdateFuncWithContextAndProperty func)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
const int rna_matrix_dimsize_4x4[]
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_float_array_funcs_runtime(PropertyRNA *prop, FloatArrayPropertyGetFunc getfunc, FloatArrayPropertySetFunc setfunc, FloatPropertyRangeFunc rangefunc, FloatArrayPropertyGetTransformFunc get_transform_fn, FloatArrayPropertySetTransformFunc set_transform_fn)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
static size_t rna_property_type_sizeof(PropertyType type)
StructRNA * RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRNA *srnafrom)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
PropertyRNA * RNA_def_boolean_layer_member(StructOrFunctionRNA *cont_, const char *identifier, const int len, const bool *default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_funcs_runtime(PropertyRNA *prop, EnumPropertyGetFunc getfunc, EnumPropertySetFunc setfunc, EnumPropertyItemFunc itemfunc, EnumPropertyGetTransformFunc get_transform_fn, EnumPropertySetTransformFunc set_transform_fn)
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_string_funcs_runtime(PropertyRNA *prop, StringPropertyGetFunc getfunc, StringPropertyLengthFunc lengthfunc, StringPropertySetFunc setfunc, StringPropertyGetTransformFunc get_transform_fn, StringPropertySetTransformFunc set_transform_fn)
void RNA_def_property_int_array_default(PropertyRNA *prop, const int *array)
void RNA_free(BlenderRNA *brna)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_float_funcs_runtime(PropertyRNA *prop, FloatPropertyGetFunc getfunc, FloatPropertySetFunc setfunc, FloatPropertyRangeFunc rangefunc, FloatPropertyGetTransformFunc get_transform_fn, FloatPropertySetTransformFunc set_transform_fn)
static bool rna_range_from_int_type(const char *dnatype, int r_range[2])
static int rna_find_sdna_member(SDNA *sdna, const char *structname, const char *membername, DNAStructMember *smember, int *offset)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
BlenderRNA * RNA_create()
void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *rna_ext)
void RNA_def_property_enum_default_func(PropertyRNA *prop, const char *get_default)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyRNA * RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
PropertyDefRNA * rna_find_parameter_def(PropertyRNA *parm)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
const int rna_matrix_dimsize_3x3[]
int rna_parameter_size(PropertyRNA *parm)
PropertyRNA * RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_flag_hide_from_ui_workaround(PropertyRNA *prop)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
static void print_default_info(const PropertyDefRNA *dp)
PropertyRNA * RNA_def_collection(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
void RNA_def_property_override_funcs(PropertyRNA *prop, const char *diff, const char *store, const char *apply)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
void RNA_def_property_int_funcs_runtime(PropertyRNA *prop, IntPropertyGetFunc getfunc, IntPropertySetFunc setfunc, IntPropertyRangeFunc rangefunc, IntPropertyGetTransformFunc get_transform_fn, IntPropertySetTransformFunc set_transform_fn)
void RNA_def_property_ui_scale_type(PropertyRNA *prop, PropertyScaleType ui_scale_type)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_override_clear_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
PropertyDefRNA * rna_find_struct_property_def(StructRNA *srna, PropertyRNA *prop)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_string_dir_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
static void rna_brna_structs_add(BlenderRNA *brna, StructRNA *srna)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_array_default(PropertyRNA *prop, const bool *array)
void RNA_def_property_string_filepath_filter_func(PropertyRNA *prop, const char *filter)
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
static ContainerDefRNA * rna_find_container_def(ContainerRNA *cont)
StructDefRNA * rna_find_struct_def(StructRNA *srna)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_define_free(BlenderRNA *)
#define IS_DNATYPE_BOOLEAN_BITSHIFT_FULLRANGE_COMPAT(_str)
void RNA_def_property_tags(PropertyRNA *prop, int tags)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
PropertyDefRNA * rna_findlink(ListBase *listbase, const char *identifier)
void RNA_def_struct_translation_context(StructRNA *srna, const char *context)
void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
void RNA_def_property_int_default_func(PropertyRNA *prop, const char *get_default)
static StructDefRNA * rna_find_def_struct(StructRNA *srna)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
int rna_parameter_size_pad(const int size)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname)
void RNA_define_fallback_property_update(int noteflag, const char *updatefunc)
void RNA_def_property_boolean_array_funcs_runtime(PropertyRNA *prop, BooleanArrayPropertyGetFunc getfunc, BooleanArrayPropertySetFunc setfunc, BooleanArrayPropertyGetTransformFunc get_transform_fn, BooleanArrayPropertySetTransformFunc set_transform_fn)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void rna_addtail(ListBase *listbase, void *vlink)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void rna_builtin_properties_next(CollectionPropertyIterator *iter)
void rna_builtin_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
PointerRNA rna_builtin_properties_get(CollectionPropertyIterator *iter)
PointerRNA rna_builtin_type_get(PointerRNA *ptr)
IDPropertyGroup * rna_struct_system_properties_get_func(PointerRNA ptr, bool do_create)
bool(*)(Main *bmain, RNAPropertyOverrideApplyContext &rnaapply_ctx) RNAPropOverrideApply
StructRNA *(*)(PointerRNA *ptr) StructRefineFunc
IDProperty **(*)(PointerRNA *ptr) IDPropertiesFunc
const char *(*)(const PointerRNA *ptr, const PropertyRNA *prop, bool do_translate) PropUINameFunc
void(*)(PointerRNA *ptr, bool *values) PropBooleanArrayGetFunc
void(*)(CollectionPropertyIterator *iter) PropCollectionNextFunc
int(*)(PointerRNA *ptr) PropStringLengthFunc
void(*)(CollectionPropertyIterator *iter, PointerRNA *ptr) PropCollectionBeginFunc
bool(*)(PointerRNA *ptr, int key, PointerRNA *r_ptr) PropCollectionLookupIntFunc
PointerRNA(*)(CollectionPropertyIterator *iter) PropCollectionGetFunc
void(*)(PointerRNA *ptr, const PointerRNA value, ReportList *reports) PropPointerSetFunc
@ PROP_INTERN_PTR_OWNERSHIP_FORCED
@ PROP_INTERN_FREE_POINTERS
@ PROP_INTERN_PTR_ID_REFCOUNT_FORCED
int(*)(const PointerRNA *ptr, int index) ItemEditableFunc
bool(*)(PointerRNA *ptr, PropertyRNA *prop) PropBooleanGetFuncEx
void(*)(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) PropFloatRangeFunc
void(*)(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) PropIntRangeFunc
bool(*)(PointerRNA *ptr, int key, const PointerRNA *assign_ptr) PropCollectionAssignIntFunc
void(*)(PointerRNA *ptr, int value) PropEnumSetFunc
int(*)(PointerRNA *ptr) PropEnumGetFunc
void(*)(Main *bmain, Scene *active_scene, PointerRNA *ptr) UpdateFunc
int(*)(const PointerRNA *ptr, const char **r_info) EditableFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop) PropEnumGetFuncEx
void(*)(PointerRNA *ptr, int value) PropIntSetFunc
int(*)(const PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION]) PropArrayLengthGetFunc
PointerRNA(*)(PointerRNA *ptr) PropPointerGetFunc
bool(*)(PointerRNA *ptr, const PointerRNA value) PropPointerPollFunc
const EnumPropertyItem *(*)(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) PropEnumItemFunc
void(*)(PointerRNA *ptr, PropertyRNA *prop, float *values) PropFloatArrayGetFuncEx
void(*)(PointerRNA *ptr, const float *values) PropFloatArraySetFunc
void(*)(Main *bmain, RNAPropertyOverrideDiffContext &rnadiff_ctx) RNAPropOverrideDiff
void(*)(PointerRNA *ptr, char *value) PropStringGetFunc
void(*)(PointerRNA *ptr, bool value) PropBooleanSetFunc
bool(*)(PointerRNA *ptr, const char *key, PointerRNA *r_ptr) PropCollectionLookupStringFunc
std::optional< std::string >(*)(const PointerRNA *ptr) StructPathFunc
StructRNA *(*)(PointerRNA *ptr) PropPointerTypeFunc
int(*)(PointerRNA *ptr) PropCollectionLengthFunc
#define CONTAINER_RNA_ID(cont)
void(*)(PointerRNA *ptr, PropertyRNA *prop, int *values) PropIntArrayGetFuncEx
void(*)(PointerRNA *ptr, PropertyRNA *prop, bool *values) PropBooleanArrayGetFuncEx
void(*)(PointerRNA *ptr, const bool *values) PropBooleanArraySetFunc
bool(*)(PointerRNA *ptr) PropBooleanGetFunc
bool(*)(Main *bmain, PointerRNA *ptr_local, PointerRNA *ptr_reference, PointerRNA *ptr_storage, PropertyRNA *prop_local, PropertyRNA *prop_reference, PropertyRNA *prop_storage, int len_local, int len_reference, int len_storage, IDOverrideLibraryPropertyOperation *opop) RNAPropOverrideStore
void(*)(PointerRNA *ptr, int *values) PropIntArrayGetFunc
void(*)(PointerRNA *ptr, float value) PropFloatSetFunc
void(*)(PointerRNA *ptr, const int *values) PropIntArraySetFunc
int(*)(PointerRNA *ptr, PropertyRNA *prop) PropIntGetFuncEx
int(*)(PointerRNA *ptr) PropIntGetFunc
float(*)(PointerRNA *ptr, PropertyRNA *prop) PropFloatGetFuncEx
void(*)(PointerRNA *ptr, const char *value) PropStringSetFunc
float(*)(PointerRNA *ptr) PropFloatGetFunc
void(*)(PointerRNA *ptr, float *values) PropFloatArrayGetFunc
void(*)(CollectionPropertyIterator *iter) PropCollectionEndFunc
PropBooleanArrayGetTransformFunc getarray_transform
PropBooleanGetFuncEx get_default
PropBooleanSetTransformFunc set_transform
PropBooleanArraySetFuncEx setarray_ex
PropBooleanArrayGetFuncEx getarray_ex
PropBooleanGetTransformFunc get_transform
PropBooleanArraySetFunc setarray
const bool * defaultarray
PropBooleanArrayGetFuncEx get_default_array
PropBooleanSetFuncEx set_ex
PropBooleanGetFuncEx get_ex
PropBooleanArraySetTransformFunc setarray_transform
PropBooleanArrayGetFunc getarray
PropCollectionNextFunc next
PropCollectionLookupStringFunc lookupstring
PropCollectionLengthFunc length
PropCollectionLookupIntFunc lookupint
PropCollectionBeginFunc begin
PropCollectionAssignIntFunc assignint
PropCollectionEndFunc end
PropCollectionGetFunc get
blender::CustomIDVectorSet< PropertyRNA *, PropertyRNAIdentifierGetter > * prop_lookup_set
const EnumPropertyItem * item
PropEnumGetTransformFunc get_transform
PropEnumGetFuncEx get_default
const char * native_enum_type
PropEnumSetTransformFunc set_transform
PropFloatSetTransformFunc set_transform
PropFloatSetFuncEx set_ex
PropertyScaleType ui_scale_type
PropFloatRangeFuncEx range_ex
PropFloatArrayGetTransformFunc getarray_transform
PropFloatArrayGetFuncEx getarray_ex
PropFloatArraySetFuncEx setarray_ex
PropFloatArrayGetFunc getarray
PropFloatGetFuncEx get_default
PropFloatArraySetTransformFunc setarray_transform
PropFloatGetTransformFunc get_transform
const float * defaultarray
PropFloatArraySetFunc setarray
PropFloatGetFuncEx get_ex
PropFloatArrayGetFuncEx get_default_array
PropIntRangeFuncEx range_ex
PropIntArrayGetFunc getarray
PropIntArrayGetFuncEx getarray_ex
PropIntArraySetTransformFunc setarray_transform
PropIntArraySetFunc setarray
PropIntArrayGetFuncEx get_default_array
PropIntSetTransformFunc set_transform
PropIntArraySetFuncEx setarray_ex
PropIntGetTransformFunc get_transform
PropertyScaleType ui_scale_type
PropIntArrayGetTransformFunc getarray_transform
PropIntGetFuncEx get_default
PropPointerTypeFunc type_fn
const char * dnastructfromprop
const char * dnastructname
const char * dnalengthstructname
const char * dnalengthname
const char * dnastructfromname
ItemEditableFunc itemeditable
PropArrayLengthGetFunc getlength
const char * translation_context
RNAPropOverrideApply override_apply
unsigned int arraydimension
const DeprecatedRNA * deprecated
PropertyPathTemplateType path_template_type
RNAPropOverrideStore override_store
PropUINameFunc ui_name_func
RNAPropOverrideDiff override_diff
unsigned int arraylength[RNA_MAX_ARRAY_DIMENSION]
unsigned int totarraylength
SDNA_StructMember members[]
struct SDNA::@324261063051035105003300060127223210155361202367 alias
StringPropertyPathFilterFunc path_filter
const char * defaultvalue
PropStringLengthFuncEx length_ex
PropStringLengthFunc length
PropStringGetFuncEx get_ex
PropStringSetFuncEx set_ex
PropStringGetTransformFunc get_transform
PropStringSetTransformFunc set_transform
StringPropertySearchFunc search
eStringPropertySearchFlag search_flag
StructUnregisterFunc unreg
StructInstanceFunc instance
const char * translation_context
const EnumPropertyItem * prop_tag_defines
PropertyRNA * nameproperty
IDPropertiesFunc idproperties
PropertyRNA * iteratorproperty
IDPropertiesFunc system_idproperties