Notifications
Clear all

[Closed] Hidden slot in Meditmaterials??

Hey guys,
I’ve run across this problem while working on a script to export files for Turbosquid’s Checkmate standard. They require that all bitmap paths be stripped from the .max file. The main command I use for this is

ATSOps.SetPath ""

however, after running my script, I go back into the Asset Tracker only to find that I’ve got these mysterious references to bitmaps which I cannot find in my scene ANYWHERE. So, after some digging around I found where they are being referenced from. If you run

foo = refs.dependson meditmaterials
  print foo

you will see a 25th “slot” in the array for Meditmaterials with an extra Material (a standard material by default). I have found this to be true in a few different versions of 3dsMax (probably all, I just haven’t tested all). In my case, it’s a MultisubObject material which contains several of these maps I’m trying to get rid of. However, this can’t be accessed or removed by using

meditmaterials[25]

So, does anyone know why this is here? or how to clear it out??

Thanks!!!

8 Replies

I’m assuming that you’ve collapsed stacks on your model/s. But just incase you haven’t, one of the places that they can be hiding is in an Unwrap UVW modifier. If you’ve used them as a BG in the drop down, that is still considered to be part of the scene.

Cg.

Ahh! Genius, that was it! Any script to remove them all at once?

There’s a script on scriptspot by a guy called Jordan Walsh, called modifierModifierZorb.
http://www.scriptspot.com/3ds-max/scripts/modifier-modifier-zorb
It will let you easily collapse all of your unwraps in one go. Either for the whole scene or for selected objects. Obviously it will also collapse the stack underneath the unwraps too.

It does so many useful things “en massse” for objects,modifiers,controller,materials etc etc. that anyone beyond beginner level in max should have it in their max install.

Cheers,
Cg.

Could try this:

unwrapMods = (getclassinstances unwrap_uvw)
for cntMods in 1 to unwrapMods.count do 
(
	for cntMaps in unwrapMods[cntMods].texMapList.count to 1 by -1 do
	(
		if classof unwrapMods[cntMods].texMapList[cntMaps] == bitmaptexture do
		(
			deleteItem unwrapMods[cntMods].texMapList cntMaps
		)
	)
)

Basically go through all unwrap mods, check the texture map list for bitmaps, if it is a bitmap remove it. This should remove all bitmap instances from the unwrap modifiers, but assigned maps in materials can be reset whenever you open the editor dialog, and choose Reset Map List. NOTE: Make sure you don’t have an unwrap modifier active in the command panel as that one won’t reset.

-Eric

Guys,
Sorry for the delay returning to this thread. I was subscribed but maybe my notifications are turned off? I had no idea I had replies. Anyway…

Thanks for taking a stab at this but unfortunately none of the suggestions here have solved the issue I described. (Though the Unwrap textures list is a good “hiding place” and good to know for future reference.) I tried Eric’s code and the Zorb script, but had no luck with either. I’m sure it would be helpful if I could tell you HOW I got that material in the “25th” slot, but I have no idea how it happened. I only know that there is a blank Standard material there by default (even on a fresh opening of 3dsMax). Bobo, are you out there? You’d likely have an answer here.

my guess is you probably can’t delete it but you can access it from your own code above

for example…

foo = refs.dependson meditmaterials
mat = foo[25];
foo[25] = standardMaterial();
1 Reply
(@digitalx3d)
Joined: 11 months ago

Posts: 0

Well, with this you’re only accessing the array element inside of “foo”, and not the 25th element of meditmaterials.

buts it’s not the 25th “hidden” material editor material it’s Material #1 and meditmaterials references it.

try…


  foo = refs.dependson meditmaterials
  foo[25].diffuse;
  foo[25] = standardMaterial();
  foo2 = refs.dependson meditmaterials
  foo2[25].diffuse;