Skip to content

Commit

Permalink
Merge pull request #756 from mattyjams/pr/migrate_pxrUsdTranslators_t…
Browse files Browse the repository at this point in the history
…ests

migrate remaining relevant pxrUsdTranslators tests to test/lib/usd/translators
  • Loading branch information
Krystian Ligenza authored Sep 8, 2020
2 parents e2060a8 + c2c11f6 commit 864556d
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 257 deletions.
31 changes: 0 additions & 31 deletions lib/usd/translators/overview.dox

This file was deleted.

8 changes: 2 additions & 6 deletions plugin/pxr/maya/lib/usdMaya/overview.dox
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
USD support in Maya is provided through several libraries and plugins:
- \subpage usd_maya_lib_usdMaya_page_front
This library provides reusable logic for using USD in Maya.
- \subpage usd_maya_plugin_pxrUsdTranslators_page_front
This plugin supports the built-in Maya nodes.
- \subpage usd_maya_plugin_pxrUsd_page_front
This is the main plugin that you load for USD functionality in Maya.
This is the main plugin that you load for Pixar's USD functionality in Maya.
- \subpage usd_maya_plugin_pxrUsdPreviewSurface_page_front
This is a Maya surface shader plugin node that mimics the UsdPreviewSurface shader in USD.

Expand All @@ -31,9 +29,7 @@ proxy shapes, and related Maya nodes.
## Translation Plugins

Plugins can provide new translation functions for USD types that are not built
into the core UsdMaya library. We ship plugins for the major Maya built-in node
types in the \ref usd_maya_plugin_pxrUsdTranslators_page_front
"pxrUsdTranslators Maya plugin".
into the core UsdMaya library.

When implementing new plugins, you must make sure to generate plugInfo.json
files, and that they are recognized by the Plug system. More details for
Expand Down
1 change: 0 additions & 1 deletion plugin/pxr/maya/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
add_subdirectory(pxrUsd)
add_subdirectory(pxrUsdPreviewSurface)
add_subdirectory(pxrUsdTranslators)
19 changes: 9 additions & 10 deletions plugin/pxr/maya/plugin/pxrUsd/overview.dox
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
/*!
\page usd_maya_plugin_pxrUsd_page_front PxrUsd : Main USD plugin for Maya
\page usd_maya_plugin_pxrUsd_page_front PxrUsd : Pixar's USD plugin for Maya
\if ( PIXAR_MFB_BUILD )
\mainpage PxrUsd : Main USD plugin for Maya
\mainpage PxrUsd : Pixar's USD plugin for Maya
\publicLib
\endif

## Overview

This is the main plugin that registers USD functionality in Maya, including
import and export commands, as well as USD nodes such as the reference assembly
and proxy shape.
This is the plugin that registers Pixar's USD functionality in Maya, including
import and export commands, as well as USD nodes such as Pixar's USD reference
assembly and the Pixar-specific USD proxy shape.

The core reusable logic is implemented in the
\ref usd_maya_lib_usdMaya_page_front "UsdMaya library". Translation
functionality for built-in Maya types is automatically loaded from the
\ref usd_maya_plugin_pxrUsdTranslators_page_front "pxrUsdTranslators plugin"
when needed.
The majority of the functionality has been absorbed into the core mayaUsd
library, and the "mayaUsdPlugin" should be favored over "pxrUsd". What remains
in the Pixar plugin is implemented in the
\ref usd_maya_lib_usdMaya_page_front "UsdMaya library".

*/
68 changes: 0 additions & 68 deletions plugin/pxr/maya/plugin/pxrUsdTranslators/CMakeLists.txt

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 3 additions & 0 deletions test/lib/usd/translators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set(TEST_SCRIPT_FILES
testUsdExportFrameOffset.py
testUsdExportInstances.py
testUsdExportLocator.py
testUsdExportMayaInstancer.py
testUsdExportMesh.py
testUsdExportNurbsCurve.py
testUsdExportOpenLayer.py
Expand All @@ -35,9 +36,11 @@ set(TEST_SCRIPT_FILES
testUsdExportShadingModePxrRis.py
testUsdExportSkeleton.py
testUsdExportStripNamespaces.py
testUsdExportStroke.py
testUsdExportVisibilityDefault.py
testUsdImportCamera.py
testUsdImportColorSets.py
testUsdImportExportScope.py
# To investigate: following test asserts in TDNshapeEditorManager.cpp, but
# passes. PPT, 17-Jun-20.
testUsdImportFrameRange.py
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//Maya ASCII 2019 scene
//Name: InstancerExportTest.ma
//Name: UsdExportMayaInstancerTest.ma
//Last modified: Tue, Dec 17, 2019 02:42:02 PM
//Codeset: UTF-8
requires maya "2019";
Expand Down Expand Up @@ -582,4 +582,4 @@ connectAttr "npPointsBlinn.msg" ":defaultShaderList1.s" -na;
connectAttr "npPointsVolume.msg" ":defaultShaderList1.s" -na;
connectAttr "defaultRenderLayer.msg" ":defaultRenderingList1.r" -na;
connectAttr "pCubeShape1.iog" ":initialShadingGroup.dsm" -na;
// End of InstancerExportTest.ma
// End of UsdExportMayaInstancerTest.ma
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//Maya ASCII 2016 scene
//Name: StrokeExportTest.ma
//Name: UsdExportStrokeTest.ma
//Last modified: Mon, Jun 24, 2019 04:49:14 PM
//Codeset: UTF-8
requires maya "2016";
Expand Down Expand Up @@ -71,9 +71,9 @@ createNode camera -s -n "sideShape" -p "side";
setAttr ".man" -type "string" "side_mask";
setAttr ".hc" -type "string" "viewSet -s %camera";
setAttr ".o" yes;
createNode transform -n "StrokeExportTest";
createNode transform -n "UsdExportStrokeTest";
rename -uid "B31EB8C0-0000-5E19-5D11-615E00000262";
createNode transform -n "Geom" -p "StrokeExportTest";
createNode transform -n "Geom" -p "UsdExportStrokeTest";
rename -uid "B31EB8C0-0000-5E19-5D11-616600000263";
createNode transform -n "Plane" -p "Geom";
rename -uid "B31EB8C0-0000-5E19-5D11-60CC00000254";
Expand Down Expand Up @@ -583,4 +583,4 @@ connectAttr "renderLayerManager.rlmi[0]" "defaultRenderLayer.rlid";
connectAttr ":time1.o" "crystals1.tim";
connectAttr "defaultRenderLayer.msg" ":defaultRenderingList1.r" -na;
connectAttr "PlaneShape.iog" ":initialShadingGroup.dsm" -na;
// End of StrokeExportTest.ma
// End of UsdExportStrokeTest.ma
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,28 @@
# limitations under the License.
#

import os
import unittest

from pxr import Gf
from pxr import Usd
from pxr import UsdGeom

from maya import cmds
from maya import standalone

import fixturesUtils

import os
import unittest

class testPxrUsdTranslatorsInstancer(unittest.TestCase):

class testUsdExportMayaInstancer(unittest.TestCase):

@classmethod
def setUpClass(cls):
standalone.initialize('usd')
inputPath = fixturesUtils.setUpClass(__file__)

cls._clsTestName = 'UsdExportMayaInstancerTest'

cls._clsTestName = 'InstancerExportTest'
cls.mayaFile = os.path.abspath('%s.ma' % cls._clsTestName)
cls.mayaFile = os.path.join(inputPath, cls._clsTestName,
"%s.ma" % cls._clsTestName)

@classmethod
def tearDownClass(cls):
Expand All @@ -43,7 +46,6 @@ def doExport(self, **kwargs):
# Export to USD.
usdFilePath = os.path.abspath('%s_%s.usda' % (self._clsTestName,
self._testMethodName))
cmds.loadPlugin('pxrUsd')

finalKwargs = {
'mergeTransformAndShape': True,
Expand Down Expand Up @@ -141,7 +143,7 @@ def testMethod(self):
doc += '.'
testMethod.__doc__ = doc

setattr(testPxrUsdTranslatorsInstancer, testName, testMethod)
setattr(testUsdExportMayaInstancer, testName, testMethod)

for namespacedInstancer in (False, True):
for namespacedPrototype in (False, True):
Expand Down
Loading

0 comments on commit 864556d

Please sign in to comment.