ozioz
05-08-2007, 11:02 AM
Hi Guys;
I need some advices and help for a script.. Here it is:
------------------------------------------------------------------
fn showMatInViewport mat =
(
if (mat != undefined) do
(
--this works for all materials
mat.showinviewport = true
--but there could also be the show in viewport of just the bitmaps..
--so if it was a standard material
if classof mat == Standardmaterial then
(
-- then we use the .diffusemap object of the material
if (mat.diffusemap != undefined) then showTextureMap mat mat.diffusemap on
)
--if it wasn't a standard material, check if its a vraymaterial
else if classof mat == Vraymtl then
(
--and then we try and shut off the .texmap_diffuse map
if (mat.texmap_diffuse != undefined) then showTextureMap mat mat.texmap_diffuse on
)
)
)--end function
-- teh script
sel = selection as array
for n = 1 to sel.count do
(
if classof sel[n].material == Multimaterial then
(
for i in 1 to sel[n].material.numsubs do
(
showMatInViewport sel[n].material.materiallist[i]
)
)
else
(
showMatInViewport sel[n].material
)
)
All I wanna do is just removing all the textures that are displayed in the viweport. Unfortunately there are many objects and many differenet bitmaps. So I do not want to try turning off "Show Bitmap on Viweport" option for every single metarial. It would be a nightmare I think. I have to remove the textures from the viewport.. ıt was a mistake to show them but I have done. I always run into memory problems while rendering. ( Textures are too big and have a resalution 2k - 2048/2048 ) Vray always goes crazy...
I have found that little script . But It did not work. It turns on the option. That is not What I wanna achive..
I hope I have been able to explain What I mean.. Could you please do something for me if it is possible?? I cannot use MAXScript. One of the guys in the forum offered me to fill you in about the situation I have..
Best Regards;
Ozioz.
I need some advices and help for a script.. Here it is:
------------------------------------------------------------------
fn showMatInViewport mat =
(
if (mat != undefined) do
(
--this works for all materials
mat.showinviewport = true
--but there could also be the show in viewport of just the bitmaps..
--so if it was a standard material
if classof mat == Standardmaterial then
(
-- then we use the .diffusemap object of the material
if (mat.diffusemap != undefined) then showTextureMap mat mat.diffusemap on
)
--if it wasn't a standard material, check if its a vraymaterial
else if classof mat == Vraymtl then
(
--and then we try and shut off the .texmap_diffuse map
if (mat.texmap_diffuse != undefined) then showTextureMap mat mat.texmap_diffuse on
)
)
)--end function
-- teh script
sel = selection as array
for n = 1 to sel.count do
(
if classof sel[n].material == Multimaterial then
(
for i in 1 to sel[n].material.numsubs do
(
showMatInViewport sel[n].material.materiallist[i]
)
)
else
(
showMatInViewport sel[n].material
)
)
All I wanna do is just removing all the textures that are displayed in the viweport. Unfortunately there are many objects and many differenet bitmaps. So I do not want to try turning off "Show Bitmap on Viweport" option for every single metarial. It would be a nightmare I think. I have to remove the textures from the viewport.. ıt was a mistake to show them but I have done. I always run into memory problems while rendering. ( Textures are too big and have a resalution 2k - 2048/2048 ) Vray always goes crazy...
I have found that little script . But It did not work. It turns on the option. That is not What I wanna achive..
I hope I have been able to explain What I mean.. Could you please do something for me if it is possible?? I cannot use MAXScript. One of the guys in the forum offered me to fill you in about the situation I have..
Best Regards;
Ozioz.
