Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface.c
| Context not available. | |||||
| but->dragpoin = (void *)ptr; | but->dragpoin = (void *)ptr; | ||||
| } | } | ||||
| void UI_but_drag_set_rna_type(uiBut *but, int type, PointerRNA *ptr) | |||||
| { | |||||
| but->dragtype = type; | |||||
| but->dragpoin = (void *)ptr; | |||||
| } | |||||
| void UI_but_drag_set_path(uiBut *but, const char *path) | void UI_but_drag_set_path(uiBut *but, const char *path) | ||||
| { | { | ||||
| but->dragtype = WM_DRAG_PATH; | but->dragtype = WM_DRAG_PATH; | ||||
| Context not available. | |||||
sergey: Would suggest something like
void UI_but_drag_set_rna_type(uiBut *but, int type, PointerRNA… | |||||
Not Done Inline ActionsWM_DRAG_*** isn't private, so would prefer just to have UI_but_drag_set(uiBut *but, PointerRNA *ptr, int dragtype) which takes the WM_DRAG_*** argument too. Then it can be used anywhere. campbellbarton: `WM_DRAG_***` isn't private, so would prefer just to have `UI_but_drag_set(uiBut *but… | |||||
Would suggest something like
void UI_but_drag_set_rna_type(uiBut *but, int type, PointerRNA *ptr) { but->dragtype = type; but->dragpoin = (void *)ptr; }