#ifndef shaveNodeCmd_h #define shaveNodeCmd_h // Shave and a Haircut // (c) 2019 Epic Games // US Patent 6720962 #include #include #include #include #if MAYA_API_VERSION < 20180000 class MArgDatabase; class MDagModifier; class MDGModifier; #endif class shaveHairShape; class shaveNodeCmd : public MPxCommand { public: shaveNodeCmd(); virtual ~shaveNodeCmd(); static MStatus copyInputConnections( MDGModifier& dgMod, MObject srcNode, MObject destNode, MObject attr ); static void* createCmd(); MStatus doIt( const MArgList& args ); bool isUndoable() const; static MSyntax createSyntax(); static const MString commandName; private: void displayInputConnection( MObject node, MObject attr, MString indent ); MStatus doEditFlags( const MArgDatabase& args, shaveHairShape* nodePtr ); MStatus doQueryFlags( const MArgDatabase& args, shaveHairShape* nodePtr ); // Fills 'curves' with dag paths for all of the curves passed to // the command using the '-curve' flag. If any of the curves are // invalid then 'curves' will be empty and MS::kInvalidParameter will // be returned. MStatus getCurves(const MArgDatabase& args, MDagPathArray& curves); MDagPath getParentTransform( const MArgDatabase& args, MDagModifier& dm, MStatus& st ); shaveHairShape* getShaveNode(const MArgDatabase& args); static MVector interpolate( const MVector& p1, const MVector& p2, const MVector& p3, const MVector& p4, double u ); MString stripNode(MString plugName); }; inline bool shaveNodeCmd::isUndoable() const { return false; } #endif