Пример #1
0
def initializePlugin(obj):
    plugin = OpenMayaMPx.MFnPlugin(obj)

    try:
        plugin.registerNode(ms_environment_nodeTypeName, ms_environment_nodeTypeId, ms_environment_nodeCreator, ms_environment_nodeInitializer, OpenMayaMPx.MPxNode.kLocatorNode)
    except:
        sys.stderr.write("Failed to register node: %s" % ms_environment_nodeTypeName)

    try:
        plugin.registerNode(ms_renderSettings_nodeTypeName, ms_renderSettings_nodeTypeId, ms_renderSettings_nodeCreator, ms_renderSettings_nodeInitializer)
    except:
        sys.stderr.write("Failed to register node: %s\n" % ms_renderSettings_nodeTypeName)

    # load objExport plugin if its not loaded yet
    try:
        if not cmds.pluginInfo('objExport', query=True, loaded=True):
            cmds.loadPlugin('objExport')
        if not cmds.pluginInfo('ms_appleseed_material.py', query=True, loaded=True):
            cmds.loadPlugin('ms_appleseed_material.py')
        if not cmds.pluginInfo('ms_appleseed_shading_node.py', query=True, loaded=True):
            cmds.loadPlugin('ms_appleseed_shading_node.py')
    except: 
        print 'objExport plugin could not be loaded, cannot load mayaseed'

    ms_menu.createMenu()
    ms_menu.buildMenu()
Пример #2
0
def initializePlugin(obj):

    import ms_appleseed_material
    ms_appleseed_material.initializePlugin(obj)

    import ms_appleseed_shading_node
    ms_appleseed_shading_node.initializePlugin(obj)

    import ms_environment
    ms_environment.initializePlugin(obj)

    import ms_physical_environment
    ms_physical_environment.initializePlugin(obj)

    import ms_render_settings
    ms_render_settings.initializePlugin(obj)

    import ms_appleseed_scene
    ms_appleseed_scene.initializePlugin(obj)

    ms_menu.createMenu()
    ms_menu.buildMenu()

    ms_shelf.create_if_absent()

    import AEms_renderSettingsTemplate

    appleseed_version_notice = 'This version of mayaseed is designed to work with {0}. Other versions of appleseed may work but have not been tested.'.format(
        ms_commands.RECCOMENDED_APPLESEED_VERSION)

    ms_commands.info(appleseed_version_notice)
Пример #3
0
def initializePlugin(obj):
    #register nodes
    plugin = OpenMayaMPx.MFnPlugin(obj)
    try:
        plugin.registerNode(ms_environment_nodeTypeName, ms_environment_nodeTypeId, ms_environment_nodeCreator, ms_environment_nodeInitializer, OpenMayaMPx.MPxNode.kLocatorNode)
    except:
        sys.stderr.write( "Failed to register node: %s" % ms_environment_nodeTypeName)
    
    try:
        plugin.registerNode( ms_renderSettings_nodeTypeName, ms_renderSettings_nodeTypeId, ms_renderSettings_nodeCreator, ms_renderSettings_nodeInitializer )
    except:
        sys.stderr.write( "Failed to register command: %s\n" % ms_renderSettings_nodeTypeName )
    
    #create menu
    ms_menu.createMenu()
    ms_menu.buildMenu()
Пример #4
0
def initializePlugin(obj):
    try:
        import ms_appleseed_material
        ms_appleseed_material.initializePlugin(obj)

        import ms_appleseed_shading_node
        ms_appleseed_shading_node.initializePlugin(obj)
        
        import ms_environment
        ms_environment.initializePlugin(obj)
        
        import ms_physical_environment
        ms_physical_environment.initializePlugin(obj)

        import ms_render_settings
        ms_render_settings.initializePlugin(obj)
    
    except: 
        print 'Failed to register mayaseed plug-in'

    ms_menu.createMenu()
    ms_menu.buildMenu()