[Closed] Color edges?
Hi folks,
I’m currently thinking about coloring a couple of edges in a mesh. In fact I’d like to have it the same way that is used to highlight edges in red when selecting them, or in green (UVW) or blue (Pelt UVW).
Does anybody have an idea about how one could achieve that via MXS?
Thanks in advance.
Hi Mirko,
as far as I know it’s not possible to assign color to edges. The workaround is to use gw functions, in particular gw.polyline feeding it with an array of edges vertexes. Warning, this is a painful trip, as you will almost always get flickering issues.
See “Viewport Drawing Methods”, “Viewport Redraw Callback Mechanism” in MaxScript Reference.
- Enrico
Salve Enrico,
thanks for your feedback. I’ve already thought of Viewport drawing methods, but wasn’t sure about that. I think I’ll give it a try, just to see it won’t work well.
There is an alternative – you can create a Manipulator (which manipulates nothing) and use its drawing functions (which are a lot more stable than gw) to draw your lines.
I had some examples in the Siggraph Master Class 2008 but I don’t think that one is out.
It is posted in the Learning Section of the Subscription center
Scripting and API:
The Secret World Of Autodesk 3ds Max: Scripted Manipulators
I had been waiting for this to come out, as I was slightly hung over when I first saw it:blush: