Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_layout.c
| Show First 20 Lines • Show All 2,430 Lines • ▼ Show 20 Lines | if (free) { | ||||
| MEM_freeN((void *)item); | MEM_freeN((void *)item); | ||||
| } | } | ||||
| ui_item_disabled(layout, propname); | ui_item_disabled(layout, propname); | ||||
| RNA_warning("enum property value not found: %s", value); | RNA_warning("enum property value not found: %s", value); | ||||
| return; | return; | ||||
| } | } | ||||
| for (a = 0; item[a].identifier; a++) { | for (a = 0; item[a].identifier; a++) { | ||||
| if (item[a].identifier[0] == '\0') { | |||||
| /* Skip enum item separators. */ | |||||
| continue; | |||||
| } | |||||
| if (item[a].value == ivalue) { | if (item[a].value == ivalue) { | ||||
| const char *item_name = name ? | const char *item_name = name ? | ||||
| name : | name : | ||||
| CTX_IFACE_(RNA_property_translation_context(prop), item[a].name); | CTX_IFACE_(RNA_property_translation_context(prop), item[a].name); | ||||
| const int flag = item_name[0] ? 0 : UI_ITEM_R_ICON_ONLY; | const int flag = item_name[0] ? 0 : UI_ITEM_R_ICON_ONLY; | ||||
| uiItemFullR( | uiItemFullR( | ||||
| layout, ptr, prop, RNA_ENUM_VALUE, ivalue, flag, item_name, icon ? icon : item[a].icon); | layout, ptr, prop, RNA_ENUM_VALUE, ivalue, flag, item_name, icon ? icon : item[a].icon); | ||||
| ▲ Show 20 Lines • Show All 2,909 Lines • Show Last 20 Lines | |||||