#include <string>#include <sstream>
...
std::stringstream stream;
stream << argList;
std::string str = stream.str();
const char* chr = str.c_str();Here's the answer.To the first question, stackoverflow. Specifically http://stackoverflow.com/a/17797823/5184320To the main question:#include <string>#include <sstream>
...
std::stringstream stream;
stream << argList;
std::string str = stream.str();
const char* chr = str.c_str();
On Friday, 17 February 2017 10:45:35 UTC+11, Michael Boon wrote:
Hi allIs 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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8f7a7d9a-b823-4b35-936d-4e760168fec8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.