ID 371713 - Catalog Items do not validate parameters prior to getting their value

Follow

Problem summary:

When the Catalog tab is refreshing its contents at attempts to get the value of various root node parameters for each catalog item, for example, the name of the render node. It does not however first check to confirm that the parameter is valid, and so can raise an exception if the catalog item is malformed. This exception causes the Catalog tab to fail to load.

Steps to reproduce:

  1. Create a malformed catalog item with the following code:
    NodegraphAPI.GetNode('rootNode').getParameter('catalog.items').createChildGroup('i_1_0')
  2. Open a new Catalog tab

 

Expected behaviour:

The Catalog tab should appear correctly, with a warning about invalid catalog items

Actual behaviour:

The Catalog tab fails to load with the message AttributeError: 'NoneType' has no attribute 'getValue'

Workaround:

Delete any corrupted Catalog items with the below code, then re-open the Catalog tab:


items = NodegraphAPI.GetNode('rootNode').getParameter('catalog.items')
for child in items.getChildren():
    if child.getNumChildren() == 0:
        items.deleteChild(child)

    We're sorry to hear that

    Please tell us why