Skip to content

UsdImagingSceneIndex plugins loaded in "random" order #3891

@paoloemilioselva

Description

@paoloemilioselva

I'm creating a UsdImagingSceneIndex and I've noticed a few issues.

  1. The interface doesn't allow to specify the priority of the plugin. The only available function "AppendSceneIndex" assumes your plugin will be added after the previous one.

  2. UsdImagingSceneIndex plugins are chained following loading-order, and being loaded in a multi-threaded mode, it means the order is not well defined.

The main function to load all sceneindex plugins is here:

https://github.com/PixarAnimationStudios/OpenUSD/blob/dev/pxr/usdImaging/usdImaging/sceneIndices.cpp#L287

which relies on this:

https://github.com/PixarAnimationStudios/OpenUSD/blob/dev/pxr/usdImaging/usdImaging/sceneIndexPlugin.cpp#L42

which basically relies on this derivedTypes vector:

https://github.com/PixarAnimationStudios/OpenUSD/blob/dev/pxr/base/tf/type.cpp#L107

In the images attached, my custom plugin "Sequences" is randomly placed before or after the UsdSkelImaging plugin (which provides two sceneindex filtering plugins so they are always together).

It would be ideal to drive the priority of the plugin, at the beginning or the end of the chain or even a numbered priority.

In my example, I have to modfy the animated transforms of a skelanimation prim, so my plugin should be before the usdskelimaging plugin (in the images, the correct one is "below" the usdskelimaging).

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions