当前位置: 首页>>代码示例>>C++>>正文


C++ MFnMatrixAttribute::setHidden方法代码示例

本文整理汇总了C++中MFnMatrixAttribute::setHidden方法的典型用法代码示例。如果您正苦于以下问题:C++ MFnMatrixAttribute::setHidden方法的具体用法?C++ MFnMatrixAttribute::setHidden怎么用?C++ MFnMatrixAttribute::setHidden使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MFnMatrixAttribute的用法示例。


在下文中一共展示了MFnMatrixAttribute::setHidden方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: initialize

MStatus n_tentacle::initialize()
{

	MFnNumericAttribute numericAttr;
	MFnMatrixAttribute matrixAttr;
	MFnTypedAttribute typedAttr;
	MFnUnitAttribute unitAttribute;
	MFnEnumAttribute enumAttr;
	MStatus				stat;


	stretch = numericAttr.create("stretch", "st", MFnNumericData::kDouble, 0.0);
	numericAttr.setMin(0.0);
	numericAttr.setMax(1.0);

	globalScale = numericAttr.create("globalScale", "gs", MFnNumericData::kDouble, 1.0);
	numericAttr.setMin(0.00001);
	numericAttr.setMax(10.0);

	iniLength = numericAttr.create("iniLength", "iln", MFnNumericData::kDouble, 0.01);

	parameter = numericAttr.create("parameter", "prm", MFnNumericData::kDouble, 0.0);
	numericAttr.setArray(true);

	blendRot = numericAttr.create("blendRot", "blr", MFnNumericData::kDouble, 0.0);
	numericAttr.setArray(true);

	interval = numericAttr.create("interval", "itv", MFnNumericData::kInt, 0);
	numericAttr.setArray(true);

	matrix = matrixAttr.create("matrix", "mtx");
	matrixAttr.setArray(true);
	matrixAttr.setHidden(true);

	curve = typedAttr.create("curve", "crv", MFnData::kNurbsCurve);

	outTranslate = numericAttr.create("outTranslate", "ot", MFnNumericData::k3Double);
	numericAttr.setArray(true);
	numericAttr.setHidden(true);
    numericAttr.setUsesArrayDataBuilder(true);
    numericAttr.setHidden(true);

	outRotateX = unitAttribute.create("outRotateX", "orx", MFnUnitAttribute::kAngle);
	outRotateY = unitAttribute.create("outRotateY", "ory", MFnUnitAttribute::kAngle);
	outRotateZ = unitAttribute.create("outRotateZ", "orz", MFnUnitAttribute::kAngle);
	outRotate = numericAttr.create("outRotate", "or",outRotateX, outRotateY, outRotateZ);
	numericAttr.setArray(true);
	numericAttr.setHidden(true);
    numericAttr.setUsesArrayDataBuilder(true);
    numericAttr.setHidden(true);

	tangentAxis = enumAttr.create("tangentAxis", "tga", 1);
	enumAttr.addField("X", 0);
	enumAttr.addField("Y", 1);
	enumAttr.addField("Z", 2);
	enumAttr.addField("negativeX", 3);
	enumAttr.addField("negativeY", 4);
	enumAttr.addField("negativeZ", 5);


	// Add the attributes we have created to the node
	//
	stat = addAttribute( parameter );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( blendRot );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( interval );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( stretch );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( globalScale );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( iniLength );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( matrix );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( curve );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( outTranslate );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( outRotate );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( tangentAxis );
		if (!stat) { stat.perror("addAttribute"); return stat;}

	attributeAffects( parameter, outTranslate );
	attributeAffects( blendRot, outTranslate );
	attributeAffects( interval, outTranslate );
	attributeAffects( stretch, outTranslate );
	attributeAffects( globalScale, outTranslate );
	attributeAffects( iniLength, outTranslate );
	attributeAffects( matrix, outTranslate );
	attributeAffects( curve, outTranslate );
	attributeAffects( tangentAxis, outTranslate );

	attributeAffects( parameter, outRotate );
	attributeAffects( blendRot, outRotate );
	attributeAffects( interval, outRotate );
	attributeAffects( stretch, outRotate );
	attributeAffects( globalScale, outRotate );
//.........这里部分代码省略.........
开发者ID:jonntd,项目名称:Public,代码行数:101,代码来源:quatcurve.cpp

示例2: initialize

// initializes attribute information
// call by MAYA when this plug-in was loded.
//
MStatus anisotropicShaderNode::initialize()
{
    MFnNumericAttribute nAttr; 
    MFnLightDataAttribute lAttr;
    MFnMatrixAttribute mAttr;

    aMatrixOToW = mAttr.create( "matrixObjectToWorld", "mow",
								MFnMatrixAttribute::kFloat );
 
    CHECK_MSTATUS( mAttr.setStorable( false ) );
    CHECK_MSTATUS( mAttr.setHidden( true ) );

    aMatrixWToC = mAttr.create( "matrixWorldToEye", "mwc", 
								MFnMatrixAttribute::kFloat );
    CHECK_MSTATUS( mAttr.setStorable( false ) );
    CHECK_MSTATUS( mAttr.setHidden( true ) );

    aDiffuseReflectivity = nAttr.create( "diffuseReflectivity", "drfl",
										 MFnNumericData::kFloat);
	MAKE_INPUT(nAttr);
    CHECK_MSTATUS( nAttr.setDefault(0.8f) );
    CHECK_MSTATUS( nAttr.setMin(0.0f) );
    CHECK_MSTATUS( nAttr.setMax(1.0f) );

    aColor = nAttr.createColor( "color", "c" );
	MAKE_INPUT(nAttr);
    CHECK_MSTATUS( nAttr.setDefault(0.0f, 0.58824f, 0.644f) );

    aNormalCamera = nAttr.createPoint( "normalCamera", "n" );
	MAKE_INPUT(nAttr);
    CHECK_MSTATUS( nAttr.setHidden(true) );

    aLightDirection = nAttr.createPoint( "lightDirection", "ld");
    CHECK_MSTATUS ( nAttr.setStorable(false) );
    CHECK_MSTATUS ( nAttr.setHidden(true) );
    CHECK_MSTATUS ( nAttr.setReadable(true) );
    CHECK_MSTATUS ( nAttr.setWritable(false) );

    aLightIntensity = nAttr.createColor( "lightIntensity", "li" );
    CHECK_MSTATUS ( nAttr.setStorable(false) );
    CHECK_MSTATUS ( nAttr.setHidden(true) );
    CHECK_MSTATUS ( nAttr.setReadable(true) );
    CHECK_MSTATUS ( nAttr.setWritable(false) );

    aLightAmbient = nAttr.create( "lightAmbient", "la",
								  MFnNumericData::kBoolean);
    CHECK_MSTATUS ( nAttr.setStorable(false) );
    CHECK_MSTATUS ( nAttr.setHidden(true) );
    CHECK_MSTATUS ( nAttr.setReadable(true) );
    CHECK_MSTATUS ( nAttr.setWritable(false) );

    aLightDiffuse = nAttr.create( "lightDiffuse", "ldf", 
								  MFnNumericData::kBoolean);
    CHECK_MSTATUS ( nAttr.setStorable(false) );
    CHECK_MSTATUS ( nAttr.setHidden(true) );
    CHECK_MSTATUS ( nAttr.setReadable(true) );
    CHECK_MSTATUS ( nAttr.setWritable(false) );

    aLightSpecular = nAttr.create( "lightSpecular", "ls",
								   MFnNumericData::kBoolean);
    CHECK_MSTATUS ( nAttr.setStorable(false) );
    CHECK_MSTATUS ( nAttr.setHidden(true) );
    CHECK_MSTATUS ( nAttr.setReadable(true) );
    CHECK_MSTATUS ( nAttr.setWritable(false) );

    aLightShadowFraction = nAttr.create( "lightShadowFraction", "lsf",
										 MFnNumericData::kFloat);
    CHECK_MSTATUS ( nAttr.setStorable(false) );
    CHECK_MSTATUS ( nAttr.setHidden(true) );
    CHECK_MSTATUS ( nAttr.setReadable(true) );
    CHECK_MSTATUS ( nAttr.setWritable(false) );

    aPreShadowIntensity = nAttr.create( "preShadowIntensity", "psi",
										MFnNumericData::kFloat);
    CHECK_MSTATUS ( nAttr.setStorable(false) );
    CHECK_MSTATUS ( nAttr.setHidden(true) );
    CHECK_MSTATUS ( nAttr.setReadable(true) );
    CHECK_MSTATUS ( nAttr.setWritable(false) );

    aLightBlindData = nAttr.createAddr( "lightBlindData", "lbld");
    CHECK_MSTATUS ( nAttr.setStorable(false) );
    CHECK_MSTATUS ( nAttr.setHidden(true) );
    CHECK_MSTATUS ( nAttr.setReadable(true) );
    CHECK_MSTATUS ( nAttr.setWritable(false) );

    aLightData = lAttr.create( "lightDataArray", "ltd",
                aLightDirection, 
                aLightIntensity, 
                aLightAmbient, 
                aLightDiffuse, 
                aLightSpecular,
                aLightShadowFraction,
                aPreShadowIntensity,
                aLightBlindData);
    CHECK_MSTATUS( lAttr.setArray(true) );
    CHECK_MSTATUS( lAttr.setStorable(false) );
    CHECK_MSTATUS( lAttr.setHidden(true) );
//.........这里部分代码省略.........
开发者ID:DimondTheCat,项目名称:xray,代码行数:101,代码来源:anisotropicShader.cpp

示例3: initialize

MStatus LSSolverNode::initialize()
{
	MFnNumericAttribute nAttr;
	MFnUnitAttribute uAttr;
	MFnTypedAttribute tAttr;
	MFnEnumAttribute eAttr;
	MFnMatrixAttribute mAttr;

	tetWorldMatrix = mAttr.create("tet_world_matrix","twm",MFnMatrixAttribute::kDouble,&returnStatus);
	McheckErr(returnStatus, "ERROR creating LSTetgenNode worldMatrix attribute\n");
	MAKE_INPUT(mAttr);
	mAttr.setHidden(true);

	restShape = tAttr.create("restShape", "rs", MFnMeshData::kMesh, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode restShape attribute\n");
	MAKE_INPUT(tAttr);

	restElements = tAttr.create("restElements", "re", MFnData::kIntArray, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode restShape attribute\n");
	MAKE_INPUT(tAttr);

	restVertices = tAttr.create("restVertices", "rv", MFnData::kDoubleArray, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode restShape attribute\n");
	MAKE_INPUT(tAttr);

	selectedConstraintVerts = tAttr.create("selectedConstraintVerts", "scv", MFnData::kIntArray, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode selectedConstraintVerts attribute\n");
	MAKE_INPUT(tAttr);

	selectedForceVerts = tAttr.create("selectedForceVerts", "sfv", MFnData::kIntArray, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode selectedForceVerts attribute\n");
	MAKE_INPUT(tAttr);

	time = uAttr.create("time", "t", MFnUnitAttribute::kTime,0.0, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode time attribute\n");
	MAKE_INPUT(uAttr);

	deformed = tAttr.create("deformed", "d", MFnMeshData::kMesh, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode deformed attribute\n");
	MAKE_OUTPUT(tAttr);

	poissonRatio = nAttr.create("poissonRatio", "pr", MFnNumericData::kDouble, 0.45, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode poisson ratio\n");
	MAKE_INPUT(nAttr);
	nAttr.setMax(0.45);
	nAttr.setMin(0);

	youngsModulus = nAttr.create("youngsModulus", "ym", MFnNumericData::kDouble, 90000000000, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode youngsModulus\n");
	MAKE_INPUT(nAttr);
	//nAttr.setMax(50000);
	//nAttr.setMin(1);

	objectDensity = nAttr.create("density", "objd", MFnNumericData::kDouble, 1000, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode objectDensity\n");
	MAKE_INPUT(nAttr);
	nAttr.setMax(10000);
	nAttr.setMin(1);

	friction = nAttr.create("friction", "f", MFnNumericData::kDouble, 0.98, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode friction\n");
	MAKE_INPUT(nAttr);
	nAttr.setMax(1);
	nAttr.setMin(0);

	restitution = nAttr.create("restitution", "r", MFnNumericData::kDouble, 0.4, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode restitution\n");
	MAKE_INPUT(nAttr);
	nAttr.setMax(1);
	nAttr.setMin(0);

	damping = nAttr.create("damping", "dmp", MFnNumericData::kDouble, 0.0, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode damping\n");
	MAKE_INPUT(nAttr);
	nAttr.setMax(1);
	nAttr.setMin(0);

	userSuppliedDt = nAttr.create("timeStep","ts",MFnNumericData::kDouble,0.01, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode userSuppliedDt\n");
	MAKE_INPUT(nAttr);
	nAttr.setMax(1);
	nAttr.setMin(0.00001);

	forceApplicationTime = nAttr.create("forceApplicationTime", "fat", MFnNumericData::kInt, 50, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode forceApplicationTime ratio\n");
	MAKE_INPUT(nAttr);

	forceReleasedTime = nAttr.create("forceReleasedTime", "frt", MFnNumericData::kInt, 100, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode forceReleasedTime ratio\n");
	MAKE_INPUT(nAttr);

	forceIncrementTime = nAttr.create("forceIncrementTime", "fit", MFnNumericData::kInt, 10, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode forceIncrementTime ratio\n");
	MAKE_INPUT(nAttr);

	forceStartTime = nAttr.create("forceStartTime", "fst", MFnNumericData::kInt,100, &returnStatus);
	McheckErr(returnStatus, "ERROR creating LSSolverNode forceStartTime\n");
	MAKE_INPUT(nAttr);

	forceStopTime = nAttr.create("forceStopTime", "fet", MFnNumericData::kInt, 200, &returnStatus);
//.........这里部分代码省略.........
开发者ID:siqihuang,项目名称:Movable-Tree,代码行数:101,代码来源:LSSolverNode.cpp

示例4: 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);
//.........这里部分代码省略.........
开发者ID:shizuo-kaji,项目名称:ProbeDeformerMaya,代码行数:101,代码来源:probeDeformerARAP.cpp


注:本文中的MFnMatrixAttribute::setHidden方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。