-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfindBadNormalMaps.ms
More file actions
62 lines (56 loc) · 1.25 KB
/
findBadNormalMaps.ms
File metadata and controls
62 lines (56 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
(
fn findNM mat =
(
print (classof mat)
if (classof mat == VRayMtl) then
(
print mat.name
if classof mat.texmap_bump == Normal_Bump then
(
local newtex = VrayNormalMap()
newtex.normal_map = mat.texmap_bump.normal_map
mat.texmap_bump = newtex
print "found"
)
)
else if (classof mat == MultiMaterial ) then
(
--print (classof mat)
for i = 1 to mat.numsubs do
(
print ( "searching " + ((classof mat) as string) + " number of subs " + (mat.numsubs) as string)
findNM mat[i]
)
)
else if (classof mat == VrayBlendMtl) then
(
--print (classof mat)
for i = 1 to mat.numsubs do
(
--print ( "searching " + ((classof mat) as string) + " number of subs " + (mat.numsubs) as string)
findNM mat[i].value
)
)
)
local sm = sceneMaterials
/*
for m in sm where classof m == VRayMtl do
(
if classof m.texmap_bump == VrayNormalMap then
(
if classof m.texmap_bump.normal_map == Normal_Bump then
(
if classof m.texmap_bump.normal_map.normal_map == Bitmaptexture then
(
m.texmap_bump.normal_map = m.texmap_bump.normal_map.normal_map
)
)
)
)
*/
for m in sm do
(
--print m.name
findNM m
)
)