What kind of plugin is it and why do you want to store it in the constructor? Is there a reason to not use it when you actually need to process the args?
On Fri, Mar 3, 2017 at 12:16 PM Michael Boon <[email protected]> wrote: > By "doesn't work" I mean it doesn't populate inputArgs with the supplied > flags. syntax() gets called, and the plugin will reject bad flags, but any > subsequent isFlagSet call I do returns false. > > > On Friday, 3 March 2017 10:13:44 UTC+11, Michael Boon wrote: > > Hey, I'm trying to process arguments in a C++ plugin. I'm a Python guy, > not C++, so little things like constructors trip me up a lot. > > If I do it like this: > MArgDatabase inputArgs(syntax(), argList); > > it works fine. > > But I want inputArgs to be a member variable, so it's already been > constructed. I thought I would be able to copy it like this: > > inputArgs = MArgDatabase(syntax(), args); > > > but that doesn't work. Can anyone explain why? I thought C++ classes > automatically got copy assignment operators. > > And what's the right way to populate an MArgDatabase that already exists? > Or should I use a pointer (with the added complexity and memory management > that I'm also not used to). > > 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/6aa917a3-89e7-4adc-aa4a-d8e62e8b0d0d%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/6aa917a3-89e7-4adc-aa4a-d8e62e8b0d0d%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/CAPGFgA2Wt-18FMptRmnkqbGPHVh1nYUnciNpBt2NYQ_keyJk-g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
