def testFooMain(*args, **kwargs):
print "Foo"
MDGMessage.addNodeAddedCallback(testFooMain, "directionalLight")
//Foo
On Thu, Aug 6, 2015 at 3:07 PM, Arvid Schneider <[email protected]>
wrote:
> Thats exactly what I did. I get an error, TypeError:
> MDGMessage_addNodeAddedCallback() takes no keyword arguments //
>
> On 6 August 2015 at 23:05, Kurian O.S <[email protected]> wrote:
>
>>
>> MCallbackId MDGMessage::addNodeAddedCallback ( MMessage::MNodeFunction
>> func,
>> const MString & nodeType = "dependNode",
>> void * clientData = NULL,
>> MStatus * ReturnStatus = NULL
>> )
>>
>> Parameters:
>> [in] nodeType Type of node that will trigger the callback
>> [in] clientData User defined data passed to the callback function
>> [out] ReturnStatus status code
>>
>>
>> There is a nodeType argument so that will help you to get what you trying.
>>
>> On Thu, Aug 6, 2015 at 3:02 PM, Ravi Jagannadhan <[email protected]>
>> wrote:
>>
>>> Filter in the callback for your specific node type?
>>>
>>> On Thu, Aug 6, 2015 at 3:00 PM, Arvid Schneider <
>>> [email protected]> wrote:
>>>
>>>> How would I create a callback that fires when a specific node type is
>>>> created?
>>>> I know about: MDGMessage.addNodeAddedCallback( function )
>>>> but that registers any node created. I want to limit that.
>>>> Someone an idea?
>>>> Arvid
>>>>
>>>> --
>>>> 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/62af34c5-03e1-4064-86c3-76e11df510b9%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/python_inside_maya/62af34c5-03e1-4064-86c3-76e11df510b9%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Where we have strong emotions, we're liable to fool ourselves - Carl
>>> Sagan
>>>
>>> --
>>> 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/CADHeb2azw6SZ7_asi6i7Le%2BD-7DyhfstwR2mbTatp4B1L%3D3Y%2BA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/python_inside_maya/CADHeb2azw6SZ7_asi6i7Le%2BD-7DyhfstwR2mbTatp4B1L%3D3Y%2BA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> --:: Kurian ::--
>>
>> --
>> 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/CANEMyhOWQCCT2R2eBaHptjEwGgcYtsN0fkEdWYzGjxjVmner-w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/python_inside_maya/CANEMyhOWQCCT2R2eBaHptjEwGgcYtsN0fkEdWYzGjxjVmner-w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Arvid Schneider
> Look Develpopment | Lighting TD | Show TD
> www.arvidschneider.com
>
> Mobil DE: (+49) 170 321 0074
> Mobile UK: (+44) 744 824 6973
> Mail: [email protected]
>
> --
> 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/CADrk2uScuj2g%2B4P9sjSRAy%2B6R%2BU3SL7cZKX-zc%3DsisdsxsE7HQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CADrk2uScuj2g%2B4P9sjSRAy%2B6R%2BU3SL7cZKX-zc%3DsisdsxsE7HQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
--:: Kurian ::--
--
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/CANEMyhNZb-Mp3FLh19LsN8eH5CVeA%2BcFnWobtVimy%2B4R%3Dnkn9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.