Clear Multiple channels from an object

Hello, I need to clear multiple channels from an object.
I tried this as a test:

for x = 5 to 50 do
channelInfo.ClearChannel $ x

[this one has 50 map channels, but I need to clear from a specified number to a another specified number]
It applied all 45 "uvw mapping clear" modifiers each with an ascending number to the stack but only cleared one of them (50) when I collapsed the stack.
If I do this manually in the map channel info dialogue but right clicking each channel and clearing it, it works – but I don’t want to do that for lots of objects with 90 channels each 

Thanks for any help

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
LittleLordPotala's picture

The solution

We must directly add the modifier in a descending loop :

  1. for i = 50 to 5 by -1 do
  2. (addmodifier $ (UVW_Mapping_Clear mapID:i); collapsestack $)
LittleLordPotala's picture

A workaround...

As the function "channelInfo.ClearChannel" does not work inside a loop,
I made an interface with spinners.

In the "channel" spinner, just enter the last channel of the list and it
automatically delete this channel, then click and hold-down the down-buton of the spinner and it will delete the channels very fast.

I added a "stop to" spinner as a protection to keep all the channels greater than this value.

AttachmentSize
clearchannel.ms 378 bytes

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.