예제 #1
0
MSyntax deletedMessage::newSyntax() {
	MSyntax syntax;
	syntax.setObjectType(MSyntax::kSelectionList);
	syntax.setMinObjects(1);
	syntax.useSelectionAsDefault(true);
	return syntax;
}
예제 #2
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;
}
예제 #3
0
MSyntax peltOverlap::newSyntax()
{
    MSyntax syntax;
    syntax.addFlag(kExitFlag, kExitFlagLong, MSyntax::kUnsigned);
    syntax.setObjectType(MSyntax::kStringObjects);
    return syntax;
}
예제 #4
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;
}
예제 #5
0
// newSyntax
//
MSyntax eventTest::newSyntax()
{
	MSyntax syntax;

	syntax.addFlag(kMessageFlag, kMessageFlagLong, MSyntax::kBoolean);
	syntax.setObjectType(MSyntax::kStringObjects);

	return syntax;
}
예제 #6
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;
}
예제 #7
0
MSyntax tm_polyExtract::newSyntax()
{
	MSyntax syntax;
//	syntax.addFlag( extractFaces_Flag, extractFaces_LongFlag);

	syntax.setObjectType( MSyntax::kSelectionList);
	syntax.useSelectionAsDefault( true);

	return syntax;
}
예제 #8
0
//-----------------------------------------------------------------------------
// Purpose: MSyntax factory for the command
// Output : A Maya MSyntax class describing command's command line syntax
//-----------------------------------------------------------------------------
MSyntax CVstSmdIOCmd::SyntaxFactory()
{
	MSyntax mSyntax;

	mSyntax.addFlag( kOptHelp, "help" );
	mSyntax.addFlag( kOptFilename, "filename", MSyntax::kString );
	mSyntax.addFlag( kOptGame, "game", MSyntax::kString );

	mSyntax.addFlag( kOptImport, "import" );
	mSyntax.addFlag( kOptOrigin, "origin", MSyntax::kDouble, MSyntax::kDouble, MSyntax::kDouble );
	mSyntax.addFlag( kOptAngles, "angles", MSyntax::kDouble, MSyntax::kDouble, MSyntax::kDouble );
	mSyntax.addFlag( kOptVmf, "valveMapFile" );
	mSyntax.addFlag( kOptTextureArchive, "textureArchive", MSyntax::kString );
	mSyntax.addFlag( kOptImportSkeleton, "importSkeleton", MSyntax::kBoolean );
	mSyntax.addFlag( kOptImportType, "importType", MSyntax::kString );

	mSyntax.addFlag( kOptExport, "export" );
	mSyntax.addFlag( kOptExportType, "exportType", MSyntax::kString );
	mSyntax.makeFlagMultiUse( kOptExportType );
	mSyntax.addFlag( kOptFrameStart, "frameStart", MSyntax::kDouble );
	mSyntax.addFlag( kOptFrameEnd, "frameEnd", MSyntax::kDouble );
	mSyntax.addFlag( kOptFrameInc, "frameIncrement", MSyntax::kDouble );
	mSyntax.addFlag( kOptSelection, "selection" );
	mSyntax.addFlag( kOptUpAxis, "upAxis", MSyntax::kString );
	mSyntax.addFlag( kOptNodePrefix, "nodePrefix", MSyntax::kString );
	mSyntax.addFlag( kOptRemovePrefix, "removePrefix", MSyntax::kString );
	mSyntax.addFlag( kOptExportInvisible, "exportInvisible" );
	mSyntax.addFlag( kOptPrettyPrint, "prettyPrint", MSyntax::kBoolean );
	mSyntax.addFlag( kOptWorld, "world" );
	mSyntax.addFlag( kOptDoubleSided, "doubleSided" );

	mSyntax.addFlag( kOptQci, "qciExport", MSyntax::kString );

	mSyntax.addFlag( kOptMaterials, "materials" );
	mSyntax.addFlag( kOptMaterialSrc, "materialSrc" );
	mSyntax.addFlag( kOptMaterialVtf, "materialVtf" );
	mSyntax.addFlag( kOptMaterialVmt, "materialVmt" );
	mSyntax.addFlag( kOptRelativeMaterials, "relativeMaterials" );

	mSyntax.addFlag( kOptQc, "qcCreate" );
	mSyntax.addFlag( kOptQcCollapseBones, "qcCollapseBones" );
	mSyntax.addFlag( kOptQcCenterBonesOnVerts, "qcCenterBonesOnVerts" );
	mSyntax.addFlag( kOptQcSkipBonesInBBox, "qcSkipBonesInBBox" );

	mSyntax.addFlag( kOptRunStudiomdl, "studiomdl" );

	mSyntax.addFlag( kOptParents, "parents" );

	mSyntax.addFlag( kOptBindCurrent, "bindCurrent" );

	mSyntax.useSelectionAsDefault( true );
	mSyntax.setObjectType( MSyntax::kSelectionList );

	return mSyntax;
}
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;
}
예제 #10
0
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 );
}
예제 #11
0
MSyntax closestPointOnCurveCommand::newSyntax()

{

   MSyntax syntax;



   // INPUT FLAGS:

   syntax.addFlag("-na", "-name", MSyntax::kString);

   syntax.addFlag("-ip", "-inPosition", MSyntax::kDouble, MSyntax::kDouble, MSyntax::kDouble);



   // OUTPUT/QUERYABLE FLAGS:

   syntax.addFlag("-p", "-position");

   syntax.addFlag("-nr", "-normal");

   syntax.addFlag("-t", "-tangent");

   syntax.addFlag("-u", "-paramU");

   syntax.addFlag("-d", "-distance");



   // DEFINE BEHAVIOUR OF COMMAND ARGUMENT THAT SPECIFIES THE CURVE NODE:

   syntax.useSelectionAsDefault(true);

   syntax.setObjectType(MSyntax::kSelectionList, 1, 1);



   // MAKE COMMAND QUERYABLE AND NON-EDITABLE:

   syntax.enableQuery(true);

   syntax.enableEdit(false);



   return syntax;

}
예제 #12
0
MSyntax lockEvent::newSyntax( )
{
	MSyntax syntax; 
	
	// begin-syntax
	syntax.addFlag( kClearCB, kClearCBLong ); 
	syntax.addFlag( kOverride, kOverrideLong, MSyntax::kBoolean ); 
	syntax.addFlag( kAttach, kAttachLong, MSyntax::kUnsigned ); 

	syntax.useSelectionAsDefault( true ); 
	syntax.setObjectType( MSyntax::kSelectionList, 0 ); 
	// end-syntax 

	return syntax; 
}
void CVstSelectCoincidentFacesCmd::SpecifySyntax(
	MSyntax &mSyntax,
	ValveMaya::CMSyntaxHelp &mSyntaxHelp )
{
	mSyntaxHelp.AddFlag( mSyntax, kOptHelp, "help", "General", "Prints usage information" );

	mSyntaxHelp.AddFlag( mSyntax, kOptTolerance, "tolerance", "General",
		"Specifies the tolerance distance between vertices for them to be considered the same vertex",
		MSyntax::kDistance );

	mSyntax.setObjectType( MSyntax::kSelectionList );
	mSyntax.useSelectionAsDefault( true );
	mSyntax.enableEdit( false );
	mSyntax.enableQuery( false );
}
예제 #14
0
MSyntax CheckMeshCmd::CreateSyntax() {
  MSyntax syntax;

  syntax.addFlag(kToleranceName.c_str(), kToleranceNameLong.c_str(),
                 MSyntax::kDouble);

  syntax.addFlag(kModeName.c_str(), kModeNameLong.c_str(), MSyntax::kString);

  syntax.useSelectionAsDefault(true);
  syntax.setObjectType(MSyntax::kStringObjects, 1);
  syntax.enableQuery(true);
  syntax.enableEdit(false);

  return syntax;
}
예제 #15
0
//------------------------------------------------------------------------------
//
MSyntax AdskSceneMetadataCmd::cmdSyntax()
{
    MSyntax syntax;

    syntax.addFlag( "-c", "-channelName",   MSyntax::kString );   
    syntax.addFlag( "-d", "-data",			MSyntax::kString );

    // In query mode, the command needs to know what channel to look for
    syntax.makeFlagQueryWithFullArgs( "-channelName", false );

    syntax.setObjectType( MSyntax::kStringObjects, 1, 1 );
    syntax.enableQuery( true );
    syntax.enableEdit( true );

    return syntax;
}
예제 #16
0
MSyntax dagMessageCmd::newSyntax()
{
	MSyntax syntax;

	syntax.useSelectionAsDefault(true);
	syntax.setObjectType(MSyntax::kSelectionList);
	syntax.setMinObjects(0);

	syntax.addFlag(kAllDagFlag, kAllDagFlagLong);
	syntax.addFlag(kParentAddedFlag, kParentAddedFlagLong);
	syntax.addFlag(kParentRemovedFlag, kParentRemovedFlagLong);
	syntax.addFlag(kChildAddedFlag, kChildAddedFlagLong);
	syntax.addFlag(kChildRemovedFlag, kChildRemovedFlagLong);
	syntax.addFlag(kChildReorderedFlag, kChildReorderedFlagLong);
	syntax.addFlag(kHelpFlag, kHelpFlagLong);
	return syntax;
}
예제 #17
0
void CVsSkinnerCmd::SpecifySyntax(
	MSyntax &mSyntax,
	ValveMaya::CMSyntaxHelp &mSyntaxHelp )
{
	mSyntaxHelp.AddFlag( mSyntax, kOptHelp, "help", "General", "Prints usage information" );

	mSyntaxHelp.AddFlag( mSyntax, kOptCreate, "create", "Create",
		"Creates a new vsSkinner node" );

	mSyntaxHelp.AddFlag( mSyntax, kOptBind, "bind", "Create",
		"Binds the created node to either the specified joint hierarchy or the selected joints. Specifiy h or s for hierarchy or selected." );

	mSyntaxHelp.AddFlag( mSyntax, kOptName, "name", "Create",
		"Names the created vsSkinner node the specified name" );

	mSyntaxHelp.AddFlag( mSyntax, kOptNewVolume, "newVolume", "Edit",
		"Creates a new volume on the specified vsSkinner node using the specified transform as the parent.  The vsSkinner node must be specified first the parent transform second." );

	mSyntaxHelp.AddFlag( mSyntax, kOptFalloff, "falloff", "Edit",
		"Specifies the falloff of a created volume, defaults to 0.25",
		MSyntax::kDouble );

	mSyntaxHelp.AddFlag( mSyntax, kOptStrength, "strength", "Edit",
		"Specifies the strength of a created volume, defaults to 1.0",
		MSyntax::kDouble );

	mSyntaxHelp.AddFlag( mSyntax, kOptAttachMesh, "attachMesh", "Edit",
		"Attaches the input mesh to the node for previewing via the vsSkinner color set" );

	mSyntaxHelp.AddFlag( mSyntax, kOptDetachMesh, "detachMesh", "Edit",
		"Detaches the preview attributes of input mesh from the node" );

	mSyntaxHelp.AddFlag( mSyntax, kOptLs, "list", "Query",
		"List the vsSkinner nodes in the scene or if -sl/-selected is specified, derived from the specified nodes" );

	mSyntaxHelp.AddFlag( mSyntax, kOptSelected, "selected", "Query",
		"Modifies the behavior of -ls/-list so only the specified or selected nodes are taken into account" );

	mSyntaxHelp.AddFlag( mSyntax, kOptLong, "long", "Query",
		"Modifies the behavior of -ls/-list so long node pathnames are returned.  If -long isn't specified, the shortest unique pathname is returned." );

	mSyntax.setObjectType( MSyntax::kSelectionList );
	mSyntax.useSelectionAsDefault( true );
	mSyntax.enableEdit( false );
	mSyntax.enableQuery( false );
}
예제 #18
0
//-----------------------------------------------------------------------------
// EntityInstanceNodeCmd::newSyntax
// definition of the syntax for command
//-----------------------------------------------------------------------------
MSyntax EntityInstanceNodeCmd::newSyntax()
{
  MSyntax syntax;

  syntax.enableEdit();
  syntax.setObjectType(MSyntax::kSelectionList, 0); // will function without error, but do nothing with no selection
  syntax.useSelectionAsDefault( true );

  syntax.addFlag( ReloadArt, ReloadArtLong );
  syntax.addFlag( ReloadAllArtFlag, ReloadAllArtFlagLong );

  syntax.addFlag( UnloadArt, UnloadArtLong );
  syntax.addFlag( UnloadAllArtFlag, UnloadAllArtFlagLong );

  syntax.addFlag( UnselectFlag, UnselectFlagLong );
  syntax.addFlag( SelectEntityAssetFlag, SelectEntityAssetFlagLong );
  syntax.addFlag( Flatten, FlattenLong );

  return syntax;
}
예제 #19
0
MSyntax ngSkinRelax::syntaxCreator(){
	MSyntax result;
	result.useSelectionAsDefault(true);
	result.setObjectType(MSyntax::kSelectionList,1);

	result.addFlag(FlagNames::NUMSTEPS, "-numSteps", MSyntax::kLong);
	result.addFlag(FlagNames::STEPSIZE, "-stepSize", MSyntax::kDouble);
	result.addFlag(FlagNames::PRESERVE_LOCKED_INFLUENCES, "-preserveLockedInfluences", MSyntax::kBoolean);
	result.addFlag(FlagNames::ASSOCIATE_VOLUME, "-associateByVolume", MSyntax::kBoolean);
	result.addFlag(FlagNames::ASSOCIATE_VOLUME_RADIUS, "-associateByVolumeRadius", MSyntax::kDouble);
	result.addFlag(FlagNames::SOFT_SELECTION_RADIUS, "-softSelectionRadius", MSyntax::kDouble);
	result.addFlag(FlagNames::NATIVE_SOFT_SELECTION, "-nativeSoftSelection", MSyntax::kBoolean);
	result.addFlag(FlagNames::WEIGHT_LIMIT, "-weightLimit", MSyntax::kLong);

	result.addFlag(FlagNames::LOCKED_VERTS, "-lockedVert", MSyntax::kSelectionItem);
	result.makeFlagMultiUse(FlagNames::LOCKED_VERTS);
	result.addFlag(FlagNames::INVISIBLE_VERTS, "-invisibleVert", MSyntax::kSelectionItem);
	result.makeFlagMultiUse(FlagNames::INVISIBLE_VERTS);

	return result;
}
void CVstAttachmentCmd::SpecifySyntax(
	MSyntax &mSyntax,
	ValveMaya::CMSyntaxHelp &mSyntaxHelp )
{
	mSyntaxHelp.AddFlag( mSyntax, kOptHelp, "help", "General",
		"Prints this information");

	mSyntaxHelp.AddFlag( mSyntax, kOptCreate, "create", "Create",
		"Creates a new vstAttachment locator" );

	mSyntaxHelp.AddFlag( mSyntax, kOptName, "name", "Create",
		"When creating a new vstAttachment locator, give it the specified name",
		MSyntax::kString );

	mSyntaxHelp.AddFlag( mSyntax, kOptParent, "parent", "Create",
		"When creating a new vstAttachment locator parent it under the first dag node specified" );

	mSyntax.enableEdit( false );
	mSyntax.enableQuery( false );

	mSyntax.setObjectType( MSyntax::kSelectionList );
	mSyntax.useSelectionAsDefault( true );
}
예제 #21
0
/* static */
MSyntax cgfxShaderCmd::newSyntax()
{
	MSyntax syntax;

	syntax.enableEdit();
	syntax.enableQuery();
	syntax.addFlag( kPluginPathFlag, kPluginPathFlagLong );
	syntax.addFlag( kMaxTexCoordsFlag, kMaxTexCoordsFlagLong );
	syntax.addFlag(kFxFlag, kFxFlagLong, MSyntax::kString);
	syntax.addFlag(kFxPathFlag, kFxPathFlagLong, MSyntax::kString);
	syntax.addFlag(kFxTechniqueFlag, kFxTechniqueFlagLong, MSyntax::kString);
	syntax.addFlag( kListTechniquesFlag, kListTechniquesFlagLong );
	syntax.addFlag(kFxProfileFlag, kFxProfileFlagLong, MSyntax::kString);
	syntax.addFlag( kListProfilesFlag, kListProfilesFlagLong );
	syntax.addFlag(kNameFlag, kNameFlagLong, MSyntax::kString);
	syntax.addFlag(kListParametersFlag, kListParametersFlagLong);
	syntax.addFlag(kParameterFlag, kParameterFlagLong, MSyntax::kString);
	syntax.addFlag( kEmptyUVFlag, kEmptyUVFlagLong );
	syntax.addFlag( kEmptyUVShapesFlag, kEmptyUVShapesFlagLong );
	syntax.addFlag( kTexCoordSourceFlag, kTexCoordSourceFlagLong );
#if MAYA_API_VERSION >= 700
	syntax.addFlag( kColorSourceFlag, kColorSourceFlagLong );
#endif
	syntax.addFlag( kCaseInsensitiveFlag, kCaseInsensitiveFlagLong );
	syntax.addFlag( kDescriptionFlag, kDescriptionFlagLong );

	syntax.setObjectType(MSyntax::kSelectionList, 0, 1);

	// Removed useSelectionAsDefault because in Maya 5.0 it causes an
	// unwanted error message to the Script Editor window from the
	// MArgDatabase constructor when no object is specified and the
	// current selection is empty.                      - kh 11/2003
	//      syntax.useSelectionAsDefault(true);

	return syntax;
}