本文整理汇总了Python中maya.OpenMayaMPx类的典型用法代码示例。如果您正苦于以下问题:Python OpenMayaMPx类的具体用法?Python OpenMayaMPx怎么用?Python OpenMayaMPx使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了OpenMayaMPx类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: nodeCreator
def nodeCreator(cls):
"""
[email protected] Node creator function. Get maya API help for more informations.
"""
return OpenMayaMPx.asMPxPtr(cls())
开发者ID:RDelet,项目名称:Maya_Tools,代码行数:7,代码来源:QDManip.py
示例2: cmdCreator
def cmdCreator():
# Create the command
"""
Return:
pointer to the command
"""
ptr = OpenMayaMPx.asMPxPtr(SamplePyCmd())
return ptr
开发者ID:jonntd,项目名称:miMayaPlugins,代码行数:10,代码来源:pyPluginCmd.py
示例3: readASCII
def readASCII(self, args, lastParsedElement):
try:
if args.length() > 0:
parsedIndex = OpenMaya.MScriptUtil.getUint(lastParsedElement)
self.__fValue = args.asDouble( parsedIndex )
parsedIndex += 1
OpenMaya.MScriptUtil.setUint(lastParsedElement,parsedIndex)
fValueDictionary[OpenMayaMPx.asHashable(self)]=self.__fValue
except:
sys.stderr.write("Failed to read ASCII value.")
raise
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:11,代码来源:blindDoubleDataCmd.py
示例4: doEditFlags
def doEditFlags(self):
theParser = self._parser()
theControl = kPythonPtrTable.get(OpenMayaMPx.asHashable(self._control()), None)
if theParser.isFlagSet(kNopFlag):
theControl.setOperation(kNop)
elif theParser.isFlagSet(kMultFlag):
theControl.setOperation(kMult)
elif theParser.isFlagSet(kAddFlag):
theControl.setOperation(kAdd)
elif theParser.isFlagSet(kRedrawFlag):
theControl.redrawCells()
theControl.redrawLabels()
else:
OpenMayaMPx.MPxControlCommand.doEditFlags(self)
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:15,代码来源:mathTableControl.py
示例5: doPress
def doPress(self, event):
OpenMayaMPx.MPxSelectionContext.doPress(self, event)
spc = OpenMaya.MSpace.kWorld
# If we are not in selecting mode (i.e. an object has been selected)
# then set up for the translation.
#
if not self._isSelecting():
argX = OpenMaya.MScriptUtil()
argX.createFromInt(0)
argXPtr = argX.asShortPtr()
argY = OpenMaya.MScriptUtil()
argY.createFromInt(0)
argYPtr = argY.asShortPtr()
event.getPosition(argXPtr, argYPtr)
self.__startPos_x = OpenMaya.MScriptUtil(argXPtr).asShort()
self.__startPos_y = OpenMaya.MScriptUtil(argYPtr).asShort()
self.__view = OpenMayaUI.M3dView.active3dView()
camera = OpenMaya.MDagPath()
self.__view.getCamera(camera)
fnCamera = OpenMaya.MFnCamera(camera)
upDir = fnCamera.upDirection(spc)
rightDir = fnCamera.rightDirection(spc)
# Determine the camera used in the current view
#
if fnCamera.isOrtho():
if upDir.isEquivalent(OpenMaya.MVector.zNegAxis, kVectorEpsilon):
self.__currWin = MoveContext.kTop
elif rightDir.isEquivalent(OpenMaya.MVector.xAxis, kVectorEpsilon):
self.__currWin = MoveContext.kFront
else:
self.__currWin = MoveContext.kSide
else:
self.__currWin = MoveContext.kPersp
# Create an instance of the move tool command.
#
newCmd = self._newToolCommand()
self.__cmd = kTrackingDictionary.get(OpenMayaMPx.asHashable(newCmd), None)
self.__cmd.setVector(0.0, 0.0, 0.0)
开发者ID:DimondTheCat,项目名称:xray,代码行数:42,代码来源:moveTool.py
示例6: contextCmdCreator
def contextCmdCreator():
"""Wrapper function that created the command"""
return OpenMayaMPx.asMPxPtr(mayaSelctionCtxCmd())
开发者ID:andreaforapani,项目名称:cadnano2,代码行数:3,代码来源:mayaSelectionContex.py
示例7: nodeCreator
def nodeCreator(cls):
return OpenMayaMPx.asMPxPtr(cls())
开发者ID:AtonLerin,项目名称:Maya_Tools,代码行数:2,代码来源:QDCos.py
示例8: cmdCreator
def cmdCreator():
return OpenMayaMPx.asMPxPtr( scriptedCommand() )
开发者ID:0xb1dd1e,项目名称:PipelineConstructionSet,代码行数:2,代码来源:pymelScrollFieldReporter.py
示例9: moveManipContext
return OpenMayaMPx.asMPxPtr( moveManipContext() )
开发者ID:DimondTheCat,项目名称:xray,代码行数:1,代码来源:moveManip.py
示例10: creator
def creator():
return OpenMayaMPx.asMPxPtr( gear_percentageToU() )
开发者ID:AtonLerin,项目名称:mgear,代码行数:2,代码来源:gear_percentageToU.py
示例11: nodeCreator
def nodeCreator():
# TODO change this node name
return OpenMayaMPx.asMPxPtr(nodeName)
开发者ID:knowlonix,项目名称:maya-lib,代码行数:3,代码来源:deformer_node_base.py
示例12: nodeCreator
def nodeCreator():
return OpenMayaMPx.asMPxPtr( sceneMsgCmd() )
开发者ID:ADN-DevTech,项目名称:Maya-Training-Material,代码行数:2,代码来源:sceneMsgCmd.py
示例13: nodeCreator
def nodeCreator():
return OpenMayaMPx.asMPxPtr( dynNode() )
开发者ID:ADN-DevTech,项目名称:Maya-Training-Material,代码行数:2,代码来源:dynNode.py
示例14: creator
def creator():
return OpenMayaMPx.asMPxPtr(cvShapeInverter())
开发者ID:zclongpop123,项目名称:MPToolkit,代码行数:2,代码来源:cvShapeInverter.py
示例15: create
def create():
return OpenMayaMPx.asMPxPtr(Ik2bCGA())
开发者ID:stkstoyanov,项目名称:Ik2bCGA,代码行数:2,代码来源:Ik2bCGA.py
示例16: normalizeCreator
def normalizeCreator():
return OpenMayaMPx.asMPxPtr( normalize() )
开发者ID:EnReich,项目名称:ProKlaue,代码行数:2,代码来源:normalize.py
示例17:
OpenMayaMPx.MPxContextCommand.__init__(self)
开发者ID:DimondTheCat,项目名称:xray,代码行数:1,代码来源:moveManip.py
示例18: nodeCreator
def nodeCreator():
return OpenMayaMPx.asMPxPtr(stretchSplineSolver())
开发者ID:skarone,项目名称:PipeL,代码行数:2,代码来源:splineSolver.py
示例19: moveManipCreator
def moveManipCreator():
return OpenMayaMPx.asMPxPtr( moveManip() )
开发者ID:DimondTheCat,项目名称:xray,代码行数:2,代码来源:moveManip.py
示例20: nodeCreator
def nodeCreator():
return OpenMayaMPx.asMPxPtr(jiggleNode())
开发者ID:tenghaowang,项目名称:JiggleDeformer,代码行数:2,代码来源:jiggleDeformer.py
注:本文中的maya.OpenMayaMPx类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论