542 |
|
load_geometry(dp, ezxml_child(wtl, "Material")); |
543 |
|
for (wld = ezxml_child(wtl, "WavelengthData"); |
544 |
|
wld != NULL; wld = wld->next) { |
545 |
< |
if (strcasecmp(ezxml_txt(ezxml_child(wld,"Wavelength")), "Visible")) |
545 |
> |
if (strcasecmp(ezxml_txt(ezxml_child(wld,"Wavelength")), |
546 |
> |
"Visible")) |
547 |
|
continue; |
548 |
< |
wdb = ezxml_child(wld, "WavelengthDataBlock"); |
549 |
< |
if (wdb == NULL) continue; |
550 |
< |
if (strcasecmp(ezxml_txt(ezxml_child(wdb,"WavelengthDataDirection")), |
548 |
> |
for (wdb = ezxml_child(wld, "WavelengthDataBlock"); |
549 |
> |
wdb != NULL; wdb = wdb->next) |
550 |
> |
if (!strcasecmp(ezxml_txt(ezxml_child(wdb, |
551 |
> |
"WavelengthDataDirection")), |
552 |
|
"Transmission Front")) |
553 |
< |
continue; |
554 |
< |
load_bsdf_data(dp, wdb); /* load front BTDF */ |
555 |
< |
break; /* ignore the rest */ |
553 |
> |
break; |
554 |
> |
if (wdb != NULL) { /* load front BTDF */ |
555 |
> |
load_bsdf_data(dp, wdb); |
556 |
> |
break; /* ignore the rest */ |
557 |
> |
} |
558 |
|
} |
559 |
|
ezxml_free(fl); /* done with XML file */ |
560 |
|
if (!check_bsdf_data(dp)) { |