Exemplo n.º 1
0
    def setUpClass(cls):
        fixturesUtils.readOnlySetUpClass(__file__, loadPlugin=False)
        if not cls.pluginsLoaded:
            cls.pluginsLoaded = mayaUtils.isMayaUsdPluginLoaded()

        # Create a pure Maya scene to reference in.
        cls.mayaSceneStr = cls.createSimpleMayaScene()
Exemplo n.º 2
0
    def setUpClass(cls):
        fixturesUtils.readOnlySetUpClass(__file__, loadPlugin=False)

        if not cls.pluginsLoaded:
            cls.pluginsLoaded = mayaUtils.isMayaUsdPluginLoaded()

        # Open top_layer.ma scene in testSamples
        mayaUtils.openTopLayerScene()

        random.seed()
Exemplo n.º 3
0
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)

        usdFile = os.path.join(inputPath, "UsdImportMeshTest", "Mesh.usda")
        cmds.usdImport(file=usdFile, shadingMode=[
            ['none', 'default'],
        ])
Exemplo n.º 4
0
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)
        cmds.file(new=True, force=True)

        # We need to use different input usd files depending on the version of USD.
        # We do this because USD introduced breaking changes on lights in USD 21.*
        # More precisely :
        #
        # - Before USD 21.* : lights attributes didn't have any prefix. Attributes
        #                     were named "intensity", "color", etc...
        # - In 21.02        : The attributes from light schemas were added a
        #                     namespace "inputs". But attributes from UsdLuxShapingAPI
        #                     (used for spot lights) or UsdLuxShadowsAPI (for shadows)
        #                     were still left without this namespace
        # - In 21.05        : Attributes from UsdLuxShadows and UsdLuxShapingAPI also
        #                     have a namespace "inputs"
        testFile = "LightsTest.usda"
        usdVersion = Usd.GetVersion()
        if usdVersion < (0, 21, 2):
            testFile = "LightsTest_2011.usda"
        elif usdVersion == (0, 21, 2):
            testFile = "LightsTest_2102.usda"

        # Import from USD.
        usdFilePath = os.path.join(inputPath, "UsdImportLightTest", testFile)
        cmds.usdImport(file=usdFilePath, readAnimData=True)
        cls._stage = Usd.Stage.Open(usdFilePath)
Exemplo n.º 5
0
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)

        usdFile = os.path.join(inputPath, "UsdImportColorSetsTest",
                               "UsdImportColorSetsTest.usda")
        cmds.usdImport(file=usdFile,
                       shadingMode='none',
                       excludePrimvar='ExcludeMe')
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)
        cmds.file(new=True, force=True)

        # Import from USD.
        usdFilePath = os.path.join(inputPath, "UsdImportShadingModeDisplayColor", "RedCube.usda")
        cmds.usdImport(file=usdFilePath, shadingMode=[['displayColor', 'default'], ])

        cls._stage = Usd.Stage.Open(usdFilePath)
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)
        cmds.file(new=True, force=True)

        # Import the USD file.
        usdFilePath = os.path.join(inputPath, "UsdImportCameraTest",
                                   "UsdImportCameraTest.usda")
        cmds.usdImport(file=usdFilePath, readAnimData=True)

        cls._stage = Usd.Stage.Open(usdFilePath)
Exemplo n.º 8
0
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)

        cmds.namespace(add='unique_namespace_1')

        usdFile = os.path.join(inputPath, "UsdImportMayaReferenceTest",
                               "MayaReference.usda")
        cmds.usdImport(file=usdFile, shadingMode=[
            ['none', 'default'],
        ])
    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.readOnlySetUpClass(
            __file__, initializeStandalone=False)

        cls._testName = 'PxrUsdMayaGLTest'
        cls._inputDir = os.path.join(inputPath, cls._testName)
Exemplo n.º 10
0
    def setUpClass(cls):
        cls.asFloat2 = mayaUsdLib.ReadUtil.ReadFloat2AsUV()
        cls.inputPath = fixturesUtils.readOnlySetUpClass(__file__)

        if cls.asFloat2: 
            usdFile = os.path.join(cls.inputPath, "UsdImportUVSetsFloatTest", "UsdImportUVSetsTest_Float.usda")
        else:
            usdFile = os.path.join(cls.inputPath, "UsdImportUVSetsTest", "UsdImportUVSetsTest.usda")

        cmds.usdImport(file=usdFile, shadingMode='none')
Exemplo n.º 11
0
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)
        cmds.file(new=True, force=True)

        cmds.loadPlugin('RenderMan_for_Maya', quiet=True)

        # Import from USD.
        usdFilePath = os.path.join(inputPath, "UsdImportRfMLightTest", "RfMLightsTest.usda")
        cmds.usdImport(file=usdFilePath, shadingMode=[['pxrRis', 'default'], ], readAnimData=True)

        cls._stage = Usd.Stage.Open(usdFilePath)
Exemplo n.º 12
0
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)
        cmds.file(new=True, force=True)

        # Import from USD.
        usdFilePath = os.path.join(inputPath, "UsdImportShadingModePxrRis",
                                   "MarbleCube.usda")

        cmds.usdImport(file=usdFilePath, shadingMode='pxrRis')

        cls._stage = Usd.Stage.Open(usdFilePath)
Exemplo n.º 13
0
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)

        usdFilePath = os.path.join(inputPath, 'UsdImportRfMShadersTest',
            'MarbleCube.usda')

        cls._stage = Usd.Stage.Open(usdFilePath)

        cmds.file(new=True, force=True)

        cmds.mayaUSDImport(file=usdFilePath, shadingMode=[['useRegistry', 'rendermanForMaya'], ])
Exemplo n.º 14
0
 def setUpClass(cls):
     cls.inputPath = fixturesUtils.readOnlySetUpClass(__file__)
     usdFile = os.path.join(cls.inputPath, "UsdImportMaterialX",
                            "UsdImportMaterialX.usda")
     options = ["shadingMode=[[useRegistry,MaterialX]]", "primPath=/"]
     cmds.file(usdFile,
               i=True,
               type="USD Import",
               ignoreVersion=True,
               ra=True,
               mergeNamespacesOnClash=False,
               namespace="Test",
               pr=True,
               importTimeRange="combine",
               options=";".join(options))
Exemplo n.º 15
0
    def setUpClass(cls):
        cls.asFloat2 = mayaUsdLib.ReadUtil.ReadFloat2AsUV()
        cls.defaultUVName = "st"
        if mayaUsdLib.ReadUtil.ReadSTAsMap1():
            cls.defaultUVName = "map1"

        cls.inputPath = fixturesUtils.readOnlySetUpClass(__file__)

        if cls.asFloat2:
            usdFile = os.path.join(cls.inputPath, "UsdImportUVSetsFloatTest",
                                   "UsdImportUVSetsTest_Float.usda")
        else:
            usdFile = os.path.join(cls.inputPath, "UsdImportUVSetsTest",
                                   "UsdImportUVSetsTest.usda")

        cmds.usdImport(file=usdFile, shadingMode=[
            ["none", "default"],
        ])
Exemplo n.º 16
0
    def setUpClass(cls):
        fixturesUtils.readOnlySetUpClass(__file__, loadPlugin=False)

        if not cls.pluginsLoaded:
            cls.pluginsLoaded = mayaUtils.isMayaUsdPluginLoaded()
Exemplo n.º 17
0
 def setUpClass(cls):
     cls.inputPath = fixturesUtils.readOnlySetUpClass(__file__)
Exemplo n.º 18
0
 def setUp(self):
     self.inputPath = fixturesUtils.readOnlySetUpClass(__file__)
     cmds.file(new=True, force=True)
Exemplo n.º 19
0
    def setUpClass(cls):
        inputPath = fixturesUtils.readOnlySetUpClass(__file__)

        usdFile = os.path.join(inputPath, "UsdImportMayaReferenceTest",
                               "MayaReference.usda")
        cmds.usdImport(file=usdFile, shadingMode='none')
 def setUpClass(cls):
     fixturesUtils.readOnlySetUpClass(__file__, loadPlugin=False)