Beispiel #1
0
MSyntax AbcImport::createSyntax()
{
    MSyntax syntax;

    syntax.addFlag("-d",    "-debug",        MSyntax::kNoArg);
    syntax.addFlag("-ftr",  "-fitTimeRange", MSyntax::kNoArg);
    syntax.addFlag("-h",    "-help",         MSyntax::kNoArg);
    syntax.addFlag("-m",    "-mode",         MSyntax::kString);
    syntax.addFlag("-rcs",  "-recreateAllColorSets", MSyntax::kNoArg);

    syntax.addFlag("-ct",   "-connect",          MSyntax::kString);
    syntax.addFlag("-crt",  "-createIfNotFound", MSyntax::kNoArg);
    syntax.addFlag("-rm",   "-removeIfNoUpdate", MSyntax::kNoArg);

    syntax.addFlag("-rpr",  "-reparent",     MSyntax::kString);
    syntax.addFlag("-sts",  "-setToStartFrame",  MSyntax::kNoArg);

    syntax.addFlag("-ft",   "-filterObjects",    MSyntax::kString);
    syntax.addFlag("-eft",  "-excludeFilterObjects",    MSyntax::kString);

    syntax.addArg(MSyntax::kString);

    syntax.enableQuery(true);
    syntax.enableEdit(false);

    return syntax;
}
MStatus exampleCameraSetViewCmd::appendSyntax()
//
//	Description:
//		Add syntax to the command. All of the parent syntax is added
//		before this call is made.
//
{
	MStatus ReturnStatus;

	MSyntax theSyntax = syntax(&ReturnStatus);
	if (MS::kSuccess != ReturnStatus) {
		MGlobal::displayError("Could not get the parent's syntax");
		return ReturnStatus;
	}

	theSyntax.addFlag(kTestMultiPackInitFlag, 
					  kTestMultiPackInitFlagLong);

	theSyntax.addFlag(kTestMultiPackResultsFlag, 
					  kTestMultiPackResultsFlagLong);

	theSyntax.addFlag(kTestMultiPackClearFlag, 
					  kTestMultiPackClearFlagLong);

	return ReturnStatus;
}
Beispiel #3
0
MSyntax
boingRbCmd::cmdSyntax()
{
    MSyntax syntax;
    syntax.enableQuery(false);
    syntax.enableEdit(false);
    
    syntax.addFlag("-h", "-help");
    syntax.addFlag("-set", "-setAttr", MSyntax::kString);
    syntax.addArg(MSyntax::kString);
    syntax.addFlag("-get", "-getAttr", MSyntax::kString);
    syntax.addArg(MSyntax::kString);
    syntax.addFlag("-add", "-addAttr", MSyntax::kString);
    syntax.addArg(MSyntax::kString);
    syntax.addFlag("-cr", "-create", MSyntax::kString);
    syntax.addArg(MSyntax::kString);
    syntax.addFlag("-del", "-delete", MSyntax::kString);
    syntax.addArg(MSyntax::kString);
    syntax.addFlag("-typ", "-type", MSyntax::kString);
    syntax.addArg(MSyntax::kString);
    syntax.addFlag("-ex", "-exists", MSyntax::kString);
    syntax.addArg(MSyntax::kString);
    syntax.addFlag("-ae", "-attributeExist", MSyntax::kString);
    syntax.addArg(MSyntax::kString);
    syntax.addFlag("-val", "-value");//, MSyntax::kDouble, MSyntax::kDouble, MSyntax::kDouble, MSyntax::kString, MSyntax::kLong );
    //syntax.addFlag("-val", "-value", MSyntax::kString);
    //syntax.addFlag("-val", "-value", MSyntax::kLong);
    syntax.addArg(MSyntax::kString);
    syntax.addArg(MSyntax::kLong);
    syntax.addArg(MSyntax::kDouble);
    
    return syntax;
}
Beispiel #4
0
MSyntax exportF3d::newSyntax()
{
    MSyntax syntax;
    MStatus stat;
    stat = syntax.addFlag("-st", "-startTime", MSyntax::kLong);ERRCHK;    
    stat = syntax.addFlag("-et", "-endTime", MSyntax::kLong);ERRCHK;  
    stat = syntax.addFlag("-o", "-outputPath", MSyntax::kString);ERRCHK; 
    stat = syntax.addFlag("-av", "-addVelocity", MSyntax::kNoArg);ERRCHK; 
    stat = syntax.addFlag("-ac", "-addColor",MSyntax::kNoArg);ERRCHK; 
    stat = syntax.addFlag("-ap", "-addPressure",MSyntax::kNoArg);ERRCHK; 
    stat = syntax.addFlag("-at", "-addTexture",MSyntax::kNoArg);ERRCHK; 
    stat = syntax.addFlag("-ns", "-numOversample",MSyntax::kLong);ERRCHK; 
    
    stat = syntax.addFlag("-d", "-debug");ERRCHK; 
    syntax.addFlag("-h", "-help");
    
    // DEFINE BEHAVIOUR OF COMMAND ARGUMENT THAT SPECIFIES THE MESH NODE:
    syntax.useSelectionAsDefault(true);
    stat = syntax.setObjectType(MSyntax::kSelectionList, 1);

    // MAKE COMMAND QUERYABLE AND NON-EDITABLE:
    syntax.enableQuery(false);
    syntax.enableEdit(false);


    return syntax;
}
MSyntax
NeuronForMayaCmd::newSyntax()
{
    MSyntax syntax;
    syntax.addFlag(kStartFlag, kStartFlagLong, MSyntax::kBoolean);
    syntax.addFlag(kDeviceNameFlag, kDeviceNameFlagLong, MSyntax::kString );
    return syntax;
}
Beispiel #6
0
	MSyntax ExtendStrand::newSyntax () {
		MSyntax syntax;

		syntax.addFlag("-b", "-base", MSyntax::kLong);
		syntax.addFlag("-t", "-target", MSyntax::kString);

		return syntax;
	}
Beispiel #7
0
MSyntax MeshControlCmd::newSyntax()
{
	MSyntax syntax;
	MStatus s;
	s = syntax.addFlag(m_initFlag[1], m_initFlag[0], MSyntax::kNoArg);
	s = syntax.addFlag(m_nameFlag[1], m_nameFlag[0], MSyntax::kString);
	return syntax;
}
Beispiel #8
0
MSyntax userMessage::newSyntax() {
	MSyntax syntax;
	syntax.addFlag( postFlag, postLongFlag, MSyntax::kString );
	syntax.addFlag( registerFlag, registerLongFlag, MSyntax::kString );
	syntax.addFlag( deregisterFlag, deregisterLongFlag, MSyntax::kString );
	syntax.addFlag( testFlag, testLongFlag );
	return syntax;
}
Beispiel #9
0
MSyntax particleCmd::newSyntax()
{
	MSyntax syntax;
	syntax.addFlag(pxFlag,pxLongFlag,MSyntax::kDouble);
	syntax.addFlag(pyFlag,pyLongFlag,MSyntax::kDouble);
	syntax.addFlag(pzFlag,pzLongFlag,MSyntax::kDouble);
	
	return syntax;
}
Beispiel #10
0
	MSyntax RetargetBase::newSyntax () {
		MSyntax syntax;

		syntax.addFlag("-p", "-perpendicular", MSyntax::kLong);
		syntax.addFlag("-b", "-base", MSyntax::kString);
		syntax.addFlag("-t", "-target", MSyntax::kString);

		return syntax;
	}
Beispiel #11
0
MSyntax tm_polySplit::newSyntax()
{
	MSyntax syntax;
	syntax.addFlag( loop_Flag, loop_LongFlag, MSyntax::kLong, MSyntax::kDouble);//, MSyntax::kLong); // - max count;
	syntax.addFlag( sel_Flag, sel_LongFlag);
	syntax.setObjectType( MSyntax::kSelectionList);
	syntax.useSelectionAsDefault( true);
	return syntax;
}
Beispiel #12
0
MSyntax particlePathsCmd::newSyntax() {
	MSyntax syntax;
	syntax.addFlag( startFlag, startLongFlag, MSyntax::kDouble );
	syntax.addFlag( finishFlag, finishLongFlag, MSyntax::kDouble );
	syntax.addFlag( incrementFlag, incrementLongFlag, MSyntax::kDouble );
	syntax.setObjectType(MSyntax::kSelectionList,1,1);
	syntax.useSelectionAsDefault();
	return syntax;
}
MSyntax GetMetaNodeConnectionCmd::newSyntax()
{
    MSyntax syntax;

    syntax.addFlag(GetMetaNodeConnectionCmd::FileParam(), GetMetaNodeConnectionCmd::FileParamLong(), MSyntax::kString);
    syntax.addFlag(GetMetaNodeConnectionCmd::FileParam2(), GetMetaNodeConnectionCmd::FileParam2Long(), MSyntax::kString);

    return syntax;
}
MSyntax classificationCommand::newSyntax()
{
    MSyntax syntax;

	syntax.addFlag( selectedFlag, selectedLongFlag, MSyntax::kString );
    syntax.addFlag( pathFlag, pathLongFlag, MSyntax::kString );
	syntax.addFlag( selectedNumFlag, selectedNumLongFlag, MSyntax::kUnsigned);
	return syntax;
}
Beispiel #15
0
MStatus mengerCmd::doIt(const MArgList &args)
{
    MSyntax syntax;
    syntax.addFlag(FLAG_SIZE, FLAG_SIZE_LONG, MSyntax::kDouble);
    syntax.addFlag(FLAG_ITER, FLAG_ITER_LONG, MSyntax::kUnsigned);

    MStatus stat = MStatus::kSuccess;

    MArgParser arg_parser(syntax, args, &stat);
    if (stat != MStatus::kSuccess)
        return stat;

    double size = 1.0f;
    stat = arg_parser.getFlagArgument(FLAG_SIZE, 0, size);

    unsigned int iterations = 3;
    stat = arg_parser.getFlagArgument(FLAG_ITER, 0, iterations);

    cube c;
    c.start.x = c.start.y = c.start.z = (float) -size;
    c.end = c.start * -1;

    std::vector<cube> cubes;
    dice_err::val dice_status =
        dice(c, iterations, cubes);

    if (dice_status == dice_err::success)
    {
        MGlobal::displayInfo("A Menger Sponge was created.");

        MString name;
        makeCubes(cubes, name, &stat);

        setResult(name);
    }
    else
    {
        MGlobal::displayError("A Menger Sponge could not be computed.");
        switch (dice_status)
        {
        case dice_err::invalid_param_err:
            MGlobal::displayError("dice was called with wrong arguments.");
            break;
        case dice_err::bounds_err:
            MGlobal::displayError("dice was called with erronous bounds.");
            break;
        case dice_err::memory_err:
            MGlobal::displayError("dice had an memory error.");
            break;
        case dice_err::success: /* Stop warnings. */
            break;
        }
    }

    return stat;
}
MSyntax AlembicAssignInitialSGCommand::createSyntax()
{
   MSyntax syntax;
   syntax.addFlag("-h", "-help");
   syntax.addFlag("-m", "-mesh", MSyntax::kString);
   syntax.enableQuery(false);
   syntax.enableEdit(false);

   return syntax;
}
Beispiel #17
0
MSyntax AlembicResolvePathCommand::createSyntax()
{
   MSyntax syntax;
   syntax.addFlag("-h", "-help");
   syntax.addFlag("-f", "-fileNameArg", MSyntax::kString);
   syntax.enableQuery(false);
   syntax.enableEdit(false);

   return syntax;
}
MSyntax AlembicPolyMeshToSubdivCommand::createSyntax()
{
	MSyntax syntax;
	syntax.addFlag("-h", "-help");
	syntax.addFlag("-m", "-mesh", MSyntax::kString);
	syntax.enableQuery(false);
	syntax.enableEdit(false);

	return syntax;
}
MSyntax	brushToolCommand::newSyntax()
{
    MSyntax syntax;
    syntax.addFlag(radiusFlag, radiusLongFlag, MSyntax::kDouble);
    syntax.addFlag(intensityFlag, intensityLongFlag, MSyntax::kDouble);
    syntax.addFlag(lockBaseFlag, lockBaseLongFlag, MSyntax::kBoolean);
    syntax.addFlag(brushModeFlag, brushModeLongFlag, MSyntax::kLong);


    return syntax;
}
MStatus	SelectRingContextCmd2::appendSyntax()
{
	MSyntax syn = syntax();
	
	syn.addFlag( selEdgesFlag, selEdgesLongFlag, MSyntax::kBoolean );
	syn.addFlag( selFacesFlag, selFacesLongFlag, MSyntax::kBoolean );
	syn.addFlag( selVerticesFlag, selVerticesLongFlag, MSyntax::kBoolean );
	syn.addFlag( selTypeFlag, selTypeLongFlag, MSyntax::kUnsigned );

	return MS::kSuccess;
}
MSyntax AlembicExportCommand::createSyntax()
{
  MSyntax syntax;
  syntax.addFlag("-h", "-help");
  syntax.addFlag("-j", "-jobArg", MSyntax::kString);
  syntax.makeFlagMultiUse("-j");
  syntax.enableQuery(false);
  syntax.enableEdit(false);

  return syntax;
}
/// AlembicAssignFacesetCommand
MSyntax AlembicAssignFacesetCommand::createSyntax()
{
   MSyntax syntax;
   syntax.addFlag("-h", "-help");
   syntax.addFlag("-a", "-attribute", MSyntax::kString);
   syntax.addFlag("-m", "-mesh", MSyntax::kString);
   //syntax.addFlag("-x", "-xset", MSyntax::kString);
   syntax.enableQuery(false);
   syntax.enableEdit(false);

   return syntax;
}
MSyntax liqAttachPrefAttribute::syntax()
{
  MSyntax syn;

  syn.setObjectType( MSyntax::kStringObjects, 1 ); // object name
  syn.useSelectionAsDefault( true );

  syn.addFlag("ws", "worldSpace");
  syn.addFlag("en", "exportN");

  return syn;
}
Beispiel #24
0
MSyntax mshUtil::newSyntax()
{
	MSyntax syntax;

	syntax.addFlag("-i", "-input", MSyntax::kString);
	syntax.addFlag("-o", "-output", MSyntax::kString);

	syntax.enableQuery(false);
	syntax.enableEdit(false);

   return syntax;
}
Beispiel #25
0
MSyntax tm_randPoint::newSyntax()
{
	MSyntax syntax;
	syntax.addFlag( amp_Flag, amp_LongFlag, MSyntax::kDouble);
	syntax.addFlag( ampX_Flag, ampX_LongFlag, MSyntax::kDouble);
	syntax.addFlag( ampY_Flag, ampY_LongFlag, MSyntax::kDouble);
	syntax.addFlag( ampZ_Flag, ampZ_LongFlag, MSyntax::kDouble);
	syntax.addFlag( seed_Flag, seed_LongFlag, MSyntax::kLong);
	syntax.addFlag( obj_Flag, obj_LongFlag, MSyntax::kString);
	syntax.addFlag( help_Flag, help_LongFlag, MSyntax::kNoArg);
	return syntax;
}
MSyntax SelectRingToolCmd2::newSyntax()
{
    MSyntax syntax;

	syntax.addFlag( edgeFlag, edgeLongFlag, MSyntax::kString );
	syntax.addFlag( selEdgesFlag, selEdgesLongFlag, MSyntax::kBoolean );
	syntax.addFlag( selFacesFlag, selFacesLongFlag, MSyntax::kBoolean );
	syntax.addFlag( selVerticesFlag, selVerticesLongFlag, MSyntax::kBoolean );
	syntax.addFlag( listAdjustFlag, listAdjustLongFlag, MSyntax::kUnsigned );
	syntax.addFlag( selTypeFlag, selTypeLongFlag, MSyntax::kUnsigned );
	
	return syntax;
}
void CVstAimCmd::SpecifySyntax( MSyntax &mSyntax, ValveMaya::CMSyntaxHelp & /* mSyntaxHelp */ )
{
	mSyntax.addFlag( kHelp, "help" );
	mSyntax.addFlag( kSelect, "select" );
	mSyntax.addFlag( kCreate, "create" );
	mSyntax.addFlag( kName, "name", MSyntax::kString );
	mSyntax.addFlag( kAim, "aim", MSyntax::kDouble, MSyntax::kDouble, MSyntax::kDouble );
	mSyntax.addFlag( kUp, "up", MSyntax::kDouble, MSyntax::kDouble, MSyntax::kDouble );

	mSyntax.setObjectType( MSyntax::kSelectionList );
	mSyntax.useSelectionAsDefault( true );
	mSyntax.enableEdit( false );
}
MSyntax Molecule3Cmd::newSyntax()
{
    MSyntax syntax;

    syntax.addFlag( radiusFlag, radiusLongFlag, MSyntax::kDistance );
    syntax.addFlag( segsFlag, segsLongFlag, MSyntax::kLong );
    syntax.addFlag( ballRatioFlag, ballRatioLongFlag, MSyntax::kDouble );
	
	syntax.enableQuery( false );
	syntax.enableEdit( false );

	return syntax;
}
Beispiel #29
0
MSyntax depthMap::newSyntax() 
{
	MSyntax syntax;

	syntax.addFlag("-n", "-name", MSyntax::kString);
	syntax.addFlag("-sc", "-scenepath", MSyntax::kString);
	syntax.addFlag("-ca", "-camera", MSyntax::kString);
	
	syntax.enableQuery(false);
	syntax.enableEdit(false);

	return syntax;
}
Beispiel #30
0
MSyntax	nodeCreatedCB::newSyntax()
//
// Create the syntax object for the nodeCreateCB command.
//
{
	MSyntax syntax;

	syntax.addFlag( kRegisterFlag, kRegisterFlagLong, MSyntax::kString );
	syntax.addFlag( kUnregisterFlag, kUnregisterFlagLong, MSyntax::kString );
	syntax.addFlag( kFilterFlag, kFilterFlagLong, MSyntax::kString );
	syntax.addFlag( kFullDagPathFlag, kFullDagPathFlagLong );

	return syntax;
}