I’ve noticed a bug when using the Level Sequence USD Exporter. The attributes for spotlights are not exported. This is due to the fact of the ShapingAPI never being added to the defined prim during the exporter process.
For Level Sequence export, the SpotLight callback stack is:
ULevelSequenceExporterUsd::ExportBinary (LevelSequenceExporterUSD.cpp:1749)
└── LevelSequenceExporterImpl::ExportMovieSceneSequence (1492, called at 1990)
└── GenerateBakersForMovieScene (812\)
└── GetPrimForComponent lambda (1088\-1109\)
└── UsdUtils::GetSchemaNameForComponent (USDConversionUtils.cpp:595\)
└── returns "SphereLight" via UPointLightComponent branch (641\-644\)
// This happens because USpotLightComponent derives from UPointLightComponent
└── CreateComponentPropertyBaker (USDPrimConversion.cpp:4491, called at 1199\)
└── Spot branch (4948\+)
└── pxr::UsdLuxShapingAPI ShapingAPI{Prim}
└── fails if (!SphereLight \|\| !ShapingAPI) return false; (4955\-4959\)
// ShapingAPI was never applied, so this check fails
└── AddBaker ignores it because BakerType \=\= None (LevelSequenceExporterUSD.cpp:1121\-1124\)
└── BakeMovieSceneSequence (1366\)
└── Spot light baker never executes (1461\)
// As a result, Spot intensity is not authored, while Point lights do work
Reading at the code the LevelExporter and the Level Sequencer exporter use different approaches for the prim creation, while in the USDLightConverter.cpp, used by the LevelExporter, it does apply the ShapingAPI for spotlight component, for the Level Sequence exporter, on the USDPrimConversion.cpp, it only checks if the ShapingAPI is valid, but it’s never applied.
A change on USDCore\Source\USDUtilities\Private\USDPrimConversion.cpp > 4956 seems to fix the issue:
pxr::UsdLuxShapingAPI ShapingAPI{Prim}; -> pxr::UsdLuxShapingAPI ShapingAPI = pxr::UsdLuxShapingAPI::Apply(Prim);