modified fix for commits r33811, 33812.
[blender.git] / release / scripts / presets / sss / apple.py
index 52ed4642ac6f58f7e5a96770791f08d017adbed8..c5f60ee509562da7c6dc55762a5b3c47dc1eaf0e 100644 (file)
@@ -1,3 +1,5 @@
 import bpy
-bpy.context.active_object.active_node_material.subsurface_scattering.radius = 11.605, 3.884, 1.754
-bpy.context.active_object.active_node_material.subsurface_scattering.color = 0.430, 0.210, 0.168
+material = (bpy.context.material.active_node_material if bpy.context.material.active_node_material else bpy.context.material)
+    
+material.subsurface_scattering.radius = 11.605, 3.884, 1.754
+material.subsurface_scattering.color = 0.430, 0.210, 0.168