ID 285076 - Transferring textures across UDIMs via API does not support previously unused UDIMS

Follow

Problem summary
Transferring textures across UDIMs via session script API does not support previously unused UDIMS

Customer reported version
3.1v3
Customer reported platform
n_a_linux

Steps to reproduce

1) Open Example Head
2) Export session out with default options
3) Add Head_Geo_New.obj as a new object
4) Run below script
Note that 1011 remains as a checkerboard.

import mari
def importMsfToMariSession(importMsfPath, uvIndexMap=None, merge=False, groupName=None):
    trgGeo = mari.session.types.GeoEntity.fromSelected()
    srcProj = mari.session.types.Project.fromMSF(importMsfPath)
    srcGeo = srcProj.geoEntities[0]
    copiedChannels = trgGeo.copyChannels(srcGeo.channels, uvIndexMap)
    trgGeo.make()
uvIndexMap={0:[1],1:[0],2:[2],3:[3],4:[10]}
importMsfToMariSession("\\path\\to\\session\\export.msf", uvIndexMap)

Workaround
There is no known workaround using this script that is viable for production. Users may be able to trick Mari into thinking a UDIM was previously in use by adding a version of an object that has UV islands modified to cover the target UDIM before exporting the session:
1) Open Example Head
2) Add a new version of Head_Geo where part of the UV islands have been moved to cover 1011 (use Head_Geo_HalfWay.obj)
3) Export sessions out with default options
4) Add Head_Geo_New.obj as a new object
5) Run script

Note 1011 transfers correctly.

If you are unable to use this method, please texture transfer by using channel transfer between objects.

Reproduced by support
3.3v1, 3.1v3, 3.0v3, 3.0v2 -Windows 7, CentOS6, OSX 10.12

Earliest version tested
Not tested further back

Expected behaviour
You should be able to transfer textures across UDIMs using python.

Actual behaviour
Mari is unable to transfer to UDIMs that were not in use in the imported session.

    We're sorry to hear that

    Please tell us why