[Closed] Set Bitmap = undefined
Hi guys,
is there a way to set a bitmap value e.g. in a Bitmaptexture to undefined?
Cheers,
Andreas
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
bitmap.filename = “”
example:
meditMaterials[1].diffuseMap.fileName = ""
-Dave
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
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