Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform.c
| Context not available. | |||||
| return 1; | return 1; | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| static void drawHelpline_color(TransInfo *t) | |||||
| { | |||||
| if (t->spacetype == SPACE_VIEW3D) { | |||||
| ED_view3d_color_overlay(t->view); | |||||
| } | |||||
| else { | |||||
| UI_ThemeColor(TH_VIEW_OVERLAY); | |||||
| } | |||||
| } | |||||
| static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata) | static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata) | ||||
| { | { | ||||
| Context not available. | |||||
| switch (t->helpline) { | switch (t->helpline) { | ||||
| case HLP_SPRING: | case HLP_SPRING: | ||||
| UI_ThemeColor(TH_VIEW_OVERLAY); | drawHelpline_color(t); | ||||
| setlinestyle(3); | setlinestyle(3); | ||||
| glBegin(GL_LINE_STRIP); | glBegin(GL_LINE_STRIP); | ||||
| Context not available. | |||||
| glLineWidth(1.0); | glLineWidth(1.0); | ||||
| break; | break; | ||||
| case HLP_HARROW: | case HLP_HARROW: | ||||
| UI_ThemeColor(TH_VIEW_OVERLAY); | drawHelpline_color(t); | ||||
| glTranslatef(mval[0], mval[1], 0); | glTranslatef(mval[0], mval[1], 0); | ||||
| Context not available. | |||||
| glLineWidth(1.0); | glLineWidth(1.0); | ||||
| break; | break; | ||||
| case HLP_VARROW: | case HLP_VARROW: | ||||
| UI_ThemeColor(TH_VIEW_OVERLAY); | drawHelpline_color(t); | ||||
| glTranslatef(mval[0], mval[1], 0); | glTranslatef(mval[0], mval[1], 0); | ||||
| Context not available. | |||||
| float dist = sqrtf(dx * dx + dy * dy); | float dist = sqrtf(dx * dx + dy * dy); | ||||
| float delta_angle = min_ff(15.0f / dist, (float)M_PI / 4.0f); | float delta_angle = min_ff(15.0f / dist, (float)M_PI / 4.0f); | ||||
| float spacing_angle = min_ff(5.0f / dist, (float)M_PI / 12.0f); | float spacing_angle = min_ff(5.0f / dist, (float)M_PI / 12.0f); | ||||
| UI_ThemeColor(TH_VIEW_OVERLAY); | drawHelpline_color(t); | ||||
| setlinestyle(3); | setlinestyle(3); | ||||
| glBegin(GL_LINE_STRIP); | glBegin(GL_LINE_STRIP); | ||||
| Context not available. | |||||