modified fix for commits r33811, 33812.
[blender.git] / release / scripts / presets / sss / chicken.py
index 1891ef95555a616f03da25bfc03a38f9bdabe666..9acc2f3e25f99f8bc2967f66cd1438af32b3075c 100644 (file)
@@ -1,3 +1,5 @@
 import bpy
-bpy.context.active_object.active_node_material.subsurface_scattering.radius = 9.436, 3.348, 1.790
-bpy.context.active_object.active_node_material.subsurface_scattering.color = 0.439, 0.216, 0.141
+material = (bpy.context.material.active_node_material if bpy.context.material.active_node_material else bpy.context.material)
+
+material.subsurface_scattering.radius = 9.436, 3.348, 1.790
+material.subsurface_scattering.color = 0.439, 0.216, 0.141