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
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
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
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
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 *
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
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
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