modified fix for commits r33811, 33812.
[blender.git] / release / scripts / presets / sss / ketchup.py
index d56746762823243528ad171c3297bac6a1a49a97..b94c7cced276b6cbf781f09810e427153a27cfed 100644 (file)
@@ -1,3 +1,5 @@
 import bpy
-bpy.context.active_object.active_node_material.subsurface_scattering.radius = 4.762, 0.575, 0.394
-bpy.context.active_object.active_node_material.subsurface_scattering.color = 0.222, 0.008, 0.002
+material = (bpy.context.material.active_node_material if bpy.context.material.active_node_material else bpy.context.material)
+
+material.subsurface_scattering.radius = 4.762, 0.575, 0.394
+material.subsurface_scattering.color = 0.222, 0.008, 0.002