本文整理汇总了C++中MFnEnumAttribute::fieldIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ MFnEnumAttribute::fieldIndex方法的具体用法?C++ MFnEnumAttribute::fieldIndex怎么用?C++ MFnEnumAttribute::fieldIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFnEnumAttribute
的用法示例。
在下文中一共展示了MFnEnumAttribute::fieldIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
//.........这里部分代码省略.........
// Only add the parent of the compound
CHECK_MSTATUS( addAttribute( aLightData ) );
// The attributeAffects() method is used to indicate when the input
// attribute affects the output attribute. This knowledge allows Maya
// to optimize dependencies in the graph in more complex nodes where
// there may be several inputs and outputs, but not all the inputs
// affect all the outputs.
//
CHECK_MSTATUS( attributeAffects( aTranslucenceCoeff, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aDiffuseReflectivity, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aColorR, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aColorG, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aColorB, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aColor, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aInTransR, aOutTransparency ) );
CHECK_MSTATUS( attributeAffects( aInTransG, aOutTransparency ) );
CHECK_MSTATUS( attributeAffects( aInTransB, aOutTransparency ) );
CHECK_MSTATUS( attributeAffects( aInTransparency, aOutTransparency ) );
CHECK_MSTATUS( attributeAffects( aInTransparency, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aIncandescenceR, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aIncandescenceG, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aIncandescenceB, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aIncandescence, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightIntensityR, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightIntensityB, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightIntensityG, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightIntensity, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aNormalCameraX, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aNormalCameraY, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aNormalCameraZ, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aNormalCamera, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightDirectionX, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightDirectionY, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightDirectionZ, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightDirection, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightAmbient, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightSpecular, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightDiffuse, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightShadowFraction, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aPreShadowIntensity, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightBlindData, aOutColor ) );
CHECK_MSTATUS( attributeAffects( aLightData, aOutColor ) );
// loading x-ray part
xrDoubleSide = nAttr.create( "xrayDoubleSide", "xrd", MFnNumericData::kBoolean, 0, &status );
MAKE_INPUT(nAttr);
LPSTRVec lst;
LPSTRIt it;
xrEngineData = eAttr.create( "xrayEngineShader", "xre");
MAKE_INPUT(eAttr);
LoadBlenderList(lst);
for (it=lst.begin(); it!=lst.end(); it++)
{
_ChangeSymbol(*it,'\\','/');
CHECK_MSTATUS (eAttr.addField(*it,crc16_calc((u8*)*it,xr_strlen(*it))));
}
#if MAYA_API_VERSION > 450
CHECK_MSTATUS ( eAttr.setDefault(eAttr.fieldIndex("default")));
#else
#endif
ClearList(lst);
xrCompilerData = eAttr.create( "xrayCompilerShader", "xrc");
MAKE_INPUT(eAttr);
LoadShaderLCList(lst);
for (it=lst.begin(); it!=lst.end(); it++){
_ChangeSymbol(*it,'\\','/');
CHECK_MSTATUS (eAttr.addField(*it,crc16_calc((u8*)*it,xr_strlen(*it))));
}
#if MAYA_API_VERSION > 450
CHECK_MSTATUS ( eAttr.setDefault(eAttr.fieldIndex("default")));
#else
#endif
ClearList(lst);
xrMaterialData = eAttr.create( "xrayGameMaterial", " ");
MAKE_INPUT(eAttr);
LoadGameMtlList(lst);
for (it=lst.begin(); it!=lst.end(); it++)
{
_ChangeSymbol(*it,'\\','/');
CHECK_MSTATUS (eAttr.addField(*it,crc16_calc((u8*)*it,xr_strlen(*it))));
}
#if MAYA_API_VERSION > 450
CHECK_MSTATUS ( eAttr.setDefault(eAttr.fieldIndex("default")));
#else
#endif
ClearList(lst);
CHECK_MSTATUS ( addAttribute(xrDoubleSide) );
CHECK_MSTATUS ( addAttribute(xrEngineData) );
CHECK_MSTATUS ( addAttribute(xrCompilerData) );
CHECK_MSTATUS ( addAttribute(xrMaterialData) );
// end x-ray part
return( MS::kSuccess );
}