OpenColorIO icon indicating copy to clipboard operation
OpenColorIO copied to clipboard

Add an easier way to get both active & inactive views for a display

Open doug-walker opened this issue 2 years ago • 2 comments

In OCIO v1, the Config getViews(display) method returned all views. This was considered a bug (per issue #67) and a fix was attempted in closed PR #324 and then finally fixed in PR #875 (as part of OCIO v2).

As a result, in OCIO 2.x, getViews only returns the active views. This is usually what an application would want.

However in some situations it is useful to get all the views (active & inactive). Currently there is this API to do that:

    int getNumViews(ViewType type, const char * display) const;
    const char * getView(ViewType type, const char * display, int index) const;

but it requires iterating over both the shared and per-display views for a display. It would be nice to have the equivalent of getNumDisplaysAll and getDisplayAll for views.

doug-walker avatar Aug 18 '23 00:08 doug-walker

🤚 for ASWF Dev Days.

eric-frazier-dev avatar Sep 24 '24 22:09 eric-frazier-dev

Awesome, assigning this to you, Eric!

carolalynn avatar Sep 24 '24 22:09 carolalynn