Problem summary Channel.makeCurrent only applies if the geometry is made current first. The documentation should reflect this.
makeCurrent(self)
Sets this channel as the currently active channel on its GeoEntity.
Customer reported version 4.0v3 Customer reported platform windows10
Steps to reproduce
1) Open the attached archive (see comments). Archive contains multiple objects that both have two channels 'Blue' and 'Orange'.
2) Set all of the objects to the Blue channel
3) In the Python Console, run
for geo in mari.geo.list(): channel_list = geo.channelList() for channel in channel_list: if channel.name()=="Orange": channel.makeCurrent()
4) The active geo will change channels to 'Orange'
Workaround The workaround for this issue is to make the geometry current before you make the current channel, such as:
for geo in mari.geo.list(): mari.geo.setCurrent(geo) for channel in geo.channelList(): if channel.name()=="Blue": channel.makeCurrent()
Reproduced by support Mari 4.0v3 - Windows 7, CentOS 7 Mari 4.0v1 Mari 3.3v1 - OSX 10.12.6 Mari 3.1v1 Mari 3.0v4 Mari 3.0v1 Mari 2.6v5 - Windows 7, CentOS 7, OSX 10.12.6
Earliest version tested Mari 2.6v5
Expected behaviour As in the workaround, all objects in the geoEntity list should update to channels called 'Orange'
Actual behaviour Only the currently active object was affected by the script.