Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_edit_uv.c
| Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (ImageTile *, tile, &image->tiles) { | ||||
| obmat[3][1] = (float)tile_y; | obmat[3][1] = (float)tile_y; | ||||
| obmat[3][0] = (float)tile_x; | obmat[3][0] = (float)tile_x; | ||||
| DRW_shgroup_call_obmat(grp, geom, obmat); | DRW_shgroup_call_obmat(grp, geom, obmat); | ||||
| } | } | ||||
| /* Only mark active border when overlays are enabled. */ | /* Only mark active border when overlays are enabled. */ | ||||
| if (pd->edit_uv.do_tiled_image_overlay) { | if (pd->edit_uv.do_tiled_image_overlay) { | ||||
| /* Active tile border */ | /* Active tile border */ | ||||
| ImageTile *active_tile = BLI_findlink(&image->tiles, image->active_tile_index); | ImageTile *active_tile = BLI_findlink(&image->tiles, image->active_tile_index); | ||||
| if (active_tile) { | |||||
| obmat[3][0] = (float)((active_tile->tile_number - 1001) % 10); | obmat[3][0] = (float)((active_tile->tile_number - 1001) % 10); | ||||
| obmat[3][1] = (float)((active_tile->tile_number - 1001) / 10); | obmat[3][1] = (float)((active_tile->tile_number - 1001) / 10); | ||||
| grp = DRW_shgroup_create(sh, psl->edit_uv_tiled_image_borders_ps); | grp = DRW_shgroup_create(sh, psl->edit_uv_tiled_image_borders_ps); | ||||
| DRW_shgroup_uniform_vec4_copy(grp, "color", selected_color); | DRW_shgroup_uniform_vec4_copy(grp, "color", selected_color); | ||||
| DRW_shgroup_call_obmat(grp, geom, obmat); | DRW_shgroup_call_obmat(grp, geom, obmat); | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| if (pd->edit_uv.do_tiled_image_overlay) { | if (pd->edit_uv.do_tiled_image_overlay) { | ||||
| struct DRWTextStore *dt = DRW_text_cache_ensure(); | struct DRWTextStore *dt = DRW_text_cache_ensure(); | ||||
| uchar color[4]; | uchar color[4]; | ||||
| /* Color Management: Exception here as texts are drawn in sRGB space directly. */ | /* Color Management: Exception here as texts are drawn in sRGB space directly. */ | ||||
| UI_GetThemeColorShade4ubv(TH_BACK, 60, color); | UI_GetThemeColorShade4ubv(TH_BACK, 60, color); | ||||
| char text[16]; | char text[16]; | ||||
| LISTBASE_FOREACH (ImageTile *, tile, &image->tiles) { | LISTBASE_FOREACH (ImageTile *, tile, &image->tiles) { | ||||
| ▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines | |||||