Hi everyone. A newbie Maya developer here.
Previously, configured the CUDA compiler for Maya C++ API build for some specific reason. (Run 6000+ blocks at once! CPU takes a lot more time to calculate those.)
Before asking a question, let me describe the situation.
First, I have 2 arrays1. an input float attribute array2. an output compound attribute array. the compound attribute has 2 double3 children.3. The number of elements of both arrays is not the same. 4. when an element of the input attribute array is changed, every element of the output attribute array should be changed.
therefore, tried this
...in compute method
if(plug == outputAttr){
if(plug.isArray){
//compute everything here.
// setAllClean
}
}
//clean whatever the plug is.
but this try failed because the plug for the array itself (or array only, not an element) was only set dirty once, and I must set it dirty manually. Whenever I change a single element of the input array, all leaf output attributes (child of each compound attribute array element.) plug is set to dirty but calculating those per every element is a big waste of computing power and impossible for this case. (Because an input element affects every output element, setting a single output plug is not working.)
One thing I tried is this. Making dummy node to set dirty bit.
![compondArray.png compondArray.png](https://forums.autodesk.com/t5/image/serverpage/image-id/1123673i77D024971499A661/image-size/large?v=v2&px=999)
but it does not work too. It only work once.
Best Regard.