Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_access.c
| Show First 20 Lines • Show All 3,778 Lines • ▼ Show 20 Lines | int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop) | ||||
| for (; iter.valid; RNA_property_collection_next(&iter)) { | for (; iter.valid; RNA_property_collection_next(&iter)) { | ||||
| length++; | length++; | ||||
| } | } | ||||
| RNA_property_collection_end(&iter); | RNA_property_collection_end(&iter); | ||||
| return length; | return length; | ||||
| } | } | ||||
| int RNA_property_collection_flag(PropertyRNA *prop) | |||||
| { | |||||
| BLI_assert(RNA_property_type(prop) == PROP_COLLECTION); | |||||
| CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop; | |||||
| return cprop->flag; | |||||
| } | |||||
| bool RNA_property_collection_is_empty(PointerRNA *ptr, PropertyRNA *prop) | bool RNA_property_collection_is_empty(PointerRNA *ptr, PropertyRNA *prop) | ||||
| { | { | ||||
| BLI_assert(RNA_property_type(prop) == PROP_COLLECTION); | BLI_assert(RNA_property_type(prop) == PROP_COLLECTION); | ||||
| CollectionPropertyIterator iter; | CollectionPropertyIterator iter; | ||||
| RNA_property_collection_begin(ptr, prop, &iter); | RNA_property_collection_begin(ptr, prop, &iter); | ||||
| bool test = iter.valid; | bool test = iter.valid; | ||||
| RNA_property_collection_end(&iter); | RNA_property_collection_end(&iter); | ||||
| return !test; | return !test; | ||||
| ▲ Show 20 Lines • Show All 2,992 Lines • Show Last 20 Lines | |||||