modified fix for commits r33811, 33812.
[blender.git] / release / scripts / presets / sss / cream.py
index c5e812ffd19158fb3ef237e6c1ca310a3082ad94..c03cc0243d949b05caaf475ec29923c6797e14b1 100644 (file)
@@ -1,3 +1,5 @@
 import bpy
-bpy.context.active_object.active_node_material.subsurface_scattering.radius = 15.028, 4.664, 2.541
-bpy.context.active_object.active_node_material.subsurface_scattering.color = 0.987, 0.943, 0.827
+material = (bpy.context.material.active_node_material if bpy.context.material.active_node_material else bpy.context.material)
+
+material.subsurface_scattering.radius = 15.028, 4.664, 2.541
+material.subsurface_scattering.color = 0.987, 0.943, 0.827