ID 330272 - forceArray hint is only respected on string attributes of GenericAssign XML node types, not number attributes, and can only be specified as strings 'True' or 'False', not any other boolean-like values

Follow

Problem summary

The forceArray hint is currently only respected on string attributes of GenericAssign XML node types, not number attributes.

Additionally, it can only be specified as strings 'True' or 'False', not any other boolean-like values. This should be modified in GenericAssign.py.

Steps to reproduce
 

  1. Copy and paste the following XML code into an empty text file:
    <args format='1.0' scope='/root' fixedCEL='/root'>
       <float name='number' default='0.5'/>
       <string name='text' />
       <float name='numberArrayQuestionMark' default='0.5' forceArray='True'/>
       <string name='textArrayQuestionMark' forceArray='True' /></args>
  2. Save the file as ForceArrayDemo.xml in a GenericAssign folder in KATANA_RESOURCES.

  3. Launch Katana and create a ForceArrayDemo node

  4. Inspect the parameter types by running the following code in the Python tab:

    print(NodegraphAPI.GetNode('ForceArrayDemo').getParameter('args.number').getXML())
    print(NodegraphAPI.GetNode('ForceArrayDemo').getParameter('args.text').getXML())
    print(NodegraphAPI.GetNode('ForceArrayDemo').getParameter('args.numberArrayQuestionMark').getXML())
    print(NodegraphAPI.GetNode('ForceArrayDemo').getParameter('args.textArrayQuestionMark').getXML())

  5. Result: numberArrayQuestionMark is a simple number parameter when it should be a number array. textArrayQuestionMark is a string array parameter as expected.

Workaround

Unknown

Reproduced by support

Katana 2.6v3 - Windows 7

This issue is present in all versions of the product.

Expected behaviour

The float parameter with the forceArray hint set to True should be created as a numberArray parameter.

Actual behaviour

It is created as a simple number parameter.

    We're sorry to hear that

    Please tell us why