change attribute value in Node Compute Function

23 views
Skip to first unread message

pety20...@gmail.com

unread,
Mar 24, 2019, 2:55:08 PM3/24/19
to Python Programming for Autodesk Maya
hi, how can i, change value Of one attribute in my Node Compute Function??
if change value Of the attribute, compute function run again...
and, run again, run again, finally is crash!
because, i use attributeAffects fanction:
attributeAffects(inputAttributeIWantChangeIt, output);

i want, attributeAffects Disabled, temporarily!

Cedric Bazillou

unread,
Mar 25, 2019, 10:36:25 PM3/25/19
to Python Programming for Autodesk Maya
Hi,
normally you have to consider that your node is black box
it will take value from input attributes compute some data and write it on your output attributes
so you have to be careful not to write anything on your input attributes as it will do infinte loop  .

what are you trying to achieve?
some time to set default value you can use postConstructor ()
Reply all
Reply to author
Forward
0 new messages