Assigning color to UV shells in UV Editor

5b5byye6
Explorer

Assigning color to UV shells in UV Editor

5b5byye6
Explorer
Explorer

Hi there

Is there a way to color particular UV shells to particular color in the UV Editor? E.g. I want some shells to be green, some yellow and doesn't matter if they are selected or not. Or maybe there is a way to display vertex color or material color in the UV Editor?
I searched in Maya MEL, Python and C# docs and couldn't find anything to get closer to solution.

0 Likes
Reply
Accepted solutions (1)
2,657 Views
5 Replies
Replies (5)

mspeer
Consultant
Consultant

Hi!

 

There is no option so set a specific color, but you can apply random colors to UV shells by using

View -> Shaded [Options] -> Color Mode (set to "Multi-Color")

and change the colors with "Multi-Color Seed".

5b5byye6
Explorer
Explorer

@mspeer  Thank you for the answer!
Unfortunately assigning random colors is not what I need.

stuzzz
Collaborator
Collaborator
Accepted solution

Hi,

 

You may use the MPxTextContext which is derived from the MPxContext. I other word you will have access to the drawing event with function like MPxContext::doPtrMoved and MHWRender::MUIDrawManager.

At this point you could query Uv positions with function like MFnMesh::getUvs() or MFnMesh::getAssignedUVs()

the MPxPolyTweakUVInteractiveCommand could give you access to the portSize and or ViewToPort.

 

 

5b5byye6
Explorer
Explorer

Thanks you. It's a good starting point.

5b5byye6
Explorer
Explorer

Hi again

I made a plugin implementing MPxTexContext, but it works as a tool. I would like to make it act as a command so I could use move/rotate/scale tool while uvs are shaded by the plugin. How to achieve that?

0 Likes