- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am writing a plugin for a new interactive tool. One of the options that the user can set is a color. So I would like to have a -rgb flag. Now I'm at the part where I'm fleshing out the "doQueryFlags" function in my class, which derives from MPxContextCommand. The problem I've run into is that the "setResult" function only has overrides for bool, int, double, and MString. So it looks like there isn't a way to query a flag with an array of values (like a color).
I was about to give up and just make separate -r, -g, and -b flags when I came across something interesting. One of Maya's built in commands is "artAttrPaintVertexCtx". It has a -colorRGBValue flag that returns three floats. It certainly looks like something derived from MPxContextCommand. But I can't figure out how they got that flag to work. Is there something I'm missing?
Solved! Go to Solution.