Example #1
0
    def test_poseLoad_relativeAbsolute_mirrorIndex(self):
        '''
        load the pose with relative and check against the store 'absolute' posefile
        '''
        # mirrorIndex Match -------------------------------------------------
        self.poseData.matchMethod = 'mirrorIndex'
        cmds.currentTime(29)
        filepath = os.path.join(self.poseFolder, 'jump_f9.pose')
        cmds.select('R_Foot_Ctrl')
        self.poseData.poseLoad(self.rootNode,
                               filepath=filepath,
                               useFilter=True,
                               relativePose=True,
                               relativeRots='projected',
                               relativeTrans='absolute')

        #the pose is no longer in the same space due to the relative code,
        #we need up update the internal pose before comparing
        self.poseData.buildDataMap(self.rootNode)
        assert not r9Pose.PoseCompare(
            self.poseData, filepath, compareDict='poseDict').compare()
        assert r9Pose.PoseCompare(self.poseData,
                                  os.path.join(self.poseFolder,
                                               'jump_f9_absolute29.pose'),
                                  compareDict='poseDict').compare()
Example #2
0
    def test_poseLoadMeta_relativeProjected(self):
        '''
        load the pose with relative and check against the store 'projected' posefile
        '''
        cmds.currentTime(0)
        requiredPose = os.path.join(self.poseFolder,
                                    'jump_f218_projected.pose')

        filepath = os.path.join(self.poseFolder, 'jump_f218.pose')
        cmds.select('L_Foot_Ctrl')
        self.poseData.poseLoad(self.mRig.mNode,
                               filepath=filepath,
                               useFilter=True,
                               relativePose=True,
                               relativeRots='projected',
                               relativeTrans='projected')
        print '\n\n\n##########   MAYA UP AXIS : ###################', r9Setup.mayaUpAxis(
        )
        print 'status : ', self.mRig.poseCompare(requiredPose,
                                                 compareDict='poseDict',
                                                 supressWarning=False).status
        assert self.mRig.poseCompare(
            requiredPose, compareDict='poseDict',
            supressWarning=False).status  # using the mRig internal wrap

        self.mRig.poseCacheStore(
        )  # build an internal poseObj on the mRig now that we've loaded in relative space
        assert not r9Pose.PoseCompare(
            self.mRig.poseCache, filepath, compareDict='poseDict').compare()
        assert r9Pose.PoseCompare(self.mRig.poseCache,
                                  requiredPose,
                                  compareDict='poseDict').compare()
Example #3
0
    def test_poseLoadMeta_relativeAbsolute(self):
        '''
        load the pose with relative and check against the store 'absolute' posefile
        '''
        cmds.currentTime(29)
        filepath = os.path.join(self.poseFolder, 'jump_f9.pose')
        cmds.select('R_Foot_Ctrl')
        self.poseData.poseLoad(self.mRig.mNode, filepath=filepath, useFilter=True,
                               relativePose=True,
                               relativeRots='projected',
                               relativeTrans='absolute')

        self.mRig.poseCacheStore()  # build an internal poseObj on the mRig now that we've loaded in relative space
        assert not r9Pose.PoseCompare(self.mRig.poseCache, filepath, compareDict='poseDict').compare()
        assert r9Pose.PoseCompare(self.mRig.poseCache, os.path.join(self.poseFolder, 'jump_f9_absolute29.pose'),
                                  compareDict='poseDict').compare()
Example #4
0
 def test_poseLoadMeta(self):
     cmds.currentTime(0)
     filepath = os.path.join(self.poseFolder, 'jump_f218.pose')
     self.poseData.poseLoad(self.mRig.mNode,
                            filepath=filepath,
                            useFilter=True)
     assert r9Pose.PoseCompare(self.poseData, filepath)
Example #5
0
    def test_poseLoad_relativeProjected_mirrorIndex(self):
        '''
        load the pose with relative and check against the store 'projected' posefile
        '''
        # mirrorIndex Match -------------------------------------------------
        self.poseData.matchMethod = 'mirrorIndex'
        cmds.currentTime(0)
        requiredPose = os.path.join(self.poseFolder,
                                    'jump_f218_projected.pose')

        filepath = os.path.join(self.poseFolder, 'jump_f218.pose')
        cmds.select('L_Foot_Ctrl')
        self.poseData.poseLoad(self.rootNode,
                               filepath=filepath,
                               useFilter=True,
                               relativePose=True,
                               relativeRots='projected',
                               relativeTrans='projected')
        print '\n\n\n##########   MAYA UP AXIS : ###################', r9Setup.mayaUpAxis(
        )

        #the pose is no longer in the same space due to the relative code,
        #we need up update the internal pose before comparing
        self.poseData.buildDataMap(self.rootNode)
        assert r9Pose.PoseCompare(self.poseData, requiredPose).compare()
Example #6
0
 def test_poseLoad_mirrorIndex(self):
     self.poseData.matchMethod = 'mirrorIndex'
     cmds.currentTime(0)
     filepath = os.path.join(self.poseFolder, 'jump_f218.pose')
     self.poseData.poseLoad(self.rootNode,
                            filepath=filepath,
                            useFilter=True)
     assert r9Pose.PoseCompare(self.poseData, filepath).compare()