ID 560038 - Using setParameter to apply an image in the Node Properties of a Shader creates a new instance of the image in the Image Manager every time
Problem summary Using setParameter to apply an image in the Node Properties of a Shader creates a new instance of the image in the Image Manager every time
Customer reported version Mari 6.0v2
Customer reported platform CentOS 7
Steps to reproduce
Create a custom Shader node that has an attribute of the type image. The attached .xml based off of the Standalone Shader Example can be used.
Launch Mari.
Register the custom Shader node. The following can be used in the Python Console: mari.gl_render.registerCustomStandaloneShaderFromXMLFile("My Phong and Lambertian 5","path/to/Mari/Scripts/SpecularShininess5.xml")
Add the custom Shader to the Node Graph.
Select and view it.
Open the Image Manager palette.
Run the following in the Python Console, making sure to point to an image in your disk:
Expected behaviour If an image on disk is already being referenced in the Image Manager, then the script shouldn't create a new instance of the same image every time it is run. This is especially true because if this is repeatedly done manually via the Node Properties palette, the Image Manager doesn't keep creating duplicates.
Actual behaviour Every time the script is run, a new instance of the same image is created in the Image Manager.
Workaround Unknown.
Reproduced by support This bug has been reproduced in: Mari 6.0v2 - Windows 10 - CentOS 7 Mari 4.8v1 - Windows 10 - CentOS 7
Unable to reproduce bug in: Mari 4.7v7
Earliest version tested Mari 4.7v7 - This issue doesn't appear in this version and has regressed