Hi,
Is it possible to display the diffuse texture or bump texture on the selected object(s)? if possible, how?
All answers are welcome :)
Forum topic · General Scripting
By tassel · 2012-12-02
Hi,
Is it possible to display the diffuse texture or bump texture on the selected object(s)? if possible, how?
All answers are welcome :)
tassel · 2012-12-03
Thank you barigazy.
i will look into it when i have some spare time. ;)
barigazy · 2012-12-03
this function will help you to toggle "showMaps" on or off in viewport
fn showInViewportOnOff =
(
local mtlTypeArr = #(Multimaterial, Standardmaterial, Arch___Design__mi, VRayMtl) --fR_Advanced and fR_Architectural not have this property
local state = if selection.count != 0 then selection else objects
for o in state where o.material != null do
(
mat = o.material, idx = (finditem mtlTypeArr (classOf mat))
case of (
(idx > 1): (mat.showInViewport = not mat.showInViewport)
(idx == 1): (for m in mat.materialList where ((finditem mtlTypeArr (classOf m)) > 1) do (m.showInViewport = not m.showInViewport))
)
)
)
also see this thread
http://forums.cgsociety.org/showthread.php?f=98&t=298391&highlight=showi…