Fix #134011: Overlay: Wireframe with object color isn't shown selected

This was an oversight and the shader was using the old API.
This commit is contained in:
Clément Foucault
2025-02-04 19:19:49 +01:00
parent f80f97ca0d
commit 6f9dedcdc4

View File

@@ -61,8 +61,13 @@ vec3 hsv_to_rgb(vec3 hsv)
void wire_object_color_get(out vec3 rim_col, out vec3 wire_col)
{
#ifdef OBINFO_NEW
eObjectInfoFlag ob_flag = eObjectInfoFlag(floatBitsToUint(drw_infos[resource_id].infos.w));
bool is_selected = flag_test(ob_flag, OBJECT_SELECTED);
#else
int flag = int(abs(ObjectInfo.w));
bool is_selected = (flag & DRW_BASE_SELECTED) != 0;
#endif
if (colorType == V3D_SHADING_OBJECT_COLOR) {
rim_col = wire_col = ObjectColor.rgb * 0.5;