Hi all, I'm very new to MEL scripting, and I just have a question that I can't figure out because I certainly don't know where to start to solve the problem!
Right now I have this MEL script which creates an emitter and puts it into a string, then connects the string with particle string. See as follows:
string $eObject =
emitter -name emitter -position 0 18 0 -type direction -rate 100 -spread 0.2 -dx 0 -dy -1.0 -dz 0;
string $pObject  =
connectDynamic -em $eObject $pObject;
But I'm trying to create an UI, however, in my UI I want to be able to choose the emitter's type, so I have radio button group for the emitter's type. See as follows:
radioButtonGrp -l "Select Type" -numberOfRadioButtons 3 -select 1 -l1 "Directional" -l2 "Omni" -l3 "Volume";
My question is, how could I change the emitter's type in my UI? I know I can use setAttr "emitter.emitterType" 1; to change to Omni and setAttr "emitter.emitterType" 4; to change to volume.
But I don't know where should I insert these scripts, since the emitter is already created in a string with its default type setting sets to directional type?
Thank you for reading my question.