Skip to content

Commit

Permalink
Merge pull request #859 from Autodesk/t_gamaj/MAYA-106489/rename_inst…
Browse files Browse the repository at this point in the history
…ance_sources

MAYA-106489 - Rename InstanceSources to be Maya-specific
  • Loading branch information
Krystian Ligenza authored Oct 22, 2020
2 parents fa9e718 + b70bbe4 commit 0c1b13a
Show file tree
Hide file tree
Showing 14 changed files with 143 additions and 143 deletions.
2 changes: 1 addition & 1 deletion lib/mayaUsd/fileio/jobs/writeJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ UsdMaya_WriteJob::_BeginWriting(const std::string& fileName, bool append)

// Perform post-processing for instances, skel, etc.
// We shouldn't be creating new instance masters after this point, and we
// want to cleanup the InstanceSources prim before writing model hierarchy.
// want to cleanup the MayaExportedInstanceSources prim before writing model hierarchy.
if (!mJobCtx._PostProcess()) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/mayaUsd/fileio/writeJobContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ _GetRootOverridePath(const UsdMayaJobExportArgs& args, const SdfPath& path)
return path;
}

const SdfPath INSTANCES_SCOPE_PATH("/InstanceSources");
const SdfPath INSTANCES_SCOPE_PATH("/MayaExportedInstanceSources");

} // anonymous namespace

Expand Down Expand Up @@ -431,7 +431,7 @@ UsdMayaWriteJobContext::_PostProcess()
if (_objectsToMasterWriters.empty()) {
mStage->RemovePrim(mInstancesPrim.GetPrimPath());
} else {
// The InstanceSources group should be an over and moved to the
// The MayaExportedInstanceSources group should be an over and moved to the
// end of the layer.
mInstancesPrim.SetSpecifier(SdfSpecifierOver);

Expand Down
22 changes: 11 additions & 11 deletions plugin/al/docs/importExport.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ AL_usdmaya_ExportCommand -f "<path/to/out/file.usd>" -mergeTransforms 0 -duplica
```
Which will generate the following instanced structure within the exported USD file:
```
over "InstanceSources"
over "MayaExportedInstanceSources"
{
def Xform "pSphere1"
{
Expand All @@ -138,15 +138,15 @@ over "InstanceSources"
def Xform "pSphere1" (
al_usdmaya_mergedTransform = "unmerged"
instanceable = true
prepend references = </InstanceSources/pSphere1>
prepend references = </MayaExportedInstanceSources/pSphere1>
)
{
}
def Xform "pSphere2" (
al_usdmaya_mergedTransform = "unmerged"
instanceable = true
prepend references = </InstanceSources/pSphere1>
prepend references = </MayaExportedInstanceSources/pSphere1>
)
{
float3 xformOp:translate:translate = (0, 0, 5)
Expand All @@ -156,7 +156,7 @@ def Xform "pSphere2" (
def Xform "nurbsCircle1" (
al_usdmaya_mergedTransform = "unmerged"
instanceable = true
prepend references = </InstanceSources/nurbsCircle1>
prepend references = </MayaExportedInstanceSources/nurbsCircle1>
)
{
float3 xformOp:translate:translate = (5, 0, 0)
Expand All @@ -170,15 +170,15 @@ def Xform "parentTransform" (
def Xform "nurbsCircle2" (
al_usdmaya_mergedTransform = "unmerged"
instanceable = true
prepend references = </InstanceSources/nurbsCircle1>
prepend references = </MayaExportedInstanceSources/nurbsCircle1>
)
{
float3 xformOp:translate:translate = (0, 0, 5)
uniform token[] xformOpOrder = ["xformOp:translate:translate"]
}
}
```
All geometry prims of instanced shapes are gathered under an override prim ```InstanceSources``` with USD hierarchy:
All geometry prims of instanced shapes are gathered under an override prim ```MayaExportedInstanceSources``` with USD hierarchy:
```
--Xform
--Mesh/NurbsCurves
Expand All @@ -191,7 +191,7 @@ AL_usdmaya_ImportCommand -f "<path/to/out/file.usd>"
```
When "duplicateInstances" is disabled and "mergeTransforms" is on, exported USD file will look like:
```
over "InstanceSources"
over "MayaExportedInstanceSources"
{
def Mesh "pSphere1_pSphereShape1"
{
Expand All @@ -203,21 +203,21 @@ over "InstanceSources"
}
def Mesh "pSphere1" (
prepend references = </InstanceSources/pSphere1_pSphereShape1>
prepend references = </MayaExportedInstanceSources/pSphere1_pSphereShape1>
)
{
}
def Mesh "pSphere2" (
prepend references = </InstanceSources/pSphere1_pSphereShape1>
prepend references = </MayaExportedInstanceSources/pSphere1_pSphereShape1>
)
{
float3 xformOp:translate:translate = (0, 0, 5)
uniform token[] xformOpOrder = ["xformOp:translate:translate"]
}
def NurbsCurves "nurbsCircle1" (
prepend references = </InstanceSources/nurbsCircle1_nurbsCircleShape1>
prepend references = </MayaExportedInstanceSources/nurbsCircle1_nurbsCircleShape1>
)
{
float3 xformOp:translate:translate = (5, 0, 0)
Expand All @@ -227,7 +227,7 @@ def NurbsCurves "nurbsCircle1" (
def Xform "parentTransform"
{
def NurbsCurves "nurbsCircle2" (
prepend references = </InstanceSources/nurbsCircle1_nurbsCircleShape1>
prepend references = </MayaExportedInstanceSources/nurbsCircle1_nurbsCircleShape1>
)
{
float3 xformOp:translate:translate = (0, 0, 5)
Expand Down
2 changes: 1 addition & 1 deletion plugin/al/lib/AL_USDMaya/AL/usdmaya/fileio/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ struct Export::Impl

void createInstancesPrim()
{
m_instancesPrim = m_stage->OverridePrim(SdfPath("/InstanceSources"));
m_instancesPrim = m_stage->OverridePrim(SdfPath("/MayaExportedInstanceSources"));
}

void processInstances()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def Xform "pCube1" (
kind = "component"
instanceable = true
prepend references = </InstanceSources/pCube1_instanceParent>
prepend references = </MayaExportedInstanceSources/pCube1_instanceParent>
)
{
double3 xformOp:translate = (-4, 2, 0)
Expand All @@ -18,7 +18,7 @@ def Xform "pCube1" (
def Xform "pCube4" (
kind = "component"
instanceable = true
prepend references = </InstanceSources/pCube1_instanceParent>
prepend references = </MayaExportedInstanceSources/pCube1_instanceParent>
)
{
double3 xformOp:translate = (4, 2, 0)
Expand All @@ -34,21 +34,21 @@ def Xform "pCube5" (

def Scope "pCubeShape1" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCubeShape1>
prepend references = </MayaExportedInstanceSources/pCube1_pCubeShape1>
)
{
}

def Scope "pCube2" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube2>
prepend references = </MayaExportedInstanceSources/pCube1_pCube2>
)
{
}

def Scope "pCube3" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube3>
prepend references = </MayaExportedInstanceSources/pCube1_pCube3>
)
{
}
Expand All @@ -67,7 +67,7 @@ def Xform "pCube5" (
}
}

over "InstanceSources"
over "MayaExportedInstanceSources"
{
def Scope "pCube1_pCubeShape1"
{
Expand All @@ -86,7 +86,7 @@ over "InstanceSources"
{
def Xform "pCube2" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube2_instancedParent>
prepend references = </MayaExportedInstanceSources/pCube1_pCube2_instancedParent>
)
{
double3 xformOp:translate = (0, -3, 0)
Expand All @@ -98,7 +98,7 @@ over "InstanceSources"
{
def Xform "pCube3" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube2_instancedParent>
prepend references = </MayaExportedInstanceSources/pCube1_pCube2_instancedParent>
)
{
double3 xformOp:translate = (0, -6, 0)
Expand All @@ -110,21 +110,21 @@ over "InstanceSources"
{
def Scope "pCubeShape1" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCubeShape1>
prepend references = </MayaExportedInstanceSources/pCube1_pCubeShape1>
)
{
}

def Scope "pCube2" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube2>
prepend references = </MayaExportedInstanceSources/pCube1_pCube2>
)
{
}

def Scope "pCube3" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube3>
prepend references = </MayaExportedInstanceSources/pCube1_pCube3>
)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ def Xform "pCube1" (

def Scope "pCubeShape1" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCubeShape1>
prepend references = </MayaExportedInstanceSources/pCube1_pCubeShape1>
)
{
}

def Scope "pCube2" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube2>
prepend references = </MayaExportedInstanceSources/pCube1_pCube2>
)
{
}

def Scope "pCube3" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube3>
prepend references = </MayaExportedInstanceSources/pCube1_pCube3>
)
{
}
Expand All @@ -43,21 +43,21 @@ def Xform "pCube4" (

def Scope "pCubeShape1" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCubeShape1>
prepend references = </MayaExportedInstanceSources/pCube1_pCubeShape1>
)
{
}

def Scope "pCube2" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube2>
prepend references = </MayaExportedInstanceSources/pCube1_pCube2>
)
{
}

def Scope "pCube3" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube3>
prepend references = </MayaExportedInstanceSources/pCube1_pCube3>
)
{
}
Expand All @@ -72,21 +72,21 @@ def Xform "pCube5" (

def Scope "pCubeShape1" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCubeShape1>
prepend references = </MayaExportedInstanceSources/pCube1_pCubeShape1>
)
{
}

def Scope "pCube2" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube2>
prepend references = </MayaExportedInstanceSources/pCube1_pCube2>
)
{
}

def Scope "pCube3" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube3>
prepend references = </MayaExportedInstanceSources/pCube1_pCube3>
)
{
}
Expand All @@ -105,7 +105,7 @@ def Xform "pCube5" (
}
}

over "InstanceSources"
over "MayaExportedInstanceSources"
{
def Scope "pCube1_pCubeShape1"
{
Expand All @@ -129,7 +129,7 @@ over "InstanceSources"

def Scope "pCubeShape2" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube2_pCubeShape2>
prepend references = </MayaExportedInstanceSources/pCube1_pCube2_pCubeShape2>
)
{
}
Expand All @@ -145,7 +145,7 @@ over "InstanceSources"

def Scope "pCubeShape2" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCube2_pCubeShape2>
prepend references = </MayaExportedInstanceSources/pCube1_pCube2_pCubeShape2>
)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def Xform "pCube1" (
instanceable = true
kind = "component"
prepend references = </InstanceSources/pCube1_instanceParent>
prepend references = </MayaExportedInstanceSources/pCube1_instanceParent>
)
{
double3 xformOp:translate = (-4, 2, 0)
Expand All @@ -18,7 +18,7 @@ def Xform "pCube1" (
def Xform "pCube2" (
instanceable = true
kind = "component"
prepend references = </InstanceSources/pCube1_instanceParent>
prepend references = </MayaExportedInstanceSources/pCube1_instanceParent>
)
{
double3 xformOp:translate = (0, 2, 0)
Expand All @@ -28,14 +28,14 @@ def Xform "pCube2" (
def Xform "pCube3" (
instanceable = true
kind = "component"
prepend references = </InstanceSources/pCube1_instanceParent>
prepend references = </MayaExportedInstanceSources/pCube1_instanceParent>
)
{
double3 xformOp:translate = (4, 2, 0)
uniform token[] xformOpOrder = ["xformOp:translate"]
}

over "InstanceSources"
over "MayaExportedInstanceSources"
{
def Xform "pCube1_instanceParent"
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def Xform "pCube1" (

def Scope "pCubeShape1" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCubeShape1>
prepend references = </MayaExportedInstanceSources/pCube1_pCubeShape1>
)
{
}
Expand All @@ -29,7 +29,7 @@ def Xform "pCube2" (

def Scope "pCubeShape1" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCubeShape1>
prepend references = </MayaExportedInstanceSources/pCube1_pCubeShape1>
)
{
}
Expand All @@ -44,13 +44,13 @@ def Xform "pCube3" (

def Scope "pCubeShape1" (
instanceable = true
prepend references = </InstanceSources/pCube1_pCubeShape1>
prepend references = </MayaExportedInstanceSources/pCube1_pCubeShape1>
)
{
}
}

over "InstanceSources"
over "MayaExportedInstanceSources"
{
def Scope "pCube1_pCubeShape1"
{
Expand Down
Loading

0 comments on commit 0c1b13a

Please sign in to comment.