hi, thanks for the replies to my posting concerning fluid attributes.
i tried to work with the getFluidAttr command, but couldn't set the result as a variable, whith which i planned to work...
is it possible to automatically assign the value of a fluid attribute in a certain voxel to a varaible? and is it possible that the value of the variable changes according to the fluid's changing over time?
The way it works is you set values inside an expression, which evaluates over time. The fluid attribute data is returned as float data arrays, so inside your expression you would do things like:
This puts the entire contents of the density grid into the float array $dens. You could declare this array global in your expression, which would allow you to access it outside the expression, although this is generally not a good way to work. It might make more sense to assign the fluid values to whatever you wish to control from within the expression.
Note that by adding index values to the getFluidAttr call you can return individual voxels, voxel rows or voxel planes, depending on how many of the 3 indices you specify( -xi, -yi, -zi).