Index: source/blender/editors/interface/interface_templates.c =================================================================== --- source/blender/editors/interface/interface_templates.c (revision 46458) +++ source/blender/editors/interface/interface_templates.c (working copy) @@ -1968,7 +1968,28 @@ int cur = GET_INT_FROM_POINTER(arg2); wmWindow *win = CTX_wm_window(C); int i, tot, shift = win->eventstate->shift; + int ctrl = win->eventstate->ctrl; + if (ctrl) { + int *act = (but->rnapoin.type == &RNA_Scene) ? + &((Scene *)but->rnapoin.id.data)->layact : + ((but->rnapoin.type == &RNA_SpaceView3D) ? + &((View3D *)but->rnapoin.data)->layact : + NULL); + + unsigned int *lay = (but->rnapoin.type == &RNA_Scene) ? + &((Scene *)but->rnapoin.id.data)->lay : + ((but->rnapoin.type == &RNA_SpaceView3D) ? + &((View3D *)but->rnapoin.data)->lay: + NULL); + + if (act) { + *act = 1 << cur; + *lay |= *act; + } + return; + } + if (!shift) { tot = RNA_property_array_length(&but->rnapoin, but->rnaprop); @@ -1991,6 +2012,12 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *used_ptr, const char *used_propname, int active_layer) { + const int last_layer = (ptr->type == &RNA_Scene) ? + ((Scene *)ptr->id.data)->layact : + ((ptr->type == &RNA_SpaceView3D) ? + ((View3D *)ptr->data)->layact : + 0); + uiLayout *uRow, *uCol; PropertyRNA *prop, *used_prop = NULL; int groups, cols, layers; @@ -2049,6 +2076,9 @@ but = uiDefAutoButR(block, ptr, prop, layer, "", icon, 0, 0, UI_UNIT_X / 2, UI_UNIT_Y / 2); uiButSetFunc(but, handle_layer_buttons, but, SET_INT_IN_POINTER(layer)); + if (butlay & last_layer) { + uiButSetFlag(but, UI_BUT_REDALERT); + } but->type = TOG; } } Index: source/blender/editors/space_view3d/drawobject.c =================================================================== --- source/blender/editors/space_view3d/drawobject.c (revision 46458) +++ source/blender/editors/space_view3d/drawobject.c (working copy) @@ -6517,8 +6517,20 @@ /* finally set the color */ if (colindex == 0) { - if (theme_shade == 0) UI_ThemeColor(theme_id); - else UI_ThemeColorShade(theme_id, theme_shade); + float fcol[3]; + float tcol[3]; + float acol[3] = {0.8f, 0.8f, 0.8f}; + if (theme_shade == 0) UI_GetThemeColor3fv(theme_id, fcol); + else UI_GetThemeColorShade3fv(theme_id, theme_shade, fcol); + + if (ob->lay & (v3d->scenelock ? scene->layact : v3d->layact) ) { + interp_v3_v3v3(tcol, acol, fcol, 0.3f); + } + else { + copy_v3_v3(tcol, fcol); + } + + glColor3fv(tcol); } else { col = colortab[colindex];