Example #1
1
File: gui.py Project: UIKit0/boRigs


from pymel.core import *
import boTweaks
from boTweaks import views
import viewGui.gui


LOG = boTweaks.getLogger('Gui')


VIEWS = views.VIEWS
WIN_NAME = 'boTweaksWin'

def Gui():
    title = 'Tweaks {0}'.format(boTweaks.__version__)
    g = viewGui.Gui(title, WIN_NAME, VIEWS, views.DEFAULT_VIEW)
    g.create()

Example #2
0


from pymel.core import *
import boTweaks
from boTweaks import core
import viewGui

LOG = boTweaks.getLogger('Views')

DEFAULT_VIEW = 'MainView'


class MainView(viewGui.View):
    displayName='Main'
    def buildBody(self):
        with columnLayout(adj=True, rs=2):
            with frameLayout(l='Setup', mw=4, mh=4, bs='out'):
                button(l='Tweak Selected', c=Callback(core.createTweaks))



VIEWS = [
    MainView,
]

Example #3
0


from pymel.core import *
import boTools.utils
import boTweaks


LOG = boTweaks.getLogger('core')

BASENAME_FMT = '{0}_tweak_f{1}'


def createTweaks(geo=None, frame=None):
    """Create a tweak for the given geometry on the given frame.
    If frame is None use the current time"""
    if geo is None:
        geo = selected()
    if geo == [] or geo is None:
        return
    
    if frame is None:
        frame = int(currentTime())
    
    LOG.debug('Creating tweaks for {0}'.format(geo))
    for obj in geo:
        createTweak(obj, frame)        



def createTweak(geo, frame):