File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
exporter/SynthesisFusionAddin/src/Parser/SynthesisParser Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -210,13 +210,16 @@ def getMaterialAppearance(
210
210
211
211
if matModelType == 0 :
212
212
baseColor = properties .itemById ("opaque_albedo" ).value
213
- baseColor .opacity = 255
213
+ if baseColor :
214
+ baseColor .opacity = 255
214
215
elif matModelType == 1 :
215
216
baseColor = properties .itemById ("metal_f0" ).value
216
- baseColor .opacity = 255
217
+ if baseColor :
218
+ baseColor .opacity = 255
217
219
elif matModelType == 2 :
218
220
baseColor = properties .itemById ("layered_diffuse" ).value
219
- baseColor .opacity = 255
221
+ if baseColor :
222
+ baseColor .opacity = 255
220
223
elif matModelType == 3 :
221
224
baseColor = properties .itemById ("transparent_color" ).value
222
225
transparent_distance = properties .itemById ("transparent_distance" ).value
@@ -228,7 +231,9 @@ def getMaterialAppearance(
228
231
opac = 255
229
232
elif opac < 0 :
230
233
opac = 0
231
- baseColor .opacity = int (round (opac ))
234
+
235
+ if baseColor :
236
+ baseColor .opacity = int (round (opac ))
232
237
233
238
if baseColor :
234
239
color .R = baseColor .red
You can’t perform that action at this time.
0 commit comments