Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_buttons/buttons_context.c
| Show First 20 Lines • Show All 647 Lines • ▼ Show 20 Lines | for (a = 0; a < BCONTEXT_TOT; a++) { | ||||
| if (buttons_context_path(C, path, a, pflag)) { | if (buttons_context_path(C, path, a, pflag)) { | ||||
| flag |= (1 << a); | flag |= (1 << a); | ||||
| /* setting icon for data context */ | /* setting icon for data context */ | ||||
| if (a == BCONTEXT_DATA) { | if (a == BCONTEXT_DATA) { | ||||
| ptr = &path->ptr[path->len - 1]; | ptr = &path->ptr[path->len - 1]; | ||||
| if (ptr->type) { | if (ptr->type) { | ||||
| if(RNA_struct_is_a(ptr->type, &RNA_Light)) | |||||
| sbuts->dataicon = ICON_OUTLINER_DATA_LIGHT; | |||||
| else | |||||
| sbuts->dataicon = RNA_struct_ui_icon(ptr->type); | sbuts->dataicon = RNA_struct_ui_icon(ptr->type); | ||||
| } | } | ||||
| else { | else { | ||||
| sbuts->dataicon = ICON_EMPTY_DATA; | sbuts->dataicon = ICON_EMPTY_DATA; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 480 Lines • Show Last 20 Lines | |||||