[Maya-Python] Register specific node type created

2015-08-06 Thread Arvid Schneider
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

Re: [Maya-Python] Register specific node type created

2015-08-06 Thread Ravi Jagannadhan
Filter in the callback for your specific node type? On Thu, Aug 6, 2015 at 3:00 PM, Arvid Schneider 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

Re: [Maya-Python] Register specific node type created

2015-08-06 Thread Arvid Schneider
That doesnt work.. MDGMessage.addNodeAddedCallback( newNodeCB, 'directionalLight') what is the proper syntax? On 6 August 2015 at 23:02, Ravi Jagannadhan wrote: > Filter in the callback for your specific node type? > > On Thu, Aug 6, 2015 at 3:00 PM, Arvid Schneider > wrote: > >> How would I cr

Re: [Maya-Python] Register specific node type created

2015-08-06 Thread Kurian O.S
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 call

Re: [Maya-Python] Register specific node type created

2015-08-06 Thread Arvid Schneider
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 wrote: > > MCallbackId MDGMessage::addNodeAddedCallback ( MMessage::MNodeFunction > func, > const MString & nodeType = "dependNode", > void *

Re: [Maya-Python] Register specific node type created

2015-08-06 Thread Kurian O.S
def testFooMain(*args, **kwargs): print "Foo" MDGMessage.addNodeAddedCallback(testFooMain, "directionalLight") //Foo On Thu, Aug 6, 2015 at 3:07 PM, Arvid Schneider wrote: > Thats exactly what I did. I get an error, TypeError: > MDGMessage_addNodeAddedCallback() takes no keyword arguments

Re: [Maya-Python] Register specific node type created

2015-08-06 Thread Arvid Schneider
I just restarted maya..now everything works as expected! Thanks Kurian for the quick help! On 6 August 2015 at 23:11, Kurian O.S wrote: > def testFooMain(*args, **kwargs): > print "Foo" > > MDGMessage.addNodeAddedCallback(testFooMain, "directionalLight") > > > //Foo > > On Thu, Aug 6, 2015 a

[Maya-Python] Combined Texture Channel

2015-08-06 Thread Kurian O.S
Hey, Anyone tried to change a shader texture channel ( Hardware Texturing) contained textures through python ?. I tried but no luck, AE never get updated. Any hints ? Thanks -- --:: Kurian ::-- -- You received this message because you are subscribed to the Google Groups "Python Programming f