Colors should be defined before being associated to a material. If a material is assigned a color that is not defined, the parser should log a message and exit immediately.
The best place to fix this might be at the scene level. When a call is made to Scene#get_color(), if the color does not exist, the program should log an error and call exit_mbrt(). This might affect some materials as they use "working" colors that are not defined in the scene. These tend to start with leading underscore(s), so that may be the best way to guard against unneeded terminations. In this case, we shouldn't allow scenes to use leading underscore(s) in their colors to maintain safety.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1876946
Originator: YES
The best place to fix this might be at the scene level. When a call is made to Scene#get_color(), if the color does not exist, the program should log an error and call exit_mbrt(). This might affect some materials as they use "working" colors that are not defined in the scene. These tend to start with leading underscore(s), so that may be the best way to guard against unneeded terminations. In this case, we shouldn't allow scenes to use leading underscore(s) in their colors to maintain safety.