03-14-2020, 08:06 PM
(03-14-2020, 07:39 PM)tyFlow Wrote: For fun, here is an example of reading custom attributes from a node using the Script operator. In this case, I added 6 custom attribute float values to a point helper in the scene, and read them in using a script. I birth a number of particles equal to the number of available attributes, and assign the attribute float value to the new particle's position.x value.
If you click the point helper in the scene, you can see the attributes in the modifier panel and change them (refresh the sim after changing them in order to import the changes into the flow).
The only real trick to accessing Max C# structures (IINode, IParamBlock, etc) is figuring out what their class names and function/property names are. They mostly correspond to equivalent C++ SDK structures, and you can figure out the exact syntax required by examining the .NET dlls in the [maxroot]\bin\assemblies folder with a tool like DotPeek.
whoa this is great...
i can dive deeper about this script operator.
yeah in fact i wouldn't ask complicated operator if i knew this can be done before...
hmmm perhaps you could update the doc or example for this capabilities...
thanks tyson!!!