Skip to content

Commit

Permalink
Respect prim writer ShouldPruneChildren when shading mode is useRegistry
Browse files Browse the repository at this point in the history
Currently, there is no way to register a shader writer that handles all
connected plugs to the shader. For example, the writer might handle file
nodes connected to the shader, but useRegistry shading mode will invoke
FileTextureWriter unconditionally. It will write out a UsdUVTexture
shader, which useRegistry won't be able to connect to the shading network.
  • Loading branch information
stefans-chaos committed May 27, 2022
1 parent 005eca8 commit 1ad5bd0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/mayaUsd/fileio/shading/shadingModeUseRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ class UseRegistryShadingModeExporter : public UsdMayaShadingModeExporter
if (shaderPrim && !topLevelShader) {
topLevelShader = UsdShadeShader(shaderPrim);
}
if (srcShaderInfo->ShouldPruneChildren()) {
iterDepGraph.prune();
}

for (unsigned int i = 0u; i < dstPlugs.length(); ++i) {
const MPlug dstPlug = dstPlugs[i];
Expand Down

0 comments on commit 1ad5bd0

Please sign in to comment.