Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/addon/version_update.py
| Context not available. | |||||
| scene.render.bake.use_pass_direct = False | scene.render.bake.use_pass_direct = False | ||||
| scene.render.bake.use_pass_indirect = False | scene.render.bake.use_pass_indirect = False | ||||
| def size_to_angular_diameter_conversion(light_size): | |||||
| """ | |||||
| Convert the light size to angular diameter | |||||
| """ | |||||
| return 2.0 * math.atan(light_size / 2.0) | |||||
| @persistent | @persistent | ||||
| def do_versions(self): | def do_versions(self): | ||||
| Context not available. | |||||
| if not clight.is_property_set("use_multiple_importance_sampling"): | if not clight.is_property_set("use_multiple_importance_sampling"): | ||||
| clight.use_multiple_importance_sampling = False | clight.use_multiple_importance_sampling = False | ||||
| if version < (2, 80, 0): | |||||
| clight = light.cycles | |||||
| if clight.type == 'SUN': | |||||
| clight.sun_angle = size_to_angular_diameter_conversion(clight.shadow_soft_size) | |||||
| # Worlds | # Worlds | ||||
| for world in bpy.data.worlds: | for world in bpy.data.worlds: | ||||
| if world.library not in libraries: | if world.library not in libraries: | ||||
| Context not available. | |||||