Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_nodetree.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 1,853 Lines • ▼ Show 20 Lines | static const EnumPropertyItem *itemf_function_check( | ||||
| } | } | ||||
| RNA_enum_item_end(&item_array, &items_len); | RNA_enum_item_end(&item_array, &items_len); | ||||
| return item_array; | return item_array; | ||||
| } | } | ||||
| static bool attribute_random_type_supported(const EnumPropertyItem *item) | static bool attribute_random_type_supported(const EnumPropertyItem *item) | ||||
| { | { | ||||
| return ELEM(item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3); | return ELEM(item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_BOOL); | ||||
| } | } | ||||
| static const EnumPropertyItem *rna_GeometryNodeAttributeRandom_type_itemf( | static const EnumPropertyItem *rna_GeometryNodeAttributeRandom_type_itemf( | ||||
| bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) | bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) | ||||
| { | { | ||||
| *r_free = true; | *r_free = true; | ||||
| return itemf_function_check(rna_enum_attribute_type_items, attribute_random_type_supported); | return itemf_function_check(rna_enum_attribute_type_items, attribute_random_type_supported); | ||||
| } | } | ||||
| static bool attribute_random_domain_supported(const EnumPropertyItem *item) | static bool attribute_random_domain_supported(const EnumPropertyItem *item) | ||||
| { | { | ||||
| return item->value == ATTR_DOMAIN_POINT; | return item->value == ATTR_DOMAIN_POINT; | ||||
| } | } | ||||
| static const EnumPropertyItem *rna_GeometryNodeAttributeRandom_domain_itemf( | static const EnumPropertyItem *rna_GeometryNodeAttributeRandom_domain_itemf( | ||||
| bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) | bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) | ||||
| { | { | ||||
| *r_free = true; | *r_free = true; | ||||
| return itemf_function_check(rna_enum_attribute_domain_items, attribute_random_domain_supported); | return itemf_function_check(rna_enum_attribute_domain_items, attribute_random_domain_supported); | ||||
| } | } | ||||
| static bool attribute_fill_type_supported(const EnumPropertyItem *item) | static bool attribute_fill_type_supported(const EnumPropertyItem *item) | ||||
| { | { | ||||
| return ELEM(item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_COLOR); | return ELEM(item->value, CD_PROP_FLOAT, CD_PROP_FLOAT3, CD_PROP_COLOR, CD_PROP_BOOL); | ||||
| } | } | ||||
| static const EnumPropertyItem *rna_GeometryNodeAttributeFill_type_itemf(bContext *UNUSED(C), | static const EnumPropertyItem *rna_GeometryNodeAttributeFill_type_itemf(bContext *UNUSED(C), | ||||
| PointerRNA *UNUSED(ptr), | PointerRNA *UNUSED(ptr), | ||||
| PropertyRNA *UNUSED(prop), | PropertyRNA *UNUSED(prop), | ||||
| bool *r_free) | bool *r_free) | ||||
| { | { | ||||
| *r_free = true; | *r_free = true; | ||||
| return itemf_function_check(rna_enum_attribute_type_items, attribute_fill_type_supported); | return itemf_function_check(rna_enum_attribute_type_items, attribute_fill_type_supported); | ||||
| ▲ Show 20 Lines • Show All 8,377 Lines • Show Last 20 Lines | |||||