本文整理汇总了C++中MFnMatrixAttribute::setUsesArrayDataBuilder方法的典型用法代码示例。如果您正苦于以下问题:C++ MFnMatrixAttribute::setUsesArrayDataBuilder方法的具体用法?C++ MFnMatrixAttribute::setUsesArrayDataBuilder怎么用?C++ MFnMatrixAttribute::setUsesArrayDataBuilder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFnMatrixAttribute
的用法示例。
在下文中一共展示了MFnMatrixAttribute::setUsesArrayDataBuilder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
MStatus inverseSkinCluster::initialize()
{
MStatus status;
MFnNumericAttribute nAttr;
MFnMatrixAttribute mAttr;
MFnMessageAttribute msgAttr;
MFnTypedAttribute tAttr;
aInMesh = tAttr.create( "inMesh", "inMesh", MFnData::kMesh );
tAttr.setStorable( true );
CHECK_MSTATUS_AND_RETURN_IT( addAttribute( aInMesh ) );
aGeomMatrix = mAttr.create( "geomMatrix", "geomMatrix" );
tAttr.setCached( false );
CHECK_MSTATUS_AND_RETURN_IT( addAttribute( aGeomMatrix ) );
aMatrix = mAttr.create( "matrix", "matrix" );
mAttr.setArray( true );
mAttr.setStorable( true );
mAttr.setUsesArrayDataBuilder( true );
CHECK_MSTATUS_AND_RETURN_IT( addAttribute( aMatrix ) );
aBindPreMatrix = mAttr.create( "bindPreMatrix", "bindPreMatrix" );
mAttr.setArray( true );
mAttr.setStorable( true );
mAttr.setUsesArrayDataBuilder( true );
CHECK_MSTATUS_AND_RETURN_IT( addAttribute( aBindPreMatrix ) );
aUpdateMatrix = nAttr.create( "updateMatrix", "updateMatrix", MFnNumericData::kBoolean, false );
nAttr.setStorable( false );
CHECK_MSTATUS_AND_RETURN_IT( addAttribute( aUpdateMatrix ) );
aTargetSkinCluster = msgAttr.create( "targetSkinCluster", "targetSkinCluster" );
CHECK_MSTATUS_AND_RETURN_IT( addAttribute( aTargetSkinCluster ) );
aUpdateWeightList = nAttr.create( "updateWeightList", "updateWeightList", MFnNumericData::kBoolean, false );
nAttr.setStorable( false );
CHECK_MSTATUS_AND_RETURN_IT( addAttribute( aUpdateWeightList ) );
CHECK_MSTATUS_AND_RETURN_IT( attributeAffects( aInMesh, outputGeom ) );
CHECK_MSTATUS_AND_RETURN_IT( attributeAffects( aGeomMatrix, outputGeom ) );
CHECK_MSTATUS_AND_RETURN_IT( attributeAffects( aMatrix, outputGeom ) );
CHECK_MSTATUS_AND_RETURN_IT( attributeAffects( aBindPreMatrix, outputGeom ) );
CHECK_MSTATUS_AND_RETURN_IT( attributeAffects( aUpdateMatrix, outputGeom ) );
CHECK_MSTATUS_AND_RETURN_IT( attributeAffects( aUpdateWeightList, outputGeom ) );
CHECK_MSTATUS_AND_RETURN_IT( attributeAffects( aTargetSkinCluster, outputGeom ) );
CHECK_MSTATUS_AND_RETURN_IT( attributeAffects( aMatrix, outputGeom ) );
return MS::kSuccess;
}
示例2: initialize
// create attributes
MStatus probeDeformerARAPNode::initialize(){
MFnTypedAttribute tAttr;
MFnNumericAttribute nAttr;
MFnEnumAttribute eAttr;
MFnMatrixAttribute mAttr;
MRampAttribute rAttr;
// this attr will be dirtied when ARAP recomputation is needed
aARAP = nAttr.create( "arap", "arap", MFnNumericData::kBoolean, true );
nAttr.setStorable(false);
nAttr.setKeyable(false);
nAttr.setHidden(true);
addAttribute( aARAP );
// this attr will be dirtied when weight recomputation is needed
aComputeWeight = nAttr.create( "computeWeight", "computeWeight", MFnNumericData::kBoolean, true );
nAttr.setStorable(false);
nAttr.setKeyable(false);
nAttr.setHidden(true);
addAttribute( aComputeWeight );
aMatrix = mAttr.create("probeMatrix", "pm");
mAttr.setStorable(false);
mAttr.setHidden(true);
mAttr.setArray(true);
mAttr.setUsesArrayDataBuilder(true);
mAttr.setDisconnectBehavior(MFnMatrixAttribute::kDelete);
addAttribute(aMatrix);
attributeAffects( aMatrix, outputGeom );
aInitMatrix = mAttr.create("initProbeMatrix", "ipm");
mAttr.setHidden(true);
mAttr.setArray(true);
mAttr.setStorable(true);
mAttr.setUsesArrayDataBuilder(true);
addAttribute(aInitMatrix);
attributeAffects( aInitMatrix, outputGeom );
aBlendMode = eAttr.create( "blendMode", "bm", BM_SRL );
eAttr.addField( "expSO+expSym", BM_SRL );
eAttr.addField( "expSE+expSym", BM_SSE );
eAttr.addField( "logmatrix3", BM_LOG3 );
eAttr.addField( "logmatrix4", BM_LOG4 );
eAttr.addField( "quat+linear", BM_SQL );
eAttr.addField( "linear", BM_AFF );
eAttr.addField( "off", BM_OFF );
eAttr.setStorable(true);
eAttr.setKeyable(false);
addAttribute( aBlendMode );
attributeAffects( aBlendMode, outputGeom );
aRotationConsistency = nAttr.create( "rotationConsistency", "rc", MFnNumericData::kBoolean, false );
nAttr.setKeyable(false);
nAttr.setStorable(true);
addAttribute( aRotationConsistency );
attributeAffects( aRotationConsistency, outputGeom );
aFrechetSum = nAttr.create( "frechetSum", "fs", MFnNumericData::kBoolean, false );
nAttr.setKeyable(false);
nAttr.setStorable(true);
addAttribute( aFrechetSum );
attributeAffects( aFrechetSum, outputGeom );
aNormaliseWeight = eAttr.create( "normaliseWeight", "nw", NM_LINEAR );
eAttr.addField( "NONE", NM_NONE );
eAttr.addField( "Linear", NM_LINEAR );
eAttr.addField( "Softmax", NM_SOFTMAX );
eAttr.setStorable(true);
addAttribute( aNormaliseWeight );
attributeAffects( aNormaliseWeight, outputGeom );
attributeAffects( aNormaliseWeight, aComputeWeight );
aWeightMode = eAttr.create( "weightMode", "wtm", WM_HARMONIC_COTAN );
eAttr.addField( "inverse", WM_INV_DISTANCE );
eAttr.addField( "cut-off", WM_CUTOFF_DISTANCE );
eAttr.addField( "draw", WM_DRAW );
// eAttr.addField( "harmonic-arap", WM_HARMONIC_ARAP);
eAttr.addField( "harmonic-cotan", WM_HARMONIC_COTAN);
eAttr.setStorable(true);
eAttr.setKeyable(false);
addAttribute( aWeightMode );
attributeAffects( aWeightMode, outputGeom );
attributeAffects( aWeightMode, aComputeWeight );
aConstraintMode = eAttr.create( "constraintMode", "ctm", CONSTRAINT_CLOSEST );
eAttr.addField( "neighbour", CONSTRAINT_NEIGHBOUR);
eAttr.addField( "closestFace", CONSTRAINT_CLOSEST );
eAttr.setStorable(true);
eAttr.setKeyable(false);
addAttribute( aConstraintMode );
attributeAffects( aConstraintMode, outputGeom );
attributeAffects( aConstraintMode, aARAP);
aTetMode = eAttr.create( "tetMode", "tm", TM_FACE );
eAttr.addField( "face", TM_FACE );
eAttr.addField( "edge", TM_EDGE );
eAttr.addField( "vertex", TM_VERTEX );
eAttr.addField( "vface", TM_VFACE );
eAttr.setStorable(true);
//.........这里部分代码省略.........