Python maya.OpenMayaMPx.asMPxPtr() Examples

The following are 28 code examples of maya.OpenMayaMPx.asMPxPtr(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module maya.OpenMayaMPx , or try the search function .
Example #1
Source File: SimpleCommand.py    From tutorials with MIT License 5 votes vote down vote up
def cmdCreator():
    # Create the command
    return OpenMayaMPx.asMPxPtr( SimpleCommand() )

# Syntax creator 
Example #2
Source File: pushDeformer.py    From AdvancedPythonForMaya with GNU General Public License v3.0 5 votes vote down vote up
def creator(cls):
        # Unlike OpenMaya API 2, we need to return this as a MPxPtr instead
        return ompx.asMPxPtr(cls()) 
Example #3
Source File: characterRoot.py    From AdvancedPythonForMaya with GNU General Public License v3.0 5 votes vote down vote up
def creator(cls):
        return ompx.asMPxPtr(cls()) 
Example #4
Source File: swingtwist.py    From cmt with MIT License 5 votes vote down vote up
def creator(cls):
        return OpenMayaMPx.asMPxPtr(SwingTwistCommand()) 
Example #5
Source File: swingtwist.py    From cmt with MIT License 5 votes vote down vote up
def creator(cls):
        return OpenMayaMPx.asMPxPtr(cls()) 
Example #6
Source File: instanceAlongCurve.py    From instanceAlongCurve with MIT License 5 votes vote down vote up
def nodeCreator():
        return OpenMayaMPx.asMPxPtr( instanceAlongCurveLocatorManip() ) 
Example #7
Source File: instanceAlongCurve.py    From instanceAlongCurve with MIT License 5 votes vote down vote up
def cmdCreator():
        return OpenMayaMPx.asMPxPtr( instanceAlongCurveCommand() ) 
Example #8
Source File: instanceAlongCurve.py    From instanceAlongCurve with MIT License 5 votes vote down vote up
def nodeCreator():
        return OpenMayaMPx.asMPxPtr( instanceAlongCurveLocator() ) 
Example #9
Source File: oyClosestPointOnMesh.py    From anima with MIT License 5 votes vote down vote up
def nodeCreator():
    return OpenMayaMPx.asMPxPtr(oyClosestPointOnMesh())


# initializer 
Example #10
Source File: oyTrajectoryDrawer.py    From anima with MIT License 5 votes vote down vote up
def nodeCreator():
    '''creator
    '''
    return OpenMayaMPx.asMPxPtr( oyTrajectoryDrawer() ) 
Example #11
Source File: randomizeUVDeformer.py    From anima with MIT License 5 votes vote down vote up
def nodeCreator():
    """creates the node
    """
    return_data = OpenMayaMPx.asMPxPtr(RandomizeDeformer())
    return return_data 
Example #12
Source File: closestPointOnCurve.py    From anima with MIT License 5 votes vote down vote up
def nodeCreator():
    return OpenMayaMPx.asMPxPtr(closestPointOnCurve())

# initializer 
Example #13
Source File: oyCenterOfMass.py    From anima with MIT License 5 votes vote down vote up
def nodeCreator():
    """creator
    """
    return OpenMayaMPx.asMPxPtr( oyCenterOfMass() ) 
Example #14
Source File: loadOsm2maya.py    From osm2maya with GNU General Public License v3.0 5 votes vote down vote up
def translatorCreator():
        return OpenMayaMPx.asMPxPtr(osm2mayaTranslator()) 
Example #15
Source File: spore_sampler.py    From spore with MIT License 5 votes vote down vote up
def creator():
    return ompx.asMPxPtr(SporeSampler())


# Syntax creator 
Example #16
Source File: shakeNode.py    From tutorials with MIT License 5 votes vote down vote up
def nodeCreator():
	return OpenMayaMPx.asMPxPtr( ShakeNode() )


# Maya expects this function, to initialize
# the node class ONCE when the plugin is loaded
# It sets up the attributes 
Example #17
Source File: cmdx.py    From cmdx with BSD 2-Clause "Simplified" License 5 votes vote down vote up
def initializeManipulator1(Manipulator):
    def _manipulatorCreator():
        return ompx1.asMPxPtr(Manipulator())

    def _manipulatorInit():
        ompx1.MPxManipContainer.addToManipConnectTable(Manipulator.ownerid)
        ompx1.MPxManipContainer.initialize()

    def initializePlugin(obj):
        version = ".".join(map(str, Manipulator.version))
        plugin = ompx1.MFnPlugin(obj, "Cmdx", version, "Any")

        # NOTE(marcus): The name *must* end with Manip
        # See https://download.autodesk.com/us/maya/2011help
        #     /API/class_m_px_manip_container.html
        #     #e95527ff30ae53c8ae0419a1abde8b0c
        assert Manipulator.name.endswith("Manip"), (
            "Manipulator '%s' must have the name of a plug-in, "
            "and end with 'Manip'"
        )

        plugin.registerNode(
            Manipulator.name,
            Manipulator.typeid,
            _manipulatorCreator,
            _manipulatorInit,
            ompx1.MPxNode.kManipContainer
        )

    return initializePlugin 
Example #18
Source File: P4Maya.py    From P4VFX with MIT License 5 votes vote down vote up
def cmdCreator():
    return OpenMayaMPx.asMPxPtr( scriptedCommand() )
    
# Initialize the script plug-in 
Example #19
Source File: glTFTranslator.py    From maya-glTF with MIT License 5 votes vote down vote up
def translator_creator():
    return OpenMayaMPx.asMPxPtr( GLTFTranslator() )

# initialize the script plug-in 
Example #20
Source File: paintSmoothWeightsCtxCommands.py    From maya-skinning-tools with GNU General Public License v3.0 5 votes vote down vote up
def creatorUpdate():       
    return OpenMayaMPx.asMPxPtr(SmoothWeightsCtxUpdate()) 
Example #21
Source File: paintSmoothWeightsCtxCommands.py    From maya-skinning-tools with GNU General Public License v3.0 5 votes vote down vote up
def creatorInitialize():     
    return OpenMayaMPx.asMPxPtr(SmoothWeightsCtxInitialize()) 
Example #22
Source File: paintRemoveInfluenceCtxCommands.py    From maya-skinning-tools with GNU General Public License v3.0 5 votes vote down vote up
def creatorAfter():
    return OpenMayaMPx.asMPxPtr(RemoveInfluenceCtxAfter()) 
Example #23
Source File: paintRemoveInfluenceCtxCommands.py    From maya-skinning-tools with GNU General Public License v3.0 5 votes vote down vote up
def creatorBefore():     
    return OpenMayaMPx.asMPxPtr(RemoveInfluenceCtxBefore()) 
Example #24
Source File: paintRemoveInfluenceCtxCommands.py    From maya-skinning-tools with GNU General Public License v3.0 5 votes vote down vote up
def creatorInitialize():     
    return OpenMayaMPx.asMPxPtr(RemoveInfluenceCtxInitialize()) 
Example #25
Source File: spore_command.py    From spore with MIT License 5 votes vote down vote up
def creator():
        return ompx.asMPxPtr(SporeCommand()) 
Example #26
Source File: spore_context.py    From spore with MIT License 5 votes vote down vote up
def creator():
        return ompx.asMPxPtr(SporeContextCommand()) 
Example #27
Source File: spore_context.py    From spore with MIT License 5 votes vote down vote up
def makeObj(self):
        return ompx.asMPxPtr(SporeContext()) 
Example #28
Source File: spore_context.py    From spore with MIT License 5 votes vote down vote up
def creator():
        return ompx.asMPxPtr(SporeToolCmd())