Notifications
Clear all

[Closed] getNumMaps

anyone know why it defaults to 2 (sdk doc) when there’s only 1 map ?

mobj = converttomesh (plane());
format "num maps = %\n" (meshop.getNumMaps mobj);
for m = -2 to 99 where meshop.getMapSupport mobj m do format "map = %\n" m;

will produce an odd result. It also doesn’t count channel 0, -1 and -2 supported or not they are not included in the num of maps… to get a true count you have to iterate through the hiddens then add getNumMaps and subtract 1. Who’s fucking brain fart was that ?

3 Replies

OK because non hidden maps start at 1 as 0 is a hidden map so even if not supported vert colour map (0) counts towards the total because 1 is the second value in the map array wot a load of bs !

there is such thing in SDK (mesh.h) NUM_HIDDENMAPS

I know but you still get weirdness

if there are no actual maps then it’s the number of hidden (2) (though these may or may not be actually used)
if the last map is in slot x then it’s x+1

should rename it getNumSchrodingerMaps

it’s not the number of maps it’s the min number you have check starting from -2 to see if any are being used.