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:
authorThomas Dinges <blender@dingto.org>2014-09-07 17:26:12 +0400
committerThomas Dinges <blender@dingto.org>2014-09-07 17:26:24 +0400
commit7b12c569d4964e523c28a508625b8f62f63f7f26 (patch)
tree1c484a8fbacabac67ec954b472af628750c38813
parent28cce475f2c7ff0e9d367b8a9fd9662336dadb4b (diff)
Some updates for Quick Smoke / Cycles.
* Add Density multiplier. * Use Smoke color attribute. Patch by Gottfried Hofmann, with some small tweaks by myself. Differential revision: https://developer.blender.org/D776
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index 79e681128d6..86cab3be9b3 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -405,15 +405,32 @@ class QuickSmoke(Operator):
node_absorption.location = grid_location(3, 2)
links.new(node_absorption.outputs["Volume"],
node_add_shader_2.inputs[1])
+
+ # Density Multiplier
+ node_densmult = nodes.new(type='ShaderNodeMath')
+ node_densmult.location = grid_location(2, 2)
+ node_densmult.operation = 'MULTIPLY'
+ node_densmult.inputs[1].default_value = 5.0
+ links.new(node_densmult.outputs["Value"],
+ node_scatter.inputs["Density"])
+ links.new(node_densmult.outputs["Value"],
+ node_absorption.inputs["Density"])
# Attribute "density"
node_attrib_density = nodes.new(type='ShaderNodeAttribute')
node_attrib_density.attribute_name = "density"
- node_attrib_density.location = grid_location(2, 2)
+ node_attrib_density.location = grid_location(1, 2)
links.new(node_attrib_density.outputs["Fac"],
- node_scatter.inputs["Density"])
- links.new(node_attrib_density.outputs["Fac"],
- node_absorption.inputs["Density"])
+ node_densmult.inputs[0])
+
+ # Attribute "color"
+ node_attrib_color = nodes.new(type='ShaderNodeAttribute')
+ node_attrib_color.attribute_name = "color"
+ node_attrib_color.location = grid_location(2, 3)
+ links.new(node_attrib_color.outputs["Color"],
+ node_scatter.inputs["Color"])
+ links.new(node_attrib_color.outputs["Color"],
+ node_absorption.inputs["Color"])
# Fire