ID 547012 - Using _Inverse to invert a LocatorType="Matrix" Node Property on a custom node's GLSL makes Mari ignore $AttributeName

Follow

Problem summary
Using _Inverse to invert a LocatorType="Matrix" Node Property on a custom node's GLSL makes Mari ignore $AttributeName if there is only $AttributeName_Inverse in the shader code.
 


Customer reported version
Mari 6.0v2
 

Customer reported platform
Multiple
 

Steps to reproduce
1.  Create a custom node with a LocatorList Node Property, of the type Matrix, by saving the following text as LocatorListInvertedMatrix.xml into the user Scripts folder:
<Node>  <DefaultName>Locator List Inverted Matrix</DefaultName>  <Cost>0.2</Cost>  <CostDescription>Calculations</CostDescription>  <ID>LOCATOR_LIST_INVERTED_MATRIX</ID>  <Inputs>    <Input Name="Position"/>  </Inputs>  <Attributes>    <Attribute Name="Transform" PrettyName="Transform" Group="" Type="LocatorList" LocatorType="Matrix"></Attribute>  </Attributes>  <Contexts>    <Context Type="NodeGraphView">    </Context>    <Context Type="GLSL">      <Shader>        <Inputs>          <Input Name="Position"><Default>vec4(State.Position,1.0)</Default></Input>        </Inputs>        <Body><![CDATA[            Output.rgb = ($Transform_Inverse * #Position).xyz;            Output.a = 1.0;        ]]></Body>      </Shader>    </Context>  </Contexts></Node>
 
2. Open Mari.
 
3. Open a Project, such as the Example Project.
 
4. Import the custom node into the current Mari session by running the following in the Python Console:
import mari mari.gl_render.registerCustomProceduralLayerFromXMLFile("Locator List Inverted Matrix", mari.resources.path(mari.resources.USER_SCRIPTS) + "/LocatorListInvertedMatrix.xml")
 
5. Press TAB in the Node Graph and search for "Locator List Inverted Matrix" in order to find and create the custom node.
 
6. Double-click the created node to open its node properties. 
 

Expected behaviour
The Node Properties would include a LocatorList property that gives inverted results.
 

Actual behaviour
There are no Node Properties.
 

Workaround
In order for this setup to work, the $AttributeName, which in this case is $Transform, must be referenced on its own in the shader, that is without _Inverse.
That can be done by adding a comment:
  1. Add a new line between line 20 and 21.
     
  2. Write the following into it:
                // $Transform
     
  3. Reload the custom node by selecting Tools > Shader Console > Add
 

Reproduced by support
This bug has been reproduced in:
Mari 6.0v2 - Windows 10 - CentOS 7
Mari 4.6v1 - Windows 10 - CentOS 7
 

Earliest version tested
Mari 4.6v1 - This feature did not exist before this version
 
 

    We're sorry to hear that

    Please tell us why