forked from KeyToon9/bl_mats_copy_ue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode_map.py
167 lines (166 loc) · 7.89 KB
/
node_map.py
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
NodeClassMap = {
"REROUTE" : "/Script/Engine.MaterialExpressionReroute",
# Constant
"VALUE" : "/Script/Engine.MaterialExpressionConstant",
"RGB" : "/Script/Engine.MaterialExpressionConstant3Vector",
"RGBA" : "/Script/Engine.MaterialExpressionConstant4Vector",
"VECTOR" : "/Script/Engine.MaterialExpressionConstant3Vector",
"VECT_TRANSFORM" : "/Script/Engine.MaterialExpressionTransform",
"_POINT_TRANSFORM" : "/Script/Engine.MaterialExpressionTransformPosition",
# Input
"UVMAP" : "/Script/Engine.MaterialExpressionTextureCoordinate",
"VERTEX_COLOR" : "/Script/Engine.MaterialExpressionVertexColor",
"OBJECT_INFO" : "/Script/Engine.MaterialExpressionObjectPositionWS",
"CAMERA" : "/Script/Engine.MaterialExpressionCameraVectorWS",
"_CAMERA_DEPTH" : "/Script/Engine.MaterialExpressionPixelDepth",
"FRESNEL" : "/Script/Engine.MaterialExpressionCustom",
"_NORMALWS" : "/Script/Engine.MaterialExpressionPixelNormalWS",
"_CAMVECWS" : "/Script/Engine.MaterialExpressionCameraVectorWS",
# Texture coordinate
"TEX_COORD" : "/Script/Engine.MaterialExpressionTextureCoordinate",
"_NORMALOS" : "/Script/Engine.MaterialExpressionPixelNormalWS",
"_UV" : "/Script/Engine.MaterialExpressionTextureCoordinate",
"_OBJ_POS" : "/Script/Engine.MaterialExpressionWorldPosition",
"_CAM_POS" : "/Script/Engine.MaterialExpressionWorldPosition",
"_WIN_POS" : "/Script/Engine.MaterialExpressionScreenPosition",
# Geometry
"NEW_GEOMETRY" : "/Script/Engine.MaterialExpressionWorldPosition",
"_NORMALWS" : "/Script/Engine.MaterialExpressionPixelNormalWS",
"_TANGENTWS" : "/Script/Engine.MaterialExpressionVertexTangentWS",
"_VERTEX_NORMAlWS" : "/Script/Engine.MaterialExpressionVertexNormalWS",
"_INCOMMING" : "/Script/Engine.MaterialExpressionCustom",
"_CAMERA_POS" : "/Script/Engine.MaterialExpressionCameraPositionWS",
# Mix
"MIX_RGB" : "/Script/Engine.MaterialExpressionCustom",
# Combine
"COMBXYZ" : "/Script/Engine.MaterialExpressionMaterialFunctionCall",
"COMBRGB" : "/Script/Engine.MaterialExpressionMaterialFunctionCall",
# Separate
"SEPXYZ" : "/Script/Engine.MaterialExpressionMaterialFunctionCall",
"SEPRGB" : "/Script/Engine.MaterialExpressionMaterialFunctionCall",
"GAMMA" : "/Script/Engine.MaterialExpressionPower",
# Math Node Two Input
"ADD" : "/Script/Engine.MaterialExpressionAdd",
"SUBTRACT" : "/Script/Engine.MaterialExpressionSubtract",
"MULTIPLY" : "/Script/Engine.MaterialExpressionMultiply",
"DIVIDE" : "/Script/Engine.MaterialExpressionDivide",
"POWER" : "/Script/Engine.MaterialExpressionPower",
"MINIMUM" : "/Script/Engine.MaterialExpressionMin",
"MAXIMUM" : "/Script/Engine.MaterialExpressionMax",
"MODULO" : "/Script/Engine.MaterialExpressionFmod",
"ARCTAN2" : "/Script/Engine.MaterialExpressionArctangent2Fast",
"LESS_THAN" : "/Script/Engine.MaterialExpressionCustom",
"GREATER_THAN" : "/Script/Engine.MaterialExpressionCustom",
# Math Node One Input
"SQRT" : "/Script/Engine.MaterialExpressionSquareRoot",
"ABSOLUTE" : "/Script/Engine.MaterialExpressionAbs",
"ROUND" : "/Script/Engine.MaterialExpressionRound",
"FLOOR" : "/Script/Engine.MaterialExpressionFloor",
"CEIL" : "/Script/Engine.MaterialExpressionCeil",
"FRACT" : "/Script/Engine.MaterialExpressionFrac",
"SINE" : "/Script/Engine.MaterialExpressionSine",
"COSINE" : "/Script/Engine.MaterialExpressionCosine",
"TANGENT" : "/Script/Engine.MaterialExpressionTangent",
"ARCSINE" : "/Script/Engine.MaterialExpressionArcsineFast",
'ARCCOSINE': "/Script/Engine.MaterialExpressionArccosineFast",
"ARCTANGENT" : "/Script/Engine.MaterialExpressionArctangentFast",
"SIGN" : "/Script/Engine.MaterialExpressionSign",
"TRUNC" : "/Script/Engine.MaterialExpressionTruncate",
# Vector Math Two Input
"CROSS_PRODUCT" : "/Script/Engine.MaterialExpressionCrossProduct",
"DOT_PRODUCT": "/Script/Engine.MaterialExpressionDotProduct",
"DISTANCE" : "/Script/Engine.MaterialExpressionDistance",
"SCALE" : "/Script/Engine.MaterialExpressionMultiply",
# Vector Math One Input
"NORMALIZE" : "/Script/Engine.MaterialExpressionNormalize",
"LENGTH" : "/Script/Engine.MaterialExpressionDistance",
# Converter
"BLACKBODY" : "/Script/Engine.MaterialExpressionBlackBody",
"RGBTOBW" : "/Script/Engine.MaterialExpressionCustom",
"CLAMP" : "/Script/Engine.MaterialExpressionClamp",
# Vector
"MAPPING" : "/Script/Engine.MaterialExpressionCustom",
}
NodeNameMap = {
"REROUTE" : "MaterialExpressionReroute",
# Constant
"VALUE" : "MaterialExpressionConstant",
"RGB" : "MaterialExpressionConstant3Vector",
"RGBA" : "MaterialExpressionConstant4Vector",
"VECTOR" : "MaterialExpressionConstant3Vector",
"VECT_TRANSFORM" : "MaterialExpressionTransform",
"_POINT_TRANSFORM" : "MaterialExpressionTransformPosition",
# Input
"UVMAP" : "MaterialExpressionTextureCoordinate",
"VERTEX_COLOR" : "MaterialExpressionVertexColor",
"OBJECT_INFO" : "MaterialExpressionObjectPositionWS",
"CAMERA" : "MaterialExpressionCameraVectorWS",
"_CAMERA_DEPTH" : "MaterialExpressionPixelDepth",
"FRESNEL" : "MaterialExpressionCustom",
"_NORMALWS" : "MaterialExpressionPixelNormalWS",
"_CAMVECWS" : "MaterialExpressionCameraVectorWS",
# Texture coordinate
"TEX_COORD" : "MaterialExpressionTextureCoordinate",
"_NORMALOS" : "MaterialExpressionPixelNormalWS",
"_UV" : "MaterialExpressionTextureCoordinate",
"_OBJ_POS" : "MaterialExpressionWorldPosition",
"_CAM_POS" : "MaterialExpressionWorldPosition",
"_WIN_POS" : "MaterialExpressionScreenPosition",
# Geometry
"NEW_GEOMETRY" : "MaterialExpressionWorldPosition",
#"_NORMALWS" : "MaterialExpressionPixelNormalWS",
"_TANGENTWS" : "MaterialExpressionVertexTangentWS",
"_VERTEX_NORMAlWS" : "MaterialExpressionVertexNormalWS",
"_INCOMMING" : "MaterialExpressionCustom",
"_CAMERA_POS" : "MaterialExpressionCameraPositionWS",
# Mix
"MIX_RGB" : "MaterialExpressionCustom",
# Combine
"COMBXYZ" : "MaterialExpressionMaterialFunctionCall",
"COMBRGB" : "MaterialExpressionMaterialFunctionCall",
# Separate
"SEPXYZ" : "MaterialExpressionMaterialFunctionCall",
"SEPRGB" : "MaterialExpressionMaterialFunctionCall",
"GAMMA" : "MaterialExpressionPower",
# Math Node Two Input
"ADD" : "MaterialExpressionAdd",
"SUBTRACT" : "MaterialExpressionSubtract",
"MULTIPLY" : "MaterialExpressionMultiply",
"DIVIDE" : "MaterialExpressionDivide",
"POWER" : "MaterialExpressionPower",
"MINIMUM" : "MaterialExpressionMin",
"MAXIMUM" : "MaterialExpressionMax",
"MODULO" : "MaterialExpressionFmod",
"ARCTAN2" : "MaterialExpressionArctangent2Fast",
"LESS_THAN" : "MaterialExpressionCustom",
"GREATER_THAN" : "MaterialExpressionCustom",
# Math Node One Input
"SQRT": "MaterialExpressionSquareRoot",
"ABSOLUTE": "MaterialExpressionAbs",
"ROUND": "MaterialExpressionRound",
"FLOOR": "MaterialExpressionFloor",
"CEIL": "MaterialExpressionCeil",
"FRACT": "MaterialExpressionFrac",
"SINE": "MaterialExpressionSine",
"COSINE": "MaterialExpressionCosine",
"TANGENT": "MaterialExpressionTangent",
"ARCSINE": "MaterialExpressionArcsineFast",
"ARCCOSINE": "MaterialExpressionArccosineFast",
"ARCTANGENT": "MaterialExpressionArctangentFast",
"SIGN": "MaterialExpressionSign",
"TRUNC": "MaterialExpressionTruncate",
# Vector Math Two Input
"CROSS_PRODUCT" : "MaterialExpressionCrossProduct",
"DOT_PRODUCT": "MaterialExpressionDotProduct",
"DISTANCE" : "MaterialExpressionDistance",
"SCALE" : "MaterialExpressionMultiply",
# Vector Math One Input
"NORMALIZE" : "MaterialExpressionNormalize",
"LENGTH" : "MaterialExpressionDistance",
# Converter
"BLACKBODY" : "MaterialExpressionBlackBody",
"RGBTOBW" : "MaterialExpressionCustom",
"CLAMP" : "MaterialExpressionClamp",
# Vector
"MAPPING" : "MaterialExpressionCustom",
}