access data from customAttributes
#7
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.


Attached Files
.max   custAttrib.max (Size: 744 KB / Downloads: 322)
  Reply


Messages In This Thread
access data from customAttributes - by isx - 03-13-2020, 01:14 PM
RE: access data from customAttributes - by tyFlow - 03-14-2020, 03:23 AM
RE: access data from customAttributes - by isx - 03-14-2020, 02:10 PM
RE: access data from customAttributes - by tyFlow - 03-14-2020, 04:37 PM
RE: access data from customAttributes - by isx - 03-14-2020, 05:54 PM
RE: access data from customAttributes - by tyFlow - 03-14-2020, 07:14 PM
RE: access data from customAttributes - by tyFlow - 03-14-2020, 07:39 PM
RE: access data from customAttributes - by isx - 03-14-2020, 08:06 PM

Forum Jump: