Author Topic: Script channelIdentifiers  (Read 81 times)

Hi, I ran into an issue on my script to automatically add/remove/edit channels on a bunch of TextureSet.

When I have a User0 channel with "oName" as custom name and I try to find my channel through a

alg.mapexport.channelIdentifiers(, it returns "oName" instead of user0.
It could be good only if :
alg.texturesets.removeChannel(, "oName") could work, but I got an error in the log:
There is no channel "oName" in the texture set

So as example:

Code: [Select]
alg.texturesets.addChannel(, "user0", "RGB8", "oName")

var currentChannels = alg.mapexport.channelIdentifiers(
var myChannels = ["diffuse", "normal"]

for(var channel in myChannels)
if((currentChannels.indexOf(myChannels[channel])) == -1)
alg.texturesets.removeChannel(, currentChannels[channel])
It won't work and will return the textureSetError previously mentionned.

Am I missing something? Remember, I passing through loops, so I can't manually provide the name of my material nor channel type.

edit: wrong  channel, can you move it to the scripts Channel please, sorry about that
Last Edit: November 28, 2018, 12:40:19 am