Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-22 03:22:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-22 03:22:29 +0300
commit9e2ed891054ccdcea315259c0d4a11d57325762a (patch)
tree9b79a962eb28318a221d178ae06be9e641c5828f /release/scripts/op
parent6db600dddc213fd2fdbf917e1301b26c8fe4a362 (diff)
SSS presets, Thomas and I added these at the same time, however I meant to make this a more general system.
this commit shows how to add a preset using the base preset class and menu with minimal effort.
Diffstat (limited to 'release/scripts/op')
-rw-r--r--release/scripts/op/presets.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/release/scripts/op/presets.py b/release/scripts/op/presets.py
index 8198cbde820..71044956816 100644
--- a/release/scripts/op/presets.py
+++ b/release/scripts/op/presets.py
@@ -25,7 +25,6 @@ from wm import AddPresetBase
class AddPresetRender(AddPresetBase):
bl_idname = "render.preset_add"
bl_label = "Add Render Preset"
-
name = AddPresetBase.name
preset_values = [
@@ -41,6 +40,30 @@ class AddPresetRender(AddPresetBase):
preset_path = os.path.join("presets", "render")
+class AddPresetSSS(AddPresetBase):
+ bl_idname = "material.sss_preset_add"
+ bl_label = "Add Render Preset"
+ name = AddPresetBase.name
+
+ preset_values = [
+ "bpy.context.material.subsurface_scattering.back",
+ "bpy.context.material.subsurface_scattering.color[0]",
+ "bpy.context.material.subsurface_scattering.color[1]",
+ "bpy.context.material.subsurface_scattering.color[2]",
+ "bpy.context.material.subsurface_scattering.color_factor",
+ "bpy.context.material.subsurface_scattering.error_tolerance",
+ "bpy.context.material.subsurface_scattering.front",
+ "bpy.context.material.subsurface_scattering.ior",
+ "bpy.context.material.subsurface_scattering.radius[0]",
+ "bpy.context.material.subsurface_scattering.radius[1]",
+ "bpy.context.material.subsurface_scattering.radius[2]",
+ "bpy.context.material.subsurface_scattering.scale",
+ "bpy.context.material.subsurface_scattering.texture_factor",
+ ]
+
+ preset_path = os.path.join("presets", "sss")
+
bpy.ops.add(AddPresetRender)
+bpy.ops.add(AddPresetSSS)