Hello board
Thought I'd ask you guys if you know if what I am trying to do is violating the Maya architecture or not. I have not explicitly seen any big don'ts about this setup but on the other hand something weird is going on.
I have made two custom nodes, the first one ("modifier") takes a polymesh as input ("inMesh") and returns a polymesh as output ("outMesh"). It interacts with the second node ("tester") through two attributes called "testOut" and "feedbackIn" (which is an array attribute).
The "tester" node then has amongst others two corresponding attributes called "testIn" and "feedbackOut".
The basic connections are quite obvious: polymesh to "modifier.inMesh", a shape node connected to "modifier.outMesh" and "modifier.testOut" to "tester.testIn" and "tester.feedbackOut" to "modifier.feedbackIn[0]".
Attribute affects for the "modifier" node are:
inMesh -> outMesh
inMesh -> testOut
feedbackIn -> outMesh
..and for the "tester" node:
testIn -> feedbackOut
So far so good.
Inside the "modifier" node, there is an iterative test & modify algorithm that tests points by setting the "testOut" attribute and requesting the "feedbackIn" result a specific number of times.
Prolem is that this setup is acting a bit strange. After some time testing I found out that unless I disable the cache on the attributes in the test / feedback loop with calls to myAttr.setCached(false); in the initialize() functions, the feedback loop always gives the same results - the first solution.
That made me a bit suspicious.
Next when I had got it working and congratulated myself over the results
, I connected one more tester node to the "modifier.feedbackIn[1]" and got very strange results back in.
This made me ever more suspicious.
I just wonder if any of you guys know if this design is violating Maya's architecture ?
I can of course extract the testing code from the test object and integrate into the modifier node and I would be fine, but I do think that the setup above is cleaner as I can then derive different tester objects without having to touch the modifier, so I do want to try to get it working.
Any thoughts?
Cheers!
/ Daniel