View Full Version : Getting the names of map channels?
scorpion007 06-21-2007, 03:52 AM 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 :)
|
|
scorpion007
06-21-2007, 04:59 AM
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...
scorpion007
06-21-2007, 05:54 AM
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 :)
urgrund
06-22-2007, 03:04 AM
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 :)
scorpion007
06-22-2007, 05:29 AM
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?
CGTalk Moderation
06-22-2007, 05:29 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.