def initializePlugin(obj):
    version = '.'.join(map(str, Plugin.version))
    plugin = om.MFnPlugin(obj, 'Cmdx', version, 'Any')
    try:
        if issubclass(Plugin, LocatorNode):
            plugin.registerNode(Plugin.name, Plugin.typeid, _nodeCreator, _nodeInit, om.MPxNode.kLocatorNode, Plugin.classification)
        elif issubclass(Plugin, DgNode):
            plugin.registerNode(Plugin.name, Plugin.typeid, _nodeCreator, _nodeInit)
        elif issubclass(Plugin, SurfaceShape):
            plugin.registerShape(Plugin.name, Plugin.typeid, _nodeCreator, _nodeInit, Plugin.uiCreator, Plugin.classification)
        else:
            raise TypeError(("Unsupported subclass: '%s'" % Plugin))
    except Exception:
        raise
    else:
        InstalledPlugins[Plugin.name] = Plugin
        Plugin.postInitialize()
def initializePlugin(obj):
    version = '.'.join(map(str, Plugin.version))
    plugin = om.MFnPlugin(obj, 'Cmdx', version, 'Any')
    try:
        if issubclass(Plugin, LocatorNode):
            plugin.registerNode(Plugin.name, Plugin.typeid, _nodeCreator, _nodeInit, om.MPxNode.kLocatorNode, Plugin.classification)
        elif issubclass(Plugin, DgNode):
            plugin.registerNode(Plugin.name, Plugin.typeid, _nodeCreator, _nodeInit)
        elif issubclass(Plugin, SurfaceShape):
            plugin.registerShape(Plugin.name, Plugin.typeid, _nodeCreator, _nodeInit, Plugin.uiCreator, Plugin.classification)
        else:
            raise TypeError(("Unsupported subclass: '%s'" % Plugin))
    except Exception:
        raise
    else:
        InstalledPlugins[Plugin.name] = Plugin
        Plugin.postInitialize()