# by trade secret or copyright law. Dissemination of this # information or reproduction of this material is strictly # forbidden unless prior written permission is obtained from # Unity Technology Aps. # ######################################################################## #+ import sys import maya.OpenMayaMPx as OpenMayaMPx import maya.cmds from UnityFbxForMaya import (version, commands, ui, debug) kPluginInfo = { 'name': version.pluginName(), 'version': version.versionName(), 'vendor': version.vendorName() } kVerbose = True kHeadlessInstall = (maya.cmds.optionVar( exists='UnityFbxForMaya_Headless') and maya.cmds.optionVar(q='UnityFbxForMaya_Headless') == 1) # initialize the script plug-in def initializePlugin(mobject): pluginFn = OpenMayaMPx.MFnPlugin(mobject, kPluginInfo['vendor'], str(kPluginInfo['version'])) try: if debug.EnableDebugMessages: sys.stdout.write('loading %s\n'%kPluginInfo['name']) commands.register(pluginFn) if not kHeadlessInstall: ui.register(pluginFn)
def displayWarning(self, msg): OpenMaya.MGlobal.displayWarning('{0}: {1}'.format(pluginName(), msg))
def displayInfo(self, msg): OpenMaya.MGlobal.displayInfo('{0}: {1}'.format(pluginName(), msg))
# information or reproduction of this material is strictly # forbidden unless prior written permission is obtained from # Unity Technology Aps. # ######################################################################## #+ import sys import maya.OpenMayaMPx as OpenMayaMPx import maya.cmds from UnityFbxForMaya import (version, commands, ui, debug) kPluginInfo = { 'name': version.pluginName(), 'version': version.versionName(), 'vendor': version.vendorName() } kVerbose = True kHeadlessInstall = (maya.cmds.optionVar(exists='UnityFbxForMaya_Headless') and maya.cmds.optionVar(q='UnityFbxForMaya_Headless') == 1) # initialize the script plug-in def initializePlugin(mobject): pluginFn = OpenMayaMPx.MFnPlugin(mobject, kPluginInfo['vendor'], str(kPluginInfo['version'])) try: if debug.EnableDebugMessages: sys.stdout.write('loading %s\n' % kPluginInfo['name'])