Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/fmodifier_ui.c
| Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | case FCM_GENERATOR_POLYNOMIAL: /* polynomial expression */ | ||||
| IFACE_("Poly Order:"), | IFACE_("Poly Order:"), | ||||
| 0.5f * UI_UNIT_X, | 0.5f * UI_UNIT_X, | ||||
| 0, | 0, | ||||
| bwidth, | bwidth, | ||||
| UI_UNIT_Y, | UI_UNIT_Y, | ||||
| &data->poly_order, | &data->poly_order, | ||||
| 1, | 1, | ||||
| 100, | 100, | ||||
| 0, | 1, | ||||
| 0, | 0, | ||||
| TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)")); | TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)")); | ||||
| UI_but_func_set(but, validate_fmodifier_cb, fcm, fcurve_owner_id); | UI_but_func_set(but, validate_fmodifier_cb, fcm, fcurve_owner_id); | ||||
| /* calculate maximum width of label for "x^n" labels */ | /* calculate maximum width of label for "x^n" labels */ | ||||
| if (data->arraysize > 2) { | if (data->arraysize > 2) { | ||||
| BLI_snprintf(xval, sizeof(xval), "x^%u", data->arraysize); | BLI_snprintf(xval, sizeof(xval), "x^%u", data->arraysize); | ||||
| /* XXX: UI_fontstyle_string_width is not accurate */ | /* XXX: UI_fontstyle_string_width is not accurate */ | ||||
| ▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* Factorized polynomial expression */ | ||||
| IFACE_("Poly Order:"), | IFACE_("Poly Order:"), | ||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| width - 1.5 * UI_UNIT_X, | width - 1.5 * UI_UNIT_X, | ||||
| UI_UNIT_Y, | UI_UNIT_Y, | ||||
| &data->poly_order, | &data->poly_order, | ||||
| 1, | 1, | ||||
| 100, | 100, | ||||
| 0, | 1, | ||||
| 0, | 0, | ||||
| TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)")); | TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)")); | ||||
| UI_but_func_set(but, validate_fmodifier_cb, fcm, fcurve_owner_id); | UI_but_func_set(but, validate_fmodifier_cb, fcm, fcurve_owner_id); | ||||
| /* draw controls for each pair of coefficients */ | /* draw controls for each pair of coefficients */ | ||||
| row = uiLayoutRow(layout, true); | row = uiLayoutRow(layout, true); | ||||
| block = uiLayoutGetBlock(row); | block = uiLayoutGetBlock(row); | ||||
| ▲ Show 20 Lines • Show All 779 Lines • Show Last 20 Lines | |||||