Esempio n. 1
0
def add_ldt_menus():
    """Add Look dev Tools menus to dccs."""
    from ldt import context
    dcc = context.dcc()
    if dcc == 'Maya':
        import pymel.core as pm
        if pm.menu('LookDevTools', l=u'LookDevTools', ex=True):
            logger.info('menu already exists.')
        else:
            pm.menu('LookDevTools', l=u'LookDevTools', to=True)
            pm.menuItem(l=u'Open', c='import ldt;reload(ldt)')
            pm.setParent("..")
Esempio n. 2
0
 def __init__(self):
     """Check dcc context, and build the ui if context is correct."""
     dcc = context.dcc()
     if dcc == 'Katana':
         import ldtkatana
         logger.info('KatanaSurfacingProjects loaded')
         self.build_ui()
     else:
         logger.warning(
             'KatanaSurfacingProjects  not loaded, dcc libs not found')
         self.plugin_layout = QtWidgets.QWidget()
         self.label_ui = QtWidgets.QLabel(self.plugin_layout)
         self.label_ui.setText(
             'KatanaSurfacingProjects\nPlugin not available in this application'
         )
Esempio n. 3
0
 def __init__(self):
     """Check dcc context, and build the ui if context is correct."""
     # Load dcc python packages inside a try, to catch the application
     # environment, this will be replaced by IPlugin Categories
     dcc = context.dcc()
     if dcc == 'Maya':
         logger.info('MayaSurfacingProjects loaded')
         self.build_ui()
     else:
         logger.warning(
             'MayaSurfacingProjects  not loaded, dcc libs not found')
         self.plugin_layout = QtWidgets.QWidget()
         self.label_ui = QtWidgets.QLabel(self.plugin_layout)
         self.label_ui.setText(
             'MayaSurfacingProjects\nPlugin not available in this application'
         )
Esempio n. 4
0
   :synopsis: MayaSurfacingProjects Plugin. Organizes scenes for export to surfacing.

.. moduleauthor:: Ezequiel Mastrasso

"""

import logging
from yapsy.IPlugin import IPlugin
from Qt import QtGui, QtWidgets, QtCore
from Qt.QtWidgets import QApplication, QWidget, QLabel, QMainWindow
import ldtmaya
from ldt import context

logger = logging.getLogger(__name__)

dcc = context.dcc()
if dcc == 'Maya':
    import pymel.core as pm
    import ldtmaya


class MayaSurfacingProjects(IPlugin):
    """Plug-in to Organize meshes for surfacing in Maya."""

    name = "MayaSurfacingProjects Plugin"

    plugin_layout = None

    def __init__(self):
        """Check dcc context, and build the ui if context is correct."""
        # Load dcc python packages inside a try, to catch the application