Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.c
| Show First 20 Lines • Show All 3,201 Lines • ▼ Show 20 Lines | if (!expand) { | ||||
| "", | "", | ||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| 5.0f * UI_UNIT_X, | 5.0f * UI_UNIT_X, | ||||
| UI_UNIT_Y, | UI_UNIT_Y, | ||||
| &coba->cur, | &coba->cur, | ||||
| 0.0, | 0.0, | ||||
| (float)(MAX2(0, coba->tot - 1)), | (float)(MAX2(0, coba->tot - 1)), | ||||
| 0, | 1, | ||||
| 0, | 0, | ||||
| TIP_("Choose active color stop")); | TIP_("Choose active color stop")); | ||||
| row = uiLayoutRow(split, false); | row = uiLayoutRow(split, false); | ||||
| uiItemR(row, &ptr, "position", 0, IFACE_("Pos"), ICON_NONE); | uiItemR(row, &ptr, "position", 0, IFACE_("Pos"), ICON_NONE); | ||||
| bt = block->buttons.last; | bt = block->buttons.last; | ||||
| bt->a1 = 1.0f; /* gives a bit more precision for modifying position */ | bt->a1 = 1.0f; /* gives a bit more precision for modifying position */ | ||||
| UI_but_func_set(bt, colorband_update_cb, bt, coba); | UI_but_func_set(bt, colorband_update_cb, bt, coba); | ||||
| Show All 13 Lines | else { | ||||
| "", | "", | ||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| 5.0f * UI_UNIT_X, | 5.0f * UI_UNIT_X, | ||||
| UI_UNIT_Y, | UI_UNIT_Y, | ||||
| &coba->cur, | &coba->cur, | ||||
| 0.0, | 0.0, | ||||
| (float)(MAX2(0, coba->tot - 1)), | (float)(MAX2(0, coba->tot - 1)), | ||||
| 0, | 1, | ||||
| 0, | 0, | ||||
| TIP_("Choose active color stop")); | TIP_("Choose active color stop")); | ||||
| row = uiLayoutRow(subsplit, false); | row = uiLayoutRow(subsplit, false); | ||||
| uiItemR(row, &ptr, "position", UI_ITEM_R_SLIDER, IFACE_("Pos"), ICON_NONE); | uiItemR(row, &ptr, "position", UI_ITEM_R_SLIDER, IFACE_("Pos"), ICON_NONE); | ||||
| bt = block->buttons.last; | bt = block->buttons.last; | ||||
| bt->a1 = 1.0f; /* gives a bit more precision for modifying position */ | bt->a1 = 1.0f; /* gives a bit more precision for modifying position */ | ||||
| UI_but_func_set(bt, colorband_update_cb, bt, coba); | UI_but_func_set(bt, colorband_update_cb, bt, coba); | ||||
| ▲ Show 20 Lines • Show All 3,530 Lines • Show Last 20 Lines | |||||