📄 m3gexportoptions.mel
字号:
}
if (`checkBoxGrp -q -v1 objCameraTop`)
{
$currentOptions = $currentOptions + "cameratop=1;";
}
else
{
$currentOptions = $currentOptions + "cameratop=0;";
}
if (`checkBoxGrp -q -v1 objCompositingModeDepthTest`)
{
$currentOptions = $currentOptions + "compositingmodedepthtest=1;";
}
else
{
$currentOptions = $currentOptions + "compositingmodedepthtest=0;";
}
if (`checkBoxGrp -q -v1 objCompositingModeDepthWrite`)
{
$currentOptions = $currentOptions + "compositingmodedepthwrite=1;";
}
else
{
$currentOptions = $currentOptions + "compositingmodedepthwrite=0;";
}
if (`checkBoxGrp -q -v1 objCompositingModeColorWrite`)
{
$currentOptions = $currentOptions + "compositingmodecolorwrite=1;";
}
else
{
$currentOptions = $currentOptions + "compositingmodecolorwrite=0;";
}
if (`checkBoxGrp -q -v1 objCompositingModeAlphaWrite`)
{
$currentOptions = $currentOptions + "compositingmodealphawrite=1;";
}
else
{
$currentOptions = $currentOptions + "compositingmodealphawrite=0;";
}
$intVal = `optionMenuGrp -q -sl objCompositingModeBlending`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "compositingmodeblending=68;";break;
case 2: $currentOptions = $currentOptions + "compositingmodeblending=65;";break;
case 3: $currentOptions = $currentOptions + "compositingmodeblending=64;";break;
case 4: $currentOptions = $currentOptions + "compositingmodeblending=66;";break;
case 5: $currentOptions = $currentOptions + "compositingmodeblending=67;";break;
}
$currentOptions = $currentOptions + "compositingmodealphathreshold=" + `floatSliderGrp -q -v objCompositingModeAlphaThreshold` + ";";
$currentOptions = $currentOptions + "compositingmodedepthoffsetfactor=" + `floatFieldGrp -q -v1 objCompositingModeDepthOffsetFactor` + ";";
$currentOptions = $currentOptions + "compositingmodedepthoffsetunits=" + `floatFieldGrp -q -v1 objCompositingModeDepthOffsetUnits` + ";";
float $rgb[3];
$rgb=`colorSliderGrp -query -rgb objFogColor`;
$currentOptions = $currentOptions + "fogcolorr=" + $rgb[0] + ";"+ "fogcolorg=" + $rgb[1] + ";"+ "fogcolorb=" + $rgb[2] + ";";
$currentOptions = $currentOptions + "fogneardistance=" + `floatFieldGrp -q -v1 objFogNearDistance` + ";";
$currentOptions = $currentOptions + "fogfardistance=" + `floatFieldGrp -q -v1 objFogFarDistance` + ";";
$currentOptions = $currentOptions + "fogdensity=" + `floatFieldGrp -q -v1 objFogDensity` + ";";
$intVal = `optionMenuGrp -q -sl objFogMode`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "fogmode=81;";break;
case 2: $currentOptions = $currentOptions + "fogmode=80;";break;
}
if (`checkBoxGrp -q -v1 objMaterialVertexColorTracking`)
{
$currentOptions = $currentOptions + "materialvertexcolortracking=1;";
}
else
{
$currentOptions = $currentOptions + "materialvertexcolortracking=0;";
}
if (`radioButtonGrp -q -sl objPolygonModeShading` == 1)
{
$currentOptions = $currentOptions + "polygonmodeshading=164;";
}
else
{
$currentOptions = $currentOptions + "polygonmodeshading=165;";
}
$intVal = `optionMenuGrp -q -sl objPolygonModeCulling`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "polygonmodeculling=160;";break;
case 2: $currentOptions = $currentOptions + "polygonmodeculling=161;";break;
case 3: $currentOptions = $currentOptions + "polygonmodeculling=162;";break;
}
if (`radioButtonGrp -q -sl objPolygonModeWinding` == 1)
{
$currentOptions = $currentOptions + "polygonmodewinding=168;";
}
else
{
$currentOptions = $currentOptions + "polygonmodewinding=169;";
}
if (`checkBoxGrp -q -v1 objPolygonModePerspectiveCorrection`)
{
$currentOptions = $currentOptions + "polygonmodeperspectivecorrection=1;";
}
else
{
$currentOptions = $currentOptions + "polygonmodeperspectivecorrection=0;";
}
if (`checkBoxGrp -q -v1 objPolygonModeLocalCameraLighting`)
{
$currentOptions = $currentOptions + "polygonmodelocalcameralighting=1;";
}
else
{
$currentOptions = $currentOptions + "polygonmodelocalcameralighting=0;";
}
if (`checkBoxGrp -q -v1 objPolygonModeTwoSidedLighting`)
{
$currentOptions = $currentOptions + "polygonmodetwosidedlighting=1;";
}
else
{
$currentOptions = $currentOptions + "polygonmodetwosidedlighting=0;";
}
if (`radioButtonGrp -q -sl objImage2DPlacement` == 1)
{
$currentOptions = $currentOptions + "image2dplacement=1;";
}
else
{
$currentOptions = $currentOptions + "image2dplacement=0;";
}
$intVal = `optionMenuGrp -q -sl objImage2DMaxSize`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "image2dmaxsize=0;";break;
case 2: $currentOptions = $currentOptions + "image2dmaxsize=8;";break;
case 3: $currentOptions = $currentOptions + "image2dmaxsize=16;";break;
case 4: $currentOptions = $currentOptions + "image2dmaxsize=32;";break;
case 5: $currentOptions = $currentOptions + "image2dmaxsize=64;";break;
case 6: $currentOptions = $currentOptions + "image2dmaxsize=128;";break;
case 7: $currentOptions = $currentOptions + "image2dmaxsize=256;";break;
}
if (`checkBoxGrp -q -v1 objImage2DForcePaletted`)
{
$currentOptions = $currentOptions + "image2dforcepaletted=1;";
}
else
{
$currentOptions = $currentOptions + "image2dforcepaletted=0;";
}
$intVal = `optionMenuGrp -q -sl objImage2DFormat`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "image2dformat=96;";break;
case 2: $currentOptions = $currentOptions + "image2dformat=97;";break;
case 3: $currentOptions = $currentOptions + "image2dformat=98;";break;
case 4: $currentOptions = $currentOptions + "image2dformat=99;";break;
case 5: $currentOptions = $currentOptions + "image2dformat=100;";break;
}
$intVal = `optionMenuGrp -q -sl objTexture2DLevelFilter`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "texture2dlevelfilter=208;";break;
case 2: $currentOptions = $currentOptions + "texture2dlevelfilter=209;";break;
case 3: $currentOptions = $currentOptions + "texture2dlevelfilter=210;";break;
}
$intVal = `optionMenuGrp -q -sl objTexture2DImageFilter`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "texture2dimagefilter=209;";break;
case 2: $currentOptions = $currentOptions + "texture2dimagefilter=210;";break;
}
$intVal = `optionMenuGrp -q -sl objTexture2DBlending`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "texture2dblending=224;";break;
case 2: $currentOptions = $currentOptions + "texture2dblending=225;";break;
case 3: $currentOptions = $currentOptions + "texture2dblending=226;";break;
case 4: $currentOptions = $currentOptions + "texture2dblending=227;";break;
case 5: $currentOptions = $currentOptions + "texture2dblending=228;";break;
}
float $rgb[3];
$rgb=`colorSliderGrp -query -rgb objTexture2DBlendColor`;
$currentOptions = $currentOptions + "texture2dblendcolorr=" + $rgb[0] + ";"+ "texture2dblendcolorg=" + $rgb[1] + ";"+ "texture2dblendcolorb=" + $rgb[2] + ";";
///////////////////////////////////////////////////////////////////////
$intVal = `optionMenuGrp -q -sl objImage2DFormatAmbient`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "image2dformatambient=96;";break;
case 2: $currentOptions = $currentOptions + "image2dformatambient=97;";break;
case 3: $currentOptions = $currentOptions + "image2dformatambient=98;";break;
case 4: $currentOptions = $currentOptions + "image2dformatambient=99;";break;
case 5: $currentOptions = $currentOptions + "image2dformatambient=100;";break;
}
$intVal = `optionMenuGrp -q -sl objTexture2DLevelFilterAmbient`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "texture2dlevelfilterambient=208;";break;
case 2: $currentOptions = $currentOptions + "texture2dlevelfilterambient=209;";break;
case 3: $currentOptions = $currentOptions + "texture2dlevelfilterambient=210;";break;
}
$intVal = `optionMenuGrp -q -sl objTexture2DImageFilterAmbient`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "texture2dimagefilterambient=209;";break;
case 2: $currentOptions = $currentOptions + "texture2dimagefilterambient=210;";break;
}
$intVal = `optionMenuGrp -q -sl objTexture2DBlendingAmbient`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "texture2dblendingambient=224;";break;
case 2: $currentOptions = $currentOptions + "texture2dblendingambient=225;";break;
case 3: $currentOptions = $currentOptions + "texture2dblendingambient=226;";break;
case 4: $currentOptions = $currentOptions + "texture2dblendingambient=227;";break;
case 5: $currentOptions = $currentOptions + "texture2dblendingambient=228;";break;
}
float $rgb[3];
$rgb=`colorSliderGrp -query -rgb objTexture2DBlendColorAmbient`;
$currentOptions = $currentOptions + "texture2dblendcolorrambient=" + $rgb[0] + ";"+ "texture2dblendcolorgambient=" + $rgb[1] + ";"+ "texture2dblendcolorbambient=" + $rgb[2] + ";";
//////////////////////////////////////////////////////////////////////
if (`checkBoxGrp -q -v1 objAlphaLuminance`)
{
$currentOptions = $currentOptions + "alphaluminance=1;";
}
else
{
$currentOptions = $currentOptions + "alphaluminance=0;";
}
$intVal = `optionMenuGrp -q -sl objImage2DFormatTransparency`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "image2dformattransparency=96;";break;
case 2: $currentOptions = $currentOptions + "image2dformattransparency=97;";break;
case 3: $currentOptions = $currentOptions + "image2dformattransparency=98;";break;
case 4: $currentOptions = $currentOptions + "image2dformattransparency=99;";break;
case 5: $currentOptions = $currentOptions + "image2dformattransparency=100;";break;
}
$intVal = `optionMenuGrp -q -sl objTexture2DLevelFilterTransparency`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "texture2dlevelfiltertransparency=208;";break;
case 2: $currentOptions = $currentOptions + "texture2dlevelfiltertransparency=209;";break;
case 3: $currentOptions = $currentOptions + "texture2dlevelfiltertransparency=210;";break;
}
$intVal = `optionMenuGrp -q -sl objTexture2DImageFilterTransparency`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "texture2dimagefiltertransparency=209;";break;
case 2: $currentOptions = $currentOptions + "texture2dimagefiltertransparency=210;";break;
}
$intVal = `optionMenuGrp -q -sl objTexture2DBlendingTransparency`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "texture2dblendingtransparency=224;";break;
case 2: $currentOptions = $currentOptions + "texture2dblendingtransparency=225;";break;
case 3: $currentOptions = $currentOptions + "texture2dblendingtransparency=226;";break;
case 4: $currentOptions = $currentOptions + "texture2dblendingtransparency=227;";break;
case 5: $currentOptions = $currentOptions + "texture2dblendingtransparency=228;";break;
}
float $rgb[3];
$rgb=`colorSliderGrp -query -rgb objTexture2DBlendColorTransparency`;
$currentOptions = $currentOptions + "texture2dblendcolorrtransparency=" + $rgb[0] + ";"+ "texture2dblendcolorgtransparency=" + $rgb[1] + ";"+ "texture2dblendcolorbtransparency=" + $rgb[2] + ";";
if (`radioButtonGrp -q -sl objUserID` == 1)
{
$currentOptions = $currentOptions + "userid=1;";
}
else
{
$currentOptions = $currentOptions + "userid=2;";
}
//////////////////////////////////////////////////////////////////////
$intVal = `optionMenuGrp -q -sl objTransparency`;
switch ( $intVal )
{
case 1: $currentOptions = $currentOptions + "transparency=1;";break;
case 2: $currentOptions = $currentOptions + "transparency=2;";break;
case 3: $currentOptions = $currentOptions + "transparency=3;";break;
case 4: $currentOptions = $currentOptions + "transparency=0;";break;
}
eval($resultCallback+" \""+$currentOptions+"\"");
$result = 1;
}
else
{
$bResult = 0;
}
return $bResult;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -