USDLayerWriter

Takes two input scenes and writes a minimal USD file containing the differences between them. This new file can then be layered in a USD composition to transform the first scene into the second. This is useful for baking modifications made in Gaffer into a USD file for consumption in other hosts.

A typical use case might be to share lookdev authored in Gaffer, with a workflow like the following :

  • A SceneReader brings model.usd into Gaffer.

  • Shaders and attributes are applied in Gaffer, using Gaffer’s standard scene processing nodes.

  • A USDLayerWriter is used to bake this lookdev into a new look.usd layer on disk, with the SceneReader for model.usd connected to the base input and the lookdev connected into the layer input.

  • A new USD file is created that layers look.usd over model.usd. This is loaded into Gaffer or another host for lighting.

Note

To write a complete USD file (rather than a layer containing differences) use the standard SceneWriter node.

user

Container for user-defined plugs. Nodes should never make their own plugs here, so users are free to do as they wish.

preTasks

Input connections to upstream nodes which must be executed before this node.

postTasks

Input connections to nodes which must be executed after this node, but which don’t need to be executed before downstream nodes.

task

Output connections to downstream nodes which must not be executed until after this node.

dispatcher

Container for custom plugs which dispatchers use to control their behaviour.

dispatcher.batchSize

Maximum number of frames to batch together when dispatching tasks. If the node requires sequence execution batchSize will be ignored.

dispatcher.immediate

Causes this node to be executed immediately upon dispatch, rather than have its execution be scheduled normally by the dispatcher. For instance, when using the LocalDispatcher, the node will be executed immediately in the dispatching process and not in a background process as usual.

When a node is made immediate, all upstream nodes are automatically considered to be immediate too, regardless of their settings.

base

The base scene that the layer input is compared to.

layer

The scene to be written to fileName. This is compared to the base scene, and only differences are written to the file.

fileName

The name of the USD file to be written.

Supported file extensions : usd, usda, usdc

out

A direct pass-through of the layer input.