Lights: change sun light size to be specified as angle
This is the angular diameter as seen from earth, which is between 0.526° and 0.545° in reality. Sharing the size with other light types did not make much sense and meant the unit was unclear. Differential Revision: https://developer.blender.org/D4819
This commit is contained in:
@@ -3418,5 +3418,12 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
||||
LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) {
|
||||
arm->flag &= ~(ARM_FLAG_UNUSED_7 | ARM_FLAG_UNUSED_9);
|
||||
}
|
||||
|
||||
/* Initializes sun lights with the new angular diameter property */
|
||||
if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "sun_angle")) {
|
||||
LISTBASE_FOREACH (Light *, light, &bmain->lights) {
|
||||
light->sun_angle = 2.0f * atanf(light->area_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user