PDA

View Full Version : URGENT: How to query pallete color in mel?


Als
04-23-2008, 12:33 AM
How to query pallete color in mel?


Thanks


Als

DOor
04-23-2008, 12:45 AM
ok I am not sure I fully understand your question but heres what I see in the command reference.

colorIndex --allows you to query the "color palette" so this may be what you are looking for.

colorEditor -- a control that allows you to grab colors and easily return the value of them.

grabColor -- like the eyedropper in photoshop.


hope one of these helps-- the mel command reference has documentation for all of these.

Als
04-23-2008, 01:18 AM
Thanks for trying. Please help! ;)

colorIndex is for GUI colors if understand right, there is 31 of those.

colorEditor can be used to interactively pick a color, not connected to pallete.

grabColor would be possible to combine, but way too complicated for what I need it for.

In color chooser you can build pallete of 256 colors. I build the pallete of colors I need with gimp-> ascii palette-> maya palette, so I want to query those color values in mel, and
assign these randomly to pfx brushes...

This give me idea to maybe look into mel for color editor, but I guess this is all inside maya code, not in mel?
Argh...

Thanks


Als

damat
04-23-2008, 11:18 AM
Probably, I don't understand you, but why not try to make an array of values and work with them?

Als
04-24-2008, 07:08 AM
On the end I created a transform node, and created mel, which creates attribute and color slider for each color it reads from the palette file. Then other mel reads the colors from this node and assigns them to brushes.
Not the best solution, but works.
I didn't do it other way, because I wanted to be able to interactively change the colors which don't work, or add the colors. Also I wanted to save them too, that's way doing it through palette in color editor would be better...

So it's not possible to read colors from palette?

Thanks


Als

CGTalk Moderation
04-24-2008, 07:08 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.