Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_define.c
| Show First 20 Lines • Show All 3,465 Lines • ▼ Show 20 Lines | switch (prop->type) { | ||||
| } | } | ||||
| default: | default: | ||||
| CLOG_ERROR(&LOG, "\"%s.%s\", type is not collection.", srna->identifier, prop->identifier); | CLOG_ERROR(&LOG, "\"%s.%s\", type is not collection.", srna->identifier, prop->identifier); | ||||
| DefRNA.error = true; | DefRNA.error = true; | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| void RNA_def_property_collection_flag(PropertyRNA *prop, int flag) | |||||
| { | |||||
| StructRNA *srna = DefRNA.laststruct; | |||||
| if (!DefRNA.preprocess) { | |||||
| CLOG_ERROR(&LOG, "only during preprocessing."); | |||||
| return; | |||||
| } | |||||
| switch (prop->type) { | |||||
| case PROP_COLLECTION: { | |||||
| CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop; | |||||
| cprop->flag = flag; | |||||
| break; | |||||
| } | |||||
| default: | |||||
| CLOG_ERROR(&LOG, "\"%s.%s\", type is not collection.", srna->identifier, prop->identifier); | |||||
| DefRNA.error = true; | |||||
| break; | |||||
| } | |||||
| } | |||||
| void RNA_def_property_srna(PropertyRNA *prop, const char *type) | void RNA_def_property_srna(PropertyRNA *prop, const char *type) | ||||
| { | { | ||||
| char error[512]; | char error[512]; | ||||
| if (rna_validate_identifier(type, error, false) == 0) { | if (rna_validate_identifier(type, error, false) == 0) { | ||||
| CLOG_ERROR(&LOG, "struct identifier \"%s\" error - %s", type, error); | CLOG_ERROR(&LOG, "struct identifier \"%s\" error - %s", type, error); | ||||
| DefRNA.error = true; | DefRNA.error = true; | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,352 Lines • Show Last 20 Lines | |||||