[Closed] Getting the names of Map Channels
Hi, Is it possible to get the names of map channels through maxscript (The ones you see in the Channel Info tool)? I know the property exists, just not sure if its exposed to maxscript?
I.e. I can get the number of maps by:
a = meshop.getNumMaps mesh
and their associated information… but what about the channel’s name? That would be really useful
Hmmm… maxscript allows me to rename a channel or even a sub-channel, but not retreive its name. Strange. I hope I’m overlooking something trivial here…
Ok, well I solved it by writing my own custom C++ maxscript plugin.
<string>getMapChannelName <node>node <int>channelID <int>subChannelID
All indexes are zero based.
which returns a string with the channel name, or an empty string “” if no name.
Works great
another whacky max script workaround…
channelName = getUserProp myNode ("MapChannel:" + i as string)
Where i is the map channel you want. Seems more logical if this sort of thing was part of the ChannelInfo interface, being able to return a Channel object with name, ID, Numverts… etc etc
Ah, I didn’t know you could do that in maxscript! I basically used the same method, but in the SDK, hah! (Note, my function can get subchannels too, but that would be trivial to add to your snippet, too)
I guess I did overlook it.
But how did you determine the name of the correct user property?