C++ API Reference
MPxPolyTweakUVCommand Class Reference

Base class used for moving polygon UV's. More...

#include <MPxPolyTweakUVCommand.h>

+ Inheritance diagram for MPxPolyTweakUVCommand:

Public Member Functions

 MPxPolyTweakUVCommand ()
 Class constructor.
 
 ~MPxPolyTweakUVCommand () override
 Class destructor.
 
virtual MStatus parseSyntax (MArgDatabase &argData)
 This method parses the additional flags before the command is executed. More...
 
virtual MStatus getTweakedUVs (const MObject &mesh, MIntArray &uvList, MFloatArray &uPos, MFloatArray &vPos)
 This computes and returns modified UVs. More...
 
- Public Member Functions inherited from MPxCommand
 MPxCommand ()
 Constructor.
 
virtual ~MPxCommand ()
 Destructor. More...
 
virtual MStatus doIt (const MArgList &args)
 This method should perform a command by setting up internal class data and then calling the redoIt method. More...
 
virtual bool hasSyntax () const
 This method specifies whether or not the command has a syntax object. More...
 
MSyntax syntax () const
 This method is intended to be used in an MArgDataBase or MArgParser contructor when the plugin command's syntax is being initialized. More...
 
bool isHistoryOn () const
 Returns whether history is on. More...
 
MString commandString () const
 This method returns the command string that is associated with this command. More...
 
MStatus setHistoryOn (bool state)
 This method specifies if history for this command is on. More...
 
MStatus setCommandString (const MString &)
 Sets the command string that is associated with this command object. More...
 
MStatus setUndoable (bool state)
 This method is obsolete. More...
 

Static Public Member Functions

static MSyntax newSyntax ()
 This method creates and returns an MSyntax object required for the poly tweak UV proxy command.
 
- Static Public Member Functions inherited from MPxCommand
static void displayInfo (const MString &theInfo)
 This method is used to display information in the script editor. More...
 
static void displayWarning (const MString &theWarning, bool showLineNumber=false)
 This method is used to display a warning in the script editor. More...
 
static void displayError (const MString &theError, bool showLineNumber=false)
 This method is used to display an error in the script editor. More...
 
static void clearResult ()
 Initializes the place where results from Maya commands get stored.
 
static void setResult (unsigned int val)
 This method puts the given value into the return value area for a command. More...
 
static void setResult (int val)
 This method puts the given value into the return value area for a command. More...
 
static void setResult (double val)
 This method puts the given value into the return value area for a command. More...
 
static void setResult (bool val)
 This method puts the given value into the return value area for a command. More...
 
static void setResult (const char *val)
 This method puts the given value into the return value area for a command. More...
 
static void setResult (const MString &val)
 This method puts the given value into the return value area for a command. More...
 
static void setResult (const MIntArray &val)
 This method puts the given values into the return value area for a command. More...
 
static void setResult (const MDoubleArray &val)
 This method puts the given values into the return value area for a command. More...
 
static void setResult (const MStringArray &val)
 This method puts the given values into the return value area for a command. More...
 
static void appendToResult (int val)
 This method will add the given value to the end of the result array of integers. More...
 
static void appendToResult (double val)
 This method will add the given value to the end of the result array of doubles. More...
 
static void appendToResult (bool val)
 This method will add the given value to the end of the result array of integers. More...
 
static void appendToResult (const char *val)
 This method will add the given value to the end of the result array of strings. More...
 
static void appendToResult (const MString &val)
 This method will add the given value to the end of the result array of strings. More...
 
static void appendToResult (const MStringArray &val)
 This method will add the given value to the end of the result array of strings. More...
 
static bool isCurrentResultArray ()
 This method will return whether the return result for the command is an array or not. More...
 
static MResultType currentResultType ()
 This method will return the type of the current result for the command. More...
 
static MStatus getCurrentResult (int &val)
 This method is not available in Python. More...
 
static MStatus getCurrentResult (double &val)
 This method is not available in Python. More...
 
static MStatus getCurrentResult (MString &val)
 This method is not available in Python. More...
 
static MStatus getCurrentResult (MIntArray &val)
 This method gets the current node's result as an array of integers, if possible. More...
 
static MStatus getCurrentResult (MDoubleArray &val)
 This method gets the current node's result as an array of doubles, if possible. More...
 
static MStatus getCurrentResult (MStringArray &val)
 This method gets the current node's result as an array of strings, if possible. More...
 
static int currentIntResult (MStatus *ReturnStatus=NULL)
 This method gets the current node's result as a int, if possible. More...
 
static double currentDoubleResult (MStatus *ReturnStatus=NULL)
 This method gets the current node's result as a double, if possible. More...
 
static MString currentStringResult (MStatus *ReturnStatus=NULL)
 This method gets the current node's result as a MString, if possible. More...
 
static const char * className ()
 Returns the name of this class. More...
 

Additional Inherited Members

- Public Types inherited from MPxCommand
enum  MResultType { kLong, kDouble, kString, kNoArg }
 Types of results from commands. More...
 

Detailed Description

Base class used for moving polygon UV's.

This is the base class for UV editing commands on polygonal objects.

The purpose of this command class is to simplify the process of moving UVs on a polygonal object. The use is only required to provide the new positions of the UVs that have been modified.

Examples:
flipUVCmd/flipUVCmd.h.

Member Function Documentation

MStatus parseSyntax ( MArgDatabase argData)
virtual

This method parses the additional flags before the command is executed.

Parameters
[in]argDataArguments passed to command.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
Examples:
flipUVCmd/flipUVCmd.h.
MStatus getTweakedUVs ( const MObject mesh,
MIntArray uvList,
MFloatArray uPos,
MFloatArray vPos 
)
virtual

This computes and returns modified UVs.

Parameters
[in]meshThe mesh object to be modified
[in]uvListThe list of UV Ids selected by the user. The method is allowed to change uvList on output.
[out]uPosThe new u values corresponding to the indices listed in uvList.
[out]vPosThe new v values corresponding to the indices listed in uvList.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
Examples:
flipUVCmd/flipUVCmd.h.

The documentation for this class was generated from the following files: