Notifications
Clear all

[Closed] Set :Bitmap = Undefined / Remove :Bitmap?

Hello again,

I looked around and didn’t find anything, so I thought I might ask. It’s not a huge deal if it can’t be done this way, but is there a way to clear /delete a bitmap from the scene? Without having to replace the material or do anything too crazy?

I’d like to do something similar to how you can just rightclick the button next to the Bitmap Map name, and say clear.

thanks!

Matt

5 Replies

I think I got my answer… my macro recorder wasn’t working, now it is.

I saw it output this line for a standard material when I cleared the diffuse, and i got the codes for
multisub and multisub within multisubs, so we will see what happens

for standard Material –

meditMaterials[2].diffuseMap = undefined


for multisub material –

1st ID
meditMaterials[2].material1.diffuseMap = undefined

2nd ID
meditMaterials[2].materialList[2].diffuseMap = undefined


Multisub (Slot 2) in Multisub (Slot 1)

meditMaterials[2].materialList[2].material1.diffuseMap = undefined

meditMaterials[2].materialList[2].materialList[2].diffuseMap = undefined

so far fine for u , but for me i m developing something that would look deep in any material
and see if there s watever type of material and would clear them , in other words suppose that i have falloff and one map of that two falloff maps has checker and on e of checker map would have bitmap texture so wat if i wanted to remove it out?
i worked out by Getclasssinstances adviced by people here and combined br replace instances just like LO said here :


for m in (getClassinstances bitmaptex) do replaceInstances m (bitmaptex())

it can replace any type of maps by other type but cant actually remove or clear map channel , so can any one uggest something ?

That’s a cool command, I had no idea about this :D.

I’m not sure what you mean exactly. I just tried putting a bitmap in one of the checkermap slots, and it was cleared. Although, it still says bitmaptexture in the slot, but the actual bitmap I loaded is gone.

Edit: Oh, i think you mean clear the bitmap from the slot, so its actually set to None? I will have to look into this…

Well… I just learned about this method… which kinda sucks, and is great, because it removes alot of what I was doing to find bitmaps. It finds the bitmaps in the selected objects material(s). Even with Multisubs, where the bitmap is inside a checker material… DOH.

But I’m not sure this method can return where the bitmap was found, as in what material ID and whatnot. Which I use for one of my scripts.

fn findBitmap bitFile =
(
	print (bitFile)
)

enumeratefiles selection[1] findBitmap 

i got it after thousands of trials and errors and heres the code

( 
	for m in (getClassinstances checker) do ( for y in  (refs.dependents m ) do
	(	
	
	if ((superclassof y)==texturemap) do 
	(a=getNumSubTexmaps y
	  if (a!=0) do
	( for i in 1 to a do 
	  (b=getSubTexmap y i
		if ((classof b)==checker) do
		(setSubTexmap y i undefined)
		  
	   )---i end do
		
		)---- if a!=0 end
		 )---do end of texture map 
		
		)---do end of refs dependannts	
   )---do end of classinstance	

hope it helps

Yeah, I just saw in another thread, very cool. Glad you figured it out. This may come in handy in the future.

I wish they would allow access to better methods, or create better methods for these things…