[Maya] Changing the color of a templated object

I am looking for a way to have an object:
[ul]
[li] Be unselectable in the viewport
[/li][li] Have only it’s wireframe displayed
[/li][li] Be able to change the color of it’s wireframe
[/li][/ul]
The first two I can do by templating, but then the color is forced to a default grey. I don’t want to change the default color of a templated object because I’d liked this to be per-object. I can make an object display as wireframe and change the color of it’s wireframe using display overrides, but then it’s still selectable.

Any way to get what I’m looking for?

Setting the override to reference doesn’t do it for you? Reference layers ?

A display override reference forces the mesh into shaded mode. I want wireframe + unselectable + colored wireframe (or in other words the override set to template + change the wireframe color per-object).

It may just not be possible, my hope is running out :(.

You could turn on drawing overrides and uncheck shading. That way you will always have only the wireframe and you can set a custom color. Then you create a scriptjob that can remove those objects from the selection. A bit complicated but it would do the job. You can tag those objects with a custom attribute and use that as a condition in your scriptjob.

reference drawing overrides will render unshaded - but not colored wire :frowning:

isn’t there a trick where you can set the overrides on the Shape Node instead of the Transform Node?
I know you can get your Display Layers in a weird state if the transform belongs to one layer, but the shape belongs to another…

Doesn’t work, rgkovach :/. Drawing overrides on the shape node take complete precedence over any that are set on the transform node, so you can’t mix and match them.

That’s the only way I can think of doing it, raziel, though I’d really like to avoid scriptJobs, especially selection ones–they just feel so clunky.

what about reference display, shaded view, and a transparent colored surface shader? Not colored wire but tuneable

I played with shaders, but in the end I just implemented the scriptjob method as it produces exactly what was requested.

Then someone requested to have the wireframe be “xray-able” like joints are in the viewport, so that it draws on top of everything. I think it’s kind of a cool request, but certainly impossible given built-in methods. I may try to use this as an opportunity to learn how to write a custom shape node though.