本文整理汇总了C++中MFnMatrixAttribute::setIndexMatters方法的典型用法代码示例。如果您正苦于以下问题:C++ MFnMatrixAttribute::setIndexMatters方法的具体用法?C++ MFnMatrixAttribute::setIndexMatters怎么用?C++ MFnMatrixAttribute::setIndexMatters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFnMatrixAttribute
的用法示例。
在下文中一共展示了MFnMatrixAttribute::setIndexMatters方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
// INIT =========================================
MStatus gear_curveCns::initialize()
{
MFnMatrixAttribute mAttr;
MStatus stat;
// INPUTS
inputs = mAttr.create( "inputs", "inputs" );
mAttr.setStorable(true);
mAttr.setReadable(false);
mAttr.setIndexMatters(false);
mAttr.setArray(true);
stat = addAttribute( inputs );
if (!stat) {stat.perror("addAttribute"); return stat;}
// CONNECTIONS
stat = attributeAffects( inputs, outputGeom );
if (!stat) { stat.perror("attributeAffects"); return stat;}
return MS::kSuccess;
}
示例2: initialize
// INIT =========================================
MStatus gear_rollSplineKine::initialize()
{
MFnMatrixAttribute mAttr;
MFnNumericAttribute nAttr;
MStatus stat;
// Inputs Matrices
ctlParent = mAttr.create( "ctlParent", "ctlp", MFnMatrixAttribute::kDouble );
mAttr.setStorable(true);
mAttr.setReadable(false);
mAttr.setIndexMatters(false);
mAttr.setArray(true);
addAttribute( ctlParent );
inputs = mAttr.create( "inputs", "in", MFnMatrixAttribute::kDouble );
mAttr.setStorable(true);
mAttr.setReadable(false);
mAttr.setIndexMatters(false);
mAttr.setArray(true);
addAttribute( inputs );
inputsRoll = nAttr.create ( "inputsRoll", "inr", MFnNumericData::kFloat, 0.0 );
nAttr.setArray(true);
nAttr.setStorable(true);
addAttribute ( inputsRoll );
outputParent = mAttr.create( "outputParent", "outp" );
mAttr.setStorable(true);
mAttr.setKeyable(true);
mAttr.setConnectable(true);
stat = addAttribute( outputParent );
if (!stat) {stat.perror("addAttribute"); return stat;}
// Inputs Sliders
u = nAttr.create("u", "u", MFnNumericData::kFloat, 0.0);
nAttr.setStorable(true);
nAttr.setKeyable(true);
nAttr.setMin(0);
nAttr.setMax(1);
stat = addAttribute( u );
if (!stat) {stat.perror("addAttribute"); return stat;}
resample = nAttr.create("resample", "re", MFnNumericData::kBoolean, false);
nAttr.setStorable(true);
nAttr.setKeyable(true);
stat = addAttribute( resample );
if (!stat) {stat.perror("addAttribute"); return stat;}
subdiv = nAttr.create("subdiv", "sd", MFnNumericData::kShort, 10);
nAttr.setStorable(true);
nAttr.setKeyable(true);
nAttr.setMin(3);
stat = addAttribute( subdiv );
if (!stat) {stat.perror("addAttribute"); return stat;}
absolute = nAttr.create("absolute", "abs", MFnNumericData::kBoolean, false);
nAttr.setStorable(true);
nAttr.setKeyable(true);
stat = addAttribute( absolute );
if (!stat) {stat.perror("addAttribute"); return stat;}
// Outputs
output = mAttr.create( "output", "out" );
mAttr.setStorable(false);
mAttr.setKeyable(false);
mAttr.setConnectable(true);
stat = addAttribute( output );
if (!stat) {stat.perror("addAttribute"); return stat;}
// Connections
stat = attributeAffects ( ctlParent, output );
if (!stat) {stat.perror("attributeAffects"); return stat;}
stat = attributeAffects ( inputs, output );
if (!stat) {stat.perror("attributeAffects"); return stat;}
stat = attributeAffects ( inputsRoll, output );
if (!stat) {stat.perror("attributeAffects"); return stat;}
stat = attributeAffects ( outputParent, output );
if (!stat) {stat.perror("attributeAffects"); return stat;}
stat = attributeAffects ( u, output );
if (!stat) {stat.perror("attributeAffects"); return stat;}
stat = attributeAffects ( resample, output );
if (!stat) {stat.perror("attributeAffects"); return stat;}
stat = attributeAffects ( subdiv, output );
if (!stat) {stat.perror("attributeAffects"); return stat;}
stat = attributeAffects ( absolute, output );
if (!stat) {stat.perror("attributeAffects"); return stat;}
return MS::kSuccess;
}