Flattening keeping payloads as payloads

Hi all,

I’m trying to profile a few things in our scenes, and one thing I’d like to compare is to remove the majority of the files and flatten all in one file, but I’d like to keep payloads as payloads, so the actual geometry is not flattened.

I’ve tried a few combination of FlattenLayerStack and copying roots of layers, but I either flatten too much, or not enough.

About the “not enough” part, I think I could spend a bit more time there and be more creative about how I’m doing it,
but before I get in this rabbit hole ( I was thinking of going through all the layers, stitching them together ), is there already something I can use for this “intent” ?

cheers,
Paolo

Not sure how to avoid the rabbit-hole, because what’s going to work best is going to be highly dependent on your composition and asset structure… if you are making payloads directly from your scene to your assets, then maybe recursive FlattenLayerStack works (i.e. do it separately for each asset, also)? Or maybe fully Flatten() each asset (though you’ll lose VariantSets then) ?

But this isn’t something we attempt to provide helpers for.