예제 #1
0
    def setUpClass(cls):
        # The test USD data is authored Z-up, so make sure Maya is configured
        # that way too.
        cmds.upAxis(axis='z')

        inputPath = fixturesUtils.setUpClass(__file__,
                                             initializeStandalone=False,
                                             loadPlugin=False)

        cls._baselineDir = os.path.join(
            inputPath, 'VP2RenderDelegatePointInstancesPickModeTest',
            'baseline')

        cls._testDir = os.path.abspath('.')

        # Store the previous USD point instances pick mode and selection kind
        # (or None if unset) so we can restore the state later.
        cls._pointInstancesPickModeOptionVarName = mayaUsdLib.OptionVarTokens.PointInstancesPickMode
        cls._prevPointInstancesPickMode = cmds.optionVar(
            query=cls._pointInstancesPickModeOptionVarName) or None

        cls._selectionKindOptionVarName = mayaUsdLib.OptionVarTokens.SelectionKind
        cls._prevSelectionKind = cmds.optionVar(
            query=cls._selectionKindOptionVarName) or None

        mayaUtils.openPointInstancesGrid14Scene()
예제 #2
0
 def testInstancesGrid14(self):
     mayaUtils.openPointInstancesGrid14Scene()
     cmds.FrameAllInAllViews()
     # Set the USD point instances pick mode to "Instances" so that we pick
     # individual point instances during the test.
     cmds.optionVar(stringValue=(
         testUtilsSelectabilityPointInstanceSelection._pointInstancesPickModeOptionVarName, 'Instances'))
     self._RunTest(14)
예제 #3
0
    def testPointInstancerGrid14(self):
        mayaUtils.openPointInstancesGrid14Scene()
        cmds.FrameAllInAllViews()
        # Set the USD point instances pick mode to "PointInstancer" so that we pick
        # the instancer and not point instances during the test.
        cmds.optionVar(stringValue=(
            testUtilsSelectabilityPointInstanceSelection._pointInstancesPickModeOptionVarName, 'PointInstancer'))

        # In USD versions before 21.05, the point instancer pick mode did not exists.
        # For those version we end-up selecting the prototypes, of which there are 7.
        expectedCount = 1 if Usd.GetVersion() >= (0, 21, 2) else 7

        self._RunTest(expectedCount)
예제 #4
0
 def testPointInstancerGrid14(self):
     self._numInstances = 14
     self._testName = 'Grid_14'
     mayaUtils.openPointInstancesGrid14Scene()
     self._RunTest()
예제 #5
0
    def setUp(self):
        self.assertTrue(self._pluginsLoaded)

        mayaUtils.openPointInstancesGrid14Scene()