On Fri, Feb 17, 2017 at 3:34 PM Michael Boon <[email protected]> wrote:

> Here's the answer.
>
> To the first question, stackoverflow. Specifically
> http://stackoverflow.com/a/17797823/5184320
>
> To the main question:
> #include <string>
> #include <sstream>
> ...
> std::stringstream stream;
> stream << argList;
> std::string str = stream.str();
> const char* chr = str.c_str();
>
>
>
Cool, thanks for confirming that you figured this one out. You are welcome
to ask C++ Maya API questions here. The title of the forum suggests we
would only accept Python topics but the scope has grown from the original
intent. People even ask Python questions unrelated to Maya.

Justin



>
> On Friday, 17 February 2017 10:45:35 UTC+11, Michael Boon wrote:
>
>
>
> Hi all
>
> Is there a list anywhere near as good as this one for asking C++ API
> questions?
>
> I have a plugin that takes a bunch of flags and other arguments. From
> inside the plugin, I want to be able to print out which flags are in use.
> Since there are a lot of flags and they are in flux, I'd rather not write a
> long section of code that goes through them one at a time. Is there a way,
> using MArgList (or MSyntax, or MArgDatabase) to print out the _names_ of
> the flags that were specified?
>
> My goal is to print out exactly what the user called (though I don't mind
> if short and long names are swapped).
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/8f7a7d9a-b823-4b35-936d-4e760168fec8%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/8f7a7d9a-b823-4b35-936d-4e760168fec8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1OSe_skMkEiC%3DLp_PtMH8oof3-8e45OkfthDnq%3Ddk0fg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to