Mel command emit from object Problem


#1

Hi guys,

So I’m doing some UI stuff to make my life easier and I have a problem:
I did a button wich creates a 3D container, another button for adding a volume emitter, and one button to emit from object. the container and volume emitter works perfectly, its when I emit from object, its only works the first time.

Here is what I did:

global proc fluidContainer()
{
string $tmpFluid = create3DFluid(10,10,10,10,10,10);
setAttr($tmpFluid+".baseResolution",35);

}

global proc emitFrom()
{

string $nonEmit[]= fluidEmitter("-typ",“surface”,"-der",1,"-her",1,"-fer",1,"-fdr",2,"-r",100.0);
$nomEmit[1] = rename($nomEmit[1],“fluidEmitter”+"_");

connectDynamic -em $emitters “fluid*”;

}

The first time I apply the code, it works as I said, and when I try the procedure again, thats the error I get:

"// Warning: line 1: Your new field/emitter/collision cannot affect the following object; it is not a dynamic object.
If it is eligible, make it a rigid body and try again: fluidEmitter2 //
// Error: line 1: fluidEmitter1. It is already connected to fluidShape1 //
"

I would like to be able to create as many meshs as i want and be able to emit from objects as many times as i need. I’m sure some strings are missing or its the connectDynamic fonction.

Sorry procedures is still a little bit confusing.

Thanks.


#2

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.