Problems with Fluid with mel programming.


#1

Hello, its my first day starting this CGSociety, I am hoping that someone who may help me with mel programming as i keep getting error for type for float []
here is the format I have on Maya 2018
C:/Program Files/Autodesk/Maya2018/scripts/AETemplates/AEfluidAttrTemplate.mel line 459: Cannot convert data of type int[] to type float[]. //

so in the templete file, there what it has said. not sure if I am having any issue with this.

// Description:
// Query the resolution attribute and stuff the current
// values into the intFieldGrp.
//
{
float $res[] = getAttr $attr;

intFieldGrp -e -v1 $res[0] -v2 $res[1] $field;

if( !$is2d ) {
    intFieldGrp -e -v3 $res[2] $field;
}

}


#2

change:
float $res[] = getAttr $attr;
to:
int $res[] = getAttr $attr;

I think the return value from getAttr for int triple compounds may have been float in past versions of Maya, so now that it works properly the old workaround is showing as an error.


#3

Hello,I have the same problem, but even changing the value from float to int, but the error message still appears
It appears as soon as I create a “3D Container”.

{
int $res[] = getAttr $attr;

intFieldGrp -e -v1 $res[0] -v2 $res[1] $field;

if( !$is2d ) {
intFieldGrp -e -v3 $res[2] $field;
}
}


#4

You need to restart Maya after changing that file to see the error go away. It is a harmless error though, and does not affect the functioning of the fluid.