当前位置: 首页>>代码示例>>Python>>正文


Python OpenMayaMPx.asMPxPtr方法代码示例

本文整理汇总了Python中maya.OpenMayaMPx.asMPxPtr方法的典型用法代码示例。如果您正苦于以下问题:Python OpenMayaMPx.asMPxPtr方法的具体用法?Python OpenMayaMPx.asMPxPtr怎么用?Python OpenMayaMPx.asMPxPtr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在maya.OpenMayaMPx的用法示例。


在下文中一共展示了OpenMayaMPx.asMPxPtr方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: nodeCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
    def nodeCreator(cls):

        """
        [email protected] Node creator function. Get maya API help for more informations.
        """

        return OpenMayaMPx.asMPxPtr(cls())
开发者ID:RDelet,项目名称:Maya_Tools,代码行数:9,代码来源:QDManip.py

示例2: cmdCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def cmdCreator():
    # Create the command
    """
    
    Return:
        pointer to the command
    
    """
    ptr = OpenMayaMPx.asMPxPtr(SamplePyCmd())
    return ptr
开发者ID:jonntd,项目名称:miMayaPlugins,代码行数:12,代码来源:pyPluginCmd.py

示例3: contextCmdCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def contextCmdCreator():
    """Wrapper function that created the command"""
    return OpenMayaMPx.asMPxPtr(mayaSelctionCtxCmd())
开发者ID:andreaforapani,项目名称:cadnano2,代码行数:5,代码来源:mayaSelectionContex.py

示例4: nodeCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
 def nodeCreator(cls):
     return OpenMayaMPx.asMPxPtr(cls())
开发者ID:AtonLerin,项目名称:Maya_Tools,代码行数:4,代码来源:QDCos.py

示例5: cmdCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def cmdCreator():
    return OpenMayaMPx.asMPxPtr( scriptedCommand() )
开发者ID:0xb1dd1e,项目名称:PipelineConstructionSet,代码行数:4,代码来源:pymelScrollFieldReporter.py

示例6: moveManipContext

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
		return OpenMayaMPx.asMPxPtr( moveManipContext() )
开发者ID:DimondTheCat,项目名称:xray,代码行数:3,代码来源:moveManip.py

示例7: creator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def creator():
    return OpenMayaMPx.asMPxPtr( gear_percentageToU() )
开发者ID:AtonLerin,项目名称:mgear,代码行数:4,代码来源:gear_percentageToU.py

示例8: nodeCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def nodeCreator():
	# TODO change this node name
	return OpenMayaMPx.asMPxPtr(nodeName)
开发者ID:knowlonix,项目名称:maya-lib,代码行数:5,代码来源:deformer_node_base.py

示例9: nodeCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def nodeCreator():
	return OpenMayaMPx.asMPxPtr( sceneMsgCmd() )
开发者ID:ADN-DevTech,项目名称:Maya-Training-Material,代码行数:4,代码来源:sceneMsgCmd.py

示例10: dataCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def dataCreator():
	return OpenMayaMPx.asMPxPtr(blindDoubleData())
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:4,代码来源:blindDoubleDataCmd.py

示例11: cmdCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def cmdCreator():
	return OpenMayaMPx.asMPxPtr(blindDoubleDataCmd())
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:4,代码来源:blindDoubleDataCmd.py

示例12: redoIt

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
	def redoIt(self):
		dependNode = OpenMaya.MObject() # Selected dependency node
		# show message and advance iterator
		def error(msg):
			sys.stderr.write(err)
			self.__iter.next()
			
		# Iterate over all selected dependency nodes
		#
		while not self.__iter.isDone():
			# Get the selected dependency node and create
			# a function set for it
			#
			try:
				self.__iter.getDependNode(dependNode)	
			except:
				error("Error getting the dependency node")
				continue

			try:
				fnDN = OpenMaya.MFnDependencyNode(dependNode)
			except:
				error("Error creating MFnDependencyNode")
				continue

			# Create a new attribute for our blind data
			#
			fnAttr = OpenMaya.MFnTypedAttribute()
			newAttr = fnAttr.create("blindDoubleData", "BDD", kPluginDataId)
			
			# Now add the new attribute to the current dependency node
			#
			fnDN.addAttribute(newAttr, OpenMaya.MFnDependencyNode.kLocalDynamicAttr)

			# Create a plug to set and retrive value off the node.
			#
			plug = OpenMaya.MPlug(dependNode, newAttr)

			# Instantiate blindDoubleData and set its value.
			#
			newData = OpenMayaMPx.asMPxPtr(blindDoubleData())
			newData.setValue(3.2)

			# Set the value for the plug.
			#
			plug.setMPxData(newData)

			# Now try to retrieve the value off the plug as an MObject.
			#
			try:
				sData = plug.asMObject()
			except:
				error("Error getting value off plug")
				continue
				
			# Convert the data back to MPxData.
			#
			pdFn = OpenMaya.MFnPluginData(sData)
			data = pdFn.constData()

			# Get the value.
			#
			if not data:
				error("Error: failed to retrieve data.")
				continue
				
			self.__iter.next()
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:69,代码来源:blindDoubleDataCmd.py

示例13: cmdCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def cmdCreator():
	return OpenMayaMPx.asMPxPtr(BasicObjectSetTest())
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:4,代码来源:basicObjectSet.py

示例14: nodeCreator

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
def nodeCreator():
	return OpenMayaMPx.asMPxPtr(BasicObjectSet())
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:4,代码来源:basicObjectSet.py

示例15: create

# 需要导入模块: from maya import OpenMayaMPx [as 别名]
# 或者: from maya.OpenMayaMPx import asMPxPtr [as 别名]
 def create( ):
  return OpenMayaMPx.asMPxPtr( kgmEngine( ) )
开发者ID:nocs13,项目名称:kgmEngine,代码行数:4,代码来源:kgmExport.py


注:本文中的maya.OpenMayaMPx.asMPxPtr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。