Skip to content

Material and HDR bindings are lost on geometry load #86

Description

@kwokcb

Issue

It seems that any existing material bindings are lost when loading in a new geometry file.

At least with the one that I used.

My guess is that the non-geometric data which is imported which is causing the issues since it seems that the entire contents are
loaded in instead of just the geometry.

Note that the file has no materials and no HDR environment so that also disappears.

Side-Effects

  • The refresh button does not seem to work for materials.
  • Loading in a new HDR does not seem to work
  • Trying to load the geometry again results in duplicates trying to be created in USD. e.g. error:
  File "D:\Work\materialx\QuiltiX\venv\Lib\site-packages\QuiltiX\usd_stage_view.py", line 94, in set_stage
    self.set_hdri_enabled(add_hdri)
  File "D:\Work\materialx\QuiltiX\venv\Lib\site-packages\QuiltiX\usd_stage_view.py", line 181, in set_hdri_enabled
    self._stage_root.subLayerPaths.append(self.hdri_stage.GetRootLayer().identifier)
pxr.Tf.ErrorException:
        Error in 'pxrInternal_v0_24__pxrReserved__::Sdf_ListEditor<class pxrInternal_v0_24__pxrReserved__::SdfSubLayerTypePolicy>::_ValidateEdit' at line 262 in file D:/Projects/Tools/GitRepositories/USD/pxr/usd/sdf/listEditor.h : 'Duplicate item 'anon:000001CB9F0D6BB0:tmp.usda' not allowed for field 'subLayers' on </>'
DEBUG:QuiltiX.qx_nodegraph:updated mx xml data

Work-Around

Load in a new materialx file seems to resynce the material but not the HDR.

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