Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform.c
| Show First 20 Lines • Show All 1,721 Lines • ▼ Show 20 Lines | t->draw_handle_cursor = WM_paint_cursor_activate( | ||||
| SPACE_TYPE_ANY, RGN_TYPE_ANY, transform_draw_cursor_poll, transform_draw_cursor_draw, t); | SPACE_TYPE_ANY, RGN_TYPE_ANY, transform_draw_cursor_poll, transform_draw_cursor_draw, t); | ||||
| } | } | ||||
| else if (t->spacetype == SPACE_ACTION) { | else if (t->spacetype == SPACE_ACTION) { | ||||
| t->draw_handle_view = ED_region_draw_cb_activate( | t->draw_handle_view = ED_region_draw_cb_activate( | ||||
| t->region->type, drawTransformView, t, REGION_DRAW_POST_VIEW); | t->region->type, drawTransformView, t, REGION_DRAW_POST_VIEW); | ||||
| t->draw_handle_cursor = WM_paint_cursor_activate( | t->draw_handle_cursor = WM_paint_cursor_activate( | ||||
| SPACE_TYPE_ANY, RGN_TYPE_ANY, transform_draw_cursor_poll, transform_draw_cursor_draw, t); | SPACE_TYPE_ANY, RGN_TYPE_ANY, transform_draw_cursor_poll, transform_draw_cursor_draw, t); | ||||
| } | } | ||||
| else if (t->spacetype == SPACE_SEQ) { | |||||
| t->draw_handle_view = ED_region_draw_cb_activate( | |||||
| t->region->type, drawTransformView, t, REGION_DRAW_POST_VIEW); | |||||
| t->draw_handle_cursor = WM_paint_cursor_activate( // do we need this? what does it do? | |||||
| SPACE_TYPE_ANY, | |||||
| RGN_TYPE_ANY, | |||||
| transform_draw_cursor_poll, | |||||
| transform_draw_cursor_draw, | |||||
| t); | |||||
| } | |||||
mano-wii: This is an area I don't remember ever touching before.
I realize that the code can be… | |||||
| createTransData(C, t); /* Make #TransData structs from selection. */ | createTransData(C, t); /* Make #TransData structs from selection. */ | ||||
| if (t->data_len_all == 0) { | if (t->data_len_all == 0) { | ||||
| postTrans(C, t); | postTrans(C, t); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 236 Lines • Show Last 20 Lines | |||||
This is an area I don't remember ever touching before.
I realize that the code can be deduplicated with ELEM(t->spacetype, ...).
Some transform modes use these handles more than others (like Rotate for example).