This is a long requested feature, however currently the color is already used for group, selection and object types.
So this is an attempt to add the ability to show colored wireframe without interfering with existing display options.
Implementation
- Color wireframe is an option which applies to wire and bounding box draw modes.
- When enabled, color from the object draw_color is used (a separate color setting).
- The background draws grey (so themes don't interfere with user-specified colors), Overlay guides draw black (cursor cross-hair for example).
- Selection state is shown by a white wire-outline.
- Active objects draw a brighter outline.
- Use the depth buffer when drawing colored wire (needed so the frontmost color draws ontop.)
Rationale
In certain cases this is a very useful feature, but it conflicts with other features too much, so this works like Matcaps, optionally changing the draw mode for all objects.
Limitations
- none left :)
Screenshot
Heres a screenshot:
Possible Improvements
- Tools to manage colors, randomize, set based on rules etc (outside the scope of this patch)
Background Color
Adding a section for this, since it seems to be one of the more controversial topics.
When custom color is set, if the user has their own theme, they will set the wire to contrast against the current theme,
This is a problem if someone else tries to use their file, so. I've opted to hard-code the background color when custom wireframes are enabled. See image below.
Testing Colors
This script is for quickly testing colors:
from random import random
from mathutils import Color
import bpy
for ob in bpy.data.objects:
c = Color(ob.draw_color[0:3])
v = c.v
c.h = 0.0
c.s = 1.0
c.h = random()
c.s = 0.2 * random()
c.v = v
ob.draw_color[0:3] = c[:]




