Hi @eZioPan, first of all, I would like to remind you, we do not have the purpose to help you with Xpresso and we normally do not have the purpose to help you on algorithm question.
With that's said, consider this as a Christmas present :wink:.
You need to store everything yourself, so a map of effector and result. Then you can do the calculation.
import c4d
#Welcome to the world of Python
listEffector = list()
class Effector(object):
def __init__(self, eff, mat):
self.eff = eff
self.mat = mat
def main():
global finalMat, listEffector
effectorInList = None
for e in listEffector:
if e.eff == eff:
effectorInList = e
break
if not effectorInList:
newEff = Effector(eff, mat)
listEffector.append(newEff)
else:
effectorInList.mat = mat
finalMat = c4d.Matrix()
for e in listEffector:
finalMat *= e.mat
Find this script in the Gvnode of this file. 0_1545392377324_effectorSampling.c4d
Note that all effector offer the possibility to be used as a Deformer by switching the Deformation Mode to Object.
Cheers,
Maxime.