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.
MaximilianPs's picture

ChannelInfo.ClearChannel

Sorry for the 5 years necromancy but I guess it could be useful ;=)

Based on selection, this will clear all Channel, you could add the channel number as your n needs.

This is useful 'cause unity fbx exporter will crash 3DS Max if channels are present!

for i in selection do 
(
  channelinfo.clearchannel i 2
  channelinfo.clearchannel i 3
)

Obviously:
DO A BACKUP BEFORE TRY IT !!!

I cannot be considered responsable for headache, monitor explosion, heart attacks

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.