Wire Frame Color Tools

Hi,
Since colored wire frames are now in Blender 2.80 here is an Addon that can do a couple of things:

  • select a multiple objects and give them a random color
  • select multiple objects and give all of them the same color
  • change wire color to Viewport Display color in Material
  • select multiple objects and give them a random range of colors

The last one is useful if you want to differentiate between groups of objects but also among each other.
For example you might want all plants to be green. But you dont want all plants to be the same type of green but different shades of green.

10 Likes

Nice!!

Thanks for that! :slight_smile:

1 Like

Thanks for sharing!
Would it be possible for Wireframe to automatically take the corresponding Viewport Display color of material Tab in selected objects?
mat_wire
I think that this should be an official feature, but in the meantime it would be nice to be able to achieve that from addon.

2 Likes

Do I understand correctly:

  • select object
  • chose viewport display color for example blue
  • wireframe of object is now blue

This is how it works now. The viewport display color ( technically called the object color) is used as the wireframe color.
Or at least a derivative of it. The way Clement implemented colored wires in the source code the color is changed depending on whether the object is selected or not. If the object is selected it is brighter and if it is not selected it is darker.
I have no influence on this with Python because that is a method defined in the C source code.

[edit]Arr… brainfart. I just read you post again and saw that you meant in the material panel.
It should be relatively easy to do that with a button in the object panel. If the user presses the button the script would check what the material display color is and change it accordingly.
If an object has more than one material it would need to autmatically chose one of the materials, though which means that probably the first material would be used.

It would probably be more complicated to implement a method that would automatically change the wire color if the user changes the material display color.
[/edit]

Added the option to get the material viewport display:

wireframecolortoolsMat

Gets color from here:

5 Likes

great, thanks!

I had not thought about it… Yes, first material could be a good choice

1 Like

Just tried out your addon. Works great in wireframe mode, but I can’t really use it in solid or rendered modes unfortunately.

1 Like

Yes, unfortunately Blender provides no way to change the wire frame colors in solid or rendered mode.
I agree that this would be great. It would also be nice to be able to change wires of empties, lamps and similar objects but unfortunately this is not possible at the moment because of limitations in Blender.

I was digging the code a bit, looking for clues. There is a wirerfame engine in the Wireframe mode, with some variables that define how it goes and what it goes to/from, but it’s somewhat involved to also add those features to the other modes. Though I’d love to. My C is not so great though.

But it must be possible! The code is all there, it’s just directing it correctly in the viewport draw modes.

2 Likes

I think somebody recently posted on devtalk that he/she wanted to tackle this. Might be misremembering, though.

Edit: Ah, I see that was you.
Awesome. I would love to have colored wireframes everywhere. Also for cameras, lights, empties and everything else.

2 Likes

Hi, The Random Color Option in ur addon is setting material to Alpha = 0 but still changing colors whcih ic useless if alpha is zero. Is it a Bug ?

1 Like

Might be cool to have option to select objects based on the color, but not sure if you want to add or not.

So if you had objects set to red/blue wireframes, but not in same collection for some reason. Let you select object(s) by red wireframe?

Thanks for reporting the bug. I fixed it and it should work now.

This is already possible with vanilla Blender.
Select your object → shift - g → color.

It would be nice if it was possible to select similar colors, though. I`m afraid that is out of the scope of this addon, though.

1 Like

Ah, ok. Yeah I tried this addon. Like some others said, is too bad how blender wireframe works/you gotta get into a special mode/situation to see the colors.

But it does work! :smiley:

Hi, I love this addon.:clap::heart:.
wonder if its possible to implement random color on the wireframe overlays as well apart from the Objects like this >
WireColorTools256

That would be really nice.
Unfortunately I believe it is not possible with a python addon.

The wireframe overlay colors are defined in:
Preferences → Themes → 3d Viewport → Wire
I am pretty sure that Blender allows only a single wire color.

1 Like

Hii, Thanks for replying back !
I did some Investigation and found out It is possible to have multi color wire overlays but not by a python addon.

The code sits here source/blender/draw/engines/overlay/overlay_wireframe.c.
Found it here

Cureently Blender allows not single but 3 wire colors >

BUT
Blender does allows multi color wire colors >
multicolorwiremode

I would say the Possibility is there, somoene with the knowledge need to implement it !:see_no_evil:

Btw, I did got Multicolor Wire Overlay View this way & I am Happy about it😉 It looks Good But works only for Edit Mode !
wirecolorhacky_optimized

So Possibilty is there :v:
Can you make it happen ?:writing_hand:

I don’t think it is possible as an addon. If anybody know how to do it I’d be very interested, though.

If you change the C code you would have to fork Blender which is overkill for a feature like this. And I don’t know how to do that anyways.

Blender allows multi color in wires in wireframe mode but I know of no way to add this to the wire overlay in solid mode. I think you would have to implement that in C.

The multi color wire overlay in your last gif does not really show multi colored wires. It just makes the wires transparent and reveals the object color bellow. This is a good option, though, imo.

I guess I could implement a button that sets up an overlay that makes the wires transparent but I am not sure if this addon is supposed to mess with the users overlay settings. The rest of this addon operates on a per object basis and setting up transparent wireframes is just two clicks away anyway in the UI. So would a feature like this be an improvement at all?

I have been looking for a way to change an objects colour if it is set to Wire display. Unfortunately, that does not seem to be possible. It would be great if someone could add a colour box for Wire display in a Blender patch though.