On 19/03/2017 at 20:11, xxxxxxxx wrote:
In Xpresso,there is a node called "smple node",is ti possible to create it with python tag?for example,how to use the falloff of a plain effector to control a lot of cubes' filter(as the screenshot below). I have achieved it via Xpresso setup,but I want to do it via python tag,How to do achieve this?somebody has an example code? any help would be very appreciated!
I want to achieve this goal via python tag ,is it possible? I tried this code below,but not work,maybe it is the cause that I don't know how to use the FalloffDataData.
import c4d from c4d.modules.mograph import FalloffDataData def main() : null = op.GetObject() cubes = null.GetChildren() FalloffDataData = doc.SearchObject('plain') for cube in cubes() : mg = cube.GetMg() FalloffDataData.mat = mg if FalloffDataData.strength >= 0: cube[c4d.PRIM_CUBE_DOFILLET] = 1 else: cube[c4d.PRIM_CUBE_DOFILLET] = 0