ID 306236 - Layers created via the API will display a difference in colorspace if created inside a group

Follow

Problem summary
In 3.3v1, layers created via the API will display a difference in colorspace depending on whether or not the layer is created within a group

Customer reported version
3.3v1
Customer reported platform
rhel7

Steps to reproduce

1) Open Mari Example Head

2) Run the below script, pointing to a TIF file on your local directory

fullImagePath='/path/to/image.tif'currentChannel = mari.geo.current().currentChannel() newTopLayer = currentChannel.createPaintableLayer("NewTopLayer", None)newTopLayer.imageSet().importImages(fullImagePath, mari.ImageSet.SCALE_THE_PATCH)cconfig = newTopLayer.imageSet().imageList()[0].colorspaceConfig()print cconfig.resolveRaw() # Prints Falseprint cconfig.resolveColorspace(cconfig.COLORSPACE_STAGE_NATIVE) # Prints 'sRGB'newGroup = currentChannel.createGroupLayer('NewGroup', None) newChild = newGroup.layerStack().createPaintableLayer("NewChildLayer", None) newChild.imageSet().importImages(fullImagePath, mari.ImageSet.SCALE_THE_PATCH)cconfig = newChild.imageSet().imageList()[0].colorspaceConfig()print cconfig.resolveRaw() # Prints Falseprint cconfig.resolveColorspace(cconfig.COLORSPACE_STAGE_NATIVE) # Prints 'raw'

3) Returns:
False
sRGB
False
raw


Workaround
Unknown - for now please ensure you double check whether or not this occurs within your projects and, if need be, create these layers via the UI.

Reproduced by support
3.3v1 - Windows 7, Windows 10, OSX 10.12.4, CentOS6

Earliest version tested
Last working version: 3.2v1

Expected behaviour
Both colorspaces should remain the same irregardless of whether or not the layer is contained within a group. i.e

False
sRGB
False
sRGB

Actual behaviour
The colorspaces did not match up when the layers were created.
 

    We're sorry to hear that

    Please tell us why