Set :Bitmap = Undefined / Remove :Bitmap?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  09 September 2010
Question 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
 
  09 September 2010
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
 
  02 February 2011
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 ?
__________________
Rigging reel 2017
Web Page
 
  02 February 2011
That's a cool command, I had no idea about this .

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 

Last edited by Kickflipkid687 : 02 February 2011 at 06:09 PM.
 
  02 February 2011
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
__________________
Rigging reel 2017
Web Page
 
  02 February 2011
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..
 
  02 February 2011
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:46 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.