ID 354556 - `NodegraphAPI.Node.getGraphState()` does not consider local Graph State modifications made via Op chain interface input requests in NodeTypeBuilder-based node types

Follow

Problem summary:

The getGraphState() function that is available on all Katana node types is meant to return the Graph State accumulated between a particular given Node instance and the respective Node on which the function is called. Typically, the current view node is passed as the Node at which to start the traversal of nodes in the node graph.

Currently, the function only considers Graph State modifications that are performed via overrides of the getLogicalInputPort() function in node type classes that are implemented in C++, such as TimeOffset and VariableSwitch. The getGraphState() function does not currently consider modifications of local Graph State that are made via input requests in functions that build the Op chain of a custom node type that is implemented in Python using NodeTypeBuilder.

Steps to reproduce:

  1. Download the attached WeakVariableSet NodeTypeBuilder-based node type definition to your ~/.katana/Plugins/ folder.
  2. Start Katana.
  3. Open the attached project.
  4. In the Node Graph tab, ensure that the edit flag is on the OpScript node, and that the view flag is on the VariableSet node.
  5. In the Parameters tab, click the Graph State Variables button in the header of the edited OpScript node, and check which Graph State Variables appear in the Locals and Globals section of the popup.
  6. In the Scene Graph tab, expand the entire scene graph.
  7. Check the shell/console/terminal for the system Op Arg printed by the OpScript node.

Expected behaviour:

The Graph State Variables popup ilsts the following two Graph State Variables in the Locals section:

  1. shot set to s002
  2. sequence set to seq050

The message printed includes both of the local Graph State Variables in the variables group:


<GroupAttribute: childCount=2> {
  timeSlice = {
    currentTime = FloatAttribute(1.0),
    shutterOpen = FloatAttribute(0.0),
    shutterClose = FloatAttribute(1.0),
    numSamples = IntAttribute(1),
  },
  variables = {
    sequence = StringAttribute("seq050"),
    shot = StringAttribute("s002"),
  },
}

Actual behaviour:

The Locals section in the Graph State Variables popup only shows the shot variable.
The sequence variable is not listed.

The output in the shell as shown above is correct.

Workaround:

No known workaround.

Tested versions/platforms:

  • 2.0v1 - Affected
  • 3.0v1 - Affected

Customer version/platform:

Not supplied

    We're sorry to hear that

    Please tell us why