Maxscript Scripted Plugins and Setting Parameters to undefined

Is there even a way to do this?

I have a scripted plugin derived from Material. I have several parameters of type #bitmap. I want to set them null their values, but I can’t; MaxScript just tells me the parameter takes bitmap type, got undefined. On top of all of this, I can’t just make a bitmap instance in memory and assign that because it wants me to save the damned thing to disk.

Any input on this one?

If it requires a bitmap value, can you just make a 1x1 pixel and pass that instead ?

undefinedBitmap = bitmap 1 1

[edit] oops looks like you tried.

Juts looked at an older script and realized how I solved that - with a temp bitmap file.


fn getUndefinedBitmap =(
	--filename uses the max temp folder
	undefinedBmpPath=(getdir #temp) + "\\undefined.bmp"
	
	--if it has not been made, make it
	if ( not doesfileexist undefinedBmpPath ) then (
		format "create file :%
" undefinedBmpPath
		undefinedBitmap = bitmap 1 1
		undefinedBitmap.Filename=undefinedBmpPath
		save undefinedBitmap
	) else (
		format "file exists :%
" undefinedBmpPath
	)
	--open the temp bitmap to a new bitmap object
	undefinedBitmap = openbitmap undefinedBmpPath
	undefinedBitmap
)

Sometimes I really hate how much one has to hack in 3DStudio.