Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface.cc
| Show First 20 Lines • Show All 5,927 Lines • ▼ Show 20 Lines | |||||
| bContextStore *UI_but_context_get(const uiBut *but) | bContextStore *UI_but_context_get(const uiBut *but) | ||||
| { | { | ||||
| return but->context; | return but->context; | ||||
| } | } | ||||
| void UI_but_unit_type_set(uiBut *but, const int unit_type) | void UI_but_unit_type_set(uiBut *but, const int unit_type) | ||||
| { | { | ||||
| but->unit_type = (uchar)(RNA_SUBTYPE_UNIT_VALUE(unit_type)); | but->unit_type = uchar(RNA_SUBTYPE_UNIT_VALUE(unit_type)); | ||||
| } | } | ||||
| int UI_but_unit_type_get(const uiBut *but) | int UI_but_unit_type_get(const uiBut *but) | ||||
| { | { | ||||
| const int ownUnit = int(but->unit_type); | const int ownUnit = int(but->unit_type); | ||||
| /* own unit define always takes precedence over RNA provided, allowing for overriding | /* own unit define always takes precedence over RNA provided, allowing for overriding | ||||
| * default value provided in RNA in a few special cases (i.e. Active Keyframe in Graph Edit) | * default value provided in RNA in a few special cases (i.e. Active Keyframe in Graph Edit) | ||||
| ▲ Show 20 Lines • Show All 860 Lines • Show Last 20 Lines | |||||