attributeAffects and input output name?

19 views
Skip to first unread message

miarmy

unread,
Nov 15, 2018, 12:59:02 PM11/15/18
to Python Programming for Autodesk Maya

hi.

how can i know Which of input attributes run compute function of my node???(in compute function )

 

example, i have:

attributeAffects(inputA, ouputB);

attributeAffects(inputB, ouputB);

attributeAffects(inputC, ouputB);

attributeAffects(inputD, ouputB);

 

Which of inputs(inputA or inputB or...)  run compute function ???
 ..........
Excuse me,I don't speak English as well as you....

Marcus Ottosson

unread,
Nov 18, 2018, 3:58:53 AM11/18/18
to python_in...@googlegroups.com

I can’t tell for sure, not without an example of sorts, but it looks like you’ve got the answer in the question. attributeAffects is how you tell Maya which attribute should trigger your compute function. What have you tried so far, and what happens? What did you expect to have happen?


--
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/e78e1719-4a74-407c-8bf3-92e655212d1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Boon

unread,
Nov 20, 2018, 10:56:17 PM11/20/18
to Python Programming for Autodesk Maya
The compute function won't be run until you ask Maya for outputB, right? Changing the inputs just flags the output as dirty, and then accessing the output causes the calculation to be done.


On Sunday, 18 November 2018 19:58:53 UTC+11, Marcus Ottosson wrote:

I can’t tell for sure, not without an example of sorts, but it looks like you’ve got the answer in the question. attributeAffects is how you tell Maya which attribute should trigger your compute function. What have you tried so far, and what happens? What did you expect to have happen?


On Thu, 15 Nov 2018 at 17:59, miarmy <egol...@gmail.com> wrote:

hi.

how can i know Which of input attributes run compute function of my node???(in compute function )

 

example, i have:

attributeAffects(inputA, ouputB);

attributeAffects(inputB, ouputB);

attributeAffects(inputC, ouputB);

attributeAffects(inputD, ouputB);

 

Which of inputs(inputA or inputB or...)  run compute function ???
 ..........
Excuse me,I don't speak English as well as you....

--
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_maya+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages