Has anyone dealt with extending fluid containers through the API as opposed
to using the gui or a mel/python command?

The gui options for Fluid Effects -> Extend Fluid Options allow you to
rebuild the initial state and extend the container in -X, X, -Y, Y, -Z and Z
directions.  These values are passed to the doExtendFluid script (in
scripts/others) which in turn calls the extendFluid command (mel/python
command).

All the previous posts on fluids have been extremely helpful but don't touch
on this.

I have a new node type inherting from MPxFluidEmitterNode and I'm doing all
the work in the fluidEmitter method which gives me access to the fluid
container (If anyone knows a better method of modifying particles or fluids
directly, not indirectly through an emitter and not through a command, I'm
all ears!)

MFnFluid has the method setSize but I'm not sure if it's what I want or I
just don't know how to use it.

*MStatus
<file:///C:/Program%20Files/Autodesk/Maya2008/docs/Maya2008/en_US/API/MStatus.html>MFnFluid::
setSize ( unsigned int Xres, unsigned int Yres, unsigned int
Zres, double Xdim, double Ydim, double Zdim, bool resample ) *

*Description*

Sets the size and resolution of the grid. The resolution parameters control
the number of cells in the fluid grid and the dimension parameters set the
size of the fluid shape in object space.

*Arguments*


   - *Xres* number of fluid grid cells in the x dimension
   - *Yres* number of fluid grid cells in the y dimension
   - *Zres* number of fluid grid cells in the z dimension
   - *Xdim* object space size in the x dimension
   - *Ydim* object space size in the y dimension
   - *Zdim* object space size in the z dimension
   - *resample* true if the previous contents of the grid should be scaled
   to fit the new size by resampling the previous data at the new resolution

But this doesn't let you specify in the negative and positive directions of
each axis.  Is this command translating the fluid container and rebuilding
the grid with the voxels shifted?

I get some results when calling setSize, but the bounding box isn't updating
and the fluids/particles are leaving the bounding container, which I guess
is kind of good right?!?!  I assumed setSize was modifying the underlying
xres, yres, zres, xdim, ydim and zdim...  How do I modify the these values
and get the fluid container to update?

Thanks!

Justin

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to