Set Bitmap = undefined


#1

Hi guys,

is there a way to set a bitmap value e.g. in a Bitmaptexture to undefined?

Cheers,
Andreas


#2

i get it can you explane what you really want


#3

Hi Hogobingo,

thanks for the quick reply. What I try is this:

s = DirectX_9_Shader:DirectX_9_Shader
s.effectfile = “$maps\fx\standardfx.fx”
s.g_toptexture = openbitmap “…”
.
.
.
s.g_toptexture = undefined


#4

how about:
s.g_toptexture = “”


#5

bitmap.filename = “”

example:


meditMaterials[1].diffuseMap.fileName = ""

-Dave


#6

you right dave it’s make a file of but it’s still bitmap used and it dosn’t work with dxshader
it’s look like a fake bitmap in standerd material we can make diffuse = undefined and bitmap will be a none but we can’t make diffuse texture = undifine…
i try to copy texture from new materiel haven’t texture to this material…

f = DirectX_9_Shader()--:
f.effectfile = "$maps\\fx\\standardfx.fx"
--f.g_TopTexture = undefined
$.material.g_TopTexture = f.g_TopTexture 

but it’s wrong

i think the right way is copy every thing to new materiel without the texture we don’t want any replace the new one to the other it’e a long way but i think it’s right


#7

When things like this pop up, I use some standard methods to recreate the map.

You could do something like this using:

getPropNames
getProperty

For instance:

–say the bitmap texturemap is stored in the variable theOldMap


theNewMap = bitmapTexture()

props = getPropNames theOldMap

for i in props where (i != #bitmap) and (i != #filename) do
(
	setProperty theNewMap i (getProperty theOldMap i)
)	 

It’s a simple way to recreate the map without the bitmap property. Less error prone than doing it manually. Just a thought.

-Dave


#8

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.