modified fix for commits r33811, 33812.
[blender.git] / release / scripts / presets / sss / potato.py
index 3610c16198fbe832987802bd3ac246aa08c59588..74807014bd3cb1fb14a2544ab2a3a3dd39f60185 100644 (file)
@@ -1,3 +1,5 @@
 import bpy
-bpy.context.active_object.active_node_material.subsurface_scattering.radius = 14.266, 7.228, 2.036
-bpy.context.active_object.active_node_material.subsurface_scattering.color = 0.855, 0.740, 0.292
+material = (bpy.context.material.active_node_material if bpy.context.material.active_node_material else bpy.context.material)
+
+material.subsurface_scattering.radius = 14.266, 7.228, 2.036
+material.subsurface_scattering.color = 0.855, 0.740, 0.292