Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UsdUtils Pipeline docs example can't be parsed. #2346

Closed
ilpoldo opened this issue Mar 16, 2023 · 3 comments
Closed

UsdUtils Pipeline docs example can't be parsed. #2346

ilpoldo opened this issue Mar 16, 2023 · 3 comments

Comments

@ilpoldo
Copy link

ilpoldo commented Mar 16, 2023

Description of Issue

When pasting the config example from the UsdUtils Pipeline docs (source)

I get json parsing errors:

>>> from pxr import UsdUtils
>>> UsdUtils.GetRegisteredVariantSets()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pxr.Tf.ErrorException: 
	Error in 'pxrInternal_v0_19__pxrReserved__::{anonymous}::_ReadPlugInfoObject' at line 182 in file /tmp/build/pxr/base/lib/plug/info.cpp : 'Plugin info file /user_data/my_plugin/plugInfo.json couldn't be read (line 9, col 31): Missing a comma or ']' after an array element.'

With a couple of syntax tweaks everything seems to work.

    "UsdUtilsPipeline": {
        "RegisteredVariantSets": {
            "modelingVariant": {
                "selectionExportPolicy": "always"
            },
            "standin": {
                "selectionExportPolicy": "never"
            }
        }
    }

Steps to Reproduce

  1. copy the example from the docs in a plugInfo.json file in a folder (/user_data/my_plugin).
  2. launch python picking up the plugin env PXR_PLUGINPATH_NAME=$PXR_PLUGINPATH_NAME:/user_data/my_plugin python
  3. run from pxr import UsdUtils; UsdUtils.GetRegisteredVariantSets()

System Information (OS, Hardware)

CentOS Linux release 7.6.1810

Package Versions

USD 19.11

@ilpoldo
Copy link
Author

ilpoldo commented Mar 16, 2023

I am using an old version of usd, but the example in the docs is still the same: https://openusd.org/dev/api/pipeline_8h.html

If it is of any help I can put a PR in. Really minor, but the example in the Kind docs https://openusd.org/dev/api/kind_page_front.html#mainpage_kind includes the outer "Info" key, which seems to be required for the registered variant sets too. Should the UsdUtils pipeline example match the scope and wording of the Kinds one?

@spiffmon
Copy link
Member

spiffmon commented Mar 17, 2023 via email

@tallytalwar
Copy link
Contributor

Filed as internal issue #USD-8133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants