[XPresso] How to add numeric data from an In-/Exclusion Userdata?
eZioPan last edited by
I have a
Null Objectwith an
In-/Exclusion Userdataattached. In
Mograph Effectorhave been added. I want to use
Sample Nodeto get all
Mograph Effector, then add output
Strengthtogether. How can I do?
Here is the snapshot of the scene.
The problem I meet is that I can't use
Pythonto sample the output of a
Mograph Effector(Sample Node With Python), and I haven't found a way to cumulate output of an
Object List Node.
m_adam last edited by
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 .
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.
eZioPan last edited by
Thank you for your kindness and the inspiring answer! It's a GREAT Christmas present for me!
So sorry asking
XPressorelated questions in this forum.
The problem I faced is a little bit complex than this: I need sample
Output Strengths in the position from a
Points, and store the result into a
Vertex Color Mapattached for further use.
This problem bothers me for months, and I didn't find any clue until your post. I have never think about using
XPresso Networkcan keep the data as I need and do the magic!
From the bottom of my heart, I want to say THANK YOU.
The answer you give not only solve this problem, but also inspire me re-thinking of
Python Node, and how these nodes executed in an
Just let me THANK YOU AGAIN!
Best wishes for you to have a wonderful holiday!