Esempio n. 1
0
    def test_bwav_handler(self):
        '''
        test the bwav handler and formatting of the data
        '''
        assert self.audioNode.isBwav()
        # print self.audioNode.bwav_timecodeFormatted()
        cmds.currentUnit(time='ntscf')
        assert r9General.getCurrentFPS() == 60
        print 'ntscf' , self.audioNode.bwav_timecodeFormatted()
        assert self.audioNode.bwav_timecodeFormatted() == '01:26:04:11'
        cmds.currentUnit(time='pal')
        assert r9General.getCurrentFPS() == 25
        # print 'pal : ', self.audioNode.bwav_timecodeFormatted()
        assert self.audioNode.bwav_timecodeFormatted() == '01:26:04:05'
        # print self.audioNode.bwav_timecodeFormatted(smpte=False)
        assert self.audioNode.bwav_timecodeFormatted(smpte=False) == '01:26:04:172'
        assert self.audioNode.bwav_timecodeReference() == 227739993
        assert self.audioNode.bwav_timecodeMS() == 5164172.1768707484

        # need to get the bWav header to bind it to the var
        self.audioNode.bwav_getHeader()
        assert self.audioNode.bwav_HeaderData == {'AudioFormat': 0,
                                                 'BextVersion': 0,
                                                 'BitsPerSample': 0,
                                                 'ChunkSize': 732516,
                                                 'Description': 'This is a unitTest file for validating the Red9 broadcast wav extraction of metaData',
                                                 'Format': 'WAVE',
                                                 'InternalFormat': 'fmt ',
                                                 'OriginationDate': '2014-03-03',
                                                 'OriginationTime': '10:00:00',
                                                 'Originator': 'Pro Tools',
                                                 'OriginatorReference': 'ffgDDffdhgff',
                                                 'Subchunk1Size': 16,
                                                 'TimeReference': 227739993,
                                                 'TimeReferenceHigh': 0}
Esempio n. 2
0
def red9_help(*args):
    '''
    open up the Red9 help docs
    '''
    import Red9.core.Red9_General as r9General  # lazy load
    helpFile=os.path.join(red9ModulePath(),'docs',r'Red9-StudioTools Help.pdf')
    r9General.os_OpenFile(helpFile)
Esempio n. 3
0
def red9_vimeo(*args):
    """
    open up the Red9 Vimeo Channel
    """
    import Red9.core.Red9_General as r9General  # lazy load

    r9General.os_OpenFile("https://vimeo.com/user9491246")
 def test_bwav_handler(self):
     '''
     test the bwav handler and formatting of the data
     '''
     assert self.audioNode.isBwav()
     #print self.audioNode.bwav_timecodeFormatted()
     cmds.currentUnit(time='ntscf')
     assert r9General.getCurrentFPS()==60
     #print 'ntscf' ,  self.audioNode.bwav_timecodeFormatted()
     assert self.audioNode.bwav_timecodeFormatted()=='01:26:04:11'
     cmds.currentUnit(time='pal')
     assert r9General.getCurrentFPS()==25
     #print 'pal : ', self.audioNode.bwav_timecodeFormatted()
     assert self.audioNode.bwav_timecodeFormatted()=='01:26:04:05'
     #print self.audioNode.bwav_timecodeFormatted(smpte=False)
     assert self.audioNode.bwav_timecodeFormatted(smpte=False)=='01:26:04:172'
     assert self.audioNode.bwav_timecodeReference()==227739993
     assert self.audioNode.bwav_timecodeMS()==5164172.1768707484
     assert self.audioNode.bwav_HeaderData=={'AudioFormat': 0,
                                              'BextVersion': 0,
                                              'BitsPerSample': 0,
                                              'ChunkSize': 732516,
                                              'Description': 'This is a unitTest file for validating the Red9 broadcast wav extraction of metaData',
                                              'Format': 'WAVE',
                                              'InternalFormat': 'fmt ',
                                              'OriginationDate': '2014-03-03',
                                              'OriginationTime': '10:00:00',
                                              'Originator': 'Pro Tools',
                                              'OriginatorReference': 'ffgDDffdhgff',
                                              'Subchunk1Size': 16,
                                              'TimeReference': 227739993,
                                              'TimeReferenceHigh': 0}
Esempio n. 5
0
def red9_website_home(*args):
    """
    open up the Red9 Consultancy homepage
    """
    import Red9.core.Red9_General as r9General  # lazy load

    r9General.os_OpenFile("http://red9consultancy.com/")
Esempio n. 6
0
def red9_facebook(*args):
    """
    open up the Red9 Facebook Page
    """
    import Red9.core.Red9_General as r9General  # lazy load

    r9General.os_OpenFile("http://www.facebook.com/Red9StudioPack/")
Esempio n. 7
0
def red9_blog(*args):
    """
    open up the Red9 Blog
    """
    import Red9.core.Red9_General as r9General  # lazy load

    r9General.os_OpenFile("http://red9-consultancy.blogspot.com/")
Esempio n. 8
0
def red9_apidocs(*args):
    '''
    open up the Red9 Vimeo Channel
    '''
    import Red9.core.Red9_General as r9General  # lazy load
    apidocs=os.path.join(red9ModulePath(),'docs', 'html', 'index.html')
    r9General.os_OpenFile(apidocs)
Esempio n. 9
0
def red9_help(*args):
    '''
    open up the Red9 help docs
    '''
    import Red9.core.Red9_General as r9General  # lazy load
    helpFile=os.path.join(red9ModulePath(),'docs',r'Red9-StudioTools Help.pdf')
    r9General.os_OpenFile(helpFile)
Esempio n. 10
0
def red9_apidocs(*args):
    '''
    open up the Red9 Vimeo Channel
    '''
    import Red9.core.Red9_General as r9General  # lazy load
    apidocs = os.path.join(red9ModulePath(), 'docs', 'html', 'index.html')
    r9General.os_OpenFile(apidocs)
Esempio n. 11
0
 def test_basics(self):
     assert isinstance(self.audioNode, r9Audio.AudioNode)
     assert r9General.formatPath(self.audioNode.path)==r9General.formatPath(self.bwavpath)
     assert self.audioNode.audioNode=='bwav_test'
     assert self.audioNode.sample_width==2
     assert self.audioNode.sampleRate==44100
     assert self.audioNode.sample_bits==16
     assert self.audioNode.channels==1
Esempio n. 12
0
def red9_apidocs(*args):
    """
    open up the Red9 Vimeo Channel
    """
    import Red9.core.Red9_General as r9General  # lazy load

    apidocs = os.path.join(red9ModulePath(), "docs", "html", "index.html")
    r9General.os_OpenFile(apidocs)
Esempio n. 13
0
def red9_help(*args):
    """
    open up the Red9 help docs
    """
    import Red9.core.Red9_General as r9General  # lazy load

    helpFile = os.path.join(red9ModulePath(), "docs", r"Red9-StudioTools Help.pdf")
    r9General.os_OpenFile(helpFile)
Esempio n. 14
0
def get_pro_pack(*args):
    import Red9.core.Red9_General as r9General  # lazy load
    result=cmds.confirmDialog(title='Red9_StudioPack : build %f' % red9_getVersion(),
                       message=("Red9_ProPack Not Installed!\r\r"+
                                "Contact [email protected] for more information"),
                       button=['Red9Consultancy.com','Get_Pro','Close'],messageAlign='center')
    if result == 'Get_Pro':
        log.warning('Red9 ProPack systems not yet available - watch this space!')
    if result =='Red9Consultancy.com':
        r9General.os_OpenFile('http://red9consultancy.com/')
Esempio n. 15
0
def red9ContactInfo(*args):
    result=cmds.confirmDialog(title='Red9_StudioPack : build %f' % red9_getVersion(),
                       message=("Author: Mark Jackson\r\r"+
                                "Technical Animation Director\r\r"+
                                "Contact me at [email protected] for more information\r\r"+
                                "thanks for trying the toolset. If you have any\r"+
                                "suggestions or bugs please let me know!"),
                       button=['thankyou','ChangeLog'],messageAlign='center')
    if result == 'ChangeLog':
        import Red9.core.Red9_General as r9General  # lazy load
        r9General.os_OpenFile(os.path.join(red9ModulePath(),'changeLog.txt'))
Esempio n. 16
0
def get_pro_pack(*args):
    import Red9.core.Red9_General as r9General  # lazy load
    result = cmds.confirmDialog(
        title='Red9_StudioPack : build %f' % red9_getVersion(),
        message=("Red9_ProPack Not Installed!\r\r" +
                 "Contact [email protected] for more information"),
        button=['Red9Consultancy.com', 'Get_Pro', 'Close'],
        messageAlign='center')
    if result == 'Get_Pro':
        log.warning(
            'Red9 ProPack systems not yet available - watch this space!')
    if result == 'Red9Consultancy.com':
        r9General.os_OpenFile('http://red9consultancy.com/')
Esempio n. 17
0
def red9ContactInfo(*args):
    import Red9.core.Red9_General as r9General  # lazy load
    result=cmds.confirmDialog(title='Red9_StudioPack : build %f' % red9_getVersion(),
                       message=("Author: Mark Jackson\r\r"+
                                "Technical Animation Director\r\r"+
                                "Contact me at [email protected] for more information\r\r"+
                                "thanks for trying the toolset. If you have any\r"+
                                "suggestions or bugs please let me know!"),
                       button=['Red9Consultancy.com','ChangeLog','Close'],messageAlign='center')
    if result == 'ChangeLog':
        r9General.os_OpenFile(os.path.join(red9ModulePath(),'changeLog.txt'))
    if result =='Red9Consultancy.com':
        r9General.os_OpenFile('http://red9consultancy.com/')
    def test_funcs(self):
        assert isinstance(self.audioNode, r9Audio.AudioNode)
        assert r9General.formatPath(self.audioNode.path) == r9General.formatPath(self.bwavpath)
        assert self.audioNode.isLoaded
        assert cmds.ls(type='audio')[0] == 'bwav_test'
        assert self.audioNode.audioNode == 'bwav_test'

        assert self.audioNode.startFrame == 0
        self.audioNode.startFrame = 10
        assert self.audioNode.startFrame == 10
        assert cmds.getAttr('%s.offset' % self.audioNode.audioNode) == 10
        self.audioNode.offsetTime(25)
        assert self.audioNode.startFrame == 35

        assert cmds.getAttr('%s.mute' % self.audioNode.audioNode) == False
        self.audioNode.mute(True)
        assert cmds.getAttr('%s.mute' % self.audioNode.audioNode) == True
Esempio n. 19
0
    def test_funcs(self):
        assert isinstance(self.audioNode, r9Audio.AudioNode)
        assert r9General.formatPath(self.audioNode.path) == r9General.formatPath(self.bwavpath)
        assert self.audioNode.isLoaded
        assert cmds.ls(type='audio')[0] == 'bwav_test'
        assert self.audioNode.audioNode == 'bwav_test'

        assert self.audioNode.startFrame == 0
        self.audioNode.startFrame = 10
        assert self.audioNode.startFrame == 10
        assert cmds.getAttr('%s.offset' % self.audioNode.audioNode) == 10
        self.audioNode.offsetTime(25)
        assert self.audioNode.startFrame == 35

        assert cmds.getAttr('%s.mute' % self.audioNode.audioNode) == False
        self.audioNode.mute(True)
        assert cmds.getAttr('%s.mute' % self.audioNode.audioNode) == True
Esempio n. 20
0
def get_pro_pack(*args):
    try:
        #new pro_pack build calls
        import Red9.pro_pack.r9pro as r9pro
        r9pro.r9import('r9wtools')
        import r9wtools
        r9wtools.MailRegistration().show()
    except:
        #legacy
        import Red9.core.Red9_General as r9General  # lazy load
        result=cmds.confirmDialog(title='Red9_StudioPack : build %f' % red9_getVersion(),
                            message=("Red9_ProPack Not Installed!\r\r"+
                                     "Contact [email protected] for more information"),
                            button=['Red9Consultancy.com','Get_Pro','Close'],messageAlign='center')
        if result == 'Get_Pro':
            log.warning('Red9 ProPack systems not yet available - watch this space!')
        if result =='Red9Consultancy.com':
            r9General.os_OpenFile('http://red9consultancy.com/')
Esempio n. 21
0
def get_pro_pack(*args):
    try:
        #new pro_pack build calls
        import Red9.pro_pack.r9pro as r9pro
        r9pro.r9import('r9wtools')
        import r9wtools
        r9wtools.MailRegistration().show()
    except:
        #legacy
        import Red9.core.Red9_General as r9General  # lazy load
        result=cmds.confirmDialog(title='Red9_StudioPack : build %f' % red9_getVersion(),
                            message=("Red9_ProPack Not Installed!\r\r"+
                                     "Contact [email protected] for more information"),
                            button=['Red9Consultancy.com','Get_Pro','Close'],messageAlign='center')
        if result == 'Get_Pro':
            log.warning('Red9 ProPack systems not yet available - watch this space!')
        if result =='Red9Consultancy.com':
            r9General.os_OpenFile('http://red9consultancy.com/')
Esempio n. 22
0
def red9ContactInfo(*args):
    import Red9.core.Red9_General as r9General  # lazy load

    result = cmds.confirmDialog(
        title="Red9_StudioPack : build %f" % red9_getVersion(),
        message=(
            "Author: Mark Jackson\r\r"
            + "Technical Animation Director\r\r"
            + "Contact me at [email protected] for more information\r\r"
            + "thanks for trying the toolset. If you have any\r"
            + "suggestions or bugs please let me know!"
        ),
        button=["Red9Consultancy.com", "ChangeLog", "Close"],
        messageAlign="center",
    )
    if result == "ChangeLog":
        r9General.os_OpenFile(os.path.join(red9ModulePath(), "changeLog.txt"))
    if result == "Red9Consultancy.com":
        r9General.os_OpenFile("http://red9consultancy.com/")
def bake_binder_data(rootNode=None,
                     debugView=False,
                     runFilter=True,
                     ignoreInFilter=[]):
    '''
    From a given Root Node search all children for the 'BoundCtr' attr marker. If none
    were found then search for the BindNode attr and use the message links to walk to
    the matching Controller.
    Those found are then baked out and the marker attribute is deleted
    '''
    BoundCtrls = get_bound_controls(rootNode)

    # Found no Ctrls, try and walk the message from the BndNodes
    if not BoundCtrls:
        BndNodes = get_bind_nodes()
        for node in BndNodes:
            cons = cmds.listConnections('%s.%s' % (node, BNDNODE_MARKER))
            if cons:
                BoundCtrls.append(cmds.ls(cons[0], l=True)[0])
            else:
                log.info('Nothing connected to %s.%s' % (node, BNDNODE_MARKER))

    if BoundCtrls:
        try:
            if not debugView:
                cmds.refresh(su=True)
            with r9General.AnimationContext():
                cmds.bakeResults(BoundCtrls,
                                 simulation=True,
                                 sampleBy=1,
                                 time=(cmds.playbackOptions(q=True, min=True),
                                       cmds.playbackOptions(q=True, max=True)),
                                 disableImplicitControl=True,
                                 preserveOutsideKeys=True,
                                 sparseAnimCurveBake=True,
                                 removeBakedAttributeFromLayer=False,
                                 controlPoints=False,
                                 shape=False)

            for node in BoundCtrls:
                # Remove the BindMarker from the baked node
                try:
                    cmds.deleteAttr('%s.%s' % (node, BAKE_MARKER))
                except StandardError, error:
                    log.info(error)
            if ignoreInFilter:
                BoundCtrls = [
                    node for node in BoundCtrls
                    if node.split('|')[-1].split(':')[-1] not in ignoreInFilter
                ]
            if runFilter:
                cmds.filterCurve(BoundCtrls)
            cmds.delete(BoundCtrls, sc=True)  # static channels
        except StandardError, error:
            raise StandardError(error)
Esempio n. 24
0
def red9_vimeo(*args):
    '''
    open up the Red9 Vimeo Channel
    '''
    import Red9.core.Red9_General as r9General  # lazy load
    r9General.os_OpenFile('https://vimeo.com/user9491246')
Esempio n. 25
0
def red9_facebook(*args):
    '''
    open up the Red9 Facebook Page
    '''
    import Red9.core.Red9_General as r9General  # lazy load
    r9General.os_OpenFile('http://www.facebook.com/Red9StudioPack/')
Esempio n. 26
0
def red9_blog(*args):
    '''
    open up the Red9 Blog
    '''
    import Red9.core.Red9_General as r9General  # lazy load
    r9General.os_OpenFile('http://red9-consultancy.blogspot.com/')
Esempio n. 27
0
def red9_website_home(*args):
    '''
    open up the Red9 Consultancy homepage
    '''
    import Red9.core.Red9_General as r9General  # lazy load
    r9General.os_OpenFile('http://red9consultancy.com/')
poseBuffer.poseSave(nodes,filePath,useFilter=False)
poseBuffer.poseSave(nodes)
poseBuffer.metaPose=False
poseBuffer.buildInternalPoseData(nodes)
poseBuffer.thumbnailRes
poseBuffer.useFilter = False
poseBuffer.useFilter

poseBuffer.metaPose
poseBuffer._buildInfoBlock()
poseBuffer._buildPoseDict(nodes)
poseBuffer.rootJnt = nodes[0]
poseBuffer._buildSkeletonData(poseBuffer.rootJnt)
poseBuffer._buildSkeletonData(poseBuffer.rootJnt)
poseBuffer.poseDict

from Red9.core import Red9_PoseSaver as r9Pose
reload(r9Pose)
r9Pose.log.setLevel(r9Pose.logging.DEBUG)

poseBuffer = r9Pose.PoseData()
poseBuffer.poseSave(nodes,filePath)
poseBuffer.metaPose=False

#Thumbnail -------------------------------------------------------------------
from Red9.core import Red9_General as r9General
reload(r9General)
filePath = 'J:/repos/morpheusrig2/morpheusRig_v2/presets/test.bmp'
r9General.thumbnailApiFromView(filePath, 230, 230, compression='bmp', modelPanel='modelPanel4')

Esempio n. 29
0
 def setup(self):
     cmds.file(new=True, f=True)
     self.path = r9General.formatPath(
         os.path.join(r9Setup.red9ModulePath(), 'tests', 'testFiles',
                      'bwav_test.wav'))
Esempio n. 30
0
def red9_blog(*args):
    '''
    open up the Red9 Blog
    '''
    import Red9.core.Red9_General as r9General  # lazy load
    r9General.os_OpenFile('http://red9-consultancy.blogspot.com/')
Esempio n. 31
0
 def setup(self):
     cmds.file(new=True, f=True)
     self.path = r9General.formatPath(os.path.join(r9Setup.red9ModulePath(), 'tests', 'testFiles', 'bwav_test.wav'))