Hi I am new to mel scripting, and I am having a problem with an error I keep getting which is // Error: Error while parsing arguments. //
my script should allow me to control one 3d fluid container with another based on desinty, heat and voxel location. I have got it to work for both heat and desnity here is a link to it on youtube http://www.youtube.com/watch?v=F8RDW41O-Uk...re=channel\_page. Like I said I am new to scripting this is only my second script that I have made which isnt from a tutorial any help would be greatly appreciated. my script is below
float $largeresX = largeshape.resolutionW;
float $largeresY = largeshape.resolutionH;
float $largeresZ = largeshape.resolutionD;
float $smallresX = smallshape.resolutionW;
float $smallresY = smallshape.resolutionH;
float $smallresZ = smallshape.resolutionD;
int $largeheight, $largewidth, $largedepth, $smallheight, $smallwidth, $smalldepth;
for ($largeheight = 0; $largeheight < $largeresX; $largeheight++) {
for ($largewidth = 0; $largewidth < $largeresY; $largewidth++) {
for ($largedepth = 0; $largedepth < $largeresZ; $largedepth++){
for ($smallheight = 0; $smallheight < $smallresX; $smallheight++) {
for ($smallwidth = 0; $smallwidth < $smallresY; $smallwidth++) {
for ($smalldepth = 0; $smalldepth < $smallresZ; $smalldepth++){
float $largeheat[] = `getFluidAttr -at "temperature" - xi $largeheight -yi $largewidth -zi $largedepth largeshape`;
float $largedensity[] = `getFluidAttr -at "density" - xi $largeheight -yi $largewidth -zi $largedepth largeshape`;
float $smallheat[] = `getFluidAttr -at "temperature" - xi $smallheight -yi $smallwidth -zi $largedepth smallshape`;
float $smalldensity[] = `getFluidAttr -at "density" - xi $smallheight -yi $smallwidth -zi $largedepth smallshape`;
int $largevox[] = `fluidVoxelInfo -os false -cb -voxel - xi $largeheight -yi $largewidth -zi $largedepth largeshape`;
int $smallvox[] = `fluidVoxelInfo -os false -cb -voxel - xi $smallheight -yi $smallwidth -zi $smalldepth smallshape`;
if ($largevox[0] != $smallvox[0]){
if ($largeheat[0] > 0 && $largedensity[0] > 0){
setFluidAttr -at "temperature" - xi $smallheight -yi $smallwidth -zi $smalldepth -fv 1 smallshape;
}
}
}
}
}
}
}
}
any help would be great even if it is not directly to do with the error itself but on how I can better the script .