thanks Chad!

you are my api-savvy doppleganger.

so, everything is working... almost.  the problem i'm having now is
with evaluation.
if i connect the two arrays directly to each other, then the
blendshape is not updated as inputs to my node change.

from pymel import *
at1 = PyNode('sppl_ColorAtPointNode1.weightsList[0].weights')
at2 =
PyNode('blendShape2.inputTarget[0].inputTargetGroup[0].targetWeights')
at1 >> at2  # connect the two array parents

all of my node's inputs are set to affect both weightList and weights:

    plColorAtPoint.attributeAffects(plColorAtPoint.time,
plColorAtPoint.weightsList)
    plColorAtPoint.attributeAffects(plColorAtPoint.inColor,
plColorAtPoint.weightsList)
    plColorAtPoint.attributeAffects(plColorAtPoint.useSG,
plColorAtPoint.weightsList)
    plColorAtPoint.attributeAffects(plColorAtPoint.inSG,
plColorAtPoint.weightsList)
    plColorAtPoint.attributeAffects(plColorAtPoint.inMesh,
plColorAtPoint.weightsList)
    plColorAtPoint.attributeAffects(plColorAtPoint.eyeToWorld,
plColorAtPoint.weightsList)

    plColorAtPoint.attributeAffects(plColorAtPoint.time,
plColorAtPoint.weights)
    plColorAtPoint.attributeAffects(plColorAtPoint.inColor,
plColorAtPoint.weights)
    plColorAtPoint.attributeAffects(plColorAtPoint.useSG,
plColorAtPoint.weights)
    plColorAtPoint.attributeAffects(plColorAtPoint.inSG,
plColorAtPoint.weights)
    plColorAtPoint.attributeAffects(plColorAtPoint.inMesh,
plColorAtPoint.weights)
    plColorAtPoint.attributeAffects(plColorAtPoint.eyeToWorld,
plColorAtPoint.weights)

but no matter how i much i change these inputs, nothing changes on my
blendshape.  even if i force my node to evaluate, the blendshape still
does not change. but if i connect each individual element from my
custom node to the blendshape weights, everything evaluates as
expected:


from pymel import *
at1 = PyNode('sppl_ColorAtPointNode1.weightsList[0].weights')
at2 =
PyNode('blendShape2.inputTarget[0].inputTargetGroup[0].targetWeights')
for i in range(at1.size()): # cylce through and connect each element
    at1[i] >> at2[i]


it's not really so bad to do it this way, but i'm a bit concerned
about load/save and general performance with high resolution meshes.
my intuition tells me that it might be faster if i connect the arrays
at their parent instead of at each element.  is this not the case, not
possible, or am i just coding my node wrong?

thanks again,
chad




--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to